Refer to previous posting creating-dataguard-physical-standby-in.html
Now for conducting switchover to secondary so that some maintenance may be carriedout on Primary follow the following steps
1) Ensure temporary files exist on the standby database that match the temporary files on the primary database
2) Chech the switchover status of both Primary and Standby using SELECT SWITCHOVER_STATUS FROM V$DATABASE;
3)Check the lags on all standbys using SELECT * FROM V$DATAGUARD_STATS; and choose the one which will require the minimum time for transition
4) If a standby database currently running in maximum protection mode will be involved in the failover, first place it in maximum performance mode by issuing the following statement on the standby database:
SQL> ALTER DATABASE SET STANDBY DATABASE TO MAXIMIZE PERFORMANCE;
5) Primary : ALTER DATABASE COMMIT TO SWITCHOVER TO PHYSICAL STANDBY;
6) Primary : SHUTDOWN IMMEDIATE;
7) Primary : STARTUP MOUNT; ---Now the former primary has become a standby
8) Standby : ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY;
9) Standby : ALTER DATABASE OPEN; if it was ever opened in readonly mode then SHUTDOWN IMMEDIATE & STARTUP
10)Check the log transport and apply by ALTER SYSTEM SWITCH LOGFILE; in new primary
The following steps are to be used for failover in case of problem in Primary database
1)check the archive log gaps SELECT THREAD#, LOW_SEQUENCE#, HIGH_SEQUENCE# FROM V$ARCHIVE_GAP;
2)The archive logs missing in the standby may be physically copied in standby file system and are to be registered using ALTER DATABASE REGISTER PHYSICAL LOGFILE 'filespec1'; Repeat until the above query returns no rows.
3)Initiate failover in standby
ALTER DATABASE RECOVER MANAGED STANDBY DATABASE FINISH FORCE;
4)Finish failover using ALTER DATABASE OPEN; if it was ever opened in readonly mode then SHUTDOWN IMMEDIATE & STARTUP
The target physical standby database has now undergone a transition to the primary database role while the previous Primary is no more a participant of Dataguard. It needs to be recreated from the current primary.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment