IBM Support

Oracle restore not using all the allocated channels

Troubleshooting


Problem

Restoring Oracle with 6 channels allocated but only 2 channels are used.

Symptom

The data exists on 6 different tape volumes and the Oracle restore is started with 6 channels allocated. The restore starts successfully, but only 2 channels are opened and utilized to transfer the data.

Cause

The backup was performed with the MAXSETSIZE parameter, which requires the backupset restore to be performed on a single channel.

Diagnosing The Problem

The Data Protection for Oracle trace using orclevel2 shows the SBTBFINFO query to obtain the information for the objects and lists the tape volume names with SBTBFINFO_LABEL. This shows that the data is on separate tapes, which should allow multiple sessions to be started. For example we can see that tape volumes 9808, 9807 and 9700 contain the data for one backupset.

  • sbtinfo2(): dsmHandle = 1, Object Name = ' /orcdb/DB_201401312101_kp0vfo6b_2_1838328523 Mgmt Class Name = 'DEFAULT', Object Id = 089627519
  • sbtinfo2(): dsmHandle = 1, SBTBFINFO_METHOD = 1
  • sbtinfo2(): dsmHandle = 1, SBTBFINFO_SHARE = 1
  • sbtinfo2(): dsmHandle = 1, SBTBFINFO_ORDER = 1
  • sbtinfo2(): dsmHandle = 1, SBTBFINFO_LABEL = 9808

  • ...
  • sbtinfo2(): dsmHandle = 1, Object Name = ' /orcdb/DB_201401312101_kp0vfo6b_5_1838328523 Mgmt Class Name = 'DEFAULT', Object Id = 089627519
  • sbtinfo2(): dsmHandle = 1, SBTBFINFO_METHOD = 1
  • sbtinfo2(): dsmHandle = 1, SBTBFINFO_SHARE = 1
  • sbtinfo2(): dsmHandle = 1, SBTBFINFO_ORDER = 1
  • sbtinfo2(): dsmHandle = 1, SBTBFINFO_LABEL = 9807

  • ...
  • sbtinfo2(): dsmHandle = 1, Object Name = ' /orcdb/DB_201401312101_kp0vfo6b_6_1838328523 Mgmt Class Name = 'DEFAULT', Object Id = 089627526
  • sbtinfo2(): dsmHandle = 1, SBTBFINFO_METHOD = 1
  • sbtinfo2(): dsmHandle = 1, SBTBFINFO_SHARE = 1
  • sbtinfo2(): dsmHandle = 1, SBTBFINFO_ORDER = 1
  • sbtinfo2(): dsmHandle = 1, SBTBFINFO_LABEL = 9700

  • ...
    etc.

An Oracle debug trace will show that the backuppieces are existing on the volumes and then locks the volumes.

    DBGMISC: channel t1 locked media [9808] [12:05:41.323] (krmqgns)
    DBGMISC: channel t1 locked media [9807] [12:05:41.323] (krmqgns)
    DBGMISC: channel t1 locked media [9700] [12:05:41.323] (krmqgns)
    DBGRPC: EXITED krmqgns with status 0

Then channel t2 looks at the volumes and also attempts to lock them, but locks 2 volumes for a different backupset.
    DBGMISC: channel t2 could not lock media [9807] [12:05:41.324] (krmqgns)
    DBGMISC: channel t2 could not lock media [9700] [12:05:41.324] (krmqgns)
    DBGMISC: channel t2 could not lock media [9808] [12:05:41.324] (krmqgns)
    DBGMISC: channel t2 locked media [9916] [12:05:41.325] (krmqgns)
    DBGMISC: channel t2 locked media [9699] [12:05:41.325] (krmqgns)

Then channel t3 looks at the volumes and attempts to lock them, but is unable since the t1 and t2 channels have already locked the volumes.
    DBGMISC: channel t3 could not lock media [9807] [12:05:41.326] (krmqgns)
    DBGMISC: channel t3 could not lock media [9699] [12:05:41.326] (krmqgns)
    DBGMISC: channel t3 could not lock media [9700] [12:05:41.326] (krmqgns)
    DBGMISC: channel t3 could not lock media [9916] [12:05:41.326] (krmqgns)
    DBGMISC: channel t3 could not lock media [9808] [12:05:41.327] (krmqgns)

This same output is seen for the remaining t4, t5 and t6 channels that have been allocated, whereby they are not able to lock any of the media for use as it is already locked.

Resolving The Problem

When an Oracle backup is performed with the MAXSETSIZE or the MAXPIECESIZE parameter, this will limit the size of the backup objects that are being sent to the Tivoli Storage Manager Server. Although this size setting can be helpful in limiting the size of the backup pieces so that they can more easily fit on the tape volumes, it will affect the manner in which a restore is performed.

During the restore of a backup that used the MAXSETSIZE or MAXPIECESIZE the entire backupset will need to be restored on the same channel. Thus, even though Oracle 11g has the capability to use multiple channels to restore backuppeices in parallel, this processing will be serialized for all the pieces in the backupset to use the same channel. The backup ID for the backupset will be checked by Oracle and all of the tape volumes that contain objects for this Backup ID will be locked for the exclusive use of the one channel. This prohibits other sessions for using these tapes even if they contain the data for different backupsets.

Since the volumes are not available for other processing, this can limit a 6 channel/session restore to only have 1 or 2 sessions.

To avoid this limitation for Oracle to use a single channel when restoring a backupset, do not use the MAXSETSIZE or MAXPIECESIZE for the backup. If it is necessary to limit the size of the backup objects, use the Oracle SECTION SIZE parameter instead.

[{"Product":{"code":"SSTFZR","label":"Tivoli Storage Manager for Databases"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":"Data Protection for Oracle","Platform":[{"code":"PF002","label":"AIX"}],"Version":"Version Independent","Edition":"","Line of Business":{"code":"LOB26","label":"Storage"}}]

Product Synonym

TSM

Document Information

Modified date:
17 June 2018

UID

swg21663786