Informix Error -748
-748 Exceeded limit on maximum number of cascaded triggers.
You exceeded the maximum number of cascading triggers, which is 61. You may be setting off triggers without realizing it. You can query the systriggers system catalog table to find out what triggers exist in the database. To trace the triggered actions, place the action clause of the initial trigger in an SPL routine, and use the SPL TRACE statement.
Oninit® Troubleshooting Guidance
Reasons / Common Causes
-748 fires when a chain of triggers firing other triggers exceeds 61 levels of cascading — per the official guidance, this is usually unintentional: triggers set off other triggers without the developer realizing the full chain.
- A trigger's action modifying a table that itself has a trigger, which modifies another table with its own trigger, and so on, exceeding 61 levels — per the official guidance, often unnoticed until it actually hits the limit.
- A trigger inadvertently re-triggering itself indirectly through a chain of other tables' triggers, rather than the more obvious direct self-reference case (which -747 would catch).
- A genuinely deep, intentional cascade design that simply needs restructuring to stay under the limit, rather than being a bug.
Solutions / Resolution
- Query
systriggersto inventory what triggers exist in the database, per the official guidance:SELECT trigname, tabid, event FROM systriggers; - Trace the triggered actions to find the actual cascade chain, per the official
guidance — place the initial trigger's action clause in an SPL routine and use the SPL
TRACEstatement (TRACE ON/TRACE OFF/TRACE PROCEDURE; there's no form that scopes tracing to an arbitrary routine name) to observe the chain as it unfolds:SET DEBUG FILE TO 'trigger_trace.out'; TRACE ON; - Break the cascade once identified — consolidate logic to avoid unnecessary trigger-to-trigger chaining, or move some of the chain's logic into a single routine called directly instead of via nested triggers.
Examples
Tracing a suspected cascade
SET DEBUG FILE TO 'trigger_trace.out';
TRACE ON;
-- exercise order_update_handler now; review trigger_trace.out afterward
-- for the full chain of triggered calls
Diagnostic Checks
- Inventory triggers via
systriggersto understand the full set of triggers involved. - Trace the actual cascade using
SET DEBUG FILE TO+TRACE, per the official guidance, to see the chain rather than guessing at it.
Related Errors / Related Topics
- -747 — "Table or column matches object referenced in triggering statement." A related trigger-restriction error, about a direct self-reference rather than an indirect cascade chain hitting the depth limit.
Usually an unintentional cascade — trace it with SET DEBUG FILE TO + TRACE rather than
guessing at which trigger chains into which.