Oracle Logical Standby 維護常用命令
// 執行跳過,跳過的結果在
execute dbms_logstdby.skip(stmt => 'DML',schema_name => '%', object_name => '%');
stmt的取值可以是:
http://download-west.oracle.com/docs/cd/B14117_01/appdev.101/b10802/d_lsbydb.htm#997290
// 跳過的內容記載在下面
select * from dba_logstdby_skip
// 停止apply
alter database stop logical standby apply;
alter database abort logical standby apply;
// 執行apply
alter database start logical standby apply;
// 實時apply
alter database start logical standby apply immediate;
// 跳過錯誤,在dba_logstdby_skip表中,ERROR列為Y
execute dbms_logstdby.skip_error('NON_SCHEMA_DDL');
// 執行apply,跳過失敗的事務
alter database start logical standby apply skip failed transaction;
// 設定引數,是否記錄跳過錯誤
exec dbms_logstdby.apply_set('RECORD_SKIP_ERRORS','FALSE');
// 設定引數,是否記錄跳過DDL
exec dbms_logstdby.apply_set('RECORD_SKIP_DDL','FALSE');
// 在備庫上關掉dataguard,備庫可寫
alter database guard none;
// 在備庫上啟用dataguard,備庫不可寫
alter database guard all;
// 官方文件
//執行某個表不透過,手工同步表
alter database stop logical standby apply;
// 建立DBLINK指向主庫,然後同步建立表
exec dbms_logstdby.instantiate_table('EYGLE','SALES','dblink_name');
alter database start logical standby apply;
// 手工新增備庫的日誌
$ cp /u01/arch/WENDING/1_22751_666200636.arc /u04/arch/WDSTD/log_1_22751_666200636.arc
SQL> alter database register logical logfile '/u04/arch/WDSTD/log_1_22751_666200636.arc';
or
SQL> alter database register or replace logical logfile '/u04/arch/WDSTD/log_1_22751_666200636.arc';
//檢視最後的進度
select LATEST_SCN,MINING_SCN,APPLIED_SCN,LATEST_TIME,MINING_TIME,APPLIED_TIME from V$LOGSTDBY_PROGRESS;
// 監控同步進度的指令碼
SELECT * FROM dba_logstdby_log;
select * from dba_logstdby_events order by event_time desc;
select LATEST_SCN,MINING_SCN,APPLIED_SCN,LATEST_TIME,MINING_TIME,APPLIED_TIME from V$LOGSTDBY_PROGRESS;
select LOGSTDBY_ID,type,status process_status from v$logstdby_process;
select * from v$logstdby_state;
select * from v$dataguard_status order by timestamp desc;
// 增加apply的程式數
ALTER DATABASE STOP LOGICAL STANDBY APPLY; --- Stop SQL Apply
EXECUTE DBMS_LOGSTDBY.APPLY_SET('APPLY_SERVERS', 20); --- 調整apply程式數為20,預設為5個
ALTER DATABASE START LOGICAL STANDBY APPLY IMMEDIATE; --- Start real-time Apply
// 停止apply時,如果當前正在應用,會等待執行後才停止
// 下面的命令可以重複執行,如果執行提示stop,則意味著正在apply還沒有結束,等結束後重新執行即可
ALTER DATABASE START LOGICAL STANDBY APPLY;
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/789833/viewspace-1045779/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- Logical Standby的維護操作_SKIP
- [zt] Logical standby維護命令手冊
- Oracle Standby系統管理與維護Oracle
- Oracle DG建立Logical Standby DatabaseOracleDatabase
- 建立Oracle 11g logical standbyOracle
- Oracle10g logical standby 建立Oracle
- Create Logical Standby For Oracle 10GOracle 10g
- Oracle10gR2 Logical Standby (zt)Oracle
- oracle 10g logical standby db creationOracle 10g
- 物理standby database的日常維護Database
- standby維護命令手冊(轉)
- 建立 Logical Standby DatabaseDatabase
- manage logical standby databaseDatabase
- DataGuard:Logical Standby Switchover
- mysql維護常用命令MySql
- 配置 Oracle 10g RAC primary + RAC logical standbyOracle 10g
- oracle LOGICAL standby ORA-04030: out of process memoryOracle
- Oracle 9i R2 配置 Logical StandbyOracle
- DataGuard:Logical Standby FailoverAI
- 監控Logical standby databaseDatabase
- Oracle 9i Logical Standby與Physical standby歸檔恢復區別Oracle
- oracle10g R2 logical standby switchover to primaryOracle
- oracle LOGICAL standby 日誌無法應用處理Oracle
- Oracle Data Gurad -- Logical Standby 相關說明Oracle
- nginx日常維護常用命令Nginx
- solaris 10維護常用命令
- oracle實驗記錄 (oracle 10G dataguard(11)建立logical standby)Oracle
- Oracle10g Logical Standby的開啟與關閉Oracle
- oracle9204(9i)_logical standby_ddl_relatedOracle
- 物理Standby資料庫及邏輯Standby資料庫(Physical Standby & Logical Standby)資料庫
- Logical Standby Database的配置步驟.Database
- Logical Standby中Job的處理
- [zt] Oracle如何配置邏輯備用資料庫(Logical Standby)Oracle資料庫
- Standby (Data guard) 常用維護命令及相關概念
- 建立Data guard logical standby database須知Database
- [江楓]In Memory Undo與logical standby databaseDatabase
- oracle goldengate維護OracleGo
- Oracle RAC 日常維護Oracle