PeopleSoft

RMAN 11g Snapshot Standby Database

October 24, 2008 · 1 Comment

Snapshot Standby Database

Oracle 11g introduces a new type of database – the Snapshot Standby Database which allows the use of a physical standby databasee in read-write mode for a short period of time. A snapshot standby database is a fully updatable standby database that is created by converting a physical standby database into a snapshot standby database.

This database is open in the read-write mode and as thus it is possible to process transactions apart from the primary database. It maintains protection by continual feed from the production database by archiving that data for later use.

Using a single command change made while the database is in read-write mode can throw away the changes made to the standby database only and re-synchronize the standby database with the production database.

Snapshot Database has these Characteristics

1. Snapshot standby database receives and archive but does not apply the redo data.
2. Redo data received from the primary database is applied automatically once the standby database is converted back into a physical standby database.
3. Data from the primary database is always protected as the archivelogs are being received and stored in their designated location.
4. All local updates will be discarded when the snapshot database is converted back to physical standby database.
5. If the primary database moves to a new database branch (for example, because of a Flashback Database or an OPEN RESETLOGS), the snapshot standby database will continue accepting redo from the new database branch.
6. Snapshot standby database cannot be the target of a switchover or failover. A snapshot standby database must first be converted back into a physical standby database before performing a role transition to it.
7. After a switchover or failover between the primary database and one of the physical or logical standby databases in a configuration, the snapshot standby database can receive redo data from the new primary database after the role transition.
8. Snapshot standby database cannot be the only standby database in a Maximum Protection Data Guard configuration.

Once the snapshot standby is activated this database diverges from its primary database over time because redo data from the primary database is not applied. Local updates to the snapshot standby database will cause additional divergence.

Steps to Convert Physical Standby Database to the Snapshot Standby Database

The conversion from physical standby to snapshot standby database can be done through the command:

ALTER DATABASE CONVERT TO SNAPSHOT STANDBY;

1. If not already configured, configure flash recovery area as show below:

first set the size of the recovery area

alter system set db_recovery_file_dest_size=;

Next, set the location

alter system set db_recovery_file_dest=;

Bring the physical standby database to mount stage:

Stop managed recovery if it is active and convert the physical standby database to snapshot standby database

alter database convert to snapshot standby;

The database is dismounted during conversion and must be restarted after the conversion completes.

SQL> select open_mode, database_role from v$database;

The database is now ready for transactions.
An implicit restore point is created when a physical standby database is converted into a snapshot standby database and this restore point is used to flashback a snapshot standby database to its original state when it is converted back into a physical standby database from a snapshot standby database.

Steps to Convert the Snapshot Standby Database Back to the Physical Standby Database:

1. shutdown the snapshot standby database
2. bring the database to the mount state
3. issue the following command

alter database convert to physical standby;

4. shutdown the database and mount it again

SQL> select open_mode, database_role from v$database;

You are now ready to start the media recovery process.

Once a snapshot standby database has been converted back into a physical standby database and restarted – start the process of applying the redo logs and all of the redo received by the snapshot standby database will be applied to the physical standby database to roll it forward.

Flashback Database is used to convert a snapshot standby database back into a physical standby database. Any operation that cannot be reversed using the Flashback Database technology will prevent a snapshot database being converted back to a physical standby.

Categories: RMAN
Tagged: ,

1 response so far ↓

Leave a Comment