Baseline SQL Server

Spread the love

Hi DBA friends! Like me, if you are responsible for multiple SQL Servers and don’t have any third-party monitoring tool, then I guess instead of writing your own in-house tool, you can go with Brent Ozar’s First Responder Kit. I blogged about it sometime back in below blog post:-

Also, recently Brent explained the same in a webcast. Below is the Youtube link:-

In case you still wonder where to start, then try downloading latest code from BrentOzarULTD/SQL-Server-First-Responder-Kit github repository. Also, on top the tables/procedures/views created by Brent Code, one can use scripts that I use to slice-dice the Baseline data collected by Brent Ozar sp_BlitzFirst. Below is the location for my script on github:-

imajaydwivedi/SQLDBA-SSMS-Solution/Baselining/

Below is little description about each of the script present in above SSMS Project:-

  1. [What was Running – AsOf.sql]
    • This returns stored data from BlitzFirst proc and sp_WhoIsActive for specific DateTime
  2. [WaitStats – Cumulative – AsOf – sp_Blitz.sql]
    • Returns WaitsStats from Server Start time till specific DateTime passed as parameter value
  3. [WaitStats – Delta – AsOf – Paul Randal – sp_Blitz.sql]
    • Returns WaitStats collected between specific DateTime and prior Collection
  4. [WaitStats – During – Paul Randal – sp_Blitz.sql]
    • Returns WaitStats between 2 DateTimes passed as parameter
  5. [PerfMon – AsOf – Delta.sql]
    • Returns PerfMon Stats collected between specific DateTime and prior Collection
  6. [FileStats – AsOf.sql]
    • Return FileStats (Latencies) from Server Start time till specific DateTime passed as parameter value
  7. [FileStats – AsOf – Delta.sql]
    • Returns FileStats (Latencies) collected between specific DateTime and prior Collection
  8. [FileStats – During.sql]
    • Returns FileStats (Latencies) between 2 DateTimes passed as parameter.

With sp_BlitzFirst & sp_WhoIsActive in a SQL Agent job with scheduled execution for every 10-15 minutes, you can look back in time in terms of What was running, its execution stats, file stats, wait stats and Perfmon counters. This would help you to answer anybody as why your server was slow at a particular point in time.

I hope you will find it useful. Thanks 🙂

3 Comments

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.