Home » RDBMS Server » Backup & Recovery » RMAN restore off autobackup (Oracle 11.2.0.3.0)
icon5.gif  RMAN restore off autobackup [message #600142] Fri, 01 November 2013 05:26 Go to next message
ijsselg
Messages: 13
Registered: April 2005
Location: Netherlands
Junior Member
I want to restore my database from server x to server y.

The control files on server x are named [$ORACLE_SID]_control01.ctl and [$ORACLE_SID]_control02.ctl.
We have an auto backup of the control files.

When I restore the control files on host y, (from autobackup) the restored controle files have other names: control01.ctl and control02.ctl. After the restore and recover (which goes well) the database does not start correctly.

SQL> ORACLE instance started.

Total System Global Area  626327552 bytes
Fixed Size                  2224088 bytes
Variable Size             411041832 bytes
Database Buffers          205520896 bytes
Redo Buffers                7540736 bytes
Database mounted.
ORA-01122: database file 1 failed verification check
ORA-01110: data file 1: '/data/coda/coda_system01.dbf'
ORA-01202: wrong incarnation of this file - wrong creation time 


Re: RMAN restore off autobackup [message #600144 is a reply to message #600142] Fri, 01 November 2013 05:38 Go to previous messageGo to next message
John Watson
Messages: 8922
Registered: January 2010
Location: Global Village
Senior Member
You might be better off following one of the standard techniques for duplicating a database, there is a step-by-step description here in chapter 24,
http://docs.oracle.com/cd/E11882_01/backup.112/e10642/toc.htm
Re: RMAN restore off autobackup [message #600146 is a reply to message #600144] Fri, 01 November 2013 05:43 Go to previous messageGo to next message
ijsselg
Messages: 13
Registered: April 2005
Location: Netherlands
Junior Member
Thanks, but we have a standard procedure/script voor backup and restore with RMAN. And this procedure is working for all other databases, only this one is the problem.
Re: RMAN restore off autobackup [message #600148 is a reply to message #600146] Fri, 01 November 2013 05:55 Go to previous messageGo to next message
John Watson
Messages: 8922
Registered: January 2010
Location: Global Village
Senior Member
If you post your script here, with the output of what happens when you run it, perhaps someone can debug it for you.
Re: RMAN restore off autobackup [message #600149 is a reply to message #600148] Fri, 01 November 2013 05:58 Go to previous messageGo to next message
ijsselg
Messages: 13
Registered: April 2005
Location: Netherlands
Junior Member
ok, this is my restorescript

rman target / << EOF
set dbid $DBID
STARTUP FORCE NOMOUNT PFILE='/dbms/oracle/admin/$sid/pfile/init.ora'
RESTORE CONTROLFILE FROM '/dbms/oracle/${flash}_recovery_area/auto.restore.$ORACLE_SID/$ctrlfile2';
alter database mount;
catalog start with '/dbms/oracle/${flash}_recovery_area/auto.restore.$ORACLE_SID';
YES
run {
set until time "to_date('$dat $tijd','dd-mm-yyyy hh24:mi:ss')";
restore database;
recover database;
}
exit
EOF


sqlplus '/as sysdba' << EOF
alter database open resetlogs;
shutdown abort
startup
exit
EOF
Re: RMAN restore off autobackup [message #600150 is a reply to message #600149] Fri, 01 November 2013 06:04 Go to previous messageGo to next message
John Watson
Messages: 8922
Registered: January 2010
Location: Global Village
Senior Member
There is one obvious bug: you need to specify the pfile, or create an spfile, for your final startup.
--
update: and you do need to show what actually happens.

[Updated on: Fri, 01 November 2013 06:06]

Report message to a moderator

Re: RMAN restore off autobackup [message #600151 is a reply to message #600150] Fri, 01 November 2013 06:07 Go to previous messageGo to next message
ijsselg
Messages: 13
Registered: April 2005
Location: Netherlands
Junior Member
The pfile is /dbms/oracle/admin/$sid/pfile/init.ora, it is specified in this code
'STARTUP FORCE NOMOUNT PFILE='/dbms/oracle/admin/$sid/pfile/init.ora'
Re: RMAN restore off autobackup [message #600152 is a reply to message #600150] Fri, 01 November 2013 06:10 Go to previous messageGo to next message
John Watson
Messages: 8922
Registered: January 2010
Location: Global Village
Senior Member
John Watson wrote on Fri, 01 November 2013 11:04
There is one obvious bug: you need to specify the pfile, or create an spfile, for your final startup.

Re: RMAN restore off autobackup [message #600156 is a reply to message #600152] Fri, 01 November 2013 08:07 Go to previous messageGo to next message
gazzag
Messages: 1118
Registered: November 2010
Location: Bedwas, UK
Senior Member
John meant this one:

sqlplus '/as sysdba' << EOF
alter database open resetlogs;
shutdown abort
startup
exit
EOF

Which is not required after your alter database open resetlogs;
icon12.gif  Re: RMAN restore off autobackup [message #600157 is a reply to message #600156] Fri, 01 November 2013 08:27 Go to previous messageGo to next message
ijsselg
Messages: 13
Registered: April 2005
Location: Netherlands
Junior Member
I just found the problem and it was so simple... Thanks all for your help. Smile

The pfile on system y was wrong.

was:

control_files=("/data/coda/ctrl/control01.ctl", "/dbms/oracle/admin/coda/ctrl/control02.ctl")


correct is this, where xxx is $ORACLE_SID:

control_files=("/data/coda/ctrl/xxxx_control01.ctl", "/dbms/oracle/admin/coda/ctrl/xxxx_control02.ctl")


Re: RMAN restore off autobackup [message #600161 is a reply to message #600157] Fri, 01 November 2013 09:53 Go to previous messageGo to next message
gazzag
Messages: 1118
Registered: November 2010
Location: Bedwas, UK
Senior Member
Thanks for the feedback. I recommend that you look into using a SPFILE rather than a pfile:

http://docs.oracle.com/cd/E11882_01/server.112/e41084/statements_6016.htm#SQLRF54345
Re: RMAN restore off autobackup [message #600162 is a reply to message #600161] Fri, 01 November 2013 09:55 Go to previous message
ijsselg
Messages: 13
Registered: April 2005
Location: Netherlands
Junior Member
Thank,I will read the document. Have a nice weekend.
Previous Topic: difference between backup control file and backing up using controlfile?
Next Topic: Help using RMAN newbie
Goto Forum:
  


Current Time: Fri Mar 29 06:02:25 CDT 2024