100% found this document useful (1 vote)
49 views13 pages

Manual Switchover Steps For DR

MANUAL SWITCHOVER STEPS FOR DR
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
49 views13 pages

Manual Switchover Steps For DR

MANUAL SWITCHOVER STEPS FOR DR
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 13

UZMA PARVEEN DR DRILL

ORACLE DR SWITCHOVER, MANUALLY

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.

In this Document I will demonstrate how to perform the DR SWITCHOWER manually.

Page 1 of 13 o-dba-g.blogspot.com
UZMA PARVEEN DR DRILL

ENVIRONMENT BEFORE SWITCHOVER

SOURCE |PRIMARY TARGET |STANDBY


OS / VERSION Oracle Linux Server 7.9 Oracle Linux Server 7.9
HOSTNAME Node1.uzmalabs.com Node2.uzmalabs.com
IP ADDRESS 192.168.56.106 192.168.56.230
CDB NAME DB19 SDB19
PDB NAME DB19PDB DB19PDB
DATABASE ROLE PRIMARY STANDBY
SWITCHOVER STATUS TO STANDBY NOT ALLOWED
DB VERSION 19.3.0 19.3.0
ORACLE HOME /u01/app/oracle/product/19c/db_home /u02/app/oracle/product/19c/db_home
FILE SYSTEM Non - ASM Non - ASM
ARCH LOCATION /u02/app/oracle/primary/arch /u02/app/oracle/standby/arch
DATAFILE LOCATION /u01 and /u03 /u01 and /u02
MRP PROCESS Runs at standby

ENVIRONMENT AFTER SWITCHOVER

TARGET |NEW STANDBY SOURCE |NEW PRIMARY


OS / VERSION Oracle Linux Server 7.9 Oracle Linux Server 7.9
HOSTNAME Node1.uzmalabs.com Node2.uzmalabs.com
IP ADDRESS 192.168.56.106 192.168.56.230
CDB NAME DB19 SDB19
PDB NAME DB19PDB DB19PDB
DATABASE ROLE STANDBY PRIMARY
SWITCHOVER STATUS NOT ALLOWED TO STANDBY
DB VERSION 19.3.0 19.3.0
ORACLE HOME /u01/app/oracle/product/19c/db_home /u02/app/oracle/product/19c/db_home
FILE SYSTEM Non - ASM Non - ASM
ARCH LOCATION /u02/app/oracle/primary/arch /u02/app/oracle/standby/arch
DATAFILE LOCATION /u01 and /u03 /u01 and /u02
MRP PROCESS Runs at Standby

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

ALTER DATABASE COMMIT TO SWITCHOVER TO STANDBY WITH SESSION SHUTDOWN NOWAIT.

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

ALTER DATABASE MOUNT STANDBY DATABASE.

PRIMARY DATABASE or NEW STANDBY DATABASE

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

PRIMARY DATABASE or NEW STANDBY DATABASE

The Alert log content

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

ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY WITH SESSION SHUTDOWN NOWAIT.

STANDBY DATABASE or NEW PRIMARY DATABASE

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

STANDBY DATABASE or NEW PRIMARY DATABASE

Now open the PDBs also in READ WRITE mode.

Page 10 of 13 o-dba-g.blogspot.com
UZMA PARVEEN DR DRILL

STANDBY DATABASE or NEW PRIMARY DATABASE

The Alert log content

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

You might also like