This section is my Code Library – bits and pieces of code that I find incredibly useful. Most of these will need to be adapted to suit specific purposes.
My policy on any code that you get from the internet (including my blog): If you can’t explain to another person how the code that you’re copying from the internet works, then DON’T USE IT on a production system! After all, you will be the one supporting it!
T-SQL Scripts
Ad-Hoc Querying – Establishing SQL Environment
Ad-Hoc Querying – Excel Spreadsheets (2003 format)
Ad-Hoc Querying – Text Files
Detect Duplicate Key Constraints
Extended Properties – Get All for Object
Grouped Delimited Lists
Maintenance Scripts
OLE Automation – Saving Image or VarBinary datatyped columns to files
OLE Automation – Saving text to files
Setting and Restoring Configuration Settings
Shred Deadlock Graphs
Shred IO Statistics into Tabular Results
sp_Blitz checks
sp_help_revlogin scripts
Virtual Tally (Numbers) Table
