处理过程:

 1.关闭apply

alter database stop logical standby apply;

停止不掉可以强制关闭

alter database abort logical standby apply;

 

2.排除表

EXEC DBMS_LOGSTDBY.SKIP('DML','ORADBCA','T_TRANSACTION_ORDER');

update system.logstdby$skip
set esc = '\'
where esc is NULL;
commit;

 

3.重新应用

alter database start logical standby apply immediate;

 

4.关闭应用

alter database stop logical standby apply;

 

5.把排除的表,重新恢复同步

EXEC DBMS_LOGSTDBY.UNSKIP('DML','ORADBCA','T_TRANSACTION_ORDER');

 

6.表初始化

exec dbms_logstdby.instantiate_table('ORADBCA','T_TRANSACTION_ORDER','Pridb');

 

7.起同步进程

alter database start logical standby apply immediate;

 

8.check check

 

 

–附检查sql

select * from V$LOGSTDBY_STATE;

select * from V$LOGSTDBY_STATS;

 

select * from V$LOGSTDBY_PROGRESS;

select * from V$LOGSTDBY_PROCESS;

 

 

select 'Logical standbydb delay '||(sysdate-lp.APPLIED_TIME)*24*3600||'s' delay from v$logstdby_progress lp,v$database d

where d.database_role= 'LOGICAL STANDBY';