Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 Scripting Triggers

Author  Topic 

nice123ej
Starting Member

48 Posts

Posted - 2009-01-16 : 05:57:08
Hi

I am using SQL Server 2005

I have 2 different copies of the same database (FINANCE_DEV & FINANCE_TEST)

what i want is to get the script of the Triggers from FINANCE_DEV and execute it on FINANCE_TEST

when i use Tasks -> Generate Scripts i have option to copy Tables script with the Triggers, but I dont want the tables script, i just want the Triggers script only

Is there any script i can use to extract only Triggers Script ?

thanks

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2009-01-16 : 06:12:34
See http://weblogs.sqlteam.com/peterl/archive/2008/10/24/How-to-script-out-all-your-objects-one-per-file.aspx


E 12°55'05.63"
N 56°04'39.26"
Go to Top of Page

madhivanan
Premature Yak Congratulator

22864 Posts

Posted - 2009-01-16 : 07:44:33
or change the where clause to xtype='tr'
http://sqlblogcasts.com/blogs/madhivanan/archive/2007/12/13/script-out-procedures-and-functions-part-2.aspx


Madhivanan

Failing to plan is Planning to fail
Go to Top of Page
   

- Advertisement -