一、问题:在做数据库的异地恢复的时候,恢复控制文件报RMAN-06024错
RMAN> run{
2> allocate channel t1 type 'sbt_tape' parms 'ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin64/tdpo.opt)';
3> sql 'alter session set NLS_DATE_FORMAT="YYYY-MM-DD HH24:MI:SS"';
4> sql 'alter session set NLS_LANGUAGE=American';
5> set until time='2009-07-09 21:50:00';
6> restore controlfile;
7> release channel t1;
8> }
allocated channel: t1
channel t1: sid=1117 devtype=SBT_TAPE
channel t1: Data Protection for Oracle: version 5.3.3.0
sql statement: alter session set NLS_DATE_FORMAT="YYYY-MM-DD HH24:MI:SS"
sql statement: alter session set NLS_LANGUAGE=American
executing command: SET until clause
Starting restore at 10-JUL-09
released channel: t1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 07/10/2009 09:24:45
RMAN-06026: some targets not found - aborting restore
RMAN-06024: no backup or copy of the control file found to restore
crosscheck发现控制文件是存在的:crosscheck结果如下:
backup piece handle=controlfile1_20090708_691709298 recid=5718 stamp=691709298
crosschecked backup piece: found to be 'AVAILABLE'
通过 restore controlfile from "controlfile1_20090708_691709298";语句可以恢复该控制文件。
但接下来恢复数据文件时,报RMAN-06133错误:
RMAN> run{
2> allocate channel t1 type 'sbt_tape' parms 'ENV=(TDPO_OPTFILE=/usr/tivoli/tsm/client/oracle/bin64/tdpo.opt)';
3> sql 'alter session set NLS_DATE_FORMAT="YYYY-MM-DD HH24:MI:SS"';
4> sql 'alter session set NLS_LANGUAGE=American';
5> set until time='2009-07-09 21:50:00';
6> restore database;
7> release channel t1;
8> }
allocated channel: t1
channel t1: sid=1117 devtype=SBT_TAPE
channel t1: Data Protection for Oracle: version 5.3.3.0
sql statement: alter session set NLS_DATE_FORMAT="YYYY-MM-DD HH24:MI:SS"
sql statement: alter session set NLS_LANGUAGE=American
executing command: SET until clause
Starting restore at 10-JUL-09
released channel: t1
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of restore command at 07/10/2009 10:45:12
RMAN-06133: recovery catalog may have obsolete data for datafile 43
二、在原备份的数据库上检查43号文件,是最近加入的,怀疑是rman的catalog信息和数据库的控制文件不一致,通过resync catalog之后,重新恢复控制文件,然后恢复数据文件,解决了问题
三、操作步骤
$ rman target / catalog rman/rman@catalog
RMAN> resync catalog;
starting full resync of recovery catalog
full resync complete
RMAN>
[@more@]相关错误:
RMAN-06133: | recovery catalog may have obsolete data for datafile string |
Cause: | A RESTORE UNTIL was issued, and the recovery catalog choose an older incarnation of the datafile than is listed in the control file. |
Action: | If the recovery catalog has correct data for the datafile, then restore a backup control file using the same UNTIL clause, then retry the datafile restore. Otherwise, restore a backup of the incarnation of the datafile listed in the control file. |
Oracle Error :: RMAN-06093
Cause
The specified datafile number was dropped and then reused. The control file mounted by the target database contains the newer version of the datafile, but the recovery catalog contains information about only the older version.
Action
Issue a RESYNC command to update the recovery catalog, then reissue the failing command. If the error persists, contact Oracle Customer Support.
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/22049049/viewspace-1024033/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/22049049/viewspace-1024033/