Backing up to a fake tape (SBT)

Backing up to a fake tape (SBT) in Oracle RMAN and using sbttest tool

When RMAN backups to tape fail, it’s not always clear whether the issue lies within Oracle or the Media Management Library (MML) provided by the backup vendor.

One of the most effective ways to isolate the problem is to perform a fake tape backup using Oracle’s disk-based SBT library. This method can also be used when you want to test an Oracle script in your home environment,

This approach allows you to validate Oracle’s SBT interface without involving any third-party media manager (Netbackup , Commvault, Veeam,Dell etc.) effectively proving whether the problem lies inside or outside the Oracle layer.

When Oracle communicates with the MML (Media Management Library) , it loads the vendor’s shared library (usually named libobk.so on UNIX/Linux, orasbt.dll on Windows) which implements the SBT (System Backup to Tape) API defined by Oracle. By default, Oracle looks for this file in:


The interactions between RMAN and the media layer are logged in the sbtio.log file. This file is generated by the MML, not by Oracle itself.

sbttest tool can be used to perform a quick test of the media manager.

If sbttest returns 0, then the test ran without error, which means that the media manager is correctly installed and can accept a data stream and return the same data when requested. If sbttest returns a nonzero value, then either the media manager is not installed or it is not configured correctly.

This tool has been available for years, but I’ve only recently become aware of it. In this blog post, I’ll use it with Oracle Database 26ai, that is, Oracle Database 23.26.0.0 running as a Docker container on my Mac.

If you have not installed any media manager then it will not find a libobk.so under $ORACLE_HOME as provided below.

In this post, i will demonstrate it with the Oracle Test Disk API. (oracle.disksbt library)

First you need to set BACKUP_DIR envirıonment variable, otherwise you will get the error provided below.

Here is a succesful run. It tests writing and reading by using Oracle test Disk API.

Lets take it further and use with RMAN to a backup USERS tablespace.

You may also use this method to remove old TAPE backups from CATALOG via RMAN, when the Media Management Layer (MML Software not installed) is NOT available anymore.

Hope it helps.


Discover More from Osman DİNÇ


Comments

Leave your comment