1820270 Members
3233 Online
109622 Solutions
New Discussion юеВ

Re: using sqlplus.

 
SOLVED
Go to solution
Boniface Chiwenda
Occasional Contributor

using sqlplus.

Hi everyone
I have a situation where Iam starting sqlplus under root with this command:
su - asy -c /home/asy/sqlplus username/password
and the command starts sqlplus without any problem but it asks me of the username and password which I have supplied on the command line. I suspect the system can only interprate the command upto sqlplus which means it's not seeing the username and password supplied.
How can I execute the same command without been asked for a username and password.
Regards

Bonnie.
3 REPLIES 3
RAC_1
Honored Contributor
Solution

Re: using sqlplus.

su - asy -c "/home/asy/sqlplus username/password"

Anil
There is no substitute to HARDWORK
Boniface Chiwenda
Occasional Contributor

Re: using sqlplus.

Thanks Anil
You have made my day.

Regards.

Bonnie.
Yogeeraj_1
Honored Contributor

Re: using sqlplus.

Bonnie,

please allow me to added the following:

if you Database allows for OS authentication, you can also avoid specifying the username and password by just running:
su - asy -c "/home/asy/sqlplus /"

assumptions:
a. You have OS parameters enabled at the database level
e.g.
SQL> show parameter os_auth

NAME TYPE VALUE
------------------------------------ ------- ------------------------------
os_authent_prefix string ops$
remote_os_authent boolean TRUE

b. you have a user ops$asy in your database.

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