Solutions:
On Primary
1.Restore archivelog From Tape Library
RMAN> RUN{
ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE';
set archivelog destination to '/ora102/archive/temp';
restore archivelog from logseq 8257 until logseq 8257;
RELEASE CHANNEL ch00;
}
2.Find startscn and endscn
SQL> select to_char(first_change#), to_char(next_change#) from v$archived_log where thread#=1 and sequence#=8257;
TO_CHAR(FIRST_CHANGE#)
----------------------------------------
TO_CHAR(NEXT_CHANGE#)
----------------------------------------
5974282330424
5974282469634
3.Logmnr archivelog
SQL> EXECUTE DBMS_LOGMNR.START_LOGMNR(startscn=>5974282330424,endscn=>5974282469634,OPTIONS => DBMS_LOGMNR.DICT_FROM_ONLINE_CATALOG+DBMS_LOGMNR.COMMITTED_DATA_ONLY +DBMS_LOGMNR.PRINT_PRETTY_SQL +DBMS_LOGMNR.CONTINUOUS_MINE);
4.查看可疑的sql
select sql_redo from v$logmnr_contents where xidusn=110 and xidslt=5 and xidsqn = 7560;
SQL_REDO
--------------------------------------------------------------------------------
"COMPONENT_QUANTITY" = 1 and
"COMPONENT_OPERATION_SEQ_NUM" = 40 and
"CREATE_TIME" = TO_DATE('20-SEP-10', 'DD-MON-RR') and
ROWID = 'AAAYBfABzAABv/lABN';
delete from "SMPERP"."SMP_BOM_EXPLOSION_TEMP"
where
"REQUEST_ID" = 1 and
"BOM_LEVEL" = 0 and
"TOP_ASSEMBLY_ITEM_ID" = 3373366 and
"ASSEMBLY_ITEM_ID" = 3373366 and
SQL_REDO
--------------------------------------------------------------------------------
"COMPONENT_ITEM_ID" = 3377384 and
"ORGANIZATION_ID" = 110 and
"ASSEMBLY_WIP_SUPPLY_TYPE" = 1 and
"COMPONENT_WIP_SUPPLY_TYPE" = 1 and
"COMPONENT_QUANTITY" = 1 and
"COMPONENT_OPERATION_SEQ_NUM" = 40 and
"CREATE_TIME" = TO_DATE('20-SEP-10', 'DD-MON-RR') and
ROWID = 'AAAYBfABzAABv/lABO';
5.以上存在问题的TABLE在备端不会用到,跳过这个table的ddl&dml操作。
exec dbms_logstdby.skip('SCHEMA_DDL','SMPERP','SMP_BOM_EXPLOSION_TEMP',NULL);
exec dbms_logstdby.skip('DML','SMPERP','SMP_BOM_EXPLOSION_TEMP',NULL);
6.Restart Logical standby apply
SQL> alter database start logical standby apply immediate;
参考网址:http://oracle.chinaitlab.com/backup/802898.html
http://dev.firnow.com/course/7_databases/oracle/oraclejs/2008515/116714_4.html
http://davis.bokee.com/254674.html
http://space.itpub.net/9338/viewspace-15390
http://www.sosdb.com/jdul/dispbbs.asp?boardID=1&ID=218
http://blog.chinaunix.net/u3/109532/showart_2212998.html
http://soaspx.com/dotnet/sql/oracle/oracle_20091122_1726.html
http://dev.firnow.com/course/7_databases/oracle/oraclejs/20100628/213454.html
http://unix-cd.com/vc/www/16/2009-02/13260.html
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/789833/viewspace-1038872/ ,如需转载,请注明出处,否则将追究法律责任。