I'm looking for a way to get all triggers and constraint we modified in a script to migrate them to a different database or reapply to this one if necessary.
I'm using SQLServer Management Studio (2008R2) and want to script triggers and constraints from and to a 2008 instance. When I try to run the Script Wizard and select a table which was not modified, it works fine. However, I want to script out the tables where we modified triggers or constraints, and if I choose one of them, the Wizard just says
Getting the list of objects from MyDatabase. - In progress and nothing more happens, it's just chattering away. Since it is working fine with unmodified tables, it has to be some issue with the modified tables.
Does anyone know a way around this problem to get all modified triggers and constraints in a script? If the wizard can't do it, I'd be as happy with a T-SQL script^^ I know that I might get the create trigger commands from sys.all_sql_modules but I hesitate to use it as I don't know if this will cut long triggers or if it will get me the modified triggers as well.
Any help would be appreciated.