Ask Me

Oracle Data-guard Switch Over Using DGMGRL

 

Switchover Process

During the switchover to a physical standby the broker performs the following:

1. Verifies that the primary is enabled and is in the TRANSPORT-ON state and that the target standby database is enabled and is in the APPLY-ON state.

2. Shuts down all instances on the primary except for one if needed. No instances will be shutdown on the target physical standby.

3. The primary database is first transitioned to the standby role then the original standby is transitioned to the primary role.

4. The broker configuration file is updated to reflect the change in roles.

5. Restarts the new standby database and begins the redo apply service.

6. The new primary database is opened in read/wirte mode and the redo transport service is started.


Connect DGMGRL on Primary Side.:

DGMGRL> switchover to 'colldb_st';

Performing switchover NOW, please wait...

New primary database "colldb_st" is opening...

Operation requires shutdown of instance "colldb" on database "colldb_pm"

Shutting down instance "colldb"...

ORA-01031: insufficient privileges

Warning: You are no longer connected to ORACLE.

Please complete the following steps to finish switchover:

        shut down instance "colldb" of database "colldb_pm"

        start up instance "colldb" of database "colldb_pm"

DGMGRL>

DGMGRL> show configuration
Configuration - COLDB_CONF
  Protection Mode: MaxPerformance
  Databases:
    colldb_st - Primary database
      Error: ORA-16778: redo transport error for one or more databases
    colldb_pm - Physical standby database
       Error: ORA-16570: database needs restart
 Fast-Start Failover: DISABLED
 Configuration Status:
 ERROR

DGMGRL>  show configuration
 Configuration - COLDB_CONF
   Protection Mode: MaxPerformance
   Databases:
     colldb_st - Primary database
     colldb_pm - Physical standby database
 Fast-Start Failover: DISABLED
 Configuration Status:
 ORA-16610: command "SWITCHOVER TO colldb_pm" in progress
 DGM-17017: unable to determine configuration status

DGMGRL> show configuration
 Configuration - COLDB_CONF
   Protection Mode: MaxPerformance
   Databases:
     colldb_st - Primary database
     colldb_pm - Physical standby database
 Fast-Start Failover: DISABLED
 Configuration Status:
 SUCCESS

OLD Primary database validation :

[oracle@Test1 dbs]$ ps -ef | grep pmon
  oracle    3655     1  0 Apr24 ?        00:00:27 asm_pmon_+ASM
 oracle    4104     1  0 Apr24 ?        00:00:30 ora_pmon_colldb
 oracle   17032 14291  0 04:54 pts/1    00:00:00 grep pmon

[oracle@Test1 dbs]$ sqlplus / as sysdba
  SQL*Plus: Release 11.2.0.3.0 Production on Tue May 13 04:54:24 2014
  Copyright (c) 1982, 2011, Oracle.  All rights reserved.
 Connected to:
 Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production

With the Partitioning, Automatic Storage Management, OLAP, Data Mining and Real Application Testing options

 SQL> select database_role from v$database;

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

[oracle@Test1 dbs]$  ps -ef | grep pmon 
oracle    3655     1  0 Apr24 ?        00:00:27 asm_pmon_+ASM 
oracle   17200     1  0 04:55 ?        00:00:00 ora_pmon_colldb 
oracle   17503 14291  0 04:56 pts/1    00:00:00 grep pmon

[oracle@Test1 dbs]$ sqlplus / as sysdba 
 SQL*Plus: Release 11.2.0.3.0 Production on Tue May 13 04:56:52 2014
 Copyright (c) 1982, 2011, Oracle.  All rights reserved. 
 Connected to:
 Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production With the Partitioning, Automatic Storage Management, OLAP, Data Mining and Real Application Testing options

 SQL> select database_role from v$database;

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

 SQL>

Primary

[oracle@Test1 dbs]$ ps -ef | grep pmon 
oracle    3655     1  0 Apr24 ?        00:00:27 asm_pmon_+ASM 
oracle    4104     1  0 Apr24 ?        00:00:30 ora_pmon_colldb 
oracle   17032 14291  0 04:54 pts/1    00:00:00 grep pmon


[oracle@Test1 dbs]$ sqlplus / as sysdba
  SQL*Plus: Release 11.2.0.3.0 Production on Tue May 13 04:54:24 2014  Copyright (c) 1982, 2011, Oracle.  All rights reserved. 

  Connected to:
 Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production With the Partitioning, Automatic Storage Management, OLAP, Data Mining and Real Application Testing options

 SQL> select database_role from v$database;

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

[oracle@Test1 dbs]$  ps -ef | grep pmon 
oracle    3655     1  0 Apr24 ?        00:00:27 asm_pmon_+ASM 
oracle   17200     1  0 04:55 ?        00:00:00 ora_pmon_colldb 
oracle   17503 14291  0 04:56 pts/1    00:00:00 grep pmon

[oracle@Test1 dbs]$ sqlplus / as sysdba

 SQL*Plus: Release 11.2.0.3.0 Production on Tue May 13 04:56:52 2014
  Copyright (c) 1982, 2011, Oracle.  All rights reserved. 
  Connected to:Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - Production With the Partitioning, Automatic Storage Management, OLAP, Data Mining and Real Application Testing options

 SQL> select database_role from v$database;

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

 SQL>


 

Popular Posts