Subscribe YouTube Channel For More Live Tutorials

Oracle Dataguard - Max Availability - with Real Time Apply - Read Only

Enable Real Time Apply - Oracle Dataguard

Oracle Dataguard - Max Availability - with Real Time Apply - Read Only

On Primary Database

SQL> select status,instance_name,database_role,protection_mode from v$database,v$instance;
SQL> select thread#,group#,bytes/1024/1024,status from v$log;
select thread#,max(sequence#) from v$archived_log where applied='YES' group by thread#;

SQL> SHUTDOWN IMMEDIATE;
SQL> STARTUP MOUNT;
SQL> ALTER DATABASE SET STANDBY DATABASE TO MAXIMIZE AVAILABILITY;
SQL> SELECT PROTECTION_MODE FROM V$DATABASE;
SQL> ALTER DATABASE OPEN;
SQL> select status,instance_name,database_role,protection_mode from v$database,v$instance;

SQL> alter system set log_archive_dest_2='SERVICE=std LGWR AFFIRM SYNC DB_UNIQUE_NAME=std VALID_FOR=(ALL_LOGFILES,PRIMARY_ROLE)' scope=both;

On Standby Database

Change - Real Time Apply - Read only with apply

SQL>alter database recover managed standby database cancel;
SQL>alter database recover managed standby database using current logfile disconnect;
SQL> select recovery_mode,open_mode,database_mode from v$archive_dest_status;

RECOVERY_MODE DATABASE_MODE
----------------------- ---------------
MANAGED READ ONLY WITH APPLY OPEN_READ-ONLY