Results 1 to 2 of 2
  1. #1
    Join Date
    Apr 2007

    Unanswered: 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.

  2. #2
    Join Date
    Jan 2003
    Provided Answers: 5
    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.


    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

    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.


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts