Your Scripting Toolbox

If you’ve been around SQL Server, and responsible for keeping it running, it isn’t long until you start to build your own DBA toolbox. Inside your toolbox you maintain scripts designed to predict, detect, and resolve problems for users or the server itself. The scripts come from all over. Some are given to you; some you get from resources you purchase; others you find over the web and elsewhere. Regardless, you have a toolbox to help you solve problems.

How do you manage this library of scripting tools? Just like any toolset, if you can’t find a tool when you need it, you may as well not have the tool. You can use templates built into SSMS to help organize things. Using templates also provides a handy user interface with a tree structure, available to you right in SSMS. If your directory makes sense, this can be a good way to locate scripts when you need it.

I was reading ideas from others on how they manage their scripts and came across a blog by Russ Thomas. Russ has some really great ideas for managing scripts. He has two hints I think are awesome. First, comment your scripts so you know what they do, and how to use them. Second, use version control for your scripts. They are going to change over time. Just like any code, you may need to reference how they were historically.

So you have your own script toolbox? Do you have any tips to share in our comments for what to keep, how to manage it, or the value you have found using them? You can drop an Email to btaylor@sswug.org if you prefer. Moreover, we have a large script library right here at SSWUG for you to use. You can even use our system as a centralized storage system for your own script toolbox.