Switchover:
Step 1:
SQL>alter database commit to switchover to physical standby with
Shut down and restart the primary instance(RED).
SQL>Shut immediate;
SQL> Startup mount;
Step 6 :
Verify the switchover status in the v$database view.
After we change the primary database to the physical standby role and the switchover notification is received by the standby databases in the configuration, we should verify if the switchover notification was processed by the target standby database by querying the " column of the v$database fixed view on the target standby database.
On Primary Database(prim)
SQL> select name,open_mode,db_unique_name,switchover_status from v$database.
NAME OPEN_MODE DB_UNIQUE_NAME SWITCHOVER_STATUS
------ ----------- -------------------- ----------------------
PRIM MOUNTED prim TO PRIMARY
On Old Standby Database(PRIM)
SQL> select name,open_mode,db_unique_name,switchover_status from v$database.
Important Notes :
The switchover_status column of v$database can have the following values:
Not Allowed:-Either this is a standby database and the primary database has not been switched first, or this is a primary database and there are no standby databases
Session Active:- Indicates that there are active SQL sessions attached to the primary or standby database that need to be disconnected before the switchover operation is permitted
Switchover Pending:- This is a standby database and the primary database switchover request has been received but not processed.
Switchover Latent:- The switchover was in pending mode, but did not complete and went back to the primary database
To Primary:- This is a standby database, with no active sessions, that is allowed to switch over to a primary database
To Standby:- This is a primary database, with no active sessions, that is allowed to switch over to a standby database
Recovery Needed:- This is a standby database that has not received the switchover request
No comments:
Post a Comment