Catalog Database

SQL> create tablespace rman_cat datafile 'C:\oracle\product\10.2.0\oradata\cat\rman_cat01.DBF' SIZE 100M;

Tablespace created.

SQL> create user munna

identified by munna

default tablespace rman_cat

temporary tablespace temp;

User created.

SQL> grant connect,resource,recovery_catalog_owner to munna;

Grant succeeded.

RMAN> connect catalog munna/munna@cat

connected to recovery catalog database

RMAN> create catalog tablespace rman_cat

recovery catalog created

C:\>rman target sys/sys@dba20 catalog munna/munna@cat

Recovery Manager: Release 10.2.0.1.0 - Production on Mon Jul 12 16:08:21 2010

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

connected to target database: DBA20 (DBID=847839442)

connected to recovery catalog database

RMAN> run

{

allocate channel c1 type disk;

allocate channel c2 type disk;

backup database;

}

RMAN> report schema;

RMAN> resync catalog;

starting full resync of recovery catalog

full resync complete

If any physical structure changes in target database then this command required for resynchronization.

RMAN> reset database;

database incarnation already registered

This command required only when incomplete recovery occurred in target database.

SQL> shutdown immediate;

Database closed.

Database dismounted.

Delete some Datafile

SQL> startup;

ORACLE instance started.

Total System Global Area 167772160 bytes

Fixed Size 1247876 bytes

Variable Size 75498876 bytes

Database Buffers 83886080 bytes

Redo Buffers 7139328 bytes

Database mounted.

ORA-01157: cannot identify/lock data file 1 - see DBWR trace file

ORA-01110: data file 1: 'C:\ORACLE\PRODUCT\10.2.0\ORADATA\DBA20\SYSTEM01.DBF'

C:\>rman target sys/sys@dba20 catalog munna/munna@cat

RMAN> run

{

allocate channel c1 type disk;

allocate channel c2 type disk;

restore database;

recover database;

}

SQL> alter database open;

Database altered.