When you think of a craftsman, a likely image to immediately pop into your head would be one of an older man, working with hand tools on a piece of wood. Each movement he makes are deliberate and precise, and he seems to know intuitively what needs to happen next. His tools are so familiar to him, and used so effortlessly that they seem like an extension of his body.
Although database work is a far cry from any form of woodwork, it is still a craft, albeit one that is difficult to garner as much sympathy at family gatherings as the classic crafts. As a craft, one of the two main things database professionals will talk about is "what have you created or done?", and "which tools do you use?".
This second question is a great question, as you may discover a fantastic tool that you’d never heard of, and which can provide vast improvements in the efficiency of your regular time-consuming tasks, whether by providing necessary information more easily, or by automating tasks you currently do manually.
I frequently get odd looks when I state that I don’t regularly use third-party tools at all (with the exception of backup compression tools).
What? No Tools?
The primary reason for this stance is that I work for many different clients, and the majority do not have any tools over what is provided with SQL Server, and for various reasons, cannot justify acquiring any additional tools.
This is not to say that I am against third-party tools – I definitely do make use of them when available, but I believe that for every task that a tool provides assistance with, a database professional should be able to do without the tool at a pinch.
I liken this to our craftsman’s view of power tools. There are many situations where power tools will greatly increase the speed and ease of creating some projects in the workshop, but for other situations hand-tools reign supreme. Perhaps the craftsman is visiting family and is asked to repair a broken chair, or has a simple task to do that doesn’t justify setting up the power tools.
Letâ€™s See Some Examples
As an example, Ola Hallengren’s excellent Index Optimisation scripts (amongst other things) are an excellent and free utility for more intelligently performing index maintenance. However, at a pinch, a DBA should be able to query the sys.dm_db_index_* family of DMVs to determine which indexes require maintenance, and issue the appropriate ALTER INDEX command.
Automatic code-completion is another helpful tool that some people swear by. As this is a relatively new feature in the SQL Server world (whether a third-party tool, or the one provided as part of SQL Server 2008′s Management Studio), many DBAs are used to not using this. In the future, however, we will become used to having code completion tools available. It’s still important to know how to quickly query the database structure using sp_help, sp_helptext, sys.objects, INFORMATION_SCHEMA, etc. (Incidentally, I wow at least 5 people a year by using the Alt-F1 shortcut for sp_help. Simply highlight a table name in a query window in Management Studio, and hit Alt-F1. Very useful.)
There are a number of tools available that can be used to trace expensive queries, and I do enjoy using a tool developed in-house to provide trace control and analysis. If this is not available, or if it would take too much time to set up, I’m happy to pull out Profiler, script out a focussed trace, collect some data, and then analyse the resulting trace files with fn_trace_gettable().
There are numerous other examples. Can you read a deadlock graph, or do you need Profiler to draw a picture? Can you read a blocking chain in sp_who2, or do you need Adam Machanic’s (blog | twitter) Who Is Active? What if you are called upon to help with a SQL Server 2000 instance, where this is unavailable?
Regardless of whether you primarily use the base set of tools, or primarily use the "power" tools, it pays to be familiar with both types, and to be able to use each tool in the proper way in the right situation.