Manual Switchover Steps For DR
Manual Switchover Steps For DR
An oracle database can be in one of two mutually exclusive modes (primary or standby). These roles can be altered
at runtime without loss of data or resetting of redo logs. This process is known as a Switchover.
A graceful switchover is a planned role reversal between the primary and the standby databases. This is used when
there is a planned outage on the primary database. The switchover allows you to switch the roles of the databases
so that, the primary database transitions to a standby role, and the standby database transitions to the primary role.
The standby databases which now transitions to become a “new” primary database and will serve applications and
user’s request. A switchover guarantees no data loss and the switchover operation happens on both the primary
and standby database.
Page 1 of 13 o-dba-g.blogspot.com
UZMA PARVEEN DR DRILL
Page 2 of 13 o-dba-g.blogspot.com
UZMA PARVEEN DR DRILL
PRIMARY DATABASE
We have a CDB (DB19) with PDB (DB19PDB) runing on host (Node1.uzmalabs.com) as PRIMARY.
STANDBY DATABASE
We have a CDB (SDB19) with PDB (DB19PDB) runing on host (Node2.uzmalabs.com) as STANDBY.
Page 3 of 13 o-dba-g.blogspot.com
UZMA PARVEEN DR DRILL
PRIMARY DATABASE
On the Primary database, the current archive log is 41. We made 2 manual archivelog switches and now
current archive log is 43.
STANDBY DATABASE
On the standby database, we can see that the last applied archived is 40 and the last archive log
received is 43. So, we can see that there is a GAP of 3 archivelog.
Page 4 of 13 o-dba-g.blogspot.com
UZMA PARVEEN DR DRILL
STANDBY DATABASE
On the standby database, we find out that MRP was not running. So, we started the MRP PROCESS and
the GAP of 3 archivelog was resolved. Now primary and standby database is in SYNC.
PRIMARY DATABASE
Now on the Primary database, we will check the SWITCHOVER STATUS and should be TO STANDBY.
Page 5 of 13 o-dba-g.blogspot.com
UZMA PARVEEN DR DRILL
STANDBY DATABASE
Now on the Standby database, we will check the SWITCHOVER STATUS and should be NOT ALLOWED.
PRIMARY DATABASE
Now on the Primary database, we will perform the SWITCHOVER with the below command
Page 6 of 13 o-dba-g.blogspot.com
UZMA PARVEEN DR DRILL
PRIMARY DATABASE
Now we will start the Primary database, in NOMOUNT stage and then mount the standby database with
the below command
Now the Primary database’s DATABASE ROLE is changed to PHYSICAL STANDBY so from now onwards
this is the STANDBY DATABASE.
Page 7 of 13 o-dba-g.blogspot.com
UZMA PARVEEN DR DRILL
Page 8 of 13 o-dba-g.blogspot.com
UZMA PARVEEN DR DRILL
STANDBY DATABASE
Now on the Standby database, we will perform the SWITCHOVER with the below command
Now STARTUP the Standby database, and it will open as READ WRITE and the DATABASE ROLE is as
PRIMARY so from now onwards this is the NEW PRIMARY Database.
Page 9 of 13 o-dba-g.blogspot.com
UZMA PARVEEN DR DRILL
Page 10 of 13 o-dba-g.blogspot.com
UZMA PARVEEN DR DRILL
Page 11 of 13 o-dba-g.blogspot.com
UZMA PARVEEN DR DRILL
PRIMARY DATABASE
On the Primary database, the current archive log is 45. We made 2 manual archivelog switches and now
current archive log is 47.
STANDBY DATABASE
On the standby database, we can see that the 2 archive logs generated on primary are ARCHIVED and
APPLIED on standby side. MRP process is also running.
Page 12 of 13 o-dba-g.blogspot.com
UZMA PARVEEN DR DRILL
THANKYOU !!!!
Page 13 of 13 o-dba-g.blogspot.com