邏輯備庫上有指定表不應用

linyu2012發表於2009-09-21

因有要求要在邏輯備庫上有指定表不應用,現做測試如下:

涉及到計費的表有:

charge_dtl

charge_group

charge_instr

charge_ref

cfs_tariff

liner_tariff

trk_tariff

一.前提條件,正常通訊的兩臺主備庫

查詢邏輯備庫上正在執行歸檔量

select sequence#,first_change#,next_change#,timestamp,applied from dba_logstdby_log order by sequence# ;

檢視主庫的歸檔量

Archive log list;

檢測是否備庫與主庫相同的歸檔量。

二.對於邏輯備庫上:

1.停止正在應用的程式

SQL> alter database stop logical standby apply;

Database altered.

2.執行要在備庫上應用跳過的表

SQL> execute dbms_logstdby.skip('DML','CTMS','CFS_TARIFF');

PL/SQL procedure successfully completed.

SQL> execute dbms_logstdby.skip('DML','CTMS','LINER_TARIFF');

PL/SQL procedure successfully completed.

SQL> execute dbms_logstdby.skip('DML','CTMS','TRK_TARIFF');

PL/SQL procedure successfully completed.

3.開啟邏輯應用

SQL> alter database start logical standby apply immediate;

Database altered.

4.查詢是否運用命令成功

SQL> select * from dba_logstdby_skip where owner='CTMS';

ERROR STATEMENT_OPT OWNER NAME USE_LIKE ESC PROC

------- --------------------- -------- ------------- ----------------------

N DML CTMS CFS_TARIFF Y

N DML CTMS LINER_TARIFF Y

N DML CTMS TRK_TARIFF Y

5.若要取消的話,

execute dbms_logstdby.unskip('DML','CTMS','LINER_TARIFF');

[@more@]

test

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/15242702/viewspace-1027180/,如需轉載,請註明出處,否則將追究法律責任。

相關文章