ALLSTARS_ORACLE 发表于 2017-4-14 17:55:15

rman恢复异常,归档日志损坏


最近生产库表被truncate,生产库通过nbu备份到带库,于是决定通过nbu将数据库在异机进行恢复,恢复过程中,控制文件和数据文件都是可以正常restore的,当开始恢复归档日志并且应用时,总是出现异常,
rman恢复的错误日志如下:
starting media recovery

channel D2: starting archive log restore to default destination
channel D1: starting archive log restore to default destination
channel D2: restoring archive log
archive log thread=2 sequence=23136
channel D1: restoring archive log
archive log thread=1 sequence=83213
channel D2: restoring archive log
archive log thread=2 sequence=23137
channel D2: reading from backup piece al_21049_1_823142358
channel D1: restoring archive log
archive log thread=1 sequence=83214
channel D1: restoring archive log
archive log thread=1 sequence=83215
channel D1: reading from backup piece al_21048_1_823142241
channel D2: restored backup piece 1
piece handle=al_21049_1_823142358 tag=NULL
channel D2: restore complete, elapsed time: 00:05:16
channel D1: restored backup piece 1
piece handle=al_21048_1_823142241 tag=NULL
channel D1: restore complete, elapsed time: 00:07:11
unable to find archive log
archive log thread=1 sequence=83213
Oracle Error:
ORA-01547: warning: RECOVER succeeded but OPEN RESETLOGS would get error below
ORA-01152: file 1 was not restored from a sufficiently old backup
ORA-01110: data file 1: '/hbora1/hotbill/system01.dbf'

released channel: D1
released channel: D2
released channel: D3
released channel: D4
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of recover command at 08/17/2013 02:15:24
ORA-19587: error occurred reading 512 bytes at block number 1
ORA-27091: unable to queue I/O
ORA-27067: size of I/O buffer is invalid
Additional information: 2
Additional information: 512
在alertlog中也发现错误信息如下:
alter database recover if needed
start until change 13423956452020 using backup controlfile
Media Recovery Start
parallel recovery started with 7 processes
ORA-279 signalled during: alter database recover if needed
start until change 13423956452020 using backup controlfile
...
Sat Aug 17 02:13:23 BEIST 2013
Archivelog restore complete. Elapsed time: 0:00:00
Archivelog restore complete. Elapsed time: 0:00:02
Sat Aug 17 02:14:48 BEIST 2013
Archivelog restore complete. Elapsed time: 0:00:00
Sat Aug 17 02:15:12 BEIST 2013
Archivelog restore complete. Elapsed time: 0:00:24
Archivelog restore complete. Elapsed time: 0:00:25
***
Corrupt block seq: 83213 blocknum=1.
Bad header found during deleting archived log
Data in bad block - flag:1. format:66. bno:1. seq:83213
beg:0 cks:43860
calculated check value: 43860
Sat Aug 17 02:15:24 BEIST 2013
alter database recover cancel
Signalling error 1152 for datafile 1!
但是这些归档日志确实已经恢复到到了/arch/archlog1的归档存放目录,在生产库我尝试对这些归档进行logmnr,也是可以执行的。
求教各位大神,是否有解决方案


list backup发现此备份有效
BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
20637   3.07G      SBT_TAPE    00:01:55     11-AUG-13      
        BP Key: 20637   Status: AVAILABLE  Compressed: NO  Tag: TAG20130811T023721
        Handle: al_21048_1_823142241   Media:
但是在异机(恢复库的主机)上执行显示发现不了备份集
RMAN> validate backupset 20637;

using target database control file instead of recovery catalog
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=2740 devtype=DISK
allocated channel: ORA_DISK_2
channel ORA_DISK_2: sid=2739 devtype=DISK
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of validate command at 08/18/2013 11:31:31
RMAN-06160: no backup pieces found for backup set key: 20637
这个数据库是每周六一次全备,之后每日增备,我是想恢复到8月11日的上午,使用的是8月11日早上增量备份结束后的控制文件备份集来恢复的控制文件,应该已经包含了这次归档的备份信息
请教大神,我是什么地方搞错了吗



我在使用validate backupset来校验最近2天的备份集时,也是出现错误
RMAN> validate backupset 21013;

using channel ORA_DISK_1
using channel ORA_DISK_2
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of validate command at 08/18/2013 11:42:15
RMAN-06160: no backup pieces found for backup set key: 21013
但是该备份集看起来状态有效
BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
21013   11.99G     SBT_TAPE    00:47:37     17-AUG-13      
        BP Key: 21013   Status: AVAILABLE  Compressed: NO  Tag: TAG20130817T055736
        Handle: al_21422_1_823672657   Media:


但是我手工掏归档是可以将这些归档日志恢复出来的,并没有说找不到备份集,命令如下:
run
{ allocate channel t1 type 'sbt_tape';
send 'NB_ORA_SERV=RLZY,NB_ORA_CLIENT=hbdb1';
SET ARCHIVELOG DESTINATION TO '/arch/archlog1';
restore archivelog from logseq  83213 until logseq 83215 thread 1  ;
release channel t1;
}
也可以list这个备份集


RMAN> list backupset 20637;

using target database control file instead of recovery catalog

List of Backup Sets
===================

BS Key  Size       Device Type Elapsed Time Completion Time
------- ---------- ----------- ------------ ---------------
20637   3.07G      SBT_TAPE    00:01:55     11-AUG-13      
        BP Key: 20637   Status: AVAILABLE  Compressed: NO  Tag:
        Handle: al_21048_1_823142241   Media:

  List of Archived Logs in backup set 20637
  Thrd Seq     Low SCN    Low Time  Next SCN   Next Time
  ---- ------- ---------- --------- ---------- ---------
  1    83212   13423925928005 11-AUG-13 13423933514102 11-AUG-13
  1    83213   13423933514102 11-AUG-13 13423943587669 11-AUG-13
  1    83214   13423943587669 11-AUG-13 13423953656929 11-AUG-13
  1    83215   13423953656929 11-AUG-13 13423953690107 11-AUG-13
  2    23134   13423906838416 10-AUG-13 13423915233965 11-AUG-13
  2    23135   13423915233965 11-AUG-13 13423933516500 11-AUG-13



想使用recover指定归档日志进行恢复,也是有错误
SQL> recover database using backup controlfile;
ORA-00279: change 13423940478029 generated at 08/11/2013 02:00:25 needed for
thread 1
ORA-00289: suggestion : /arch/archlog1/1_83213_781799413.dbf
ORA-00280: change 13423940478029 for thread 1 is in sequence #83213


Specify log: {<RET>=suggested | filename | AUTO | CANCEL}
auto
ORA-00367: checksum error in log file header
ORA-00334: archived log: '/arch/archlog1/1_83213_781799413.dbf'
页: [1]
查看完整版本: rman恢复异常,归档日志损坏