How to trace the TSM API per DB2 database partition

Technote (FAQ)


What to do if you want to have separate TSM® traces being taken on each DB2® database partition for the complete duration of the database backup?


Having the described functionality allows to collect TSM® traces per DB2® database partition. This can be useful for troubleshooting.


To achieve this goal you need to use the "OPTIONS" token in the BACKUP command, specifying the appropriate trace file. Here is an example:

export DB2NODE=0
db2 "BACKUP DB dbname ON DBPARTITIONNUM ( $DB2NODE ) USE TSM OPTIONS '-TRACEFILE=/home/db2tsm/tsm_trace.$DB2NODE.out'"

After executing the command above, the TSM trace file will be created with the corresponding node number in the file name: /home/db2tsm/tsm_trace.0.out

You can use this method in various scenarios. Another simple example is following:

db2_all "<<-1<; echo DB2NODE=\$DB2NODE; db2 -v BACKUP DB dbname TABLESPACE\(tbspcname\) ONLINE  USE TSM OPTIONS \"-TRACEFILE=/home/db2tsm/tsm.trace.\$DB2NODE.out\""

Document information

More support for:

DB2 for Linux, UNIX and Windows
3rd Party Tools - Tivoli

Software version:

9.5, 9.7, 9.8, 10.1

Operating system(s):

AIX, Windows

Reference #:


Modified date:


Translate my page

Content navigation