SQL2033N An error occurred while accessing TSM during the processing of a database utility. TSM reason code: "106".

SQL2033N  An error occurred while accessing TSM during the processing of a database utility. TSM reason code: "106".

A few days ago I had this issue while running a Db2 online backup to TSM.

db2inst1@ubusrvdb2:~
$ db2 "backup db SAMPLE online use TSM compress"

SQL2033N An error occurred while accessing TSM during the processing of a database utility. TSM reason code :"106"

so I executed db2 ? SQLXXXX to get more information as shown below.

db2inst1@ubusrvdb2:~
$ db2 ? sql2033


SQL2033N  An error occurred while accessing TSM during the processing of
      a database utility. TSM reason code: "<reason-code>".

Explanation:

Some common TSM reason codes are:

106

         The specified file is being used by another process. You tried
         to read from or write to a file that is currently being used by
         another process.


User response:

Responses for common TSM problems are:

106

         Ensure that you specified the correct file or directory name,
         correct the permissions, or specify a new location.

I checked the dsm.opt file, check location of files, however, all looked OK.

So, I kept searching and found the following link and as mentioned in this article

There are numerous triggers of the sqlcode -2033 with a sqlerrmc 106

And after checking even more files and locations, I finally found that my issue was the userprofile (./sqllib/userprofile) file since it was empty.

So I once I set the TSM related variables properly the online backup finished successfully.

db2inst1@ubusrvdb2:~
$ vi ./sqllib/userprofile
export DSMI_CON=/usr/tivoli/tsm/client/api/bin64/dsm.opt
export DSMI_DIR=/usr/tivoli/tsm/client/api/bin64
export DSMI_LOG=$HOME/log

Want to thank me?

Buy Me A Coffee