環境描述:
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)經過上面的分析,排除了腳本的問題,我們基本上確認就是因為磁帶庫的通訊問題導致的,這個時候詢問同事,確實是因為磁帶庫的通訊問題導致的,一直沒有解決的原因就是因為有的時候可以備份成功,不影響生產。找供應商解決問題,一直都不給解決。所以就一直拖着。