Skip to content
Home » Oracle » How to Resolve ORA-27211: Failed to load Media Management Library

How to Resolve ORA-27211: Failed to load Media Management Library

ORA-27211

There're two topics about error ORA-27211 in this post.

  1. NetBackup Tape Channel
  2. General SBT_TAPE Problems

NetBackup Tape Channel

In an unfamiliar server, I usually test the tape channel before actually run my RMAN scripts.

RMAN> run
{
  allocate channel c1 type 'sbt_tape';
  release channel c1;
}
2> 3> 4> 5> 6>
using target database controlfile instead of recovery catalog
RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of allocate command on c1 channel at 11/13/2014 19:41:36
ORA-19554: error allocating device, device type: SBT_TAPE, device name:
ORA-27211: Failed to load Media Management Library
Additional information: 2

Oh, some kind of library problems. After comparing the other database server, I found the error was caused by a missing link to an actual library file provided by Netbackup. So I made this soft link.

# ln -s /usr/openv/netbackup/bin/libobk.a64 $ORACLE_HOME/lib/libobk.a
# ls -l $ORACLE_HOME/lib/libobk.a
lrwxrwxrwx   1 oracle   dba         35 Nov 13 20:26 /oracle/lib/libobk.a -> /usr/openv/netbackup/bin/libobk.a64

Let's test it again.

RMAN> run
{
  allocate channel c1 type 'sbt_tape';
  release channel c1;
}
2> 3> 4> 5> 6>
using target database controlfile instead of recovery catalog
allocated channel: c1
channel c1: sid=10 devtype=SBT_TAPE
channel c1: VERITAS NetBackup for Oracle - Release 5.1 (2005081403)
sent command to channel: c1
released channel: c1

Now, we can actually run other RMAN script. Please note that, the command format of creating a symbolic link is as the following:

ln -s <source path> <target path>

General SBT_TAPE Problems

Saw ORA-27211 which caused the RMAN operation to fail.

RMAN> ...
...
ORA-19554: error allocating device, device type: SBT_TAPE, device name:
ORA-27211: Failed to load Media Management Library

Let's see what device type we have.

RMAN> SHOW DEVICE TYPE;

RMAN configuration parameters for database with db_unique_name ORCL are:
CONFIGURE DEVICE TYPE 'SBT_TAPE' PARALLELISM 3 BACKUP TYPE TO BACKUPSET;
CONFIGURE DEVICE TYPE DISK PARALLELISM 2 BACKUP TYPE TO BACKUPSET;

Solution

The solution is simple:

Link Library

If you still want to use SBT_TAPE as the default channel, you should check the media library thoroughly, it may be out of date or points to the wrong file. Try to drop symbolic links related to the library and then link them back. Use sbttest if necessary.

Reset Device Type

If you don't want to use SBT_TAPE as the default channel, then you have to clear the default channel from SBT_TAPE to DISK.

RMAN> CONFIGURE DEVICE TYPE 'SBT_TAPE' CLEAR;

old RMAN configuration parameters:
CONFIGURE DEVICE TYPE 'SBT_TAPE' PARALLELISM 3 BACKUP TYPE TO BACKUPSET;
RMAN configuration parameters are successfully reset to default value

This will make RMAN forget the device type SBT_TAPE and back to the default setting.

Leave a Reply

Your email address will not be published. Required fields are marked *