在 unix 中找不到 db2 命令 [英] db2 command not found in unix

查看:21
本文介绍了在 unix 中找不到 db2 命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试在 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 不是拼写错误,您可以运行以下命令来查找包含二进制文件的包"命令未找到 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 路径,请执行以下操作.

If the db2 path is not found in your environment variable list, then do the following.

导出 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 命令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆