Andrew Fiebert, DBA and Developer
The blogfolio of
developer Andrew Fiebert

SQL Server Scripts

Otherwise known as my tool belt, below are all the scripts I’ve made which pretty much got me through my years as a SQL Server DBA. None of them are really mind shattering, and if you’re an experienced DBA chances are you’ve seen most of these before. Thing is, when I was starting out as a DBA with zero SQL Server experience, I really could have benefited from a bunch of scripts like these. Hopefully you find some of these helpful.

Script and ReferenceTypeDate AddedDescription
Note that nowhere do I claim these scripts are earth shattering or perfectly written, in fact most of them were written by me a couple years back and approach T-SQL like a programming language and not the database scripting language that it is (ie: liberal use of cursors). The only thing that I do claim is that all scripts listed are 100% written by me.
p_get_all_clusters
(sneak preview, not posted yet)
SQL ServerJan 4, 2010Use this procedure to pull disk details from a remote instance using openrowset. Adhoc queries must be enabled and you must be local admin an all clusters owned by you (assumed).
p_get_drive_details
(Using Openrowset to gather disk usage)
SQL ServerDec 30, 2009This procedure can be used to pull disk details from a remote instance.