I connected to VM with ssh connection and I want to run sqlplus command, but when I run sqlplus / as sysdba
(to example) I get sqlplus: command not found
.
I have on the VM oracle DB and I've created a data base.
Asked
Active
Viewed 7,962 times
1 Answers
2
Is the sqlplus
binary in your PATH? Check your environment. Try:
which sqlplus
It should print the full path of the sqlplus
command. If it doesn't, you must locate the binary an append the containing directory to your path or invoke the command by the full path.

Mithrandir
- 24,869
- 6
- 50
- 66
-
I tried and I get /usr/bin/which: no sqlplus in (/home/oracle/scripts/showdb:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/oracle/bin) – zeevblu Jan 26 '12 at 15:52
-
2Then sqlplus is NOT in your path! Find it, e.g. using find / -name sqlplus -print – Mithrandir Jan 26 '12 at 15:55
-
Thanks, now I found it. what should I do now to run it? – zeevblu Jan 26 '12 at 19:01
-
Where did you find it? Let's say /oracle/bin/sqlplus. Then you can use the full path /oracle/bin/sqlplus or edit your .bashrc and say PATH=$PATH:/oracle/bin; export PATH . Source your .bashrc or log in again and you should be able to launch sqlplus. – Mithrandir Jan 26 '12 at 19:06
-
/home/oracle/orabase/product/11.2.0/bin/sqlplus and i tried to run: /home/oracle/orabase/product/11.2.0/bin/sqlplus / as sysdba and i received: Error 6 initializing SQL*Plus SP2-0667: Message file sp1
.msb not found SP2-0750: You may need to set ORACLE_HOME to your Oracle software directory – zeevblu Jan 26 '12 at 19:10 -
Add to your .bashrc : ORACLE_HOME=/home/oracle/orabase; export ORACLE_HOME. (i think the path is right). Again source .bashrc or log in (or read up on how a unix systems works) – Mithrandir Jan 26 '12 at 19:14