By default when we wish to restore the spfile,controlfile from autobackup RMAN looks for the default for autobackup at the location $ORACLE_HOME/dbs in UNIX and $ORACLE_HOME/database for Windows.
As a result when using rman when we use the command restore spfile from autobackup we get error RMAN-06172
hence to avoid the error during autobackup we specify the parameters values db_recovery_file_dest and db_name while restoring the auto backup as shown
RMAN> restore spfile from autobackup db_recovery_file_dest=’c:\oracle\flash_recovery_area’ db_name=’orcl’;
C:\WINDOWS>rman target / nocatalog
Recovery Manager: Release 10.2.0.1.0 – Production on Sun Jun 25 13:09:52 2006
Copyright (c) 1982, 2005, Oracle. All rights reserved.
connected to target database (not started)
RMAN>startup nomount;
startup failed:
ORA-01078: failure in processing system parameters
ORA-01565: error in identifying file ‘C:\oracle\product\10.2.0\db_1\dbs\spfileorcl.ora’
ORA-27041: unable to open file OSD-04002: unable to open file
O/S-Error: (OS 2) The system cannot find the file specified. starting Oracle instance without parameter file for retrival of spfile
Oracle instance started
Total System Global Area 159383552 bytes
Fixed Size 1247852 bytes
Variable Size 54527380 bytes
Database Buffers 100663296 bytes
Redo Buffers 2945024 bytes
RMAN> restore spfile from autobackup db_recovery_file_dest=’C:\oracle\flash_recovery_area’
db_name=’orcl’;
Starting restore at 25-JUN-06 allocated channel: ORA_DISK_1 channel ORA_DISK_1: sid=36 devtype=DISK recovery area destination: C:\oracle\flash_recovery_area database name (or database unique name) used for search: ORCL
channel ORA_DISK_1: autobackup found in the recovery area channel ORA_DISK_1:autobackup found:C:\ORACLE\FLASH_RECOVERY_AREA\ORCL\AUTOBACKUP\2006_06_25\O1_MF_S_593780697_29XQL0C7_.BKP
channel ORA_DISK_1: SPFILE restore from autobackup complete Finished restore at 25-JUN-06