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-Kitgithub 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:-
Below is little description about each of the script present in above SSMS Project:-
[What was Running – AsOf.sql]
This returns stored data from BlitzFirst proc and sp_WhoIsActive for specific DateTime
[WaitStats – Cumulative – AsOf – sp_Blitz.sql]
Returns WaitsStats from Server Start time till specific DateTime passed as parameter value
[WaitStats – Delta – AsOf – Paul Randal – sp_Blitz.sql]
Returns WaitStats collected between specific DateTime and prior Collection
[WaitStats – During – Paul Randal – sp_Blitz.sql]
Returns WaitStats between 2 DateTimes passed as parameter
[PerfMon – AsOf – Delta.sql]
Returns PerfMon Stats collected between specific DateTime and prior Collection
[FileStats – AsOf.sql]
Return FileStats (Latencies) from Server Start time till specific DateTime passed as parameter value
[FileStats – AsOf – Delta.sql]
Returns FileStats (Latencies) collected between specific DateTime and prior Collection
[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 am Microsoft Certified Professional having 10+ years of experience in SQL Server Querying, Database Design, and Administration. I am fond of Query Tuning and like to automate things using TSQL & PowerShell. I also have experience of implementing end-to-end Data Warehouse solution, and Data Migration using ETL tools SQL Server Integration Services (SSIS), Pentaho Business Analytics, and have designed Database Inventory through PowerShell, Python, and Django etc.