Switchover and Switchback in Oracle 11g

Share via:

Dear Readers,

In this article we will get to know how we can perform step by step Switchover and Switchback configuration in Oracle 11g.

Switchover: – A switchover is a technique through which the roles reversal is possible between the primary database and standby database. At the time of Switchover activity, the primary database becomes the standby database and vice-versa. In the whole activity, there is no data loss occur on both sides.

Let start’s the step by step Switchover and Switchback configuration in Oracle 11g.

Step 1:

First we will check the DB name, DB unique name, open_mode, database_role of both the servers.

Primary Side: –

Standby Side: –

Step 2:

Now switch the role of the primary database to the physical standby database. 

Command: – alter database commit to switchover to standby;

 

 

 

Step 3:

Now check the switchover status on the primary and the standby server.

Command: –

Now we can see from the above output our primary database role has been changed into physical standby, now we can open the database into read-only mode and start the MRP (managed recovery process) process as well.

When we start the MRP process than the status of the open_mode will change from READ ONLY to READ ONLY WITH APPLY, This is because MRP process is now ready to apply the archive log on the primary server side.

Step 4 :

Now we can switch the archives from standby side (Which is currently Primary) to the primary side (Which is currently standby).

Now we can check the same on the Primary server, whether the archives has been applied.

Output of the Primary Server: –

We can check from the above output that Archives has been successfully applied on the new physical standby server.

Let’s start the configuration of Switchback.

Step 5 :

To switchback the roles need to run the below command on the standby server.

Command to run on standby server: – alter database commit to switchover to standby;

Step 6 :

Now the roles have been changed again, at last, we can check the status of the Primary and Standby server whether the roles have been changed properly between them.

As we can check from the above output, roles have been changed successfully between the primary and the standby server.

This is the manual method of performing Switchover and Switchback in Oracle 11g. Oracle has a utility called DGMGRL though which this whole activity can run automatically through single command. In the next article we will understand how we can configure DGMGRL Utility.

Thank you for giving your valuable time to read the above information.
Follow us on 
Website  www.ktexperts.com
Facebook Page KTExperts Facebook
Linkedin Page : KT EXPERTS Linkedin

Share via:
Note: Please test scripts in Non Prod before trying in Production.
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

Add Comment