Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to run sqlplus from another UNIX account? 1

Status
Not open for further replies.

irshad

Technical User
Jan 17, 2001
19
0
0
US
I installed Oracle 8i successfully on Sun Ultra 5 Solaris 8.
I am also able to start the database (svrmgrl, lsnrctl) successfully.

I am ONLY able to run sqlplus from the "oracle" UNIX account.
I am UNABLE to run sqlplus from my other UNIX accounts on the same Sun box.

I thought it may be a PATH issue, so I tried specifying the fully qualified path like this:

$ /u01/app/oracle/product/8.1.5/bin/sqlplus

But it still doesn' work. It says:

Message file sp1<lang>.msb not found
Error 6 initializing SQL*Plus

Here's my question:
How can I run sqlplus from my other UNIX accounts on the same Sun box?

Thanks,
Irshad
 
Did you add oracle users for the other accounts? Jim

oracle, vb
 
If the Unix install is anything like NT, the file in question can be found in /u01/app/oracle/product/8.1.5/sqlplus/mesg. I would start by verifying that the file exists. Probably it does, or you would see the same error using the Unix account.

My guess is that you still have a path problem. SQL*Plus probably doesn't know where to look for its required support files. Another possibility is missing permissions.

I hope this helps. You may need advice from someone with Unix experience.
 
Hi karluk,

Thank you for your resonse.
Yes, the file (sp1us.msb) DOES exist in the
/u01/app/oracle/product/8.1.5/sqlplus/mesg
directory.

I think I have some kind of PATH or permissions problem.
Any body here with some UNIX experience?

Thanks,
Irshad

 
There are two environment variables you need to set:

$ORACLE_HOME
$ORACLE_SID

Login as oracle, type the command:

set | grep ORACLE_

and note the value of the two variables, lets say the output you get is:

ORACLE_HOME=/u01/app/oracle/product/8.1.5/
ORACLE_SID=MYDB

then login as another user and type the following commands (assuming the posix or korn shell)

export ORACLE_HOME=/u01/app/oracle/product/8.1.5/
export ORACLE_SID=MYDB
PATH=$PATH:$ORACLE_HOME/bin

Try that. Mike
michael.j.lacey@ntlworld.com
Email welcome if you're in a hurry or something -- but post in tek-tips as well please, and I will post my reply here as well.
 
Thank you very much Mike !!
Setting the appropriate ORACLE environment variables (the two you mentioned above) in my other UNIX account worked!!

Thanks,
Irshad
 
Glad you're sorted Irshad. Mike
michael.j.lacey@ntlworld.com
Email welcome if you're in a hurry or something -- but post in tek-tips as well please, and I will post my reply here as well.
 
Hi Mike,

Almost, but not quite yet !!

I am able to RUN sqlplus from my other UNIX account, but I cannot login to the database. (I tried both system/manager and scott/tiger)

It says: &quot;ORACLE UNAVAILABLE&quot;.

If I logout of UNIX and login as the &quot;oracle&quot; UNIX user, then I am able to run sqlplus AND login to the database as system/manager and scott/tiger.

Is there anything else I am missing here...

Thanks again,
Irshad
 
Ok......

Could you double check those environment variables for me please? Especially ORACLE_SID. Mike
michael.j.lacey@ntlworld.com
Email welcome if you're in a hurry or something -- but post in tek-tips as well please, and I will post my reply here as well.
 
Hi Mike,

I do have both ORACLE_HOME and ORACLE_SID set as shown below:

$ who am i
training pts/2 Feb 16 21:56

$ env | grep ORA
ORACLE_SID=bvdb
ORACLE_HOME=/u01/app/oracle/product/8.1.5

Does my UNIX user (training) need to belong to a certain UNIX group? (I know the &quot;oracle&quot; UNIX user belongs to the &quot;dba&quot; UNIX group)

Thanks,
Irshad
 
The Oracle SID is case sensitive, I have fallen foul of that before, is it in the right case?
 
type:

ps -fu oracle | grep pmon | grep -v grep

in a shell

the last four characters are (case sensitive) are your SID.
 
If you're still having the problem, do the following...
--log into Unix as your Oracle user.
--go to your Oracle Home directory (cd $ORACLE_HOME/bin)
--then give execute rights on the oracle executable to all users (chmod 6755 oracle).

I had a similar problem before where non-Oracle unix users would receive an ORA-07320 error when they tried to connect. the above fixed it.
 
Hi Nebuchednezzar,

Thank you.
I followed your instructions above and logged in as the &quot;oracle&quot; unix user and typed:
chmod 6755 oracle
That did it !!

My &quot;training&quot; unix user did not need to belong to the &quot;dba&quot; group. He still belongs to the &quot;other&quot; group.

MikeLacey & MikeJones, my SID was fine (it is all lowercase).

Thank you all, I truly appreciate everybody's help !!

Thanks,
Irshad
 
Spot on Neb :) Mike
michael.j.lacey@ntlworld.com
Email welcome if you're in a hurry or something -- but post in tek-tips as well please, and I will post my reply here as well.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top