Triggers
judes
Posts: 12
Sorry for being daft, but how does one easily identify & move triggers between two databases being compared?
This discussion has been closed.
Comments
No problem; SQL Compare really doesn't allow you to move triggers on their own, rather it compares and synchronizes the whole table schema including the columns, triggers, indexes, etc. It would synchronize all of these differences. You can turn it the other way and specifically ignore triggers from the comparison with a program setting. Otherwise SQL Compare requires you to move all differences between tables and can't just migrate the triggers by themselves.
This could be done by writing some .NET code with SQL Toolkit as it is capable of getting the SQL script for all triggers in a database and allowing you to use this information to alter or create the triggers in a second database as needed.