我刚刚在Ubuntu上安装了Oracle Database 11g R2。
我试图运行sqlplus
,但我收到了这条消息:
sqlplus: command not found
这些是以下值:$ ORACLE_SID,$ ORACLE_HOME和$ PATH
aimad@localhost:/u01/app/oracle/product/11.2.0/dbhome_2/bin$ echo $ORACLE_SID
aimad@localhost:/u01/app/oracle/product/11.2.0/dbhome_2/bin$ echo $ORACLE_HOME
/u01/app/oracle/product/11.2.0/dbhome_2/
aimad@localhost:/u01/app/oracle/product/11.2.0/dbhome_2/bin$ echo $PATH
/usr/local/sbin:/sbin:/usr/sbin:/bin:/usr/bin:/usr/bin/X11:/usr/local/bin:/usr/bin:/usr/X11R6/bin:/root/bin
我该如何解决这个问题?
答案 0 :(得分:2)
将路径/u01/app/oracle/product/11.2.0/dbhome_2/bin
(因为sqlplus在此处)添加到$PATH
变量:
PATH=$PATH:/u01/app/oracle/product/11.2.0/dbhome_2/bin
export PATH