Question & Answer
Question
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?
Cause
Having the described functionality allows to collect TSM® traces per DB2® database partition. This can be useful for troubleshooting.
Answer
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\""
Was this topic helpful?
Document Information
Modified date:
16 June 2018
UID
swg21614741