In this article we are going to learn how to performe switchover steps in Oracle Data Guard environment. Here we performing manual switchover activity. So, follow me carefully. “Switchover steps in Oracle 12c”,”Oracle database switchover steps 19c”, “Oracle Active Data Guard switchover”, “Switchover and switchback in Oracle 12c”, “Switchover steps in oracle 11g”, “Failover steps in Oracle 12c”.
Table of Contents
What is Switchover Activity?
In the Oracle DataGuard environment minimum two servers are involved. One Database role is PRIMARY and second one is Physical STANDBY. The PRIMARY database is in read write mode, which we called PRODUCTION Database. And the Physical STANDBY Database in Mount mode.
In the switchover activity we change the Database role in real time without losing any data. That means the PRIMATY Database become STANDBY and the STANDBY becomes PRIMARY. We can perform the switchover activity using the following steps.
Primary side switchover steps in Oracle
Commands to perform the switchover activity in Oracle Dataguard environment listed below.
STEP 1. Check Database current role both sides
SQL>select name,open_mode,database_role from v$database;
STEP 2. Verfy the Dataguard state on both side
Using the following command you can verify the dataguard state on both side.
SQL>ALTER SESSION SET nls_date_format='DD-MON-YYYY HH24:MI:SS';
SQL>SELECT sequence#, first_time, next_time, applied FROM v$archived_log ORDER BY sequence#;
STEP 3. Check switchover status on both side
The below command will show you the switchover status of primary database as well as standby side.
SQL>select switchover_status from v$database;
SWITCHOVER_STATUS
------------------------
TO STANDBY
Note: The switchover_status column has multiple values and what its mean listed below:
STEP 4. Switchover Primary to Standby
SQL> alter database commit to switchover to standby;
STEP 5. Shutdown and Startup Mount
SQL>shutdown immediate
SQL>startup nomount
SQL>alter database mount standby database;
Now veryfy the database status:
SQL>select name,open_mode,database_role from v$database;
Action on Standby Database
Step 6. Convert Standby to Primary
Now it time to convert physical standby database to primary database.
SQL>alter database commit to switchover to primary;
If everything going good, now check the status of the database using the following command.
SQL>select name,open_mode,database_role from v$database;
The switchover activity completed now, i hope you learn from this article if yes please write your feelings in comment box.
Read how to convert physical standby into snapshot standby
FAQ
How to switch over in Oracle?
Switchover is a role change activity in oracle, use command primary side alter database commit to switchover to standby;
How to do manual switchover in Oracle?
Here are complete steps, on how to do manual switchover in Oracle: 1. switchover primary to standby 2. switchover standby to primary
What happens during switchover?
During switchover, we change the database role which means the Primary databases become standby and standby becomes Primary.
What is switchover and switchback in Oracle?
Switchover means we change the database role and switchback is the to set database role as previously.
4 thoughts on “Switchover steps in Oracle 11G, 12c, 19c”