Skip to content
Home » Oracle Database » Using RMAN Catalog in Data Guard Architecture (2/4) - GRANT REGISTER DATABASE Clause

Using RMAN Catalog in Data Guard Architecture (2/4) - GRANT REGISTER DATABASE Clause

Using RMAN Catalog in Data Guard Architecture (1/4) - GRANT CATALOG FOR DATABASE Clause
GRANT REGISTER DATABASE makes the virtual catalog owner has more power to choose databases to register, manage and unregister, which is not a good practice in my humble opinion. Here are the steps:
  1. Drop the existing base catalog.
  2. [oracle@primary01 ~]$ rman catalog catowner/password@smalldb
    ...
    connected to recovery catalog database

    RMAN> drop catalog;

    recovery catalog owner is CATOWNER
    enter DROP CATALOG command again to confirm catalog removal

    RMAN> drop catalog;

    recovery catalog dropped

    RMAN> list db_unique_name all;

    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of list command at 12/20/2012 14:21:54
    RMAN-06428: recovery catalog is not installed
    ...

  3. Drop the existing virtual catalog.
  4. [oracle@primary01 ~]$ rman catalog vpcowner/password@smalldb
    ...
    connected to recovery catalog database

    RMAN> drop catalog;

    recovery catalog owner is VPCOWNER
    enter DROP CATALOG command again to confirm catalog removal

    RMAN> drop catalog;

    recovery catalog dropped
    ...

  5. Create the base catalog.
  6. [oracle@primary01 ~]$ rman catalog catowner/password@smalldb
    ...
    connected to recovery catalog database

    RMAN> create catalog;

    recovery catalog created
    ...

  7. Grant register database to the virtual catalog owner.
  8. RMAN> grant register database to vpcowner;

    Grant succeeded.

  9. Create the virtual catalog by the virtual catalog owner.
  10. [oracle@primary01 ~]$ rman catalog vpcowner/password@smalldb
    ...
    connected to recovery catalog database

    RMAN> create virtual catalog;

    found eligible base catalog owned by CATOWNER
    created virtual catalog against base catalog owned by CATOWNER

  11. Register both the primary and standby database.
  12. [oracle@primary01 ~]$ rman catalog vpcowner/password@smalldb target sys/password@primdb1
    ...
    connected to target database: COMPDB (DBID=841830157)
    connected to recovery catalog database

    RMAN> list db_unique_name all;


    RMAN> register database;

    database registered in recovery catalog
    starting full resync of recovery catalog
    full resync complete

    RMAN> list db_unique_name all;


    List of Databases
    DB Key  DB Name  DB ID            Database Role    Db_unique_name
    ------- ------- ----------------- ---------------  ------------------
    2       COMPDB   841830157        PRIMARY          PRIMDB
    ...
    [oracle@primary01 ~]$ rman catalog vpcowner/password@smalldb target sys/password@standb1
    ...
    connected to target database: COMPDB (DBID=841830157, not open)
    connected to recovery catalog database

    RMAN> list db_unique_name all;


    List of Databases
    DB Key  DB Name  DB ID            Database Role    Db_unique_name
    ------- ------- ----------------- ---------------  ------------------
    2       COMPDB   841830157        PRIMARY          PRIMDB
    2       COMPDB   841830157        STANDBY          STANDB
The step of CREATE VIRTUAL CATALOG must be after the step of granting, either GRANT CATALOG FOR DATABASE clause or GRANT REGISTER DATABASE clause.

Using RMAN Catalog in Data Guard Architecture (3/4) - After a Switchover

Leave a Reply

Your email address will not be published. Required fields are marked *