Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: selecting osuser info inside a stored proc
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