Loading

有关rman备份ora-27192和ora-19511错误

环境描述:

1、数据库环境AIX5.3

2、数据库版本9.2.0.8.0

3、备份媒介:磁带库

 

解决过程

1.日常巡检过程中发现数据库备份异常,错误信息栈如下:

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of backup command at 10/24/2017 21:17:37
ORA-27192: skgfcls: sbtclose2 returned error - failed to close file
ORA-19511: Error received from media manager layer, error text:
   ANS1301E (RC1)    Server detected system error

2.经过查阅资料得知ora-19511属于媒介管理错误,需要有媒介管理支持团队或供应商解决。

3.既然发现这个问题之后,那么就需要判断是否真的是因为媒介的问题,运行sbttest以测试Oracle是否可以与磁带库通信时,您可能会遇到以下错误:

[wsrz1]@[BJS5951_L2][/oracle/product/9.2.0/bin]./sbttest test
The sbt function pointers are loaded from libobk.a(shr.o) library.
Return code -1 from sbtinit, bsercoer = 7011, bsercerrno = 2534
sbtopen: System error - eg. malloc, fork errors

4.那么是否是因为脚本的问题导致的呢?

(1)备份数据文件到本地磁盘,发现没有问题

RMAN> run {
allocate channel d1 type disk format='/tmp/%U';
backup tablespace sysaux;
}2> 3> 4> 

allocated channel: d1
channel d1: SID=20 device type=DISK

Starting backup at 22 Oct 2017 10:34:37
channel d1: starting full datafile backup set
channel d1: specifying datafile(s) in backup set
input datafile file number=00002 name=/opt/app/oracle/oradata/ORA112/datafile/o1_mf_sysaux_62ojt49t_.dbf
channel d1: starting piece 1 at 25 Oct 2017 10:34:38
channel d1: finished piece 1 at 25 Oct 2017 10:35:23
piece handle=/tmp/p7mn6kju_1_1 tag=TAG20110922T143437 comment=NONE
channel d1: backup set complete, elapsed time: 00:00:45
Finished backup at 22 SEP 2011 14:35:23

Starting Control File and SPFILE Autobackup at 25 Oct 2017 10:35:23
piece handle=/opt/app/oracle/flash_recovery_area/ORA112/autobackup/2017_10_25/o1_mf_s_762532523_77ogrf5v_.bkp comment=NONE
Finished Control File and SPFILE Autobackup at 25 Oct 2017 10:35:30
released channel: d1

(2)备份到一个假的磁带库上,判断也没有问题

$ rman target /

Recovery Manager: Release 9.2.0.8.0 - Production on Thu Oct 25 10:24:56 2017
Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
connected to target database: ORA112 (DBID=232055638)

RMAN> run {
2> allocate channel t1 type 'SBT' PARMS 'SBT_LIBRARY=oracle.disksbt,ENV=(BACKUP_DIR=/tmp)';
3> backup tablespace sysaux;
4> }

using target database control file instead of recovery catalog
allocated channel: t1
channel t1: SID=20 device type=SBT_TAPE
channel t1: WARNING: Oracle Test Disk API

Starting backup at 22 Oct 2017 10:25:46
channel t1: starting full datafile backup set
channel t1: specifying datafile(s) in backup set
input datafile file number=00002 name=/opt/app/oracle/oradata/ORA112/datafile/o1_mf_sysaux_62ojt49t_.dbf
channel t1: starting piece 1 at 25 Oct 2017 14:25:48
channel t1: finished piece 1 at 25 Oct 2017 14:26:43
piece handle=p5mn6k3b_1_1 tag=TAG20110922T142547 comment=API Version 2.0,MMS Version 8.1.3.0
channel t1: backup set complete, elapsed time: 00:00:55
Finished backup at 25 Oct 2017 10:26:45

Starting Control File and SPFILE Autobackup at 25 Oct 2017 10:26:45
piece handle=c-232055638-20110922-00 comment=API Version 2.0,MMS Version 8.1.3.0
Finished Control File and SPFILE Autobackup at 25 Oct 2017 10:26:52
released channel: t1

(5)经过上面的分析,排除了脚本的问题,我们基本上确认就是因为磁带库的通讯问题导致的,这个时候询问同事,确实是因为磁带库的通讯问题导致的,一直没有解决的原因就是因为有的时候可以备份成功,不影响生产。找供应商解决问题,一直都不给解决。所以就一直拖着。

posted @ 2017-10-25 10:35  李行行  阅读(6082)  评论(0编辑  收藏  举报