DB2 user points to wrong Node (filesystem) not DB2


Jul 5, 2016
Reaction score
We have a RHEL server that backs up the filesystem nightly via cron as root.
However our DB2 users also run the DB2 api command
db2 backup database <DBNAME> use tsm open 4 sessions COMPRESS INCLUDE LOGS without prompting

env variables for DB2 user
export DSMI_CONFIG=/opt/tivoli/tsm/client/api/bin64/dsm.opt
export DSMI_DIR=/opt/tivoli/tsm/client/api/bin64/
export DSMI_LOG=/db2home/db2itmd3/
dsm.sys both in api at /opt/tivoli/tsm/client/api/bin64/dsm.sys
and for root filesystem = /opt/tivoli/tsm/client/ba/bin/dsm.sys
Problem if db2 user runs dsmc -se=Filsystem or dsmc -se=db they get into dsmc propmt for their node.
Problem is dsmc without variables brings them into the wrong node - the filesystem node as its the only one mentioned in /opt/tivoli/tsm/client/ba/bin/dsm.sys

For some reason DB2 user is NOT looking at opt/tivoli/tsm/client/api/bin64/dsm.opt but rather /opt/tivoli/tsm/client/ba/bin/dsm.opt
So if the db2 user runds dsmc they get the wrong TSM node
Looks like db2 user is ignoring DSMI_CONFIG settign and goign to the defulat dsm.opt for thfilesystem.

Workaround ?
What would be the "db2 backup database" command to have it use tsm "se=db2"
client is 8.1.15
I believe its in "options" ie
db2 backup database <my_DB2_database> ONLINE INCREMENTAL use tsm open 4 sessions COMPRESS INCLUDE LOGS without prompting
db2 backup database <my_DB2_database> ONLINE INCREMENTAL use tsm open 4 sessions options `"se=db2"` COMPRESS INCLUDE LOGS without prompting
Would that tell dB@ to use tsm with the correct dsm.sys entyr for the correct node?
Any idea why DB2 user is not using dsm.opt in its DSMI_CONFIG ???

Thanks for help
TSM dsm.opt
se filesystem
API dsm.opt
se db2
If they run dsmc without parameters if goes the filesysem stanza in dsm.sys and NOT the db2 stanza in dsm.sys but DBB2 user has no issue if they run dsmc -se=db2 how to get" backup db use tsm" to poitn to correct dsm.sys stanza mentioned in API dsm.opt ???
Much thanks for help
If you log on as instance user and issue a set|grep DSM, does it show the correct value for DSMI_CONFIG?
I don't fully understand what is your issue.
a) When db2 user runs dsmc without parameters it connects using filesystem stanza?
b) When db2 user runs db2 backup ... use tsm ... the data is stored on SP server under wrong (filesystem) node?
c) DBA don't know what they are doing

Regarding a)
dsmc uses environemnt variables DSM_* and not DSMI_*. The latter ones are for API clients.
If you wish to change how your db2 admins connects to SP server you must explicitly add/modify DSM_CONFIG in the user's profile.

Regarding b)
If the DB2 backups runs under different node than specified in DSMI_CONFIG opt file, then in 90% cases you didn't restarted DB2 instance after introducing DSM_CONFIG parameters in db2user's profile.
Run ps ewwww <pid_of_db2sysc> (alternatively look in file /proc/<pid_of_db2sysc>/environ) and see if DSMI_* parameters are present

Regarding c)
If your DB2 admins need to run dsmc in order to run a file-level backup under DB2 node, then don't let them. They should be using different node for file-level backups, do not mix non-API and API data under the same node. Also it might not be their job to run file-level backups (but it depends on your responsibilities in company)
If your DB2 admins think they need to run dsmc in order to delete old backups or check existing backups, then there are I believe some educations that could be helpful to them, or some videos. Additionally there is a dedicated utility db2adutl that is [part of DB2 toolset, exactly for this purpose - use this.