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:
sqlplus / as sysdba
2. Shutdown the standby database:
3. Start the standby database into mount state:
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;