how can i call sqlplus?


 
Thread Tools Search this Thread
Operating Systems HP-UX how can i call sqlplus?
# 1  
Old 04-02-2008
Power how can i call sqlplus?

i am new working with hp-ux but i had to because of my job.
so i want to execute some sql scripts but
when i call sqlplus to run them it responds
/sbin/sh: sqlplus not found.
i have oracle 8.1.7 installed.
what should i do
sorry if this sounds too easy but i am now learning.
The same appears for gunzip. Is it missing or i don't have the right shell???
# 2  
Old 04-02-2008
start by :
which sqlplus

Does it find it?
If not you would have to set your path to include the directory where it lies, most certainly /opt/oracle/product/8.1.7/bin but as this depend on how it is installed you will have to check...
# 3  
Old 04-03-2008
sqlplus

at which sqlplus it says
no sqlplus in /usr/sbin /opt/java1.4/bin /usr/dt/bin /usr/bin / /usr/local/bin /
var/opt /usr/css/bin /usr/ucb /etc /bin /opt/bin .

so i suppose i haven't set my path to include the directory where it lies.
the path installed is /usr/oracle/u01/8.1.7/bin
what do i have to write to set my path to include this directory?Smilie
thank you vbe
# 4  
Old 04-03-2008
Quote:
Originally Posted by theodore
at which sqlplus it says
no sqlplus in /usr/sbin /opt/java1.4/bin /usr/dt/bin /usr/bin / /usr/local/bin /
var/opt /usr/css/bin /usr/ucb /etc /bin /opt/bin .

so i suppose i haven't set my path to include the directory where it lies.
the path installed is /usr/oracle/u01/8.1.7/bin
what do i have to write to set my path to include this directory?Smilie
thank you vbe
You need to set ORACLE_HOME, ORACLE_SID explicitly. Do this
In sh/ksh
Code:
set ORACLE_HOME=/usr/oracle/u01/8.1.7
set PATH=${ORACLE_HOME}/bin;${PATH}

# 5  
Old 04-03-2008
sqlplus

Quote:
Originally Posted by vino
You need to set ORACLE_HOME, ORACLE_SID explicitly. Do this
In sh/ksh
Code:
set ORACLE_HOME=/usr/oracle/u01/8.1.7
set PATH=${ORACLE_HOME}/bin;${PATH}

hi vino, thanks for your answer.
after the second command set PATH=....
i get ksh: /usr/sbin:/opt/java1.4/bin:/usr/dt/bin:/usr/bin:/:/usr/local/bin:/var/opt:/
usr/css/bin:/usr/ucb:/etc:/bin:/opt/bin:: not found
am i doing something wrong???
# 6  
Old 04-03-2008
Quote:
Originally Posted by theodore
hi vino, thanks for your answer.
after the second command set PATH=....
i get ksh: /usr/sbin:/opt/java1.4/bin:/usr/dt/bin:/usr/bin:/:/usr/local/bin:/var/opt:/
usr/css/bin:/usr/ucb:/etc:/bin:/opt/bin:: not found
am i doing something wrong???
My bad. The second statemetn should read
Code:
set PATH=${ORACLE_HOME}/bin:${PATH}

# 7  
Old 04-03-2008
Quote:
Originally Posted by vino
My bad. The second statemetn should read
Code:
set PATH=${ORACLE_HOME}/bin:${PATH}

vino
i tried the correct command, i don't get back an error but still
sqlplus won't run.response:
ksh: sqlplus: not found

....Smilie
Login or Register to Ask a Question

Previous Thread | Next Thread

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

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

4. UNIX for Dummies Questions & Answers

Why do I need to call make if I call gcc ?

Why do I need to call make if I call gcc ? I thought gcc already compiles the sources. thanks (1 Reply)
Discussion started by: aneuryzma
1 Replies

5. Infrastructure Monitoring

diffrence between method call and function call in perl

Hello, I have a problem with package and name space. require "/Mehran/DSGateEngineLib/general.pl"; use strict; sub System_Status_Main_Service_Status_Intrusion_Prevention { my %idpstatus; my @result; &General_ReadHash("/var/dsg/idp/settings",\%idpstatus); #print... (4 Replies)
Discussion started by: Zaxon
4 Replies

6. UNIX for Dummies Questions & Answers

sqlplus call

I have a .sh file which acts as an all set for a couple of oracle scripts i want to call. Basically it has 3 variables, the user Id, the password, and the oracle instance to connect to.. the problem is I cant seem to get the connection string format properly.. the program essentially is this: ... (1 Reply)
Discussion started by: JohnZ1385
1 Replies

7. Shell Programming and Scripting

Call sqlplus in the shell script

Hi, I am writing a script to test database connection. If the first try fails, it will wait for 1 minutes and then try again. The script is as following: ........ for i in $ORACLE_SID do $ORACLE_HOME/bin/sqlplus $username/$password@$i <<! >/dev/null select * from tab; exit if ; then... (3 Replies)
Discussion started by: beaniebear
3 Replies

8. UNIX for Advanced & Expert Users

how to differentiate system call from library call

Hi, Ho do I differentiate system call from library call? for example if I am using chmod , how do I find out if it is a system call or library call? Thanks Muru (2 Replies)
Discussion started by: muru
2 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
Login or Register to Ask a Question