Professional Documents
Culture Documents
Snapshot Standby Database - 11gR2
Snapshot Standby Database - 11gR2
Prerequsite:
Configuring Oracle 11gR2 Data Guard - Physical Standby (without DG Broker)
Brief:
Snapshot Standby is a new feature introduced in 11g that allows the standby database to be opened in read-
write mode for real time testing. When switched back into standby mode, all changes made whilst in read-
write mode are lost. This is achieved using flashback database, but the standby database does not need to
have flashback database explicitly enabled to take advantage of this feature. Using the Flashback Database
technology restore point is guaranteed to which the database can be later flashed back to.
A Snapshot Standby is opened in the read-write mode and hence it is possible to process transactions
independently of the primary database. At the same time, it maintains protection by continuing to receive
data from the production database, archiving it for later use.
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.
Steps: (Only on Standby)
1) Check the status of flashback on standby.
select name,open_mode,database_role,db_unique_name, flashback_on from v$database;
Database altered.
3) Convert the standby to a snapshot standb. Observe flashback_on column in v$database also.
Database altered.
select name,open_mode,database_role,db_unique_name, flashback_on from v$database;
NAM OPEN_MOD DB_UNIQUE_NAM
DATABASE_ROLE FLASHBACK_ON
E E E
DUBA SNAPSHOT RESTORE POINT
MOUNTED riyadh
I STANDBY ONLY
C
1
7) Now convert it back to the physical standby, losing all the changes made since the conversion to
snapshot standby.
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance started.
Total System Global Area 1068937216 bytes
Fixed Size 2262048 bytes
Variable Size 281021408 bytes
Database Buffers 780140544 bytes
Redo Buffers 5513216 bytes
Database mounted.
Database altered.
SQL> shutdown immediate;
ORA-01507: database not mounted
Database altered.
SQL> alter database recover managed standby database using current logfile disconnect from session;
Database altered.
The standby is once again in managed recovery and archivelog shipping is resumed. Notice that flashback
database is still not enabled.