Skip to content

Latest commit

 

History

History
65 lines (42 loc) · 1.51 KB

DISABLE_TRIGGER.rst

File metadata and controls

65 lines (42 loc) · 1.51 KB

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. The trigger must be operative (if it is not, recreate it with RECREATE_TRIGGER 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