Unable to connect to sqlplus from unix


 
Thread Tools Search this Thread
Top Forums UNIX for Advanced & Expert Users Unable to connect to sqlplus from unix
# 1  
Old 07-01-2012
Network Unable to connect to sqlplus from unix

Hi,

I have been trying to connect to sqlplus the same way I used to do in my earlier company but I get these error messages , please suggest way out -

user name - xyzuser
schema name - xyzschema

Code:
[ceadmin@FNPRODCE1:/home/ceadmin]$ sqlplus xyzuser@xyzschema
ksh: sqlplus:  not found.
[ceadmin@FNPRODCE1:/home/ceadmin]$ sqlplus -s xyzuser@xyzschema
ksh: sqlplus:  not found.
[ceadmin@FNPRODCE1:/home/ceadmin]$ man sqlplus
Manual entry for sqlplus not found or not installed.
[ceadmin@FNPRODCE1:/home/ceadmin]$ /sqlplus -s xyzuser@xyzschema<
ksh: /bin/sqlplus:  not found.
[ceadmin@FNPRODCE1:/home/ceadmin]$ /usr/local/bin/sqlplus
ksh: /usr/local/bin/sqlplus:  not found.


Last edited by Scott; 07-01-2012 at 09:30 AM.. Reason: Code tags, please...
# 2  
Old 07-01-2012
Where is sqlplus located on the machine (mostly $ORACLE_HOME/bin)? Is that location a part of PATH value?
# 3  
Old 07-01-2012
It seems you have not set the Oracle environment yet.

Try:
Code:
$ ORAENV_ASK=no
$ . oraenv xyzschema

oraenv is located in the Oracle 'home' bin directory (i.e. /oracle/product/11.2/bin)
# 4  
Old 07-01-2012
For older versions of oracle you have to have:

ORACLE_HOME variable defined
$ORACLE_HOME/bin in your PATH variable
ORACLE_SID [optional] defined as your oracle instance name.

Code:
# ORACLE_SID is required to use sqlplus this way:
sqlplus username/passwd
#otherwise
sqlplus username/passwd@instance_name

# 5  
Old 07-04-2012
If all else fails, try a blunt search to find out where the program resides and by implication whether the Server Administrator has allowed you to see the program. The redirect of the error channel to /dev/null is because you are not the "root" user and will be refused access to numerous directories.

Please post the result of:
Code:
find // -type f -name sqlplus -exec ls -ald {} \; 2>/dev/null

If there is more than one version of Oracle on the computer, you may get more than one hit.
# 6  
Old 07-05-2012
Another way to find out the the Oracle-home(s) on your box is to look into the file /etc/oratab. The free Oracle-Express databases doesn't ship with oraenv (that should also find in /usr/local/bin) but have the script $ORACLE_HOME/bin/oracle_env.sh to set up your environment.
Its structure is
Code:
$ORACLE_SID:$ORACLE_HOME:$START_ORACLE_AUTOMATICALLY


Last edited by cero; 07-05-2012 at 03:31 AM.. Reason: Info about Oracle-Express
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. 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

2. Shell Programming and Scripting

Connect to Oracle using sqlplus

I have logged into oracle using SQLPLUS. When I type any kind of query, there is only 1 answer - '2'. What is wrong with it? (1 Reply)
Discussion started by: Subhasis
1 Replies

3. Shell Programming and Scripting

Unable to connect to SQL through unix

I am trying to connect to SQL plus through unix but i am getting below error 'ksh: sqlplus: not found' note i am running this from /home/xxx do i need to set any environmental variable for this. below is my code echo " hello world" sqlplus -s apps/CAF78GEN<<EOF set heading... (4 Replies)
Discussion started by: karnatis
4 Replies

4. Solaris

Unable to start SQLPLUS

I upgraded my system to Solaris 11 and everything works but I can't start my database or what (I am a noob). OS: -bash-4.1$ uname -a SunOS Solaris11 5.11 11.0 i86pc i386 i86pc -bash-4.1$ isainfo -kv 64-bit amd64 kernel modules Database version is 11g2 Enterprise edition, installed on... (6 Replies)
Discussion started by: solaris_user
6 Replies

5. Solaris

Unable to connect to Internet

Hi friends recently i have installed SXDE 1/08 into my machine,and i installed wifi driver also its working fine,Recently i was unable to connect to Internet,I have not changed any configurations and any installations,thing is that i got my iwk0 interface is UP and IP address also and i can... (6 Replies)
Discussion started by: srinivas2828
6 Replies

6. Solaris

SQLPLUS unable to execte query automatically from solaris script

Hi, I am trying to execte the .sql file(which contain the two different sql query) from solaris script using sqlplus command, the script is executing successfully but the issue is when i execute the script, it is not terminating automatically, for example if i put one sql statement then i have... (2 Replies)
Discussion started by: jyotisree
2 Replies

7. UNIX for Dummies Questions & Answers

connect sqlplus from unix

hi, I have this basic query. I have created a new user on unix. I have given home directory and permission through chmod to create directory stucture. Now need to connect sqlplus. What permissions should we give, so that this works? Any help is appreciated. Thanks, Neha (1 Reply)
Discussion started by: nehak
1 Replies

8. UNIX for Dummies Questions & Answers

unable to start sqlplus from unx

I want to execute sqlplus command from unix environment.Infact I enter the command Here is what I entered. $ pwd /u01/app/oracle/product/9.2.0_64/TSTGDPB/bin $ ls -l sqlplus -rwxr-x--x 1 oragdpb oinstall 1062664 Oct 18 2005 sqlplus $ whoami bpt3a1 $ sqlplus /bin/ksh: sqlplus: not... (1 Reply)
Discussion started by: MSHETTY
1 Replies

9. Shell Programming and Scripting

connect to sqlplus from shell

I'm writting a shell script and at the begining I login to sqlplus by sqlplus -l user_name/password@instance what I would like is to check if the database is down or not , and if the database has started moved to the next step else sleep for a certain time and then check again . I know how to... (4 Replies)
Discussion started by: aya_r
4 Replies

10. Shell Programming and Scripting

connect to sqlplus in a script

Hi, I want to write a script, in which I will connect to sqlplus and do a quary and then exit sqlplus user/pwd@database select count(*) from table exit. and write the result in a log file. How to write it ? Many thanks before. (1 Reply)
Discussion started by: big123456
1 Replies
Login or Register to Ask a Question