I’m seeing an interesting behavior difference between my instance and my boss’s instance of SSMS. When he uses Tasks->Generate Scripts… for tables, it puts guards around the triggers for that table (If exists…) but when I do the same thing using the same options SSMS doesn’t put the guards around the triggers so I get errors if I run the script it generates more than once. Any idea how I can get SSMS to generate the guards around the triggers for me?
I’m seeing an interesting behavior difference between my instance and my boss’s instance of
Share
In SSMS, review the (menu) Tools / Options dialog, in the “Scripting” section. The setting of “Include IF NOT EXISTS clause” may differ between your two systems, but it may be something similar but more obscure.