建立Oracle 11g logical standby

wenaini發表於2009-01-26
其實過程很簡單。。。。做過10g建立logical standby的同志看都不用看了,除了新增加一個ALTER DATABASE RECOVER TO LOGICAL STANDBY KEEP IDENTITY功能,它可以保證standby資料庫的DB_NAME 和 DBID不變化,從而方便進行rolling upgrade[@more@]

首先還是建立物理的standby,然後進行轉換,rac physical standby需要關閉除了apply節點以外的節點

prdb:

ALTER DATABASE SET STANDBY DATABASE TO MAXIMIZE PERFORMANCE;

lstdb:

ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
prdb:

EXECUTE DBMS_LOGSTDBY.BUILD;

ALTER SYSTEM ARCHIVE LOG CURRENT;

lstdb:

ALTER SYSTEM SET CLUSTER_DATABASE=FALSE SCOPE=SPFILE;
SHUTDOWN ABORT;
STARTUP MOUNT EXCLUSIVE;
ALTER DATABASE RECOVER TO LOGICAL STANDBY lstdb;
ALTER SYSTEM SET CLUSTER_DATABASE=TRUE SCOPE=SPFILE;
STARTUP MOUNT FORCE;
ALTER DATABASE OPEN RESETLOGS;
ALTER DATABASE START LOGICAL STANDBY APPLY;

這樣logical standby rac就建立好了,可以新增standby redo進行實時的apply:

ALTER DATABASE ADD STANDBY LOGFILE THREAD 1 GROUP 5 SIZE 50M,GROUP 6 SIZE 50M,GROUP 7 SIZE 50M;


ALTER DATABASE ADD STANDBY LOGFILE THREAD 2 GROUP 8 SIZE 50M,GROUP 9 SIZE 50M,GROUP 10 SIZE 50M;

ALTER DATABASE START LOGICAL STANDBY APPLY IMMEDIATE SKIP FAILED TRANSACTION;

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

相關文章