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: Stephen Bell <stephen.bell_at_cgi.ca>
Date: Mon, 16 Jul 2001 12:58:00 -0400
Message-ID: <3B531D18.F52C896D@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 - 11:58:00 CDT

Original text of this message

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