Skip Headers
Oracle® Database Backup and Recovery Advanced User's Guide
10g Release 2 (10.2)

Part Number B14191-02
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Contact Us

Go to previous page
Previous
Go to next page
Next
View PDF

Exporting and Importing the Recovery Catalog

To move the recovery catalog from one database to another, export the catalog from the old database, and import it into the new one. You can only import the catalog into a supported version of the Oracle database server. In general, you can import the catalog into a database of the same release or later.

Exports can also serve as logical backups of the RMAN recovery catalog. If the recovery catalog database is damaged, you can quickly reimport the exported recovery catalog data into another database and rebuild the catalog.

This section contains the following topics:

Considerations When Moving Catalog Data

You should only import the recover catalog into a schema that does not already contain a recovery catalog schema. In other words, the user who will own the imported recovery catalog schema should not already own a recovery catalog schema. For example, if user rman owns the recovery catalog on database catdb, and you want to export the recovery catalog on catdb and import it into database catdb2, then rman should not already own a recovery catalog on catdb2. You should either create a new recovery catalog owner on catdb2, or drop the current user rman on catdb2 and then re-create the user. You cannot merge a recovery catalog into an existing recovery catalog.

The basic steps for exporting a recovery catalog from a primary database and importing the catalog into a secondary database are as follows:

  1. Use one of the Oracle Export utilities to export the catalog data from the primary database. See "Exporting the Recovery Catalog" for an example.

  2. Create a user on the secondary database as described in "Creating the Recovery Catalog Owner", and grant the user necessary privileges.

  3. Use the import utility corresponding to the export utility in step 1 to import the catalog data into the schema created in the previous step. See "Importing the Recovery Catalog" for an example.

You should not run the CREATE CATALOG command either before or after the Import of the catalog into the secondary database. By importing the catalog data into the new schema, you effectively create the catalog in the secondary database.

Note:

You cannot import data exported from two different recovery catalogs to merge them into one catalog. It is not currently possible to merge two or more recovery catalog schemas into one.

Exporting the Recovery Catalog

This example uses the Original Export utility described in Oracle Database Utilities to create a logical export of the recovery catalog. Refer to Oracle Database Utilities for concepts and procedures relating to the Data Pump Export utility.

The following procedure creates a logical export of the recovery catalog.

  1. Execute the Oracle export utility at the operating system command line, making sure to do the following:

    1. Connect as the owner of the recovery catalog

    2. Specify the OWNER option

    3. Specify an output file

    For example, if the owner of the catalog in database catdb is rman, you can issue the following at the UNIX command line to export the catalog to file cat.dmp:

    % exp rman/cat@catdb FILE=cat.dmp OWNER=rman
    
    
  2. Examine the output to make sure you were successful:

    Export terminated successfully without warnings.
    

Importing the Recovery Catalog

This example uses the Original Import utility described in Oracle Database Utilities to create a logical export of the recovery catalog. Refer to Oracle Database Utilities for concepts and procedures relating to the Data Pump Import utility.

To make a logical import of the recovery catalog from the command line:

  1. Create a new user in another database. For the recommended SQL syntax for creating a new user in a recovery catalog database, see "Creating the Recovery Catalog Owner". Be sure to grant the new user the necessary privileges.

  2. Import the catalog data from the export file. Execute the import at the command line, making sure to do the following:

    1. Connect as the new owner of the recovery catalog.

    2. Specify the old owner with the FROMUSER parameter.

    3. Specify the new owner with the TOUSER parameter.

    4. Specify the import file.

    For example, assume the following:

    • The old owner of the catalog in database prod1 is rman.

    • The user in the new recovery catalog database catdb2 is rman2.

    • The file containing the export of the catalog is cat.dmp.

    The command is then as follows:

    % imp USERID=rman2/cat2@catdb2 FILE=cat.dmp FROMUSER=rman TOUSER=rman2 
    
    
  3. Use the imported catalog data for restore and recovery of your target database.