SQLPLUS not found


 
Thread Tools Search this Thread
Top Forums UNIX for Dummies Questions & Answers SQLPLUS not found
# 1  
Old 12-27-2011
SQLPLUS not found

hi,

I am new to unix and trying to connect to oracle from unix.

I typed the below command and the error is sqlplus not found

Code:
$ sqlplus
-ksh: sqlplus: not found [No such file or directory]


can someone please tell me what is missing? I see that oracle is available on this unix box in the path /opt/oracle as a tar file.

thanks!

Last edited by radoulov; 12-27-2011 at 05:33 PM.. Reason: Code tags!
# 2  
Old 12-27-2011
Hi.

You need to set the Oracle environment.

If you type oraenv do you get a similar error?

When no, then you could do:

Code:
ORAENV_ASK=NO
. oraenv DB_NAME

then retry the sqlplus command.
# 3  
Old 12-27-2011
I get the same error for oraenv. and then I did used the commands you gave.. for the second command- the error message is the below.

Code:
. oraenv DB_NAME
-ksh: .: oraenv: cannot open [No such file or directory]

can you please check this?

it is a space dot oraenv space DB_NAME, is this correct?

Last edited by radoulov; 12-27-2011 at 05:33 PM.. Reason: Code tags!
# 4  
Old 12-27-2011
Here's how (on Solaris 10) my environment looks before and after calling oraenv...

Code:
$ env
_=/usr/bin/env
LANG=C
HZ=
PATH=/oracle/product/11.2/bin:/usr/bin:
LOGNAME=oracle
MAIL=/var/mail/oracle
SHELL=/usr/bin/ksh
HOME=/export/home/oracle
TERM=xterm
PWD=/export/home/oracle
TZ=Europe/Zurich
$ . oraenv         
ORACLE_SID = [oracle] ? DB1
The Oracle base for ORACLE_HOME=/oracle/product/11.2 is /oracle/u01
$ env     
_=/usr/bin/env
LANG=C
HZ=
PATH=/oracle/product/11.2/bin:/usr/bin:
ORACLE_BASE=/oracle/u01
LOGNAME=oracle
MAIL=/var/mail/oracle
ORACLE_SID=DB1
SHELL=/usr/bin/ksh
HOME=/export/home/oracle
LD_LIBRARY_PATH=/oracle/product/11.2/lib
TERM=xterm
ORACLE_HOME=/oracle/product/11.2
PWD=/export/home/oracle
TZ=Europe/Zurich

New in red, changed in purple. You need at least what is in purple to run SQLPlus (obviously changing the path to fit your needs).

Give it a try.

(you could also provide more information about your OS, Shell and user)
# 5  
Old 12-27-2011
thanks scott. I am guessing may be oracle is not installed in unix.. it is just available as a tar file in a directory called oracle.. so i think it is not installed. i appreciate your help! Is there a way to check if oracle is installed in the unix box?
# 6  
Old 12-27-2011
If there's no Oracle user (id oracle), that's a good sign. I think Oracle server requires a local Oracle user, even if you're all AD'd / LDAP'd up, so that should be sufficient.

Software installation locations vary by OS, so if you can't find it using find, that might be a sign it's not installed.
# 7  
Old 12-30-2011
Hi Scott,

the enviornment details (like the ORACLE_SID, ORACLE_HOME, path etc) that you showed in one of your previous posts, is that stored in a file? if yes, can you please tell me which location this file has to go to and the name of the file?

Actually I have the details to set up the env. and I executed the commands and exported them.. but it worked in that unix session. I closed that session and opened an another one, but it is not working..

Thanks!
 
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX and Linux Applications

Problem on SQLplus command ""bash: sqlplus: command not found""

Hi all, i face an error related to my server ""it's running server"" when i use sqlplus command $ sqlplus bash: sqlplus: command not found the data base is up and running i just need to access the sqlplus to import the dump file as a daily backup. i already check the directory... (4 Replies)
Discussion started by: clerck
4 Replies

2. UNIX for Dummies Questions & Answers

Unable to configure Oracle sqlplus V12 properly. Need Help. Resources could'nt be found elsewhere .

I installed Oracle sqlplus on My Ubuntu 14.04 64bit version as per the instructions on: help.ubuntu page (Unable to post the URL as i'm new user here). I'm totally new to SQL and now i'm learning queries in my college. I installed 64bit version of sqplus and run it executing the command:... (14 Replies)
Discussion started by: arjunmayilvagan
14 Replies

3. Shell Programming and Scripting

Sqlplus error - sqlplus -s <login/password@dbname> : No such file or directory

i am using bash shell Whenever i declare an array, and then using sqlplus, i am getting sqlplus error and return code 127. IFS="," declare -a Arr=($Variable1); SQLPLUS=sqlplus -s "${DBUSER}"/"${DBPASS}"@"${DBASE} echo "set head off ; " > ${SQLCMD} echo "set PAGESIZE 0 ;" >> ${SQLCMD}... (6 Replies)
Discussion started by: arghadeep adity
6 Replies

4. Shell Programming and Scripting

Sqlplus Help

When i run the following script am getiing the output correct but i want to get it in the form of a table, could any one help me please. the script is a s follows count=`sqlplus -s $ORACLE_ACCOUNT << EOF set heading off set wrap on set feedback off column ChangeNumber format a12 column... (9 Replies)
Discussion started by: jhon1257
9 Replies

5. Ubuntu

sqlplus: command not found

I installed Oracle 10.2.1.0 in Ubuntu 10.10..my installation was well,i could even open isqlplus( http://ubuntu.ubuntu-domain:5560/isqlplus/workspace.uix ) and execute some queries..But,back in terminal when i try to login to sqlplus i am getting error (20 Replies)
Discussion started by: sandy0594
20 Replies

6. Shell Programming and Scripting

sqlplus: not found

Hi All , At the end I have to post my problem thinking I'll be able to get a clue. I have done a shell script to access a table in our database to extract some logs . Script is working when executed manually ,but when I set it up in cronjob it is not working. I know thins should be a... (2 Replies)
Discussion started by: Davinzy
2 Replies

7. Shell Programming and Scripting

sqlplus : not found

Hi, Below is my script: #!/bin/sh sqlplus uname/pwd@instance <<EOF set wrap off set feedback off set pagesize 0 set verify off set trimspool on set linesize 5000 spool /arboru02/FX/scripts/customer_profile_def.txt select... (1 Reply)
Discussion started by: ss_ss
1 Replies

8. HP-UX

sqlplus: command not found

hi, i need bash shell script run on the crontab(Unix tru64). i have write my shell. it's using sqlplus command and connect to oracle db. execute cron job when i have error messege: "sqlplus: command not found" have you any suggestion? (4 Replies)
Discussion started by: Tlg13team
4 Replies

9. Shell Programming and Scripting

Sqlplus

I am looking to loop round a load of files and execute each in sqlplus, I have looked at the forum to see what was posted in the past, but most of the examples seem to use the sql being passed in through the script, which is not really what I am looking for, can someone tell me if the code below is... (9 Replies)
Discussion started by: LiquidChild
9 Replies

10. Shell Programming and Scripting

how can i check in csh if command found or not found ?

hello all im trying to use in sun Solaris the information received from the top command now i several machines that dont have install the top program so when im running the script im geting error saying after im running this code : set MemoryInfo = `top | grep Memory` if (... (2 Replies)
Discussion started by: umen
2 Replies
Login or Register to Ask a Question