how can i call sqlplus?


 
Thread Tools Search this Thread
Operating Systems HP-UX how can i call sqlplus?
# 8  
Old 04-03-2008
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...)
# 9  
Old 04-03-2008
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.
# 10  
Old 04-03-2008
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.
# 11  
Old 04-03-2008
(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...
# 12  
Old 04-07-2008
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 seeSmilie
thanks talk you soon!
# 13  
Old 04-25-2008
What does running this:

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

at the command line give you?
# 14  
Old 04-25-2008
Also, if you have significant permissions, try:

find /usr/oracle/u01/8.1.7 -name sqlplus
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