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: find out who makes the update in a trigger event

Re: find out who makes the update in a trigger event

From: Daniel A. Morgan <dmorgan_at_exesolutions.com>
Date: Sun, 01 Jul 2001 22:10:49 -0700
Message-ID: <3B400258.279297AC@exesolutions.com>

Mario wrote:

> Steno,
>
> look at the USERENV function in the SQL Manual
>
> Mario
>
> "steno" <snovotny_at_integro.net> wrote in message
> news:9e0619$bhnt$1_at_ID-37725.news.dfncis.de...
> > hi there,
> >
> > i want to log database changes trough triggers.
> > therefore i need to know which session fires the trigger. is there a
> > possibilty to get the SID from the session which fired the trigger?
> >
> > additionally i added triggers on v$session to recognize if there is a new
> > session
> > and capture the commit and rollback command.
> >
> > thanks in advance
> > steno
> >
> >
> >
> >

And not only is v$session a view, not a table, you should never add any triggers to any object owned by SYS or SYSTEM. Look at the triggers suggested by Mario. Also, have you considered just using Oracle's built-in audit functionality?

Daniel A. Morgan Received on Mon Jul 02 2001 - 00:10:49 CDT

Original text of this message

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