The MidnightSQL Server Evaluation script for SQL Server

Server evaluations are a major part of my consulting business. I need to get up to speed very quickly on a server when I first start a project, and uncover the big potential issues. So, I started developing a set of scripts to help me gather and summarize that information fast.  What I have now is a single script: the MidnightSQL Server Evaluation, version 1.0….aka the Eval.

A simple server eval...
A simple server eval…

What’s the Eval script for?

This script isn’t an all-purpose tool, nor an in depth troubleshooter. It IS a general information-gatherer that answers most of my biggest questions about a server. Here’s a subset of what the Eval gathers:

  • Server name
  • Product and platform versions
  • Number of CPU cores, amount of memory
  • Database and file count, file types in use (e.g. Log, Rows, Filestream)
  • Drive letters that host database files
  • Log file unused space
  • A small subset of sp_configure counters
  • Traces running
  • Trace flags enabled
  • Missing backups
  • Top wait types

I’ll go ahead and tell you now: I fully expect you guys will use the script, and come back to me with bugs and improvements. Shoot, even sp_whoisactive  is on version 11.11 right now. But I’ve been using this script for months, and it’s fairly solid.

I can just close my eyes and run the Eval, right?

No, that’s never ever the case with a script you got from the internet.  Like anything else, this script comes with no guarantees or warranties! Though I’ve tried to ensure the script is low impact and non-invasive, I can’t guarantee how it will interact with your system.

*** Test this script before you run it in a production environment, and use at your own risk. ***

Wait a minute, this sounds an awful lot like sp_Blitz™…

Yep, it sure does. Brent Ozar’s sp_Blitz™ is a great tool that’s still in my arsenal, and the Eval is very similar in purpose and use to it. So why did I create a completely different script?

I wanted a different set of information – think “partially overlapping Venn diagram of information” here.  And I wanted to present it differently, in a more summarized format. I knew at the start that I’d be creating a similarly-themed product, and I made sure to create my own solution (not modify Brent’s). This will be self-evident pretty quickly to anyone who takes a look at the code itself.

Like I said, sp_Blitz™ is a tool I still use. As a matter of fact, the Eval will run sp_Blitz™ – if it exists in the master database of the target server – and summarize the results along with all the other data gathered.  If sp_Blitz™ isn’t on the target server, then the Eval skips that section, providing a link to download it (if the user wishes). I told you: it’s a great tool.

Can I modify the Eval?

Absolutely. Once you’re comfortable with the Eval and using it, feel free to tailor it to your needs. I’m releasing the Eval under a Creative Commons Attribution 3.0 Unported License.  This means you can share, remix, and make commercial use of the script, so long as you attribute the original source as Jen McCown, www.MidnightSQL.com.

Growing the Eval script

If you’re feeling particularly awesome, send me your changes and I might add them to a future edition. The hivemind can be quite brilliant, you know.

I use the Eval all the time, and so as I get the time I’ll improve and solidify it, do more formal testing and documentation, and happily accept feedback. Think of this 1.0 release as an “informal” release…I’m pushing it out there in a raw state so people can use it, and so I’ll be more inclined to invest time in the thing.

Download the MidnightSQL Server Evaluation, version 1.0

Happy days,
Jen McCown
http://www.MidnightDBA.com/SQL

Leave a Reply

Your email address will not be published. Required fields are marked *