物理standby database的日常維護

yuanqc發表於2013-11-27

1. Check if they are in sync

primary:
alter system switch logfile;
select max(SEQUENCE#) from v$archived_log where applied='YES';
standby:
select max(SEQUENCE#) from v$archived_log where applied='YES';

2. Check if standby database are applying the log

SQL> select PROCESS,STATUS from v$managed_standby;


PROCESS                     STATUS
--------------------------- ------------------------------------
ARCH                        CLOSING
ARCH                        CONNECTED
ARCH                        CLOSING
ARCH                        CLOSING
RFS                         IDLE
RFS                         IDLE
RFS                         IDLE
MRP0                        APPLYING_LOG


8 rows selected.


3. Stop applying log

Alter database recovery managed standby database cancel;

4. Resume applying log

startup nomount;
alter database mount standby database;
alter database recover managed standby database disconnect from session; 
alter database recover managed standby database using current logfile disconnect from session;



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

相關文章