问题描述
我试图在Linux命令提示符下执行一个简单的db2命令。但是Linux命令提示符无法识别它给出的命令-找不到bash db2命令。但是db2已安装在Linux机器中。
I am trying to execute a simple db2 command in Linux command prompt. but Linux command prompt is not recognizing the command it is giving - bash db2 command not found. but db2 is installed in the Linux machine.
命令我试图从Linux命令行处理器执行的命令是 db2 create database smaple
我遇到的错误在下面 如果db2输入错误,您可以运行以下命令查找包含二进制文件的软件包 command-not-found db2 -bash:db2:命令未找到
这是由于环境变量问题引起的??或只有一个db2实例,即db2inst1正在计算机中运行。我在 appsusr 中的用户名与db2实例名称是 db2inst1 是不同的,这是否引起问题? ?并且我没有超级用户访问权限。这是否引起任何问题?我需要超级用户访问权限吗?
Is this because of environment variable problem ?? or there is only one instance of db2 ie db2inst1 is running in the machine.my user name in appsusr and db2 instance name is db2inst1 are different is this causing problem?? and I am not having super user access.Is this is causing any problem?? do I need super user access is required ??
推荐答案
只需在命令提示符下键入 echo $ PATH ,您就可以在其中看到系统中所有导出的路径。
Just type, echo $PATH in your command prompt , where you can see all the exported paths in your system.
如果db2拍拍在您的环境变量列表中找不到h,然后执行以下操作。
If the db2 path is not found in your environment variable list, then do the following.
export PATH = $ PATH:/opt/IBM/db2/V10.1/bin
export PATH=$PATH:/opt/IBM/db2/V10.1/bin
,然后按Enter。
我希望这能解决您的问题。
and then press enter. I hope this will resolve your issue.
这篇关于UNIX中找不到db2命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!