Re: Triggers

From: ddf <oratune_at_msn.com>
Date: Tue, 8 Sep 2009 13:10:14 -0700 (PDT)
Message-ID: <e049c122-1b18-498d-b6ae-e26e1bddf5a0_at_o41g2000yqb.googlegroups.com>



On Sep 8, 11:28 am, The Magnet <a..._at_unsu.com> wrote:
> On Sep 8, 11:20 am, ddf <orat..._at_msn.com> wrote:
>
>
>
>
>
> > On Sep 8, 11:05 am, The Magnet <a..._at_unsu.com> wrote:
>
> > > Hi,
>
> > > Probably a nutty question, but, is it possible to find out what
> > > program contained the DML which fired the trigger?
>
> > > We have a particular situation, and next to mining the logs, we're not
> > > sure how to find who or what is updating a certain row.  So, we should
> > > a trigger on the table testing for this particular user ID and
> > > capturing information is the best way to go.
>
> > > If there are others, I'm all ears.
>
> > You could set event 10046 at the instance level, but that would be
> > overkill, I think.  An after update trigger would work, provided you
> > populate an auditing table with the desired information.  You'll need
> > to regularly monitor the table for size, unless this is a 'one-shot'
> > event where once you find the 'cuplrit' you disable the trigger.
>
> > Of course others may have differing opinions.
>
> > David Fitzjarrell
>
> Thanks David.  The only thing is that we're looking for the program
> name.  Say it is an external application with a direct DML statement.
> Would that appear in PROGRAM or CLIENT INFO of V$SESSION?- Hide quoted text -
>
> - Show quoted text -

Unless you set it through a call to
dbms_application_info.set_client_info it should appear in the PROGRAM column.

David Fitzjarrell Received on Tue Sep 08 2009 - 15:10:14 CDT

Original text of this message