Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

How to Script all Triggers from DB into Text File? Expand / Collapse
Author
Message
Posted Thursday, August 12, 2010 5:38 AM


SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Tuesday, October 14, 2014 7:49 AM
Points: 212, Visits: 1,117

How to script triggers only and getting output in text files as same as SSMS Script Wizard, specially w.r.t SQL Server 2005 and 2008.

Post #968083
Posted Thursday, August 12, 2010 7:52 AM


SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Today @ 3:30 AM
Points: 2,379, Visits: 7,582
http://www.sqlservercentral.com/scripts/Maintenance+and+Management/30222/


Not a DBA, just trying to learn

For better, quicker answers on T-SQL questions, click on the following...
http://www.sqlservercentral.com/articles/Best+Practices/61537/

For better, quicker answers on SQL Server performance related questions, click on the following...
http://www.sqlservercentral.com/articles/SQLServerCentral/66909/



If you litter your database queries with nolock query hints, are you aware of the side effects?
Try reading a few of these links...

(*) Missing rows with nolock
(*) Allocation order scans with nolock
(*) Consistency issues with nolock
(*) Transient Corruption Errors in SQL Server error log caused by nolock
(*) Dirty reads, read errors, reading rows twice and missing rows with nolock


LinkedIn | Blog coming soon (for sufficiently large values of "soon" )!
Post #968194
Posted Thursday, August 12, 2010 10:43 PM


SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Tuesday, October 14, 2014 7:49 AM
Points: 212, Visits: 1,117


Thank you for your time,

but i had gone through this solution before but .... !


My scheme would be to replace this old technique, as we can easily get definition of trigger by new methods into a table/variable and then by just using any useful/simple technique to write contents of that table/variable to a simple text file.

Do you can assist? Please!



Post #968649
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse