Blog

Let’s jump in the time machine and go back to April 2010. I attended my first SQL Saturday, in Chicago, IL. One of the speakers was a blogger I had been reading, named Brent Ozar. He was showing off a script he’d written, sp_Blitz, to diagnose issues with SQL Servers. I loved the script and have used it at various times throughout my career.

If only time travel was this easy

Running sp_Blitz is like sending your SQL Server instance to the doctor. It checks your vitals – it asks if backups are being taken. It tells you who has sysadmin privileges. It checks security. It looks at what non-default options are turned on. It finds tables without clustered indexes. It warns you if tables have triggers on them. It’s a comprehensive overview of which best practices could be implemented.

Making sp_Blitz Better

Throughout the years, the SQL Server community has contributed to making sp_Blitz better (because the community is awesome like that). Suggestions have been submitted to check for mis-matched collations, looking for database owners, and even to fix spelling errors!

It’s a great give and take project. There have been over 10,000 downloads of it so far! Brent gave it to the community, they have used it, and they’ve given suggestions to make it better.

sp_Blitz Results Can Now Be Shown As A Report!

In May of 2012, I joined Brent Ozar PLF! Now, I’m able to make my own contribution to sp_Blitz. I didn’t know this when they hired me, but all those years of playing with SQL Server Reporting Services came in handy right away. I’ve created a SQL Server Management Studio custom report to display the results of sp_Blitz!

You’ve been looking at results displayed in this format:

Now, when you install the custom report, you can view your results in this format:

You can download the report here.

Instructions to install the sp_Blitz custom report:

  • Open SQL Server Management Studio and connect to an instance.
  • Right-click the instance name and select Reports > Custom Report. (This will create the appropriate folder – C:\Users\username\Documents\SQL Server Management Studio\Custom Reports.)
  • Copy the .rdl file to the Custom Reports folder just created.
  • In SSMS, right-click the instance name, select Reports > Custom Report > sp_blitz.
  • If you see a Warning, “You are about to run a custom report….”, click Run.

Running a custom report by accessing it through the instance name will make the report execute in the context of the master database. If you create stored procedures in a different database, simply right-click the database name and select Reports > Custom Reports to execute it in the context of that database.

Interested in learning more? I’ve made a short video that explains how to run and use the report!

↑ Back to top
  1. Hey that’s Spadina circle in Toronto! See that pink house on the left side of the picture? There’s a building behind the trees just to the left of that. My brother used to live there.

    Also reminds me of a funky tune called “Spadina Bus” which (if you have time) is entertaining for a million reasons http://www.youtube.com/watch?v=KZnLjRi_g9o

  2. Oh, and great report Jes.
    I’ve always had trouble with defining custom reports. The report viewer control that SSMS uses seems to only support .rdl that was written using BIDS 2005. Is that still true?

    • It’s too funny that you know where that picture was taken!

      SQL Server 2005, 2008, and 2008R2 require that the custom report .rdls be built in BIDS 2005. With SQL Server 2012, you can use SQL Server Data Tools and Reporting Services 2012, which is a big improvement.

  3. Thanks for the improvement and enhancement.

    Great work

  4. Tim did something very similar and blogged about it back back in April – here’s the post http://sqlservertimes2.com/?p=768

  5. Nice, I like the report a lot. Appreciate you taking the time to add this enhancement.

  6. This is really awesome stuff.Very useful.Thanks for your efforts.

  7. The screenshots look great. Unfortunately when our 3rd party vendor delivered our database it was set in compatibility mode 80 so I have been unable to run any of the standard or custom reports which has been a real pain. I have setup a new machine and plan to restore my production database to this machine and change the compatibility level to 90 so I can run this report.To get all the information that is in this report what other databases would I have to restore to my new machine? I was thinking master and model as well.

    • When you install SQL Server on the new machine, the system databases will be installed. You can then restore your vendor database. It’s great planning on your part to do the upgrade on a secondary server!

  8. Hi Jes,

    thank you for this cool report.
    I already use sp_Blitz a lot but with this output it´s even more valuable when you want to show the results to others.
    I needed to make a little change since I do not place the sproc in the master but in a “AdminDB”.
    Unluckily I have used SQL Srv 2008 R2 BIDS and the reportd did not work any longer (the report viewer ctrl problem)
    So I made the change with notepad, still one of the best editors you can use….. :-)

  9. Nice report! Going to make it easier for the non-DBA folks here to understand and visualize the issues I am constantly raising. Thanks!

  10. Nice! Thanks for sharing! And, yes, I do recognize that picture too!

  11. Hi Jes,
    Thank you for this incredibly useful report! I’d like to suggest one thing about the report for inprovement! Like most reports, the information about the server that you are reporting on would be a great information to have. right on the report. Other than that, just wow!!!

    • Thanks for the great feedback, and the great idea! I’ll add that to the list of future enhancements!

  12. When I run the stored procedure, sp_BlitzUpdate, I get this error. I used to run this successfully before but any more.

    Error Message:
    LE DB provider “SQLNCLI10″ for linked server “(null)” returned message “Login timeout expired”.
    OLE DB provider “SQLNCLI10″ for linked server “(null)” returned message “A network-related or instance-specific error has occurred while establishing a connection to SQL Server. Server is not found or not accessible. Check if instance name is correct and if SQL Server is configured to allow remote connections. For more information see SQL Server Books Online.”.
    Msg 53, Level 16, State 1, Line 0
    Named Pipes Provider: Could not open a connection to SQL Server [53].

Leave a Reply

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

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>