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: clueless <ro_cright_at_hotmail.com>
Date: Wed, 08 May 2002 14:30:27 GMT
Message-ID: <7EaC8.20779$f5.1693383@news>


oracle 8.1.7 on W2K
"Roman Mirzaitov" <rmirzaitov_at_kt.kg> wrote in message news:abb9qj$gs76u$1_at_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 - 09:30:27 CDT

Original text of this message

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