Snapshot Standby , this feature allows the repository to be "read and write" for content that is not easy to test in the main library of the production environment, such as simulating on-line testing tasks. When the task is completed in the read and write state of the standby library, it is very easy to complete the snapshot standby database role switch back to the repository role and restore the synchronization with the master library data. In the snapshot standby database state, the repository is a log that can accept the main library, but it is not able to apply the changes to the repository.
Prerequisites for converting a physical standby Library to Snapshot
As shown below, if you switch to snapshot.
1. Stop the log application on the standby library.
dgmgrl> Edit Database 11gdg2 set State=apply-off; Succeeded.dgmgrl>
2. Turn on the standby database flash back function
Sql> ALTER DATABASE Flashback On;database altered.
3. Turn the standby library into snapshot
Dgmgrl> CONVERT DATABASE 11gdg2 to SNAPSHOT STANDBY; Converting database "11GDG2" to a Snapshot Standby database, please wait ... Database "11GDG2" converted successfully
4. At this point, we do some data modification on the main library.
Sql> Select COUNT (*) from T1; COUNT (*)----------56sql> INSERT INTO T1 SELECT * from t1;56 rows created. Sql> commit; Commit complete.
5. Modifying data in the Standby repository
sql> conn/as sysdbaconnected.sql> Select Open_mode from V$database;open_ MODE------------------------------------------------------------READ writesql> Conn Scott/tigerconnected.sql > CREATE TABLE t2 as select * from T1; Table created. Sql> Select COUNT (*) from T2; COUNT (*)----------56sql>
6. Convert snapshot to physical standby
dgmgrl> convert database 11gdg2 to physical standby; converting database "11GDG2" to a physical standby database, please wait ... operation requires shutdown of instance "Dgtst" on database "11GDG2" shutting down instance "Dgtst" ... Database closed. Database dismounted. Oracle instance shut down. operation requires startup of instance "Dgtst" on database "11GDG2" starting instance "Dgtst" ... Oracle instance started. Database mounted. continuing to convert database "11gdg2"   operation requires shutdown of instance "Dgtst" on database "11GDG2" shutting down instance "Dgtst" ... Ora-01109: database not opendatabase dismounted. Oracle instance shut down. Operation requires startup of instance "Dgtst" on database "11GDG2" starting instance "Dgtst" ... Oracle instance started. Database mounted. database "11GDG2" converted successfully
Open the Standby library
Sql> ALTER DATABASE open read Only;database altered.
7. Check if the T2 table still exists in the standby library
Sql> Conn scott/tigerconnected.sql> SELECT * from T2;select * from T2 *error @ line 1:ora-00942:table Or view does not existsql>
8. See if the change data made to the main library is applied after switching to snapshot.
Sql> Select COUNT (*) from T1; COUNT (*)----------112sql>
And the 4th step is the same as the conclusion.
This article is from the "Ding Dong" blog, please be sure to keep this source http://lqding.blog.51cto.com/9123978/1682805
Oracle Learning Dataguard (11) Snapshot database