Saturday, June 28, 2008

Creating a recovery catalog for RMAN

For Oracle Server Enterprise Edition 9x-10x

Creating a recovery catalog for RMAN


Server A - Target database (PROD)

Server B - Recovery Catalog database (catdb)

General settings:


1. RDBMS version and OS version should be same in Server A and Server B.

2. Server A and B should ping each other. Check each other entries in /etc/hosts file.

3. Copy the tnsname.ora entry (server A) add it in server B tnsname.ora entry and vice versa.


Step -1: Create password file on target DB (server A)


$orapwd file=orapwORACLE_SID (filename) password=password

Eg: - $orapwd file=orapwPROD password=rolta2k
(oracle password file default file location is $ORACLE_HOME/dbs)
Then,
Add parameter remote_login_passwordfile=EXCLUSIVE in server A initSID.ora
And bounce the database once.


After done this settings you should be able to connect the remotely

Eg: - From Server B just execute, and vice versa.
$sqlplus sys/sys@PROD as sysdba


Step - 2: Create tablespace for recovery catalog to store the target (server A) database information.

Connect to catalog DB Server B where you we need to configure the recovery catalog.
$sqlplus “/as sysdba”


sql>CREATE TABLESPACE rmanDATAFILE '/u02/app/oradata/rman/rman01.dbf' size 500m;

Step - 3: Create the Recovery Catalog Owner in the new database (CATDB)

Sql>CREATE USER rman IDENTIFIED BY rmanDEFAULT TABLESPACE rmanQUOTA UNLIMITED ON rman;


Step – 4: Grant the necessary privileges to the schema ownersql> GRANT connect, resource, recovery_catalog_owner TO rman;Here the role \"RECOVERY_CATALOG_OWNER\" provides the user with all privileges required to maintain and query the recovery catalog

Step – 5:Creating the Recovery CatalogConnect to the Server -B which will contain the catalog as the catalog owner. $ rman catalog rman/passwd@catdb

Eg: - $rman catalog rman/rman@UAT04

Recovery Manager: Release 10.2.0.2.0 - Production on Mon Feb 25 16:00:46 2008

Copyright (c) 1982, 2005, Oracle. All rights reserved.

Connected to recovery catalog database

Step – 6: Run the CREATE CATALOG command to create the catalog
RMAN> CREATE CATALOG;recovery catalog created

Step – 7: Registering Target Database in the Recovery CatalogConnect to the target (Server A) database and recovery catalog database (Server B).

$ rman target sys/passwd@prod catalog rman/passwd@catdb

Eg: - $rman target sys/sys@NPROD catalog rman/rman@UAT04

Then, register the target database in recovery catalog

RMAN> REGISTER DATABASE;

Then, to identify whether has registered properly, execute the below command

RMAN> REPORT SCHEMA;

It will show the target database (Server A) datafile paths.

Eg: -
Report of database schema

List of Permanent Datafiles
===========================
File Size(MB) Tablespace RB segs Datafile Name
---- -------- -------------------- ------- ------------------------
1 1000 SYSTEM YES /uat01/oracle/PROD/db/apps_st/data/system01.dbf
2 1000 SYSTEM YES /uat01/oracle/PROD/db/apps_st/data/system02.dbf
3 1000 SYSTEM YES /uat01/oracle/PROD/db/apps_st/data/system03.dbf
4 1000 SYSTEM YES /uat01/oracle/PROD/db/apps_st/data/system04.dbf
5 1000 SYSTEM YES /uat01/oracle/PROD/db/apps_st/data/system05.dbf
6 200 CTXD NO /uat01/oracle/PROD/db/apps_st/data/ctxd01.dbf
7 10 OWAPUB NO /uat01/oracle/PROD/db/apps_st/data/owad01.dbf
8 1000 APPS_TS_QUEUES NO /uat01/oracle/PROD/db/apps_st/data/a_queue02.dbf
9 100 ODM NO /uat01/oracle/PROD/db/apps_st/data/odm.dbf
10 17 OLAP NO /uat01/oracle/PROD/db/apps_st/data/olap.dbf
11 2000 SYSAUX NO /uat01/oracle/PROD/db/apps_st/data/sysaux01.dbf
12 500 APPS_TS_TOOLS NO /uat01/oracle/PROD/db/apps_st/data/apps_ts_tools01.dbf
13 1615 SYSTEM YES


For additional reference:
http://download.oracle.com/docs/cd/B19306_01/backup.102/b14194/rcmsynta045.htm#sthref722

http://www.dbapool.com/articles/04110701.html
http://www.oracle-base.com/articles/9i/RecoveryManager9i.php

Metalink Doc ID: 360416.1
Subject: Oracle10g - Getting Started with Recovery Manager (RMAN)