Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Unix account from PL/SQL ??
You can use remote login "rlogin" and run the shell script which you need to run on the remote Unix machine. You dont have to pass any password while using rlogin command. See the help for rlogin for how to set it up..
-----Original Message-----
Susantio
Sent: Monday, December 10, 2001 2:45 PM
To: Multiple recipients of list ORACLE-L
Hi Sunny,
Thanks for your help.
It seems to be the answered for me ;)
But I still hit one problem here,
I tried to invoke the SQL statement from my package.
and when I compile the package,
It keeps giving me the error message :
PLS-00201: identifier 'SYS.V_$SESSION' must be declared
any idea what could be the problem ?
Another question,
What is the safe way to switch to another user in the shell script ?
if I use su oracle or su - oracle,
normally it will prompt me for the password.
How do I do that in the shell script,
Do I need to include the password as well ?
Won't that be dangerous ?
Thanks a lot Sunny
Regards
Herman
>
>
> Hello Herman,
>
> Correction :
> select osuser
> into <>
> from v$session
> where audsid = userenv('sessionid');
>
> should give you the unix userid from within pl/sql
>
> For the second question, I think it's called the "Sticky bit" setting on
a
> file's permissions where it basically does a "switch user" to the owner
> before executing it. So regardless of who in the group runs oracle, it
will
> be run as Oracle.
>
> thanks,
> Sunny
>
>
> >From: "Herman Susantio" <sherman_at_bcsis.com>
> >Reply-To: ORACLE-L_at_fatcity.com
> >To: Multiple recipients of list ORACLE-L <ORACLE-L_at_fatcity.com>
> >Subject: Unix account from PL/SQL ??
> >Date: Thu, 06 Dec 2001 18:25:18 -0800
> >
> >Hi all,
> >
> >I've got 2 questions here : (Platform : Sun Solaris) :
> >
> >1. What is the command in PL/SQL to get unix userID who logged in when I
> >execute PL/SQL
> > script ?
> >2. I have created a new user : ABC123, and the primary group is oinstall.
> > When I start oracle instance using ABC123, how come the process
still
> >belong to another
> > user (oracle) ?
> >
> >Any feedback would be greatly appreciated
> >
> >Thanks & Regards
> >Herman
> >
> >
> >
> >
> >
> >
> >--
> >Please see the official ORACLE-L FAQ: http://www.orafaq.com
> >--
> >Author: Herman Susantio
> > INET: sherman_at_bcsis.com
> >
> >Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> >San Diego, California -- Public Internet access / Mailing Lists
> >--------------------------------------------------------------------
> >To REMOVE yourself from this mailing list, send an E-Mail message
> >to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> >the message BODY, include a line containing: UNSUB ORACLE-L
> >(or the name of mailing list you want to be removed from). You may
> >also send the HELP command for other information (like subscribing).
>
>
> _________________________________________________________________
> Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp
>
>
-- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Herman Susantio INET: sherman_at_bcsis.com Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). -- Please see the official ORACLE-L FAQ: http://www.orafaq.com -- Author: Rahul Mehendale INET: rahul.mehendale_at_tatainfotech.com Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Lists -------------------------------------------------------------------- To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing).Received on Mon Dec 10 2001 - 06:12:10 CST