Restoring the Control File from a Backup Set Without Using RMAN
The following is taken straight from the Oracle documentation:
- “You must use a non-standard procedure to restore a control file from
an RMAN backup set in the following situations:
- -
- -
- If you have no other backup of the control file except in a RMAN backup set, and you need the control file to perform a restore operation, use the following PL/SQL program to extract the control file from the backup set. Run this program from SQL*Plus while connected as SYSDBA to the target database:
- -
devtype varchar2(256);
done boolean;
BEGIN
devtype := dbms_backup_restore.deviceallocate('devtype', params=>'');
# Replace 'devtype' with the device type you used when creating the backup: NULL or
# sbt_tape. If you used an sbt_tape device and specified a 'parms' option on the RMAN
# allocate channel command, then put that parms data in the 'params' operand here.
dbms_backup_restore.restoresetdatafile;
dbms_backup_restore.restorecontrolfileto('/tmp/foo.cf');
# This path specifies the location for the restored control file. If there are multiple
# control files specified in the init.ora file, copy the control file to all specified
# locations before mounting the database.
dbms_backup_restore.restorebackuppiece('handle',done=>done);
# Replace 'handle' with the your backup piece handle. This example assumes that the
# backup set contains only one backup piece. If there is more than one backup piece in
# the backup set (which only happens if the RMAN command set limit kbytes is used), then
# repeat the restorebackuppiece statement for each backup piece in the backup set.
END;
/
- After you have successfully restored the control file, you can mount
the database and perform restore and recovery operations.”
[EMAIL PROTECTED]
At 12:24 PM 10/24/2003 -0800, you wrote:
AK
Since extracting the controlfile from your backup seems to be your major
issue, perhaps someone on this list that mastered that issue will reply --
how about it? You could also Google for Oracle-L and RMAN, you might find
where they posted it.
8i? Check Appendix C of Freeman's book. The man thinks of everything.
Dennis Williams
DBA
Lifetouch, Inc.
[EMAIL PROTECTED]