為物理備庫新增standby logfile group相關事則

wisdomone1發表於2010-01-19
1,為了理解physical standby db,在其上新增standby logfile group,
 
SQL> alter database add standby logfile group 4 ('/oracle/oradata/centos/redo04') size 50m;
alter database add standby logfile group 4 ('/oracle/oradata/centos/redo04') size 50m
*
ERROR at line 1:
ORA-01156: recovery in progress may need access to files
--以上錯誤表明:此時備庫處於recover mode
2,取消備庫的recover狀態
SQL> alter database recover managed standby database cancel immediate;

Database altered.
3,再次重複1步驟,成功新增standby logfile group
SQL> alter database add standby logfile group 4 ('/oracle/oradata/centos/redo04') size 50m;

Database altered.

4,查詢新增的standby logfile group 資訊,可透過如下檢視
SQL> select group#,dbid,thread#,sequence#,bytes/1024/1024,archived,status from v$standby_log;  

    GROUP# DBID                                        THREAD#  SEQUENCE#
---------- ---------------------------------------- ---------- ----------
BYTES/1024/1024 ARC STATUS
--------------- --- ----------
         4 UNASSIGNED                                        0          0
             50 YES UNASSIGNED
(group#要全域性唯一,不能與v$log對應重複)

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

相關文章