Title: Oracle RMAN restore autobackup controlfile
Date: 02/2007
NV Version: 7.4.x
OS Version: Any
Application version:Oracle 9x, Oracle 10x
Plugin version:RMAN 4.5
Description: Instructions for retrieving the latest autobackup controlfile backup with no catalog.
Symptoms: In a disaster recovery situation it is necessary to retrieve the last controlfile backed up by autobackup controlfile. This controlfile is not accessible through the Netvault restore GUI as it is not a Netvault generated backup.
At the recovery point of an Oracle database which has been backed up with RMAN us a controlfile instead of a catalog, having created a new instance to recover into, the current controlfile has no record of the location of the backups. So it is necessary to do a manual recovery of the controlfile from the tape before proceeding.
You first need to locate the actual backup piece of the last autobackup controlfile - you can find this by accessing the Netvault Restore module, selecting your original Netvault Client RMAN module and browsing the records - the RMAN controlled backups are listed separately - pick the one with the most recent timestamp.
Example listing:
"RMAN controlled backup - c-3893371605-20070215-06 (Saveset 21) 11:10 15 Feb 2007
The backup piece name is 'c-3893371605-20070215-06'.
This backup piece name is needed to relocate your controlfile locally:
The code required is:
DECLARE
devtype varchar2(256);
done boolean;
BEGIN
devtype := dbms_backup_restore.deviceallocate('sbt_tape', params=>' ');
dbms_backup_restore.restoresetdatafile;
dbms_backup_restore.restorecontrolfileto('/tmp/controlfile disk location');
dbms_backup_restore.restorebackuppiece('backup piece name',done=>done);
END;
/
So for the above example this becomes:
Connecting as sysdba in SQLPLUS:
SQL> startup nomount;
SQL>
DECLARE
devtype varchar2(256);
done boolean;
BEGIN
devtype := dbms_backup_restore.deviceallocate('sbt_tape', params=>' ');
dbms_backup_restore.restoresetdatafile;
dbms_backup_restore.restorecontrolfileto('/tmp/temp_controlfile.ora');
dbms_backup_restore.restorebackuppiece('c-3893371605-20070215-06',done=>done);
END;
/
Having run this command you will need to relocate the temporary controlfile to the original location using a filesystem copy (to all copies of the controlfile), after which you should then be able to run:
SQL> alter database mount;
then continue with the RMAN restore/recover process.