Skip Headers
Oracle® Database Backup and Recovery Advanced User's Guide
10g Release 2 (10.2)

Part Number B14191-01
Go to Documentation Home
Home
Go to Book List
Book List
Go to Table of Contents
Contents
Go to Index
Index
Go to Master Index
Master Index
Go to Feedback page
Feedback

Go to previous page
Previous
Go to next page
Next
View PDF

Configuring RMAN to Make Backups to a Media Manager

On most platforms, to back up to and restore from sequential media such as tape you must integrate a media manager with your Oracle database. A media manager is not an Oracle product and must be obtained from a third-party vendor. If you choose to use RMAN with a media manager, then you must obtain all product-specific information from the vendor.

This section describes the generic steps for configuring RMAN for use with a media manager. The actual steps depend on the media management product that you install and the platform on which you are running the database.

Read the following sections in order when configuring the media manager:

  1. Prerequisites for Using a Media Manager with RMAN

  2. Locating the Media Management Library: The SBT_LIBRARY Parameter

  3. Testing Whether the Media Manager Library Is Integrated Correctly

  4. Configuring SBT Channels for Use with a Media Manager


    See Also:

    "Media Management" for an overview of media management software and its implications for RMAN

Prerequisites for Using a Media Manager with RMAN

Before you can begin using RMAN with a media manager, you must install it and make sure that RMAN can communicate with it. Instructions for this procedure should be available in the media manager vendor's software documentation.

In general, you should begin by installing and configuring the media management software on the target host or production network. Ensure that you can make non-RMAN backups of operating system files on the target database host. This step makes later troubleshooting much easier, by confirming that the basic integration of the media manager with the target host has been successful. Refer to your media management documentation to learn how to back up files to the media manager outside of RMAN.

Then, obtain and install the third-party media management module for integration with the database server. This module contains the media management library that the Oracle database loads and uses when accessing the media manager. It is generally a third-party product which must be purchased separately. Contact your media management vendor for details.

Locating the Media Management Library: The SBT_LIBRARY Parameter

When allocating or configuring channels for RMAN to use to communicate with a media manager, specify the SBT_LIBRARY parameter to provide the path to the media management software library. When RMAN actually allocates channels to communicate with a media manager, it attempts to load the library indicated by the SBT_LIBRARY parameter.

If you do not provide a value for this parameter, RMAN looks in a platform-specific default location. On UNIX, the default library filename is $ORACLE_HOME/lib/libobk.so, with the extension name varying according to platform: .so, .sl, .a, and so forth. On Windows the default library location is %ORACLE_HOME%\bin\orasbt.dll.


Note:

The default media management library file is not part of the standard database installation. It is only present if you install third-party media management software.

If the database is unable to locate a media management library in the location specified by the SBT_LIBRARY parameter or the default location, then RMAN issues an ORA-27211 error and exits.

Whenever channel allocation fails, the database writes a trace file to the USER_DUMP_DEST directory. The following shows sample output:

SKGFQ OSD: Error in function sbtinit on line 2278
SKGFQ OSD: Look for SBT Trace messages in file /oracle/rdbms/log/sbtio.log
SBT Initialize failed for /oracle/lib/libobk.so

See Also:


Testing Whether the Media Manager Library Is Integrated Correctly

After you have confirmed that the database server can load the media management library, test to make sure that RMAN can back up to the media manager. The process for testing the media management library is described in the following sections:

Configuring Media Management Software for RMAN Backups

After installing the media management software, perform whatever configuration that your vendor requires so that the software can accept RMAN backups. Depending on the type of media management software that you installed, you may have to define media pools, configure users and classes, and so forth.

Then, determine which PARMS settings are needed for the ALLOCATE CHANNEL or CONFIGURE CHANNEL commands as well as the recommended FORMAT string for the BACKUP command (if needed). The PARMS parameter sends instructions to the media manager. For example, the following vendor-specific PARMS setting instructs the media manager to back up to a volume pool called oracle_tapes:

PARMS='ENV=(NSR_DATA_VOLUME_POOL=oracle_tapes)'

Refer to your third-party vendor documentation for the appropriate settings.


See Also:


Configuring Backup Piece Names and Sizes for a Media Manager

To work with restrictions on file names and sizes imposed by your media manager, you may need to configure RMAN settings that control the naming and size of backup pieces.

Configuring Backup Piece Names for RMAN Backups to a Media Manager

You may need to manage the naming of backup pieces to be written to the media manager, so that backup pieces have unique names. A backup piece name is determined by the FORMAT string specified in the BACKUP command, the CONFIGURE CHANNEL command, or the ALLOCATE CHANNEL command. The media manager considers the backup piece name as the filename of the backup file, so this name must be unique in the media manager catalog.

You can use the substitution variables provided by RMAN to generate unique backup piece names. If you do not specify the FORMAT parameter, then RMAN automatically generates a unique filename with the %U substitution variable.


Note:

Refer to your media management documentation to determine the string character limit for the media manager. For example, some media managers only support a 14-character backup piece name, and some require special FORMAT strings. The unique backup piece names generated by %U are less than 14 characters.


See Also:

Oracle Database Backup and Recovery Reference for the complete list of variables allowable in format strings with the BACKUP command

Configuring Backup Piece Sizes for RMAN Backups to a Media Manager

Some media managers have limits on the maximum size of files that they can back up or restore. You must ensure that RMAN does not produce backup sets larger than limits imposed by your media manager.

To limit backup piece sizes, use the parameter MAXPIECESIZE, which you can set in the CONFIGURE CHANNEL and ALLOCATE CHANNEL commands. Refer to the *.rcv scripts in the demo subdirectory on your system, which is located in an operating system specific location ($ORACLE_HOME/rdbms on UNIX) for an example.


See Also:

Oracle Database Backup and Recovery Reference and "Size of Backup Pieces"for details on how to set MAXPIECESIZE

Testing ALLOCATE CHANNEL on the Media Manager

Use the following steps to confirm that RMAN is able to load the media management library when allocating a channel for your media manager.

  1. Start RMAN and connect to the target database. For example, enter:

    % rman TARGET /
    
    
  2. Run the ALLOCATE CHANNEL command with the PARMS required by your media management software. For example, run this command:

    RUN
    {
      ALLOCATE CHANNEL c1 DEVICE TYPE sbt 
        PARMS='SBT_LIBRARY=/mediavendor/lib/libobk.so ENV=(NSR_SERVER=tape_srv,NSR_GROUP=oracle_tapes)';
    }
    
    

If you do not receive an error message, then the database successfully loaded the media management library. If you receive the ORA-27211 error, the media management library could not be loaded:

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03009: failure of allocate command on c1 channel at 11/30/2001 13:57:18
ORA-19554: error allocating device, device type: SBT_TAPE, device name: 
ORA-27211: Failed to load Media Management Library
Additional information: 25

In this case, you must check your media management installation to make sure that the library is correctly installed, and re-check the value for the SBT_LIBRARY parameter as described in "Locating the Media Management Library: The SBT_LIBRARY Parameter".

For any other errors, check the trace file in USER_DUMP_DEST directory for more information.

Testing a Backup to the Media Manager

After testing a channel allocation on the media manager, make a test backup. For example, to test whether your backup goes successfully to tape, you might run the following command:

RUN
{
  ALLOCATE CHANNEL c1 DEVICE TYPE sbt 
    PARMS='SBT_LIBRARY=/mediavendor/lib/libobk.so ENV=(NSR_SERVER=tape_srv,NSR_GROUP=oracle_tapes)';
  BACKUP CURRENT CONTROLFILE;
}

The specifics of your PARMS and FORMAT settings depend on the media management software that you are using.

If the backup succeeds, then you are ready to make backups to your media manager.

Possible failures include the following cases:

Case Response
The backup hangs. A hanging backup usually indicates that the media manager is waiting to mount a tape. Check if there are any media manager jobs in "tape mount request" mode and fix the problem.

Ensure that the steps in "Configuring RMAN to Make Backups to a Media Manager" are correctly done. Refer to "Backup Job Is Hanging: Scenario" if the problem persists.

The backup fails with an ORA-19511 This error indicates that the media management software is not correctly configured. Ensure that the steps in "Configuring RMAN to Make Backups to a Media Manager" are correctly done. Also, ensure that you have the correct PARMS and FORMAT strings required by your media management software.


See Also:

"Testing the Media Management API" and "RMAN Troubleshooting Scenarios" for more information about troubleshooting RMAN with a media manager

Configuring SBT Channels for Use with a Media Manager

This section describes how to configure channels specifically for use with a media manager. For an overview of configured channels and how they are used, refer to the section "Configuring Channels". The following setup procedure references the sections in "Configuring Channels" where it is appropriate.

To configure channels for use with a media manager:

  1. Configure a generic channel of DEVICE TYPE sbt as described in "Configuring Channel Settings for a Device Type". In the configuration enter all parameters that you tested in the section "Testing a Backup to the Media Manager". For example, assume that your media vendor requires PARMS settings as follows:

    RMAN> CONFIGURE CHANNEL DEVICE TYPE sbt 
      PARMS='SBT_LIBRARY=/mediavendor/lib/libobk.so ENV=(NSR_SERVER=tape_svr,NSR_CLIENT=oracleclnt,NSR_GROUP=ora_tapes)' 
      FORMAT "BACKUP_%U";
    
    
  2. After configuring the channel, test by backing up something small, such as the control file:

    RMAN> BACKUP DEVICE TYPE sbt CURRENT CONTROLFILE;
    
    
  3. Check your configuration by running the following command:

    RMAN> SHOW CHANNEL FOR DEVICE TYPE sbt;
    
    
  4. Configure the default device to sbt so that RMAN sends all backups to the media manager. For example:

    RMAN> CONFIGURE DEFAULT DEVICE TYPE TO sbt;
    

  1. After configuring the default device, make a test backup to determine whether it is really going to the media manager:

    RMAN> BACKUP CURRENT CONTROLFILE;
    

  1. Check your configuration by running the following command:

    RMAN> SHOW DEFAULT DEVICE TYPE;
    
    
  2. If you use more than one tape device, then you must specify the channel parallelism as described in "Configuring Channel Parallelism". Assume that you want to back up to your media manager using two tape drives in parallel. In this case, you can run the following commands:

    RMAN> CONFIGURE DEVICE TYPE sbt PARALLELISM 2;       
    RMAN> BACKUP DATABASE;