RMAN restore database from disk in custom location



This topic explain a basic methodology for restoring an Oracle database without catalog from a custom location in  disk in the local server. 



1- Connect to the catalog database.


$ORACLE_HOME/bin/rman target db_user/password  catalog  db_catalog/password@db_catalog

You need to check the incarnation id of  the database in order to see if you need to reset another one.

RMAN> LIST INCARNATION of database;



List of Database Incarnations

 DB Key  Inc Key DB Name  DB ID            STATUS  Reset SCN     Reset Time
 ------- ------- -------- ---------------- ---     ----------    ----------
32705   211103  TST      1523482262       ORPHAN  244511521611  04-05-15:17:10:38
32705   211266  TST      1523482262       ORPHAN  244511530444  05-05-15:17:44:35
32705   215420  TST      1523482262       ORPHAN  244511530444  06-05-15:09:27:51
236249  236262  TST      2719392798       PARENT  960431        23-02-11:09:25:52
236249  236263  TST      2719392798       PARENT  244510551973  07-05-15:11:16:36
236249  236250  TST      2719392798       PARENT  244510597472  07-05-15:18:00:10
                236249  236462  TST      2719392798       ORPHAN  244510637964  08-05-15:11:17:26
236249  244655  TST      2719392798       CURRENT 244510638378  09-05-15:18:42:58


In this case, the current Inc Key 244655 is correct.  

 

2- Restore control files, datafiles and archives logs files.


run{
allocate channel d1 type disk;
allocate channel d2 type disk;

RESTORE CONTROLFILE from '/backup/backup11/rman/tst/restore/rman_control_file_tst.rman';
alter database mount;
estore database;
CATALOG START WITH '/backup/backup11/rman/tst/restore' NOPROMPT;
recover database;
alter database open resetlogs;

release channel d1;
release channel d2;

}


Comments