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???

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

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?:b:
thank you vbe

You need to set ORACLE_HOME, ORACLE_SID explicitly. Do this
In sh/ksh

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???

My bad. The second statemetn should read

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

....:frowning:

Lets start all again.. with vino's addition:
What do you know about unix in general? (may help us understand your pain... and answer accordingly...)

vino suggest you set some env variable:
the best for you in this case is to edit using vi your .profile
on a standard HP system you should be using ksh (or posix..)
so in your home directory do a vi of .profile:
look for this line:
# Set up the search paths:

#### and add now:
ORACLE_HOME=/usr/oracle/u01/8.1.7
#### and complete the PATH:
PATH=$PATH:$ORACLE_HOME/bin
export ORACLE_HOME PATH

### save -> :wq
now execute . ./.profile
env
you should see the modified path and the new variable
which sqlplus should say /usr/oracle/u01/8.1.7/bin/sqlplus (If you are sure its in that directory...)

Helpful people: Please also take note of the fact that he is using bash (as can be seen from his original post), and he is being instructed to add things to korn shell config files.

Shawn -

In HPUX /sbin/sh usually points to ksh by default. Most bash installation are in places like /usr/local/bin. This does not mean that /sbin/sh could not point somewhere else, but you have to assume ksh or a POSIX Bourne-like shell.

(ant B.11.11 U 9000/800 168921511 unlimited-user license
ant:/sbin $ file sh
sh: PA-RISC1.1 shared executable
ant:/sbin $ file /usr/bin/sh
/usr/bin/sh: PA-RISC1.1 shared executable dynamically linked
ant:/sbin $ file /usr/bin/ksh
/usr/bin/ksh: PA-RISC1.1 shared executable dynamically linked
ant:/sbin $

/sbin/sh is by default only used by root and is pure bourne shell(not dynamically linked), the reason in when in maintenance level or single user you may very well have nothing more than / mounted...
this said it doesnt change anything to the syntax given...

thanks guys for your answers.

vbe as you understand i use unix only for my work and the only things i know are from college 3-4 years ago.so....please do answer me accordingly!

by default the machine points at sh but i used ksh to write what vino instructed
i will these new things and we'll see;)
thanks talk you soon!

What does running this:

/usr/oracle/u01/8.1.7/bin/sqlplus

at the command line give you?

Also, if you have significant permissions, try:

find /usr/oracle/u01/8.1.7 -name sqlplus