Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: selecting osuser info inside a stored proc

Re: selecting osuser info inside a stored proc

From: Knut Talman <knut.talman_at_mytoys.de>
Date: Wed, 08 May 2002 16:06:02 +0200
Message-ID: <3CD930CA.6BD4ACBE@mytoys.de>


clueless wrote:
>
> Hi gang,
>
> I am writing a pl/sql stored procedure. Inside the procedure I want to
> determine the osuser who is executing the stored proc. The user will NOT
> have dba privileges, i.e. this will be a NORMAL user. Any ideas, hints,...
>
> I was thinking about creating another stored function owner by a dba that
> would return the osusers from v$session when called (execute priv would be
> granted to the NORMAL user). The problem is that this view (v$session) will
> return all users logged in.

The view v$mystat shows your SID. Knowing it you can query v$session to get the os user.

Regards,

Knut Received on Wed May 08 2002 - 09:06:02 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US