How to create a Recovery Catalog

***The sole purpose of the recovery catalog is to hold or store database backups.  As long as the recovery catalog schema exists, we can recover datafiles, controlfiles, pfiles, spfiles  and redologfiles from the recovery catalog in case of a crash. Proactively use the recovery catalog as part of your backup strategy.***

RECOVERY CATALOG
================
1. Create RCAT(recovery catalog database) tablespace

SQL> create tablespace rcat_ts datafile ‘/u02/oradata/kud02/rcat_ts.dbf’ size 100M;

Tablespace created.

SQL>

2. create a RCAT user

SQL> create user RCAT identified by RCAT default tablespace rcat_ts temporary tablespace temp quota unlimited on rcat_ts;

User created.

SQL>

3. Grant the recovery_catalog_owner role to the RCAT user. This role provides all of the privileges required to maintain and query the recovery catalog:

SQL> GRANT RECOVERY_CATALOG_OWNER TO RCAT;

Grant succeeded.

4. grant connect, resource, create session to the RCAT user or for class purposes, grant him the dba role
SQL> grant dba to RCAT;

Grant succeeded.

5. connect to the recovery catalog database (kud02) from kud01

[69-64-69-66:oracle]$echo $ORACLE_SID
kud01
[69-64-69-66:oracle]$ rman target / catalog RCAT@kud02
password: RCAT

you can also connect as shown below;

rman target / catalog RCAT/RCAT@kud02

6. Run the create catalog
RMAN> create catalog;

recovery catalog created

7. Register the intended database to be backed in the recovery catalog
RMAN> register database;

database registered in recovery catalog
starting full resync of recovery catalog
full resync complete

RMAN>

9. test backup of database
backup database plus archivelog;

TEST OF RECOVERY USING RECOVERY CATALOG

1. create tablespace APPLE datafile ‘/u02/oradata/kud01/apple.dbf’ size 100M;

Tablespace created.

2. connect to recovery catalog and backup database

3. drop the tablespace APPLE

SQL> drop tablespace APPLE including contents and datafiles;

Tablespace dropped.

4. Recover the tablespace from the recovery catalog

-End-

-By Anthony Besong

 

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s