cancel
Showing results for 
Search instead for 
Did you mean: 

Restoring Controlfile

muneer alam
Occasional Contributor

Restoring Controlfile

Hi,

I am facing a problem with Oracle Restore.

I am want to restore the Production RMAN Backups(taken via HPDP) to a test machine.

When I try to restore the controlfile from RMAN autobackup using the following command:

run {

set controlfile autobackup format for device type 'sbt_type' to '%F';

allocate channel 'dev_0' type 'sbt_tape' parms 'ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=PRD,OB2BARLIST=Daily_Full_RAC2)';

restore controlfile from autobackup;

release channel 'dev_0';

}

The above command just get stuck at:

using target database control file instead of recovery catalog
allocated channel: dev_0
channel dev_0: sid=870 devtype=SBT_TAPE
channel dev_0: Data Protector A.06.00/331

Starting restore at 27-JAN-11

channel dev_0: looking for autobackup on day: 20110127


It does not move ahead. I am not sure whether it is hung or it is searching the backups. However, even after an hour, it did not proceed further.

I cancelled this and copied the controlfiles from cold file system backups and then ran the following restore command in RMAN on this test machine:

run {

allocate channel 'dev_0' type 'sbt_tape' parms 'ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=PRD,OB2BARLIST=Daily_Full_RAC1)';

set until time "to_date('27/01/2011:08:35:10','dd/mm/yyyy:hh24:mi:ss')";

restore database;

recover database;

release channel 'dev_0';

}

This command is working fine and Datafiles are being restored.

Can someone suggest what is wrong when i am trying to restore the controlfiles.

Thanks.
8 REPLIES
Horia Chirculescu
Honored Contributor

Re: Restoring Controlfile

Hello Muneer,

You should restore the control file in no mount state (or cp the control file(s) from the backup/tape) to the test machine.

Of course, you should have configured autobackup on the controlfile.

Best regards from Romania,

Horia.
Best regards from Romania,
Horia.
muneer alam
Occasional Contributor

Re: Restoring Controlfile

Thanks for the reply.

I am trying to restore the controlfile in NOMOUNT mode only.
butti
Frequent Advisor

Re: Restoring Controlfile

Hi,

try this.. (include "controlfile from..")


# more rmanControlfileRestore.rman

set dbid 123321123
run {
allocate channel 'dev_0' type 'sbt_tape'
format 'Host_lrr.dbf'
parms 'ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=lrr)';

restore controlfile from 'Host_lrr<725373692:1>.dbf';


release channel 'dev_0';


best regards,
butti
muneer alam
Occasional Contributor

Re: Restoring Controlfile

Dear Butti,

Thanks for your kind response.

Could you please explain the following parameters in details:

'Host_lrr.dbf'

What is Host_lrr ?
and
What is .dbf ???

Kindly explain.

Thanks.
butti
Frequent Advisor

Re: Restoring Controlfile

Hi,

you could see this parameter in your backup Log !! (Internal Database > Your Session > Messages).

'Host_lrr.dbf'
Host_lrr = My Backup definition (name) in DataProtector.

lrr = Instance name

But your Parameter could you see in your last Backup Log !!

butti
Jean-Luc Oudart
Honored Contributor

Re: Restoring Controlfile

Hi

not sure what you tried to achieve. If you want to create a clone of your database you should use the duplicate command ;
http://download.oracle.com/docs/cd/B14117_01/server.101/b10734/rcmdupdb.htm#1006085

For a restore to a different location :
http://download.oracle.com/docs/cd/B14117_01/server.101/b10734/rcmrecov.htm#1009919
I believe the dbid will be same.

Also, you should indicate the version of the products and OS.

Regards
Jean-Luc
fiat lux
muneer alam
Occasional Contributor

Re: Restoring Controlfile

Dear Butti,

I got the following errors when I ran the command suggested by you:

RMAN>

RMAN> run {

allocate channel 'dev_0' type 'sbt_tape' parms 'ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=PRD)';

restore controlfile from 'Daily_Incr_RAC2<741448503:1>.dbf';

release channel 'dev_0';

}2> 3> 4> 5> 6> 7> 8> 9>

allocated channel: dev_0
channel dev_0: sid=870 devtype=SBT_TAPE
channel dev_0: Data Protector A.06.00/331

Starting restore at 30-JAN-11

channel dev_0: restoring control file
[Normal] From: OB2BAR_Oracle8@aqhauerptestdb.qudrah.com "PRD" Time: 01/30/2011 09:11:28 AM
Starting OB2BAR Restore: aqherprac2.qudrah.com:Daily_Incr_RAC2<741448503:1>.dbf "Oracle8"


[Normal] From: OB2BAR_Oracle8@aqhauerptestdb.qudrah.com "PRD" Time: 01/30/2011 09:11:34 AM
Completed OB2BAR Restore: aqherprac2.qudrah.com:Daily_Incr_RAC2<741448503:1>.dbf "Oracle8"


released channel: dev_0
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 01/30/2011 09:11:38
ORA-19697: standby control file not found in backup set

Kindly advice.

Thanks.
muneer alam
Occasional Contributor

Re: Restoring Controlfile

Dear Butti,

Thanks a ton for your kind help.

I was giving wrong backup set. When i gave the correct backup set name, i was able to restore the controlfile.

RMAN> run {
allocate channel 'dev_0' type 'sbt_tape' parms 'ENV=(OB2BARTYPE=Oracle8,OB2APPNAME=PRD)';
restore controlfile from 'c-1745654497-20110130-05';
release channel 'dev_0';
}2> 3> 4> 5> 6> 7> 8> 9>
allocated channel: dev_0
channel dev_0: sid=870 devtype=SBT_TAPE
channel dev_0: Data Protector A.06.00/331
Starting restore at 30-JAN-11

channel dev_0: restoring control file
[Normal] From: OB2BAR_Oracle8@aqhauerptestdb.qudrah.com "PRD" Time: 01/30/2011 12:05:36 PM
Starting OB2BAR Restore: aqherprac2.qudrah.com:c-1745654497-20110130-05 "Oracle8"
[Normal] From: OB2BAR_Oracle8@aqhauerptestdb.qudrah.com "PRD" Time: 01/30/2011 12:05:48 PM
Completed OB2BAR Restore: aqherprac2.qudrah.com:c-1745654497-20110130-05 "Oracle8"
channel dev_0: restore complete, elapsed time: 00:03:36
output filename=/u02/prod/proddata/cntrl01.dbf
output filename=/u02/prod/proddata/cntrl02.dbf
output filename=/u02/prod/proddata/cntrl03.dbf
Finished restore at 30-JAN-11
released channel: dev_0

I have completed my long pending testing today.

Thanks a lot once again.

Muneer.