Oracle从磁带恢复备份集,从磁带恢复归档出现ORA-19870错误

从磁带中直接恢复归档日志时,出现了这个错误信息。

归档日志前后备份了两次,一次是在备份数据库后做的,另一次是凌晨7点左右进行的,其中第二次备份包含的归档日志比第一次多,最近的归档日志文件备份信息如下:

BS Key  Size       Device Type Elapsed Time Completion Time

------- ---------- ----------- ------------ -------------------

37761   3.18G      SBT_TAPE    00:01:22     2011-08-27 03:22:37

BP Key: 37761   Status: AVAILABLE  Compressed: NO  Tag: TAG20110827T032114

Handle: al_43199_1_760245675   Media:

List of Archived Logs in backup set 37761

Thrd Seq     Low SCN    Low Time            Next SCN   Next Time

---- ------- ---------- ------------------- ---------- ---------

1    132214  10200825285755 2011-08-27 00:35:39 10200825450980 2011-08-27 00:40:04

1    132215  10200825450980 2011-08-27 00:40:04 10200825451525 2011-08-27 00:40:06

1    132216  10200825451525 2011-08-27 00:40:06 10200826640012 2011-08-27 01:05:42

1    132217  10200826640012 2011-08-27 01:05:42 10200828085370 2011-08-27 02:08:11

1    132218  10200828085370 2011-08-27 02:08:11 10200831622590 2011-08-27 03:05:09

1    132219  10200831622590 2011-08-27 03:05:09 10200831803462 2011-08-27 03:21:02

1    132220  10200831803462 2011-08-27 03:21:02 10200831803603 2011-08-27 03:21:12

BS Key  Size       Device Type Elapsed Time Completion Time

------- ---------- ----------- ------------ -------------------

37763   4.22G      SBT_TAPE    00:06:40     2011-08-27 07:12:26

BP Key: 37763   Status: AVAILABLE  Compressed: NO  Tag: TAG20110827T070545

Handle: al_43201_1_760259146   Media:

List of Archived Logs in backup set 37763

Thrd Seq     Low SCN    Low Time            Next SCN   Next Time

---- ------- ---------- ------------------- ---------- ---------

1    132214  10200825285755 2011-08-27 00:35:39 10200825450980 2011-08-27 00:40:04

1    132215  10200825450980 2011-08-27 00:40:04 10200825451525 2011-08-27 00:40:06

1    132216  10200825451525 2011-08-27 00:40:06 10200826640012 2011-08-27 01:05:42

1    132217  10200826640012 2011-08-27 01:05:42 10200828085370 2011-08-27 02:08:11

1    132218  10200828085370 2011-08-27 02:08:11 10200831622590 2011-08-27 03:05:09

1    132219  10200831622590 2011-08-27 03:05:09 10200831803462 2011-08-27 03:21:02

1    132220  10200831803462 2011-08-27 03:21:02 10200831803603 2011-08-27 03:21:12

1    132221  10200831803603 2011-08-27 03:21:12 10200839298501 2011-08-27 05:59:17

1    132222  10200839298501 2011-08-27 05:59:17 10200851993798 2011-08-27 07:05:40

1    132223  10200851993798 2011-08-27 07:05:40 10200851993847 2011-08-27 07:05:44

而且这两个备份并不在同一个磁带中,前面的一份归档备份和全库备份同处于一个磁带中,因此在恢复的过程中,直接将这盘磁带取出,在另一台服务器上进行恢复。

全库的还原没有碰到问题,但是恢复归档日志则碰到了下面的错误:

RMAN> run

2> {

3>         ALLOCATE CHANNEL ch00 TYPE 'SBT_TAPE';

4>         SEND 'NB_ORA_SERV=nbusrv, NB_ORA_CLIENT=ccicdbsrv5';

5>         restore archivelog from sequence 132214  until sequence 132220;

6>         RELEASE CHANNEL ch00;

7> }

allocated channel: ch00

channel ch00: sid=1630 devtype=SBT_TAPE

channel ch00: Veritas NetBackup for Oracle - Release 6.5 (2007072323)

sent command to channel: ch00

Starting restore at 2011-09-11 21:03:48

channel ch00: starting archive log restore to default destination

channel ch00: restoring archive log

archive log thread=1 sequence=132214

channel ch00: restoring archive log

archive log thread=1 sequence=132215

channel ch00: restoring archive log

archive log thread=1 sequence=132216

channel ch00: restoring archive log

archive log thread=1 sequence=132217

channel ch00: restoring archive log

archive log thread=1 sequence=132218

channel ch00: restoring archive log

archive log thread=1 sequence=132219

channel ch00: restoring archive log

archive log thread=1 sequence=132220

channel ch00: reading from backup piece al_43201_1_760259146

ORA-19870: error reading backup piece al_43201_1_760259146

ORA-19507: failed to retrieve sequential file, handle="al_43201_1_760259146", parms=""

ORA-27029: skgfrtrv: sbtrestore returned error

ORA-19511: Error received from media manager layer, error text:

Failed to open backup file for restore.

failover to previous backup

channel ch00: starting archive log restore to default destination

channel ch00: restoring archive log

archive log thread=1 sequence=132214

channel ch00: restoring archive log

archive log thread=1 sequence=132215

channel ch00: restoring archive log

archive log thread=1 sequence=132216

channel ch00: restoring archive log

archive log thread=1 sequence=132217

channel ch00: restoring archive log

archive log thread=1 sequence=132218

channel ch00: restoring archive log

archive log thread=1 sequence=132219

channel ch00: restoring archive log

archive log thread=1 sequence=132220

channel ch00: reading from backup piece al_43199_1_760245675

ORA-19870: error reading backup piece al_43199_1_760245675

ORA-19507: failed to retrieve sequential file, handle="al_43199_1_760245675", parms=""

ORA-27029: skgfrtrv: sbtrestore returned error

ORA-19511: Error received from media manager layer, error text:

Failed to process backup file

failover to previous backup

released channel: ch00

RMAN-00571: ===========================================================

RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============

RMAN-00571: ===========================================================

RMAN-03002: failure of restore command at 09/11/2011 21:04:30

RMAN-06026: some targets not found - aborting restore

RMAN-06025: no backup of log thread 1 seq 132220 lowscn 10200831803462 found to restore

RMAN-06025: no backup of log thread 1 seq 132219 lowscn 10200831622590 found to restore

RMAN-06025: no backup of log thread 1 seq 132218 lowscn 10200828085370 found to restore

RMAN-06025: no backup of log thread 1 seq 132217 lowscn 10200826640012 found to restore

RMAN-06025: no backup of log thread 1 seq 132216 lowscn 10200825451525 found to restore

RMAN-06025: no backup of log thread 1 seq 132215 lowscn 10200825450980 found to restore

RMAN-06025: no backup of log thread 1 seq 132214 lowscn 10200825285755 found to restore

由于要恢复的归档日志在两个备份集中存在,因此RMAN尝试了两次进行恢复。第一次寻找al_43201_1_760259146文件,由于这个文件不在当前的磁带中,恢复失败是正常的,但是al_43199_1_760245675文件就存放在当前的磁带中,而仍然出现无法获取文件的错误就不正常了。

考虑到恢复环境和备份环境并不一致,备份时使用的带库而当前仅包含一个磁带,且磁带的catalog信息很可能也没有导入,因此对于源数据的查找可能存在问题。

通过CHANGE BACKUP TAG ‘TAG20110827T070545’ UNAVAILABLE的方式,避免恢复过程中去寻找目前并不存在的备份。再次使用RMAN执行同样的恢复操作,这次恢复成功。

恢复应该在和备份等同条件下进行,否则至少应该保证带库的CATALOG数据导入,否则就可能出现这种跨磁带查找文件时出现的错误,而利用RMAN直接在当前的磁带中扫描文件则不受影响。

转自 http://blog.itpub.net/4227/viewspace-707217/

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值