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: Roman Mirzaitov <rmirzaitov_at_kt.kg>
Date: Wed, 8 May 2002 19:39:25 +0600
Message-ID: <abb9qj$gs76u$1@ID-127142.news.dfncis.de>


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...

> 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
>
>
Received on Wed May 08 2002 - 08:39:25 CDT

Original text of this message

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