Put standby database into snapshot standby

Posted: May 25, 2012 in Dataguard

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.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s