这个是instance user的环境没有设置,找不到db2环境。 检查的话,login as intance user, 如果是下面这样,环境就是设好的。 你从新登录变好了,可能是.profile 配置是好的,login会从新运行.profile, 就就把环境设好了。
host_name> su - tsminst1
$ db2level
DB21085I This instance or install (instance name, where applicable:
\"tsminst1\") uses \"64\" bits and DB2 code release \"SQL11010\" with level
identifier \"0201010F\".
Informational tokens are \"DB2 v11.1.0.0\", \"s1606081100\", \"DYN1606081100AIX\",
and Fix Pack \"0\".
Product is installed at \"/opt/tivoli/tsm/db2\".
$ env|grep DSMI
DSMI_CONFIG=/home/tsminst1//tsmdbmgr.opt
DSMI_LOG=/home/tsminst1/
DSMI_DIR=/opt/tivoli/tsm/server/bin/dbbkapi