rman恢复遭遇ora-1152

在一次rman异机恢复中,遇到了ora-1152的错误。

Error Text, Cause and Action from Message File/s for ORA-01152

Versions 9.2, 10.1, 10.2, 11.1, 11.2, 12.1

Error:  ORA-01152 file %s was not restored from a sufficiently old backup 
---------------------------------------------------------------------------
Cause:  An incomplete recovery session was started, but an insufficient number 
	of logs were applied to make the database consistent. This file is 
	still in the future of the last log applied. The most likely cause of 
	this error is forgetting to restore the file from a backup before doing 
	incomplete recovery. 
Action: Either apply more logs until the database is consistent or restore the 
	database file from an older backup and repeat recovery. 


这是metalink上面的信息。同时提到会触发12c的一个bug,以后在12c的时候需要一个补丁包。

可能metalink上描述不够清晰,只是说明是日志问题,最后总结2种解决方案


1、根据scn进行恢复

查询scan

SQL> select max(checkpoint_change#) from v$datafile_header; (数据文件最大的现有SCN
MAX(CHECKPOINT_CHANGE#)
-----------------------
                 554055
SQL>  select checkpoint_change#,current_scn from v$database (控制文件scn)

CHECKPOINT_CHANGE# CURRENT_SCN
------------------ -----------
            554193           0

RMAN> list backup of archivelog all; 

 Thrd Seq     Low SCN    Low Time  Next SCN   Next Time
  ---- ------- ---------- --------- ---------- ---------
  1    45      554130     23-MAR-11 554151     23-MAR-11


SQL> select sequence# from v$log;
SEQUENCE#
----------
        50
        51
        49


很容易发现,备份的日志组是45号,但是时间上面已经到了51号,可能原因是备份时间长,备份过程中产生了日志切换。

那么恢复的时候只需要回到45号日志组  scn 554151。


2、使用隐藏参数强制打开

startup force

alter system set "_allow_resetlogs_corruption“=true scope=spfile;

recover database using backup controlfile until cancel;

alter database open resetlogs;

阅读更多
版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/darrowzeng/article/details/46785255
个人分类: RMAN
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

不良信息举报

rman恢复遭遇ora-1152

最多只允许输入30个字

加入CSDN,享受更精准的内容推荐,与500万程序员共同成长!
关闭
关闭