【DB2】If 'db2' is not a typo you can run the following command to lookup the package that contains the binary: command-not-found db2 bash: db2: command not found

切换到db2inst1用户下,执行db2命令报错如下:

image

解决办法:

首先进入到opt目录下查看bin的路径:

例如(这是我自己lInux的目录):/opt/ibm/db2/V9.7/bin

export PATH=$PATH:/opt/ibm/db2/V9.7/bin

执行了以上语句后,再次输入db2命令,执行结果:

image

已经成功解决问题。

posted @ 2017-11-30 22:09  OLIVER_QIN  阅读(1379)  评论(0编辑  收藏  举报