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

Home -> Community -> Usenet -> c.d.o.tools -> Re: Getting Current User from triggers

Re: Getting Current User from triggers

From: Van Messner <vmessner_at_bestweb.net>
Date: Mon, 16 Jul 2001 22:47:54 GMT
Message-ID: <uaK47.2043$Ka2.518298@monger.newsread.com>

If you do use the user pseudo column be sure to test that your are getting the results you want. Is your middle tier product sending the requests from each actual user to Oracle with a different user name or as a single user? Any connection pooling?

Van

"Stephen Bell" <stephen.bell_at_cgi.ca> wrote in message news:3B531D18.F52C896D_at_cgi.ca...
> Hi,
>
> You can use USER in the VALUES clause of an insert statement, for instance
 if
> you want to insert the name of
> the user that performed the insert/update....you could use a default value
> (user) for when an insert occurs and when an update
> occurs you can populate an "UPDATED BY" field in the table....whatever
 method
> you use, I think it's the USER function
> you're looking for.
>
> Best regards,
> Steve
>
> Fabio GRANDE wrote:
>
> > Hi all !
> > I have a trigger attached to a table, that run every time there's an
 insert
> > or an update.
> > In this trigger, I need to know the current Oracle User (and other info
 such
> > as those I can get from v$session view such as OSUSER and MACHINE).
> > Is there a way to do this with PL/SQL ?
> > Thanx in advance for Your co-operation
> >
> > --
> > Fabio GRANDE
> > fabiog_at_NOSPAMfileita.it
>
Received on Mon Jul 16 2001 - 17:47:54 CDT

Original text of this message

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