DISABLE_TRIGGER procedure¶
Disables the specified trigger by saving its definition to a table and dropping it.
Prototypes¶
DISABLE_TRIGGER(ASCHEMA VARCHAR(128), ATRIGGER VARCHAR(128))
DISABLE_TRIGGER(ATRIGGER VARCHAR(128))
Description¶
Drops a trigger after storing its definition in DISABLED_TRIGGERS for later “revival” with ENABLE_TRIGGER procedure. The trigger must be operative (if it is not, recreate it with RECREATE_TRIGGER procedure before calling DISABLE_TRIGGER.
Parameters¶
- ASCHEMA
- If provided, the schema containing the trigger to disable. If omitted, defaults to the value of the CURRENT SCHEMA special register.
- ATRIGGER
- The name of the trigger to disable.
Examples¶
Disable the FINANCE.LEDGER_INSERT trigger:
CALL DISABLE_TRIGGER('FINANCE', 'LEDGER_INSERT');
Recreate then disable the EMPLOYEE_UPDATE trigger in the current schema:
CALL RECREATE_TRIGGER('EMPLOYEE_UPDATE');
CALL DISABLE_TRIGGER('EMPLOYEE_UPDATE');
See Also¶
- Source code
- ENABLE_TRIGGER procedure
- RECREATE_TRIGGER procedure
- DISABLE_TRIGGERS procedure
- SYSCAT.TRIGGERS (built-in catalogue table)