how to apply primary database redo information to standby database while standby database is in read only mode – Active Data guard feature – Active Data Guard Part-IV

Active Data Guard

Oracle 11g introduced Active Data Guard new Feature, in this standby database is allowed to be open in read only mode for query access and managed recovery also started and standby database is in sync/up-to-date with primary database.
Note:
You need licence to get benefit of this feature.

Previously, we covered How to open physical standby database in read only mode

Let me demonstrate for you to how to do it:

Verify database name, its open mode and database role by following command:

SQL> select name,open_mode,database_role from v$database;
NAME OPEN_MODE DATABASE_ROLE
--------- -------------------- ----------------
RTS MOUNTED PHYSICAL STANDBY

Standby database is in mount state.

Following sort of command will use to enable active data guard feature at standby database:

Gracefully shutdown your standby database and startup with mount state:

SQL> shutdown immediate;
ORA-01109: database not open
Database dismounted.
ORACLE instance shut down.
SQL> startup mount;
ORACLE instance started.
Total System Global Area 1469792256 bytes
Fixed Size 2213456 bytes
Variable Size 905972144 bytes
Database Buffers 553648128 bytes
Redo Buffers 7958528 bytes
Database mounted.

Open standby database is in read only mode:

SQL> alter database open read only;
Database altered.

Following command will help you to enable active dataguard feature.

SQL> alter database recover managed standby database disconnect from session;
Database altered.

Again verify database name, its open mode and database role by following command, Your standby database is in READ ONLY WITH APPLY. It means redo apply process in place and running.

SQL> select name,open_mode,database_role from v$database;
NAME OPEN_MODE DATABASE_ROLE
--------- -------------------- ----------------
RTS READ ONLY WITH APPLY PHYSICAL STANDBY

With the help of above, we can open standby database in read only mode for query access along with redo apply.

Stay Tune. 🙂

Leave a Reply