What is switch over status for data guard ?
1) Status on Primary database :
select switchover_status from v$database ;
SWITCHOVER_STATUS
--------------------
TO PRIMARY
2) Status on Standby database :
select switchover_status from v$database ;
SWITCHOVER_STATUS
--------------------
NOT ALLOWED
3) Status on Standby database : (After making Primary as a standby)
i.e.alter database commit to switchover to physical standby with session shutdown;
SQL> select database_role from v$database ;
DATABASE_ROLE
----------------
PHYSICAL STANDBY
4) Recovery status on standby:
Use : RECOVER MANAGED STANDBY DATABASE FINISH;
SQL> select switchover_status from v$database;
SWITCHOVER_STATUS
--------------------
RECOVERY NEEDED
Info for switchover_status column of v$database:
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.
1) Status on Primary database :
select switchover_status from v$database ;
SWITCHOVER_STATUS
--------------------
TO PRIMARY
2) Status on Standby database :
select switchover_status from v$database ;
SWITCHOVER_STATUS
--------------------
NOT ALLOWED
3) Status on Standby database : (After making Primary as a standby)
i.e.alter database commit to switchover to physical standby with session shutdown;
SQL> select database_role from v$database ;
DATABASE_ROLE
----------------
PHYSICAL STANDBY
4) Recovery status on standby:
Use : RECOVER MANAGED STANDBY DATABASE FINISH;
SQL> select switchover_status from v$database;
SWITCHOVER_STATUS
--------------------
RECOVERY NEEDED
Info for switchover_status column of v$database:
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