I’m presenting right now at the Professional Association for SQL Server Summit in Seattle, and I’m just about to show my attendees the latest incarnation of my Blitz script.
In the past, my manual Blitz script has helped DBAs all over the world discover ugly problems in SQL Servers. However, one thing has been bothering me a lot for the last year or so. One of the lines in the script said, “Change this email address to your own, then execute this line and make sure you can receive emails from Database Mail.” You can probably guess what happened – a lot of people didn’t bother changing the email address. I used my own email in the script because I wanted to know when people ran it that way, and I got at least a dozen emails a week. I talked to some of the users, and they confessed that they didn’t even bother to read the script – they just clicked F5.
At first that bugged me. The Blitz script really has two purposes: to enlighten DBAs about their SQL Server’s risks, and to start teaching the basics of DMVs. These users weren’t learning anything – they just wanted to run the script and make the magic happen. So I figured – why not give it to ’em?
sp_Blitz®: One-Minute Server Takeovers
Say hello to sp_Blitz® – a simple stored procedure that runs a bunch of health checks and exports the results in a prioritized list. Here’s what the output looks like:
The URL column includes a link for each problem we found in the SQL Server. Copy/paste that link into a web browser and you’ll be able to learn more about the particular issue you’re facing. I also include a quick snippet about the general source of the data, like which DMVs I’m querying to catch the issue.
The stored procedure can take a minute or two to run on larger servers, and this is very much a version 1.0. If you find things you’d like to improve, please feel free to let me know – especially if you include sample code to improve it, heh. I expect sp_Blitz® to undergo some rapid improvements over the coming weeks as people holler about bugs, which leads me to the next fun idea I’m playing with in the session.