SKIP操作,注意顺序
a、停止日志应用
ALTER DATABASE STOP LOGICAL STANDBY APPLY;
b、skip相关操作
EXECUTE DBMS_LOGSTDBY.SKIP(stmt => 'DML', schema_name => 'SYSLOG', object_name => 'TU1', proc_name => null); #DML操作
EXECUTE DBMS_LOGSTDBY.SKIP(stmt => 'SCHEMA_DDL', schema_name => 'SCOTT', object_name => 'T', proc_name => null); #DDL操作
c、开启实时应用
alter database start logical standby apply immediate;
UNSIKP操作,注意顺序
a、创建DBLINK
create database link dblinktu connect to system identified by oracle using '192.168.0.149:1521/testdb';
b、停止日志应用
ALTER DATABASE STOP LOGICAL STANDBY APPLY;
c、执行UNSKIP和表初始化包
EXECUTE DBMS_LOGSTDBY.UNSKIP(stmt => 'DML', schema_name => 'SYSLOG', object_name => 'TU1');
EXECUTE DBMS_LOGSTDBY.UNSKIP(stmt => 'SCHEMA_DDL', schema_name => 'SCOTT', object_name => 'T', proc_name => null); #DDL操作
exec dbms_logstdby.instantiate_table('SYSLOG','TU1','TT');
d、开启日志应用
alter database start logical standby apply immediate;
One Response