Forked from martinusso/disable_all_triggers_on_firebird.sql
Created
June 26, 2018 08:11
-
-
Save mreis1/8b33abbeb1807288df478b2af8a40fcc to your computer and use it in GitHub Desktop.
Enable/Disable all Triggers on a Firebird database
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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