Friday, June 1, 2012

Manually Clone Database using RMAN

1) Connect to the target database using rman backup the database on node 1

rman target /

backup database;

2) Move the following files to the NODE 2:
- backup pieces
- controlfile backup piece
- the parameter file i.e init.ora file to the default location i.e $ORACLE_HOME/dbs

3) Modify PFILE accordingly, invoke Rman on the node 2 after setting the Oracle environment variables and start the database in nomount mode:
export ORACLE_HOME, ORACLE_SID, PATH

$rman target /

RMAN> startup nomount;

4) Restore the controlfile from the backup piece.
RMAN> restore controlfile from ‘/node2/database/backup/c-3932056136-20070213-02′;

5) Mount the database
RMAN > alter database mount

6) Now catalog the backup pieces that was moved from NODE 1

RMAN> catalog backuppiece ‘/node2/database/backup/o1_mf_annn_TAG20070213T002925_2×21m6ty_.bkp’;

7) Now restore the datafiles
RMAN> run
{
restore database;
switch datafile all;
recover database;
alter database open resetlogs;
}

also refer Note:419137.1