Step By Step Switchover Testing



Steps: (Primary Site)
1) Shutdown the One of the RAC Database instance (RAKIBDB2) (In RAC Environment all RAC database instances should be shutdown, except one instance while performing switchover)   
2) Request the Primary Database for Switchover to Physical standby database on RAKIBDB1
3) Shutdown the last Instance (RAKIBDB1)
4) Start one of the RAC db instance RAKIBDB1 in mount state

Steps: (DR Site)
5) Request the Standby Database for Switchover to on DRIBDB
6) Open the DRIBDB database

Steps: (Primary Site)
7) Start Managed recovery on started instance(RAKIBDB1)  
8) Mount other instances of RAC database

-------->>>
Primary Site:

Shutdown the RAKIBDB2 instance

Login as oracle on hoibdbs02

<oracle:hoibdbs02>$ export ORACLE_SID=RAKIBDB2
<oracle:hoibdbs02>$ SQLPLUS / AS SYSDBA

<Sat Aug 30 12:17:47> SQL> SHUTDOWN IMMEDIATE
<Sat Aug 30 12:18:27> SQL>

**Shutdown of RAKIBDB2 Instance has taken 39 Seconds

Operations RAKIBDB1

Login as oracle on hoibdbs01

<oracle:hoibdbs01>$ export ORACLE_SID=RAKIBDB1
<oracle:hoibdbs01>$ SQLPLUS / AS SYSDBA

<Sat Aug 30 12:24:21> <SQL> ALTER DATABASE COMMIT TO SWITCHOVER TO PHYSICAL STANDBY WITH 
                                                  SESSION SHUTDOWN;
<Sat Aug 30 12:25:05> SQL>

<Sat Aug 30 12:25:47> SQL>SHUTDOWN IMMEDIATE
<Sat Aug 30 12:25:56> SQL>
<Sat Aug 30 12:26:15> SQL> STARTUP NOMOUNT
<Sat Aug 30 12:26:16> SQL>
<Sat Aug 30 12:26:33> SQL>ALTER DATABASE MOUNT;
<Sat Aug 30 12:26:42> SQL>

** Operations On RAKIBDB1 has taken 141 Seconds

DR Site:

Operations on DRIBDB

Login as oracle on hoibdbs01

<oracle:hoibdbs01>$ export ORACLE_SID=DRIBDB
<oracle:hoibdbs01>$ SQLPLUS / AS SYSDBA

<Sat Aug 30 12:25:28> SQL> ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY;
<Sat Aug 30 12:25:28> SQL>
<Sat Aug 30 12:25:44> SQL>ALTER DATABASE OPEN;
<Sat Aug 30 12:25:49>

***Opening DRIBDB database has taken 19 Seconds
***Production database 23 Seconds in advance from DR database server

** Switchover to DRIBDB database has taken total of:199 Seconds (3 Mins 31 Seconds) including command typing delay

Primary Site:

Operations RAKIBDB1

Login as oracle on hoibdbs01

<oracle:hoibdbs01>$ export ORACLE_SID=RAKIBDB1
<oracle:hoibdbs01>$ SQLPLUS / AS SYSDBA

SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;

Operations RAKIBDB2

Login as oracle on hoibdbs02

<oracle:hoibdbs01>$ export ORACLE_SID=RAKIBDB2
<oracle:hoibdbs01>$ SQLPLUS / AS SYSDBA

SQL> STARTUP MOUNT

**** At this State the DRIBDB Database is in primary role and RAKIBDB Database in Physical Standby Role
======================================================================================================================
Switchback to Primary RAC Database

Steps: (Primary Site)
1) Shutdown the One (RAKIBDB2) of the RAC Database instance (In RAC Environment all RAC database instances should be shutdown, except one instance while performing switchover)   

Steps: (DR Site)
2) Request the NEW primary (DRIBDB) Database for Switchover to Physical standby database 
3) Shutdown the NEW Primary (DRIBDB) Database
4) Start the DRIBDB Database in mount State.

Steps: (Primary Site)
5) Request the NEW Standby Database RAKIBDB for Switchover to on RAKIBDB1 instance
6) Open the RAKIBDB1 instance

Steps: (DR Site)
7) Start Managed recovery on DRIBDB  

Steps: (Primary Site)
8) Start all other instances (RAKIBDB2) 



------------------------------>>>




Primary Site:

Shutdown the RAKIBDB2 instance

Login as oracle on hoibdbs02

<oracle:hoibdbs02>$ export ORACLE_SID=RAKIBDB2
<oracle:hoibdbs02>$ sqlplus / as sysdba

SQL> SHUTDOWN IMMEDIATE
SQL>

DR Site:

Operations on DRIBDB

Login as oracle on dribdbs01

<oracle:hoibdbs01>$ export ORACLE_SID=DRIBDB
<oracle:hoibdbs01>$ SQLPLUS / AS SYSDBA

SQL>ALTER DATABASE COMMIT TO SWITCHOVER TO PHYSICAL STANDBY WITH SESSION SHUTDOWN;
SQL> SHUTDOWN IMMEDIATE
SQL> STARTUP MOUNT

Operations RAKIBDB1

Login as oracle on hoibdbs01

<oracle:hoibdbs01>$ export ORACLE_SID=RAKIBDB1
<oracle:hoibdbs01>$ SQLPLUS / AS SYSDBA

SQL> ALTER DATABASE COMMIT TO SWITCHOVER TO PRIMARY;
SQL>ALTER DATABASE OPEN;

DR Site:

Operations on DRIBDB

Login as oracle on hoibdbs01

<oracle:hoibdbs01>$ export ORACLE_SID=DRIBDB
<oracle:hoibdbs01>$  SQLPLUS / AS SYSDBA 

SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;

Primary Site:

Operations RAKIBDB2

Login as oracle on hoibdbs02

<oracle:hoibdbs01>$ export ORACLE_SID=RAKIBDB2
<oracle:hoibdbs01>$ SQLPLUS / AS SYSDBA

SQL> STARTUP

**** At this State the DRIBDB Database is in Standby role and RAKIBDB Database in Primary Role

1 comment:

  1. http://www.tomas-solar.com/eng/blog/ora-12899-value-too-large-for-column/

    ReplyDelete