In the previous post, we can read about Snapshot Standby Overview. In this post, we can convert to Snapshot Standby.

Prerequisites :

Physical Standby Database is already created and synchronized with Primary Database .

Database Details :

Step 1: Check Primary database :

[oracle@localhost admin]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Fri Apr 27 15:09:14 2018

Copyright (c) 1982, 2013, Oracle.  All rights reserved.

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, Oracle Label Security, OLAP, Data Mining,
Oracle Database Vault and Real Application Testing options

SQL> select name,open_mode from v$database;

NAME	  OPEN_MODE
--------- --------------------
MGR	   READ WRITE

SQL> select name,open_mode,database_role from v$database;

NAME	  OPEN_MODE	       DATABASE_ROLE
--------- -------------------- ----------------
MGR	   READ WRITE	       PRIMARY

SQL> select max(sequence#) from v$thread;

MAX(SEQUENCE#)
--------------
	    56

Step 2 : Check Standby Database :

[oracle@test1 ~]$ sqlplus / as sysdba

SQL*Plus: Release 11.2.0.4.0 Production on Fri Apr 27 15:10:33 2018

Copyright (c) 1982, 2013, Oracle.  All rights reserved.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.4.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options

SQL> select name,open_mode,database_role from v$database;

NAME	  OPEN_MODE	       DATABASE_ROLE
--------- -------------------- ----------------
MGR	  MOUNTED	       PHYSICAL STANDBY

SQL> select max(sequence#) from v$thread;

MAX(SEQUENCE#)
--------------
	    56

Step 3 : Stop recovery.

SQL> RECOVER MANAGED STANDBY DATABASE CANCEL;
Media recovery complete.

Step 4 : Convert physical standby to snapshot standby using following command:

SQL> alter database convert to snapshot standby;                                               

Database altered.

SQL>

check alert log

alter database convert to snapshot standby
Starting background process RVWR
Fri Apr 27 16:44:30 2018
RVWR started with pid=35, OS id=14563 
Allocated 3981120 bytes in shared pool for flashback generation buffer
Created guaranteed restore point SNAPSHOT_STANDBY_REQUIRED_04/27/2018 16:44:30
Killing 4 processes with pids 11523,11517,11519,11521 (all RFS) in order to disallow current and future RFS connections. Requested by OS process 11541
Begin: Standby Redo Logfile archival
End: Standby Redo Logfile archival
RESETLOGS after incomplete recovery UNTIL CHANGE 1216480
Waiting for all non-current ORLs to be archived...
All non-current ORLs have been archived.
Resetting resetlogs activation ID 1906664927 (0x71a565df)
Online log /u01/oracle/fast_recovery_area/STD_MGR/onlinelog/o1_mf_1_ffcscxwk_.log: Thread 1 Group 1 was previously cleared
Online log /u01/oracle/fast_recovery_area/STD_MGR/onlinelog/o1_mf_2_ffcsczdm_.log: Thread 1 Group 2 was previously cleared
Online log /u01/oracle/fast_recovery_area/STD_MGR/onlinelog/o1_mf_3_ffcsd0p0_.log: Thread 1 Group 3 was previously cleared
Standby became primary SCN: 1216478
Fri Apr 27 16:44:33 2018
Setting recovery target incarnation to 4
CONVERT TO SNAPSHOT STANDBY: Complete - Database mounted as snapshot standby
Completed: alter database convert to snapshot standby
Fri Apr 27 16:44:42 2018
ARC1: Becoming the 'no SRL' ARCH

View Snapshot Database Information :

Step 5 : Check role of snapshot database :

SQL> select name,open_mode,database_role from v$database;

NAME	  OPEN_MODE	       DATABASE_ROLE
--------- -------------------- ----------------
MGR	  READ WRITE	       SNAPSHOT STANDBY

Stay tuned for More articles on Oracle DataGuard

Thank you for giving your valuable time to read the above information.

If you want to be updated with all our articles send us the Invitation or Follow us:

Telegram Channel: https://t.me/helporacle

Skant Gupta’s LinkedIn: www.linkedin.com/in/skantali/

Joel Perez’s LinkedIn: Joel Perez’s Profile

LinkedIn Group: Oracle Cloud DBAAS

Facebook Page: OracleHelp

About The Author

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.