Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save mreis1/8b33abbeb1807288df478b2af8a40fcc to your computer and use it in GitHub Desktop.
Save mreis1/8b33abbeb1807288df478b2af8a40fcc to your computer and use it in GitHub Desktop.
Enable/Disable all Triggers on a Firebird database
update
rdb$triggers
set
rdb$trigger_inactive = 1
where
rdb$trigger_source is not null
and (coalesce(rdb$system_flag,0) = 0)
and rdb$trigger_source not starting with 'CHECK'
update
rdb$triggers
set
rdb$trigger_inactive = 0
where
rdb$trigger_source is not null
and (coalesce(rdb$system_flag,0) = 0)
and rdb$trigger_source not starting with 'CHECK'
alter trigger TRIGGER_NAME inactive;
alter trigger TRIGGER_NAME active;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment