Computing.Net > Forums > Unix > sqlplus won't work

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

sqlplus won't work

Reply to Message Icon

Name: aandy
Date: June 1, 2004 at 07:59:10 Pacific
OS: hp ux
CPU/Ram: 2 gb
Comment:

Hi,

Could anybody please tell why this is happening? sqlplus command works in my user login, but when logged in as root, it won't work. I changed root's .profile to include oracle environment variables (root and user login have same lines). It's still not working. Any ideas?

Thanks



Sponsored Link
Ads by Google

Response Number 1
Name: Jim Boothe
Date: June 1, 2004 at 08:47:06 Pacific
Reply:

When you say "it won't work", do you mean that the shell cannot find sqlplus? If so, that means that $ORACLE_HOME/bin will not be in your $PATH. To confirm, from your root session: echo $PATH


0

Response Number 2
Name: aandy
Date: June 1, 2004 at 09:01:33 Pacific
Reply:

My user environment is already set. I tried running a script in my account as root. It didn't execute as it has slplus in it.

I tried issuing echo $PATH, echo $ORACLE_HOME, echo $ORACLE_BASE etc ... as root and they returned valid values (Both at / and homedir as root).


Thanks


0

Response Number 3
Name: Jim Boothe
Date: June 1, 2004 at 09:43:50 Pacific
Reply:

Sorry, I am still confused.

First, please confirm exactly will not work. Can the shell not find sqlplus, or what?

In your root session, you say that $PATH looks OK. Please confirm: Does $PATH contain $ORACLE_HOME/bin?

If $PATH is set up properly, the "which" command will be able to locate sqlplus. What do you get when you do:

which sqlplus


0

Response Number 4
Name: aandy
Date: June 1, 2004 at 11:06:22 Pacific
Reply:

Hi,

This is what the .profile has (some key lines)

[code]


PATH=/usr/sbin:$PATH:/sbin:/home/root

[/code]

[code]

ORACLE_HOME=/u01/app/oracle/product/8.1.7; export ORACLE_HOME
ORACLE_BASE=/u01/app/oracle; export ORACLE_BASE
ORACLE_SID=serva; export ORACLE_SID
PATH=:$PATH:.:/opt/perl5/bin:/opt/gcc/bin:/opt/softbench/bin:$ORACLE_HOME/bin:/bin:opt/bin:/opt/softbench/contrib/bin:/opt/emacs/bin:
export PATH
SHLIB_PATH=$ORACLE_HOME/lib:/usr/lib/Motif1.2:/usr/lib; export SHLIB_PATH
[/code]

After I changed it, logged out, logged back in, I get the following. PATH doesn't show ORACLE. I guess something is wrong with pATH setting. Any idea? Thanks again.

# which sqlplus
no sqlplus in /usr/bin /usr/sbin /sbin

# echo $PATH
/usr/bin:/usr/sbin:/sbin

# echo $ORACLE_HOME
/u01/app/oracle/product/8.1.7

# echo $ORACLE_BASE
/u01/app/oracle

# echo $ORACLE_SID
serva



0

Response Number 5
Name: Jim Boothe
Date: June 1, 2004 at 12:29:27 Pacific
Reply:

I can't see anything. Maybe PATH is getting re-declared after your declaration?

For trouble-shooting, right after your PATH declaration in .profile, I would put:

echo "PATH has just been set to:"
echo $PATH

and at very end of .profile:

echo "PATH is:"
echo $PATH


0

Related Posts

See More



Response Number 6
Name: jaivrat
Date: June 2, 2004 at 22:28:26 Pacific
Reply:

Will you please let me know what is exact error message you are getting?

Jai Vrat Singh


0

Response Number 7
Name: jaivrat
Date: June 2, 2004 at 23:31:31 Pacific
Reply:

In addition to my message above, the sqlplus command generally uses some shared objects. To get these .so (shared object) files at runtime, it serached them in the addresses mentione in the LD_LIBRARY_PATH environment variable. Can you please set it the same as in your user login and try again?

I hope it will work.


Jai Vrat Singh


0

Sponsored Link
Ads by Google
Reply to Message Icon






Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Unix Forum Home


Sponsored links

Ads by Google


Results for: sqlplus won't work

CD-ROM won't play music CD's www.computing.net/answers/unix/cdrom-wont-play-music-cds/2141.html

Help with www.computing.net/answers/unix/help-with-/6436.html

Won't boot www.computing.net/answers/unix/wont-boot/6076.html