Import Catalog: A New RMAN Feature

Start Here

Get in touch with a
TriCore Solutions specialist

Blog | Jul 1, 2016

Import Catalog: A New RMAN Feature


The IMPORT CATALOG command is used to import the metadata from one recovery catalog schema into a different catalog schema. Each target imported is unregistered from the source catalog and registered with the target catalog by default.


Introduction:

Generally we use the same catalog schema for most of the Databases that have the same DB version however when we upgrade one of the DB to a higher version there are possibilities of encountering issues. For example either to upgrade the recovery catalog or create a new recovery catalog for an upgraded DB. If we upgrade the recovery catalog, then the version of the recovery catalog will be higher and the version of rest of the DB registered with that catalog will be lower. If we create a new recovery catalog for an upgraded DB and register it with the new catalog then all of the previous metadata information will not be available in the new catalog. 

To counter the above problem, Oracle introduced the IMPORT CATALOG command from 11g onwards. The IMPORT CATALOG command is used to import the metadata from one recovery catalog schema into a different catalog schema. Each target imported is unregistered from the source catalog and registered with the target catalog by default. If we use the NO UNREGISTER clause during import catalog, it will not unregister the DB from the source catalog.  

Below are few examples on how to migrate metadata from one recovery catalog to another recovery catalog:

Example 1:  Importing Metadata for All Registered Databases from Source catalog to New Catalog.

import db metadata

RMAN> CONNECT CATALOG rman12102@emrep 

recovery catalog database Password: xxxxx

connected to recovery catalog database 

RMAN> IMPORT CATALOG rman1124@emrep; 

Starting import catalog at 21-JUN-16

source recovery catalog database Password: xxxxxx

connected to source recovery catalog database

import validation complete

database unregistered from the source recovery catalog

Finished import catalog at 21-JUN-16 

Example 2:  Importing Metadata for a Single Registered Database from Source catalog to New Catalog. We can specify the DBID or DB_NAME to import metadata of each target.


create new catalog

RMAN> CONNECT CATALOG rman12102@emrep 

recovery catalog database Password: xxxxxx

connected to recovery catalog database 

RMAN> IMPORT CATALOG rman1124@emrep DBID=4017675477; 

Starting import catalog at 21-JUN-16

source recovery catalog database Password: xxxxx

connected to source recovery catalog database

import validation complete

database unregistered from the source recovery catalog

Finished import catalog at 21-JUN-16 

Example 3:  Importing Metadata for a Single Registered Database without unregistering from Source catalog. We can specify the DBID or DB_NAME to import metadata of each target. 

RMAN> CONNECT CATALOG rman12102@emrep 

recovery catalog database Password: password

connected to recovery catalog database 

RMAN> IMPORT CATALOG rman1124@emrep DBID=4017675475 no unregister; 

Starting import catalog at 21-JUN-16

source recovery catalog database Password: xxxxx

connected to source recovery catalog database

import validation complete

Finished import catalog at 21-JUN-16

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 

Conclusion:
We can import the metadata from one recovery catalog into another recovery catalog very easily by using the above discussed commands. There is no need to upgrade the whole catalog if single database is upgraded to a higher version. You can use the  commands discussed above to make all of the previous metadata available in new catalog schema. For any questions on the topic click below. You can also leave a comment. 

Ask Mithun