SWITCH OVER
1. SELECT SWITCHOVER_STATUS FROM V$DATABASE;
SWITCHOVER_STATUS
-----------------
TO STANDBY
1 row selected
2. ALTER DATABASE COMMIT TO SWITCHOVER TO PHYSICAL STANDBY;
3. SHUTDOWN IMMEDIATE;
STARTUP MOUNT;
4. SELECT SWITCHOVER_STATUS FROM V$DATABASE;
SWITCHOVER_STATUS
------------
TO_PRIAMRY
5. at standby ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY;
6. alter database open [if db opened read only since last time it was started]
else shutdown and restart
7. ALTER SYSTEM SWITCH LOGFILE;
FAILOVER
First resolve gap:
A) Identify and resolve any gaps in the archived redo log files.
SQL> SELECT THREAD#, LOW_SEQUENCE#, HIGH_SEQUENCE# FROM V$ARCHIVE_GAP;
THREAD# LOW_SEQUENCE# HIGH_SEQUENCE#
---------- ------------- --------------
1 90 92
ALTER DATABASE REGISTER PHYSICAL LOGFILE 'filespec1';
B) Repeat A) until all gaps are resolved.
C) Copy any other missing archived redo log files.
SQL> SELECT UNIQUE THREAD# AS THREAD, MAX(SEQUENCE#)
2> OVER (PARTITION BY thread#) AS LAST from V$ARCHIVED_LOG;
THREAD LAST
---------- ----------
1 100
ALTER DATABASE REGISTER PHYSICAL LOGFILE 'filespec1';
now initiate failover at standby
1. ALTER DATABASE RECOVER MANAGED STANDBY DATABASE FINISH FORCE;
2. ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY;
3. alter database open [if db opened read only since last time it was started]
else shutdown and restart
No comments:
Post a Comment