Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: selecting osuser info inside a stored proc
Hi,
select sys_context('USERENV','OS_USER') from dual;
OS_USER - returns the operating system username of the client process that
initiated the database session.
However, ability to use sys_context function depends on your Oracle version.
And as always you forgot to mention it.
Regards,
-- Roman Mirzaitov Brainbench MVP for Oracle Administration www.brainbench.com "clueless" <ro_cright_at_hotmail.com> wrote in message news:LB9C8.20757$f5.1692498_at_news...Received on Wed May 08 2002 - 08:39:25 CDT
> 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.
>
> Thanks,
> Clueless
>
>