Databases
cancel
Showing results for 
Search instead for 
Did you mean: 

How can I run sqlplus on HP-UX console

SOLVED
Go to solution
cazxd
Advisor

How can I run sqlplus on HP-UX console

I would likt to run SQLplus on a HP-ux Console.

1. login as root
2.change path to the oracle/bin directory
3.su oracle
4.enter sqlplus

But I get the response as;
sh: sqlplus : not found

How can I run sqlplus on HP-UX console.

Thankes
question
9 REPLIES
Duncan Edmonstone
Honored Contributor
Solution

Re: How can I run sqlplus on HP-UX console

Try This:

1. login as root
2.change path to the oracle/bin directory
3.su - oracle
4.enter ./sqlplus

HTH

Duncan

HTH

Duncan
Pete Randall
Outstanding Contributor

Re: How can I run sqlplus on HP-UX console

First off, I would try changing our su command to:

su - oracle

and then try sqlplus.


If that doesn't do it, enter the full path name:

/oracle/bin/sqlplus (or wherever it's located).


Pete

Pete
Duncan Edmonstone
Honored Contributor

Re: How can I run sqlplus on HP-UX console

Try This:

1. login as root
2. su - oracle
3.change path to the oracle/bin directory
4.enter ./sqlplus

HTH

Duncan

HTH

Duncan
Patrick Wallek
Honored Contributor

Re: How can I run sqlplus on HP-UX console

You really should do an 'su - oracle'. The way you are doing it, Oracles .profile is not getting sourced and all the Oracle environment variables, like Oracle_home, are not getting set thus you are not able to find the path to sqlplus.

Adding the - to the su will cause the .profile to get read.

# su - oracle
$ sqlplus

Otherwise (without the - in the su command)

# su oracle
$ cd /path/to/oracle/bin
$ ./sqlplus
Massimo Bianchi
Honored Contributor

Re: How can I run sqlplus on HP-UX console

Hi,
other have answered on how to do sqlplus start from oracle user.


But if you want to start it as root,
do the following:

- export ORACLE_HOME=...
- export ORACLE_SID=..

- export PATH=$PATH:$ORACLE_HOME/bin


now you will be able to run sqlplus, but without internal or /, toy should use normal system/password sintax.


If you use system/password@SID and you cannot find the SID, check ownership and perms of
$ORACLE_HOME/network/admin/*.ora files and /etc/*.ora files .


HTH,
Massimo
cazxd
Advisor

Re: How can I run sqlplus on HP-UX console

Thanks guys

I get in sqlplus by,

#su - oracle
$sqlplus

Or

# su oracle
$ cd /path/to/oracle/bin
$ ./sqlplus

thank youa again

Dong
question
twang
Honored Contributor

Re: How can I run sqlplus on HP-UX console

try to use this command:
login as root,
# su - oracle c "sqlplus"

or

# su - oracle c "sqlplus /nolog"
Steven E. Protter
Exalted Contributor

Re: How can I run sqlplus on HP-UX console

Oracle is pretty clear about NEVER using root for any database operations.

If for example you use sqlplus to start the database as root, the shared memory areas could be inaccessible to regular users.

What you are proposing is okay, but its not exactly the same as a native oracle login.

Another possible other problem is the TERM variable, which sqlplus might not like.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Yogeeraj_1
Honored Contributor

Re: How can I run sqlplus on HP-UX console

hi,

i don't understand why you cannot login as the oracle user itself on the HP-UX console?

please revert.

regards
Yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)