Use of a recovery catalog is optional although highly recommended.

Regardless of whether or not a recovery catalog is being used, the RMAN will "always" write backup metadata to the control file of the target database. The following is an example of how to create an RMAN recovery catalog in a new database named CATDB. Note that the owner of an RMAN recovery catalog cannot be the SYS user and the database hosting the recovery catalog (CATDB in example below) should be a different database from the target database you will be backing up, created on a different host and on different disks than the target database. 1. Create a database for the recovery catalog (i.e. CATDB). 2. Create a tablespace for the recovery catalog.

CREATE TABLESPACE rman_catalog DATAFILE SIZE 500m AUTOEXTEND on NEXT 100m MAXSIZE 8g EXTENT MANAGEMENT local UNIFORM SIZE 1m SEGMENT SPACE MANAGEMENT auto; Tablespace created. 3. Create database user to hold recovery catalog objects.

CREATE USER rman IDENTIFIED BY rman_pwd DEFAULT TABLESPACE rman_catalog TEMPORARY TABLESPACE temp QUOTA UNLIMITED ON rman_catalog; User created. 4. Grant the RECOVERY_CATALOG_OWNER role to the new schema owner. This role provides the user with privileges to create, maintain, and query the recovery catalog.

SQL> GRANT recovery_catalog_owner TO rman; Grant succeeded. 5. After creating the catalog owner, create the recovery catalog by using the CREATE CATALOG command within the RMAN interface. This command will create the catalog in the default tablespace of the catalog owner or you can explicitly set the tablespace name to be used by using the "TABLESPACE" option as shown below.

% rman catalog rman/rman_pwd@catdb Recovery Manager: Release 11.2.0.3.0 - Production on Mon May 13 16:47:42 2013 Copyright (c) 1982, 2011, Oracle and/or its affiliates. connected to recovery catalog database RMAN> create catalog tablespace rman_catalog; recovery catalog created All rights reserved.

you can also remove it using the DROP CATALOG command.2.3.6. % rman target backup_admin/backup_admin_pwd@testdb1 catalog rman/rman_pwd@catdb Recovery Manager: Release 11. RMAN> unregister database. Just as you can create the recovery catalog schema. For example. If the database has been removed then in most cases. The target database must be either mounted or opened in order to register it. The following example registers a target database named TESTDB1 to the newly created recovery catalog within the database named CATDB. database name is "TESTDB1" and DBID is 527025534 Do you really want to unregister the database (enter YES or NO)? YES database unregistered from the recovery catalog 10. database registered in recovery catalog starting full resync of recovery catalog full resync complete 8. you can register more than one target database in the same recovery catalog. it is just as easy to unregister a database. register the target database(s) in the recovery catalog. As easy as it is to register a target database in the recovery catalog. all data contained in the schema will be lost so take a backup before dropping the catalog. 9. recovery catalog owner is RMAN enter DROP CATALOG command again to confirm catalog removal RMAN> drop catalog. RMAN will obtain all information it needs to register the target database from the target database itself. simply connect to that database and to the recovery catalog and issue the following command: All rights reserved. Oracle and/or its affiliates. recovery catalog dropped 7. issue the following command: . As long as each target database has a distinct DBID. all you need to supply is the name of the database.0.Production on Mon May 13 17:03:41 2013 Copyright (c) 1982. Before using RMAN with a recovery catalog. but not necessarily a unique database name. Of course.0 . To unregister an existing database. connected to target database: TESTDB1 (DBID=527025534) connected to recovery catalog database RMAN> register database. to remove the TESTDB1 database. Each database registered in a given catalog must have a unique database identifier (DBID). RMAN> drop catalog. 2011.

0. 2011. executing command: SET DBID database name is "TESTDB1" and DBID is 527025534 RMAN> unregister database noprompt. Oracle and/or its affiliates.RMAN> unregister database testdb1. In this case.0 . Since this method necessitates the need to set the DBID. database name is "TESTDB1" and DBID is 527025534 Do you really want to unregister the database (enter YES or NO)? YES database unregistered from the recovery catalog 11.3. .Production on Mon May 13 17:23:50 2013 Copyright (c) 1982. database name is "TESTDB1" and DBID is 527025534 database unregistered from the recovery catalog All rights reserved. the unregister command will need to be performed within a run block: % rman catalog rman/rman_pwd@catdb Recovery Manager: Release 11.2. connected to recovery catalog database RMAN> set dbid 527025534. A more difficult situation exists when multiple databases with the same name are registered in the recovery catalog. you need to know the DBID for the database you want to remove from the recovery catalog.

Sign up to vote on this title
UsefulNot useful