Table of Contents

DB2 Backup - Possible errors

Configuration

Environment variables

Backup to TSM requires 3 environment variables. If one or more of these is not set, or set incorrectly you may see TSM Reason code 106.
In particular note:

  1. For online backups; the DB2 instance must be restarted if DSMI environment variables are changed.
  2. If DB2 is started from SAP (by running startsap) be aware that the SAP admin user (<sid>adm) does not run userprofile so DSMI variables must be sourced before startsap is run.

See DB2 backup to TSM for more detail.

db2 => backup database sp1 online use tsm
SQL2033N  An error occurred while accessing TSM during the processing of a
database utility.  TSM reason code: "106".

TSM Options

If TSM backup options are incorrectly specified then you may see TSM reason code 400.
Most likely place for options to be set is in dsm.opt but they can also be specified in the database parameter VENDOROPT.

db2 => backup database sp1 online use tsm
SQL2033N  An error occurred while accessing TSM during the processing of a
database utility.  TSM reason code: "400".

Backup in progress

One or more tablespaces have the BACKUP_IN_PROGRESS flag set.
This might happen if a backup is cancelled and then attempted in quick succession.
In this case patience is a virtue - DB2 will clear the flags given time (true for DB2 v9.7 FP2).

From db2 this error might appear as:

db2 => backup database sp1 online incremental delta use tsm without prompting
SQL2048N  An error occurred while accessing object "0".  Reason code: "6".

In db2diag.log this might appear as:

2011-06-21-04.43.40.344127-240 E8263185E732        LEVEL: Error
PID     : 18315                TID  : 47075576244544PROC : db2sysc 0
INSTANCE: db2sp1               NODE : 000          DB   : SP1
APPHDL  : 0-6852               APPID: *LOCAL.db2sp1.110621084340
AUTHID  : DB2
EDUID   : 100                  EDUNAME: db2agent (SP1) 0
FUNCTION: DB2 UDB, database utilities, sqlubBuildAppTbsp, probe:1685
MESSAGE : SQL2048N  An error occurred while accessing object "".  Reason code:
          "".
DATA #1 : String, 166 bytes
The BACKUP_IN_PROGRESS state is already on for this tablespace.
This tablespace is already in the midst of being backed up and
cannot have a concurrent backup on it.
DATA #2 : String, 11 bytes
SYSCATSPACE