RMAN REstore without Controlfile/Catalog
Assumptions
1) There is no controlfile available
2) We have the DBID of the database
3) Database has been completely lost
4) We either have the Catalog OR the Logfile of the RMAN backup taken last time
Procedure To Restore
A) if we have the logfile of the backups , get the Media Handle of the controlfile from the logfile
Getting the Media Handle from the Backup Logfile
Recovery Manager: Release 11.2.0.1.0 – Production on Wed Jul 28 13:20:44 2010
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
connected to target database: itskills (DBID=1314616062)
connected to recovery catalog database
RMAN> 2> 3> 4> 5> 6> 7> 8> 9> 10>
new incarnation of database registered in recovery catalog
starting full resync of recovery catalog
full resync complete
allocated channel: t1
channel t1: SID=3 instance=itskills1 device type=SBT_TAPE
channel t1: Veritas NetBackup for Oracle – Release 6.5 (2010011113)
sent command to channel: t1
Starting backup at 28-JUL-10
channel t1: input backup set: count=178, stamp=725540188, piece=1
channel t1: starting piece 1 at 28-JUL-10
channel t1: backup piece +DG_RECOVERY/itskills/backupset/2010_07_28/nnndf0_tag20100728t105627_0.333.725540189
piece handle=5nljtotf_1_1comment=API Version 2.0,MMS Version 5.0.0.0
channel t1: finished piece 1 at 28-JUL-10
channel t1: backup piece complete, elapsed time: 00:01:21
channel t1: input backup set: count=179, stamp=725540213, piece=1
channel t1: starting piece 1 at 28-JUL-10
channel t1: backup piece +DG_RECOVERY/itskills/backupset/2010_07_28/ncsnf0_tag20100728t105627_0.324.725540215
1) Open a RMAN session connected to NOMOUNTED database
2) Set up the DBID in RMAN session
RMAN> set dbid 1314616062
connected to target database: itskills (DBID=1314616062)
3) Restore the Controfile as follows
RMAN> run
{
allocate channel t1 type ‘SBT_TAPE’;
send ‘NB_ORA_POLICY=itskills_ora, NB_ORA_SERV=backupdev.itskills.ca’;
restore controlfile from ’5nljtotf_1_1′
restore database;
release channel t1;
}
4) Mount the database
RMAN> alter database mount;
database mounted
5) Restore the Database
RMAN> run
2> {
3> allocate channel t1 type ‘SBT_TAPE’;
4> send ‘NB_ORA_POLICY=otskills_ora, NB_ORA_SERV=backupdev.itskills.ca’;
5>
6> restore database;
7> release channel t1;
8> }
allocated channel: t1
channel t1: SID=93 instance=itskills1 device type=SBT_TAPE
channel t1: Veritas NetBackup for Oracle – Release 6.5 (2010011113)
sent command to channel: t1
Starting restore at 28-JUL-10
Starting implicit crosscheck backup at 28-JUL-10
Crosschecked 25 objects
Finished implicit crosscheck backup at 28-JUL-10
Starting implicit crosscheck copy at 28-JUL-10
Finished implicit crosscheck copy at 28-JUL-10
searching for all files in the recovery area
cataloging files…
no files cataloged
channel t1: starting datafile backup set restore
channel t1: specifying datafile(s) to restore from backup set
channel t1: restoring datafile 00001 to +DG_DATA/itskills/datafile/system.621.724861111
channel t1: restoring datafile 00002 to +DG_DATA/itskills/datafile/sysaux.1472.724861113
channel t1: restoring datafile 00003 to +DG_DATA/itskills/datafile/undotbs.590.724861113
channel t1: restoring datafile 00005 to +DG_DATA/itskills/datafile/undotbs1.592.724861113
channel t1: restoring datafile 00006 to +DG_DATA/itskills/datafile/undotbs2.594.724861113
channel t1: reading from backup piece 5iljtnas_1_2