Steps verify for Switchover Dataguard to physical standby

Steps verify for Switchover Dataguard to physical standby

Before Switchover the Dataguard in production Server. You need to check the value of switch over column in v$database.
If it having below value then you can go to switch over the primary to DR server. Following values means both Primary and DR are ready for switchover.

1. Verify the Switch over column value:

PRIM>select switchover_status from v$database ;

Switchover_Status
-----------------
TO Standby

STANDBY>select switchover_status from v$database ;

Switchover_Status
-----------------
TO PRIMARY

Note: If both parameter are in this stage then we have to do the switchover

Switchover status column values meaning as follows:
Not Allowed : from primary or Dr database either its not allowed to switch-over.
Session Active : means active SQL sessions attached to the primary or standby database that need to be disconnected before the switchover operation.
Switchover Pending : means switch-over request has been received but not processed.
Switchover Latent : means switch-over was in pending mode did not complete and went back to the primary database.
To Primary : From Standby Database means: no active sessions present which allowed to switch over to a primary database.
To Standby : From Primary Database means:no active sessions present which allowed to switch over to a standby database.
Recovery Needed : From Standby DB means, it has not received the switch-over request.

2. Verify the gap status

select status, gap_status from v$archive_dest_status where dest_id = 2;

STATUS GAP_STATUS
--------- ------------------------
VALID NO GAP

Note: If standby and primary have gap then resolved it first.

3. Check file location at both side in case of physical standby

select file_name from dba_data_files;
select file_name from dba_temp_files;

4. Check parameter value of archive destination.

show parameter log

5. If we found the value of switchover is SESSION ACTIVE then

select switchover_status from v$database;

SWITCHOVER_STATUS
--------------------
SESSIONS ACTIVE

-- Then use with session shutdown clause with switch over command.
PRIM>alter database commit to switchover to physical standby with session shutdown;
Standby>alter database commit to switchover to primary with session shutdown;

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.