使用dbms_logmnr.no_rowid_in_stmt
SQL> exec dbms_logmnr.add_logfile('D:ORACLEORADATAP10GONLINELOGO1_MF_3_3YY73S04_.LOG');
PL/SQL 过程已成功完成。
SQL> exec dbms_logmnr.start_logmnr(options=>dbms_logmnr.dict_from_online_catalog);
PL/SQL 过程已成功完成。
SQL> select sql_undo from v$logmnr_contents where dbms_logmnr.column_present(redo_value,'XHUSER.CLOB_TEST.ID')=1;
SQL_UNDO
--------------------------------------------------------------------------------
delete from "XHUSER"."CLOB_TEST" where "ID" = '1' and ROWID = 'AAAAAAAAAAAAAAAAAA';
SQL> exec dbms_logmnr.start_logmnr(options=>dbms_logmnr.dict_from_online_catalog+dbms_logmnr.no_rowid_in_stmt);
PL/SQL 过程已成功完成。
SQL> select sql_undo from v$logmnr_contents where dbms_logmnr.column_present(redo_value,'XHUSER.CLOB_TEST.ID')=1;
SQL_UNDO
--------------------------------------------------------------------------------
delete from "XHUSER"."CLOB_TEST" where "ID" = '1';
--转自