Skip Headers
Oracle® Database Backup and Recovery Reference
11g Release 1 (11.1)

Part Number B28273-01
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

IMPORT CATALOG

Purpose

Use the IMPORT CATALOG command to import the metadata from one recovery catalog schema into a different catalog schema. If you created catalog schemas of different versions to store metadata for multiple target databases, then this command enables you to maintain a single catalog schema for all databases.

See Also:

CREATE CATALOG

Prerequisites

RMAN must be connected to the destination recovery catalog, which is the catalog into which you want to import catalog data. This recovery catalog must not be a virtual private catalog.

No target database connection is needed in order to merge catalog schemas. Execute this command at the RMAN prompt or within the braces of a RUN command.

The version of the source recovery catalog schema must be equal to the current version of the RMAN executable. If the source schema is a lower version, then upgrade the catalog schema to the current version. If the source schema is a higher version, then retry the operation with a higher version RMAN executable.

Ensure that the same database is not registered in both the source recovery catalog schema and destination catalog schema. If a database is registered in both schemas, then UNREGISTER this database from source recovery catalog and execute the IMPORT command again.

Usage Notes

If the operation fails in the middle of the import, then the import is rolled back. Thus, a partial import is not permitted. The unregister operation is separate from the import. By default, the imported database IDs are unregistered from the source recovery catalog schema after a successful import.

Stored scripts are either global or local. It is possible for global scripts, but not local scripts, to have name conflicts during import because the destination schema already contains the script name. In this case, RMAN renames the global script name to COPY OF script_name. For example, RMAN renames bp_cmd to COPY OF bp_cmd.

If the renamed global script is still not unique, then RMAN renames it to COPY(2) OF script_name. If this script name also exists, then RMAN renames the script to COPY(3) OF script_name. RMAN continues the COPY(n) OF pattern until the script is uniquely named.

Syntax

import::=

IMPORT Command
Description of the illustration import.gif

(connectStringSpec::=)

Semantics

Syntax Element Description
connectStringSpec
Specifies the connection string for the source recovery catalog, which is the catalog whose metadata will be imported.
DBID integer Specifies the list of DBIDs for the databases whose metadata should be imported from the source catalog schema (see Example 2-85).

When not specified, RMAN merges metadata for all database IDs from the source catalog schema into the destination catalog schema. RMAN issues an error if the database whose metadata is merged is already registered in the recovery catalog schema.

DB_NAME database_name Specifies the list of databases whose metadata should be imported from the source catalog schema (see Example 2-85).

When not specified, RMAN merges metadata for all databases from the source catalog schema into the destination catalog schema. RMAN issues an error if the same DBID is registered in both recovery catalogs.

NO UNREGISTER Forces RMAN to keep imported database IDs in the source catalog schema. By default, the imported database IDs are unregistered from source recovery catalog schema.

Examples

Example 2-84 Importing Metadata for All Registered Databases

In this example, database inst1 contains a 10.2 catalog schema owned by user rcat, while database catdb contains an 11.1 catalog schema owned by user rco. RMAN imports metadata for all database IDs registered in rcat into the recovery catalog owned by rco. All target databases registered in rcat are unregistered.

RMAN> CONNECT CATALOG rco/password@catdb
 
connected to recovery catalog database
 
RMAN> IMPORT CATALOG rcat/oracle@inst1;
 
Starting import catalog at 15-FEB-07
connected to source recovery catalog database
import validation complete
database unregistered from the source recovery catalog
Finished import catalog at 15-FEB-07

Example 2-85 Importing Metadata for a Subset of Registered Databases

This example is a variation on Example 2-84. Instead of importing the entire recovery catalog, it imports only the metadata for the database with DBID 1618984270.

RMAN> CONNECT CATALOG rco/password@catdb

connected to recovery catalog database
 
RMAN> IMPORT CATALOG rcat/oracle@inst1 DBID=1618984270;
 
Starting import catalog at 15-FEB-07
connected to source recovery catalog database
import validation complete
database unregistered from the source recovery catalog
Finished import catalog at 15-FEB-07