Disables the specified trigger by saving its definition to a table and dropping it.
DISABLE_TRIGGER(ASCHEMA VARCHAR(128), ATRIGGER VARCHAR(128))
DISABLE_TRIGGER(ATRIGGER VARCHAR(128))
Drops a trigger after storing its definition in DISABLED_TRIGGERS
for later "revival" with ENABLE_TRIGGER
. The trigger must be operative (if it is not, recreate it with RECREATE_TRIGGER
before calling DISABLE_TRIGGER.
- 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.
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');
- Source code
ENABLE_TRIGGER
RECREATE_TRIGGER
DISABLE_TRIGGERS
- SYSCAT.TRIGGERS (built-in catalogue table)