Wednesday, June 10, 2009

Configure Recovery Catalog

Create a Recovery Catalog database:
As you have already aware of the RMAN Concepts, it is time to create a recovery catalog database to keep all backup/recovery metadata. Lets first create the environment to create a recovery catalog database.

Pre-requisites:
1: It is assumed that oracle software is installed and a normal Oracle database (Ex: RMAND) is already created using dbca.
2: It is assumed that the Listener is up and running.
3: It is assumed that the tnsnames.ora contains RMAND database connection information.

Test the environment in Server:
$ ps -ef grep tns
LISTENER_RMAND process is running

$ tnsping rmand
OK (80 msec)

Create the RMAN user in the database.
$ sqlplus / as sysdba
SQL> Create user rman identifed by rman default tablespace Users and temporary tablespace temp quota unlimited on users;
SQL> Grant create session, connect, resource, recovery_catalog_owner to rman;

Test Connectivity:
Lets do a test whether connectivity works fine or not.

$sqlplus rman/rman@rmand

If it is connected to database then you are all set to create a recovery catalog database.

Create a Catalog database:
$ rman catalog rman/rman@rmand
RMAN> Create Catalog;

The above steps will complete the catalog database creation. RMAN schema will have entire RMAN objects which will hold backup/recovery metadata.

Registering the TARGET database:
As the recovery catalog database is created. It is time to register the target database which needs to be backed up using RMAN.

Pre-requisites:

1: It is assumed that oracle software is installed and a normal Oracle database (Ex: RIPO) is already created using dbca.
2: It is assumed that the Listener is up and running.
3: It is assumed that the tnsnames.ora contains RMAND (Recovery Catalog) and RIPO (Target database) database connection information.

Test the environment in Server:
$ ps -ef grep tns
LISTENER_RMAND process is running
LISTENER_RIPO process is running

$ tnsping ripo
OK (80 msec)

$ tnsping rmand
OK (80 msec)

Set the TARGET database environment:
$ . oraenvORACLE_SID = [RIPO] ? RIPO

Register Target Database:
$ rman target system/manager@ripo catalog rman/rman@rmand

RMAN> register database;

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

Where to See whether the target database is registered or not?
Connect to recovery catalog database and execute the below to find whether target database is registered with recovery catalog database or not.

$sqlplus rman/rman@rmand
SQL> select * from rc_database;
DB_KEY DBINC_KEY DBID NAME RESETLOGS_CHANGE# RESETLOGS
--------- ------------- ------ ----- ----------------- -------------
1 2 2498101982 RIPO 1 15-JAN-04

For RMAN Concepts refer:
http://oracledocaccess.blogspot.com/2009/06/rman-concepts.html

No comments:

Post a Comment