NBU备份数据库时的ORA-27211错误分析解决

一朋友打电话求助,说今天安装配置Veritas Netbackup 7.0备份Oracle 11G数据库时很快报6号错误,查NBU的输出日志发现产生了一个ORA-27211的错误。具体错误信息如下:

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

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

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

RMAN-03009: failure of allocate command on ch00 channel at 09/21/2012 14:36:13

ORA-19554: error allocating device, device type: SBT_TAPE, device name: 

ORA-27211: Failed to load Media Management Library

Additional information: 2

RMAN> RMAN> 

Recovery Manager complete.

Script /usr/openv/hot_database_backup.sh

==== ended in error on Fri Sep 21 14:36:13 CST 2012 ====

6号错误是NBU中比较常见的典型错误,关于6号错误的几种情况分析,可以参见我之前的博文<netbackup7.0备份6号错误解析> http://xjsunjie.blog.51cto.com/999372/935347,当然今天我们遇到的这个错误是另外一种情况,具体问题具体分析.

检查完NBU的输出日志后,我们再查看一下备份时由Oracle产生的日志:

$ more data_ora_0579.trc

Oracle process number: 2917

Unix process pid: 5244, image: oracletrain@db

*** ACTION NAME:(0000001 STARTED1) 2012-09-21 14:36:28.230

*** SERVICE NAME:() 2012-09-21 14:36:28.230

*** SESSION ID:(160.7) 2012-09-21 14:36:28.230

SKGFQ OSD: Error in function sbtinit on line 4381

SKGFQ OSD: Look for SBT Trace messages in file  /oracle/app/oracle/product/11.2.0/admin/train/udump/sbtio.log

SBT Initialize failed for oracle.static

从上面的日志可以看出,这是由于备份时sbtinit失败所引起的。用Oracle的测试工具试试:

oracle@db$ sbttest /etc/hosts

The sbt function pointers are loaded from oracle.static library.

libobk.so could not be loaded. Check that it is installed

经过分析,主要原因是libobk.so这个文件在Oracle中不存在引起的备份失败错误。

下面我们可以这样来操作

oracle@db$ ln -s /usr/openv/netbackup/bin/libobk.so64   /oracle/app/oracle/product/11.2.0/db_1/lib/libobk.so

将NBU中的libobk.so64文件做一个软链接到ORACLE相应目录下

再来测试一下:

oracle@db$ sbttest /etc/hosts

The sbt function pointers are loaded from libobk.so library.

-- sbtinit succeeded

-- sbtinit (2nd time) succeeded

sbtinit: Media manager supports SBT API version 2.0

sbtinit: Media manager is version 5.0.0.0

sbtinit: vendor description string=Veritas NetBackup for Oracle - Release 7.0 (2011020316)

sbtinit: allocated sbt context area of 8 bytes

sbtinit: proxy copy is supported

-- sbtinit2 succeeded

-- regular_backup_restore starts ................................

或者在NBU的BIN目录下执行ORACLE_LINK脚本也可以实现。

 

再在NBU里进行该策略的备份,发现已经可以正常备份了。

注意:提示说在运行脚本前ORACLE实例需关闭,如果你是ORACLE 9i以上的版本,这个操作是可以在线直接做的。

你可能感兴趣的:(数据库,NBU备份,ORA-27211错误)