Oracle Database 11g Gata Guard Manual Switch Over on Linux





Oracle Data Guard -- Manual Switch Over


ON PRIMARY DATABASE:

Step # 1

Check Role of Primary Database

SQL> Select Database_role from v$database;

It will return "Primary".

Step # 2

Now check Switchover status of the database.

SQL> Select switchover_status from v$database;

It will return "Session Active"

Step # 3

Now perform manual switchover.

SQL> Alter Database commit to switchover to physical standby with session shutdown;
Database Altered.

Your Database has become Physical Standby.

Step # 4

You can verify this by querying Database_role of v$database, this time it will return "Physical Standby". Shutdown the database and again
start it to mount stage.

SQL> Shutdown Immediate;
SQL> Startup Mount;


SQL> Select Database_role from v$database;

DATABASE_ROLE
-------------------------
PHYSICAL STANDBY


ON STANDBY DATABASE:

Step # 1

Check Role of Standby Database

SQL> Select Database_role from v$database;

It will return "Physical Standby ".

Step # 2

Now check Switchover status of the database.

SQL> Select switchover_status from v$database;

It will return "Session Active"

Step # 3

Now cancel the MRP which is running in the background of the Standby Database.

SQL> Alter Database Recover
Managed Standby Database Cancel;
Database Altered.

Step # 4

Now perform manual switchover from Physical Standby to Primary.

SQL> Alter Database commit to switchover to primary with session shutdown;
Database Altered.

Now your Physical Standby database as has become Primary.

Step # 5

You can verify this by querying Database_role of v$database, this time it will return "Primary". Shutdown the database and again start it to mount stage.

SQL> Shutdown Immediate;
SQL> Startup Mount;


SQL> Select Database_role from v$database;

DATABASE_ROLE
-------------------------
PRIMARY

Comments

Popular posts from this blog

How to create Oracle stored Procedures using TOAD for Oracle

Create Tables in Oracle Database using TOAD

How to Create Packages in Oracle Database using TOAD for Oracle