Time for action – enabling Active Data Guard if Redo Apply is running using SQL *PLUS
If you have previously upgraded your database from Version 10gRx to 11gRx, then in order to use Active Data Guard the compatible parameter must at least be set to 11.0.0 as shown in the following query:
SQL> show parameter compatible
NAME TYPE VALUE
------------------------------- ----------- --------------------
compatible string 11.2.0.0.0
If you are using Active Data Guard for the first time, your standby database will definitely be in the MOUNT status and MRP will be in progress; hence, cancel MRP. After cancelling MRP, make sure MRP is not running any more either through the OS level grep commands or the v$managed_standby view as shown in the following query:
Open the database in the Read-Only mode to enable Active Data Guard as follows:
SQL> alter database open ;
Database altered.
SQL>
SQL> select db_unique_name,open_mode from v$database;
DB_UNIQUE_NA OPEN_MODE
------------ --------------------
INDIA_UN READ ONLY
Now restart Redo Apply
SQL> alter database recover managed standby database using current logfile disconnect from session;
Database altered.
Verify whether redo-apply is enabled or not using the following query:
SQL> select process,status,sequence# from v$managed_standby where process like '%MRP%';
PROCESS STATUS SEQUENCE#
--------- ------------ ----------
MRP0 APPLYING_LOG 522