Home » RDBMS Server » Backup & Recovery » Oracle 9.2.0.4.0 on Windows (Restoring Controlfile from Non-default Location)
Oracle 9.2.0.4.0 on Windows [message #431593] Wed, 18 November 2009 06:42 Go to next message
chetanaZ
Messages: 132
Registered: October 2009
Location: UK
Senior Member
Hi,

Following is my Backup script

run{
configure controlfile autobackup on;
configure controlfile autobackup format for device type disk to 'G:\Backups\db01backup\%d\%F';
configure channel 1 device type disk format 'G:\Backups\db01backup\%d\%d_%T_%s_%p.bak';
configure retention policy to redundancy 1;
backup database plus archivelog;
delete obsolete;
}


Now I am trying to restore, recover the database as

set DBID=3318912716
run{
configure controlfile autobackup format for device type disk to 'G:\Backups\db01backup\%d\%F';
startup nomount
restore controlfile from autobackup;
startup mount;
set until time "to_date('2009-11-17:18:08:00','YYYY-MM-DD:HH24:MI:SS')"; 
allocate channel ch1 device type disk;
restore database;
recover database;
release channel ch1;
}
alter database open resetlogs;


however I am getting following error

using target database controlfile instead of recovery catalog
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of configure command at 11/18/2009 12:21:56
ORA-01507: database not mounted


Initially I tried without configure command and I got error as following
set DBID=3318912716
run{
startup nomount
restore controlfile from autobackup;
startup mount;
set until time "to_date('2009-11-17:18:08:00','YYYY-MM-DD:HH24:MI:SS')"; 
allocate channel ch1 device type disk;
restore database;
recover database;
release channel ch1;
}
alter database open resetlogs;

Error :
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 11/18/2009 12:08:14
RMAN-06172: no autobackup found or specified handle is not a valid copy or piece

Recovery Manager complete.


How to get rid of these errors and restore the controlfile from non-default location?

Since I want to automate the script I do not want to restore controlfile with the synatx 'restore controlfile from 'G:\Backups\db01backup\...';

Thanks and Regards,
Chetana
Re: Oracle 9.2.0.4.0 on Windows [message #431596 is a reply to message #431593] Wed, 18 November 2009 07:03 Go to previous messageGo to next message
Michel Cadot
Messages: 68641
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
You cannot configure if the database is not mounted as to configure it needs to write into control file.
So if you didn't configure before and lose the control file, you cannot do it now you have to explicitly specify from where you want to restore the control file.

Regards
Michel
Re: Oracle 9.2.0.4.0 on Windows [message #431599 is a reply to message #431593] Wed, 18 November 2009 07:44 Go to previous message
chetanaZ
Messages: 132
Registered: October 2009
Location: UK
Senior Member
Thanks Michel

You have said
"You cannot configure if the database is not mounted as to configure it needs to write into control file."

This is clear to me now

However
"So if you didn't configure before and lose the control file, you cannot do it now you have to explicitly specify from where you want to restore the control file"

In Fact with my experience even if I configure (as I did while backup) but lose controlfile I need to specify file path explicitly

As of now I got rid of situation using

RMAN> run{
 startup nomount;
 SET CONTROLFILE AUTOBACKUP FORMAT FOR DEVICE TYPE DISK TO 'G:\Backups\elxtbackup\DB01\%F';
 restore controlfile from autobackup;
 }


Thanks and Regards,
Chetana
Previous Topic: Recovery catalog Views
Next Topic: message in alert.log
Goto Forum:
  


Current Time: Sat Apr 20 00:57:35 CDT 2024