使用DB2数据库切换用户启动时提示SQL10007N Message "-1390" could not be retrieved. Reason code: "3".


今天要使用DB2数据库,切换db2inst1用户时在linux shell中不显示路径了,显示为-bash-4.1#。

并且在使用DB2的命令时提示SQL10007N Message "-1390" could not be retrieved.  Reason code: "3".

 

经过查询资料后发现应该是环境变量的问题。

cd /home/db2inst1
vim ~/.bash_profile

在db2inst1用户的环境变量文件中添加:

export PATH=$PATH:$HOME/bin:/home/db2inst1/sqllib/bin
if [ -f /home/db2inst1/sqllib/db2profile ]
then
source /home/db2inst1/sqllib/db2profile
fi

记得使环境变量生效

source ~/.bash_profile

此时恢复正常

 


免责声明!

本站转载的文章为个人学习借鉴使用,本站对版权不负任何法律责任。如果侵犯了您的隐私权益,请联系本站邮箱yoyou2525@163.com删除。



 
粤ICP备18138465号  © 2018-2025 CODEPRJ.COM