End Loose Ends

SQL

Enabling and Disabling Triggers in SQL Server 2005

One of the goals of data migration is to preserve the integrity of existing data while altering it to be represented in another form.  Enabling and disabling triggers can be very handy when migrating data – particularly if you encounter triggers that alter or create rows in other tables.  Fortunately, it is extremely easy to programmatically enable/disable triggers in SQL Server 2005: ALTER TABLE [dbo].[YOUR_TABLE] DISABLE TRIGGER [YOUR_TRIGGER] ALTER TABLE [dbo].[YOUR_TABLE] ENABLE TRIGGER [YOUR_TRIGGER]