Re: Triggers
From: Malcolm Dew-Jones <yf110_at_vtn1.victoria.tc.ca>
Date: 8 Sep 2009 16:31:25 -0700
Message-ID: <4aa6e94d$1_at_news.victoria.tc.ca>
The Magnet (art_at_unsu.com) wrote:
Date: 8 Sep 2009 16:31:25 -0700
Message-ID: <4aa6e94d$1_at_news.victoria.tc.ca>
The Magnet (art_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.
As an aside, it may be useful to use PRAGMA AUTONOMOUS_TRANSACTION; so your code will save the logged details even if the caller rolls back. (And don't forget to COMMIT your AUTONOMOUS_TRANSACTION if you do do this.)
You can use it directly in the trigger, or in a function, so I understand. Received on Tue Sep 08 2009 - 18:31:25 CDT