开发者

Knowing if after insert trigger fails

开发者 https://www.devze.com 2023-03-12 14:24 出处:网络
How do I know if one of the after insert trigger is failing? I get an error for Before insert trigger if the trigger code is not valid. Does the after insert work开发者_开发知识库s the same way? Is th

How do I know if one of the after insert trigger is failing? I get an error for Before insert trigger if the trigger code is not valid. Does the after insert work开发者_开发知识库s the same way? Is there any way to log the trigger activity?


Oh yes, you can use PRAGMA AUTONOMOUS TRANSACTION to trace all the trigger activities.

The Autonomous Transaction can commit on his own, without affecting the main transaction which fires the trigger.

At the following link:

http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:2212445691154

you can find a detailed example of trigger with an autonomous transaction inside of it.

This is another useful link regarding autonomous transactions:

http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14261/sqloperations.htm#BABDHGAB

0

精彩评论

暂无评论...
验证码 换一张
取 消