Time for action – enabling Active Data Guard if Redo Apply is running using SQL *PLUS

  1. 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
  2. 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:
    SQL> select db_unique_name,open_mode from v$database;
    DB_UNIQUE_NA OPEN_MODE
    ------------ --------------------
    INDIA_UN     MOUNTED
    SQL> alter database recover managed standby database cancel;
    Database altered.
    SQL> !ps -ef|grep mrp
    oracle   27188  5882  0 11:56 pts/1    00:00:00 /bin/bash -c ps -ef|grep mrp
    oracle   27190 27188  0 11:56 pts/1    00:00:00 grep mrp
  3. 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.
  4. 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
..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.141.199.56