Make the dataguard Standby in Read Only mode

Make the dataguard Standby Server in read only mode

Note: Active Data guard required separate license as per Oracle Product.

In 11g, Oracle introduced the Active Data Guard feature. You can only fire the select command from this database.
This is used as your reporting database. You can fetch data real time from this database.

1. Connect to the standby database:

SET ORACLE_SID=IC_DR
sqlplus / as sysdba

2. Shutdown the standby database:

SHUTDOWN IMMEDIATE;

3. Start the standby database into mount state:

STARTUP MOUNT;

4. Open the database in the readonly mode:

ALTER DATABASE OPEN READ ONLY;

5. Then start the MRP process of recovery of the standby database:

ALTER DATABASE RECOVER MANAGED STANDBY DATABASE DISCONNECT FROM SESSION;

6. Check the alert log file of standby and primary that every thing is working fine.
 
7. Check the archive log gap on standby server with following query:

SELECT ARCH.THREAD# "Thread", ARCH.SEQUENCE# "Last Sequence Received", APPL.SEQUENCE# "Last Sequence Applied",
(ARCH.SEQUENCE# – APPL.SEQUENCE#) "Difference"
FROM (SELECT THREAD# ,SEQUENCE# FROM V$ARCHIVED_LOG WHERE (THREAD#,FIRST_TIME )
IN (SELECT THREAD#,MAX(FIRST_TIME) FROM V$ARCHIVED_LOG GROUP BY THREAD#)) ARCH,
(SELECT THREAD# ,SEQUENCE# FROM V$LOG_HISTORY WHERE (THREAD#,FIRST_TIME ) IN
(SELECT THREAD#,MAX(FIRST_TIME) FROM V$LOG_HISTORY GROUP BY THREAD#)) APPL
WHERE ARCH.THREAD# = APPL.THREAD# ORDER BY 1;

Advertisements

2 thoughts on “Make the dataguard Standby in Read Only mode

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

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