If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > How to avoid SQLSTATE 54038

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-14-07, 03:04
sheela562 sheela562 is offline
Registered User
 
Join Date: Apr 2007
Posts: 10
How to avoid SQLSTATE 54038

The runtime depth level of trigger cascading supported is 16. If a trigger at level 17 is activated, SQLCODE -724 (SQLSTATE 54038) will be returned and the triggering statement will be rolled back.How to avoid this error.
Reply With Quote
  #2 (permalink)  
Old 06-14-07, 08:02
ARWinner ARWinner is offline
Registered User
 
Join Date: Jan 2003
Posts: 3,575
This is from the manual on sqlcode -724:
--------------
SQL0724N The activation of "<object-name>" of type
"<object-type>" would exceed the maximum level of
indirect SQL cascading.

Explanation:

Cascading of indirect SQL occurs when a trigger activates another
trigger (possibly through referential constraint delete rules) or
a routine, containing SQL, invokes another routine. The depth of
this cascading is limited to 16.

Note that recursive situations where a trigger includes a
triggered SQL statement that directly or indirectly causes the
same trigger to be activated, or where a routine directly or
indirectly invokes itself, is a form of cascading that is very
likely to cause this error if there are no conditions to prevent
cascading from exceeding the limit.

The "<object-type>" is one of TRIGGER, FUNCTION, METHOD, or
PROCEDURE.

The "<object-name>" specified is one of the objects that would
have been activated at the seventeenth level of cascading.

User Response:

Start with the objects that are activated or invoked by the
statement that received this error. If any of these objects are
recursive, ensure that there is some condition that prevents the
object from being activated or invoked more than the limit
allows. If this is not the cause of the problem, follow the
chain of objects that are activated or invoked to determine the
chain that exceeds the cascading limit.

sqlcode : -724

sqlstate : 54038

---------------------

The only way not to get the error is to prevent it. You have to reduce the cascading to 16 or less.

Andy
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On