Snapshot Standby Database:
Snapshot standby database receives and archives redo data but do not
apply it from a primary database. Redo data received from
the primary database is applied when a snapshot standby database is converted back to a
physical standby database.
Restrictions on Snapshot Standby database:
- If there is a corrupted redo log file at the snapshot standby database, it is not discovered until the database is converted back to a physical standby database and the managed recovery process (MRP) is started.
- When you convert the physical standby database to a snapshot standby database, it cannot be the only standby database in the configuration if your configuration is in maximum protection mode.
- You cannot make changes to the configuration after converting to a snapshot standby database.
- You cannot perform a switchover to a snapshot standby database.
A snapshot standby database cannot be configured as a fast-start failover target. - If the primary database is unavailable at that time, there is no way to retrieve that log.
Operating System: OEL 6.3 64-Bit
Database : Oracle Single Instance 11g R2
RDBMS Version: 11.2.0.4
Step 1:
Cancel the media recovery on physical standby database.
SQL> recover managed standby database cancel;
Media recovery complete.
Note: You can convert first and then open the database OR you can open first and then convert. It will not be an issue.
Step 2:
Open the physical standby database and check the database role.
SQL> alter database open;
Database altered.
SQL> @rd
NAME DB_UNIQUE_NAME DATABASE_ROLE OPEN_MODE CONTROL SWITCHOVER_STATUS
--------- ------------------------------ ---------------- -------------------- ------- --------------------
DC DR PHYSICAL STANDBY MOUNTED STANDBY RECOVERY NEEDED
Step 3:
Now convert the physical standby database to snapshot standby database and check the database role.
SQL> alter database convert to snapshot standby;
Database altered.
SQL> @rdNAME DB_UNIQUE_NAME DATABASE_ROLE OPEN_MODE CONTROL SWITCHOVER_STATUS
--------- ------------------------------ ---------------- -------------------- ------- --------------------
DC DR SNAPSHOT STANDBY READ WRITE CURRENT NOT ALLOWED
Q: But what does exactly happen when we run above command of converting physical standby into snapshot standby?.
SQL> alter database convert to snapshot standby;
Ans: It performs below tasks:
- First it will start the background process RVWR(Recovery Writer Process used by Flashback)
- Allocates memory in shared pool for Flashback Generation
- Creates Guaranteed restore point automatically(Avoids human interaction).
- Kills RFS processes to disallow current and future RFS connections.
- Shuts down all dispatchers and shared servers.
- Kills server sessions.
- Disables cache recovery by SMON
- Starts archiving of standby redo logs
- Performs Resetlogs after incomplete recovery until particular change.
- Archives all current redo logs.
- All Online Redo Logs gets cleared.
- Converts primary database as you opened it in read only.
- Resets the incarnation
In short,
Data Guard implicitly flashes the database back to the guaranteed restore point and automatically applies the primary database redo that was archived by the snapshot standby database since it was created. The guaranteed restore point is dropped after this process is completed.
Thanks for reading this post ! Please comment if you like the post !
Thank you for your comment !