Archive for the ‘Dataguard’ Category

Dataguard Broker Switchover

Posted: May 31, 2012 in Dataguard

The steps to perform a switch over using dataguard broker are very simple you just need to do the following:

1. Connect to dgmgrl and make sure the configuration status = SUCCESS
2. Connect to the standby database as sys using the SID
3. Then use the command switchover to “XXXXX” where XXXXX is your standby database you wish to switch over to

See the below for the output.

So we are going to convert our physical standby database into a read-write real time clone of the primary database and we can then temporarily use this environment for carrying out DR testing.

The Snapshot Standby database in turn uses the Flashback Database technology to create a guaranteed restore point to which the database can be later flashed back to.  All accumulated redo data will be applied by Redo Apply services after the database is converted back to a physical standby database.

The database must be running in ARCHIVELOG mode with flashback switched on and flash recovery area enabled.

Example Test

Put standby to snapshot standby

PTEST1-/wload/peng/home/pengora>dgmgrl
DGMGRL for Linux: Version 11.2.0.2.0 – Production

Copyright (c) 2000, 2009, Oracle. All rights reserved.

Welcome to DGMGRL, type “help” for information.
DGMGRL> connect sys/xxxxxx@PTEST1
Connected.
DGMGRL> show configuration

Configuration – PTEST1

Protection Mode: MaxAvailability
Databases:
PTEST1 – Primary database
FTEST1 – Physical standby database

Fast-Start Failover: DISABLED

Configuration Status:
SUCCESS

DGMGRL> CONVERT DATABASE “FTEST1” TO SNAPSHOT STANDBY;
Converting database “FTEST1” to a Snapshot Standby database, please wait…
Database “FTEST1” converted successfully
Did some data inserts in the primary and also the standby to test its open read-write.
Put back to standby after testing
PTEST1-/wload/peng/home/pengora>dgmgrl
DGMGRL for Linux: Version 11.2.0.2.0 – Production

Copyright (c) 2000, 2009, Oracle. All rights reserved.

Welcome to DGMGRL, type “help” for information.
DGMGRL> connect sys/xxxxxx@PTEST1
Connected.
DGMGRL> show configuration

Configuration – PTEST1

Protection Mode: MaxAvailability
Databases:
PTEST1 – Primary database
FTEST1 – Snapshot standby database

Fast-Start Failover: DISABLED

Configuration Status:
SUCCESS

DGMGRL> CONVERT DATABASE “FTEST1” TO PHYSICAL STANDBY;
Converting database “FTEST1” to a Physical Standby database, please wait…
Operation requires shutdown of instance “FTEST1” on database “FTEST1”
Shutting down instance “FTEST1″…
Database closed.
Database dismounted.
ORACLE instance shut down.
Operation requires startup of instance “FTEST1” on database “FTEST1”
Starting instance “FTEST1″…
ORACLE instance started.
Database mounted.
Continuing to convert database “FTEST1” …
Operation requires shutdown of instance “FTEST1” on database “FTEST1”
Shutting down instance “FTEST1″…
ORA-01109: database not open

Database dismounted.
ORACLE instance shut down.
Operation requires startup of instance “FTEST1” on database “FTEST1”
Starting instance “FTEST1″…
ORACLE instance started.
Database mounted.
Database “FTEST1” converted successfully
DGMGRL>

Check alert log to make sure the standby is applying the logs.