Creating a Catalog

The examples in this section provide details for creating a catalog database and registering a target database within the catalog. These examples assume that your catalog database is on a different host than your target database. They are implemented with Oracle9i, but the steps are the same for Oracle8i.

To create a recovery catalog, follow these steps:

  1. Create a specific tablespace to hold the catalog objects.

  2. Create a catalog schema.

  3. Issue appropriate grants.

  4. Create the schema objects.

In the following examples, we use the label “901” simply to indicate the version of the catalog database, in this case Oracle Version 9.0.1.

The first step, tablespace creation, is straightforward:

SQL> CREATE TABLESPACE rman_901_cat
     DATAFILE '/d01/oradata/brdstn/rman_901_cat_01.dbf' 
       SIZE 50M;

Now that you have a tablespace to store your schema objects, you can create the schema:

SQL> CREATE USER rman_901
     IDENTIFIED BY rman_901_pwd
     DEFAULT TABLESPACE rman_901_cat
     TEMPORARY TABLESPACE temp
     QUOTA UNLIMITED ON rman_901_cat;

Before you can create the catalog objects, you need to grant special privileges to your new schema. These privileges, granted through the RECOVERY_CATALOG_OWNER role, lets the schema manage its catalog objects.

SQL> GRANT recovery_catalog_owner TO rman_901;

You can view the privileges that this role grants by looking in dba_sys_privs:

SQL> SELECT PRIVILEGE FROM dba_sys_privs 
     WHERE GRANTEE = 'RECOVERY_CATALOG_OWNER'; PRIVILEGE ---------------------------------------- ...

Get Oracle RMAN Pocket Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.