0% found this document useful (0 votes)
78 views52 pages

Top 10 FREE Performance Troubleshooting Tools For SQL Server

The document discusses top free performance troubleshooting tools for SQL Server. It describes 10 tools: 1) Microsoft Assessment and Planning Toolkit for inventory of SQL Server instances; 2) Microsoft Best Practice Analyzer to analyze configuration best practices; 3) Idera SQL Check for server performance and capacity planning; 4) DBAReports for performance monitoring reports; 5) DiskSpd to test disk I/O performance; 6) SentryOne Plan Explorer for query plan analysis; 7) sp_WhoIsActive to troubleshoot database activity; 8) sp_Blitz to troubleshoot server-level issues; 9) Query Store to troubleshoot database queries; and 10) Ola Hallengren's maintenance scripts for common maintenance procedures

Uploaded by

mladen99
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
78 views52 pages

Top 10 FREE Performance Troubleshooting Tools For SQL Server

The document discusses top free performance troubleshooting tools for SQL Server. It describes 10 tools: 1) Microsoft Assessment and Planning Toolkit for inventory of SQL Server instances; 2) Microsoft Best Practice Analyzer to analyze configuration best practices; 3) Idera SQL Check for server performance and capacity planning; 4) DBAReports for performance monitoring reports; 5) DiskSpd to test disk I/O performance; 6) SentryOne Plan Explorer for query plan analysis; 7) sp_WhoIsActive to troubleshoot database activity; 8) sp_Blitz to troubleshoot server-level issues; 9) Query Store to troubleshoot database queries; and 10) Ola Hallengren's maintenance scripts for common maintenance procedures

Uploaded by

mladen99
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 52

Top 10 FREE performance

troubleshooting tools for SQL Server

Michelle Gutzait
Principal Consultant at www.Pythian.com
[email protected]
Common “DBA” tasks

➢ SQL Server Instance inventory list


➢ Best Practice analysis
➢ Server Performance and capacity planning
➢ Check disk IO performance
➢ Troubleshooting database and database code
➢ Compare data between two databases
➢ Common maintenance procedures
➢ Security Best Practice Analysis
➢ Upgrades and migrations

4 10/7/2019
SQL Server Instance inventory list
➢ Instance discovery (server and instance)
➢ Versions and Editions
➢ Clustered? Which nodes?
➢ Physical/Virtual
➢ Prod/Dev/Test/…
➢ How much memory on server and allocated to instance
➢ How many cores
➢ How many databases
➢ Database sizes and additional info
➢ Backups
➢ …

5 10/7/2019
SQL Server Instance inventory list – Tool #1

➢ Microsoft Assessment and Planning (MAP)


Toolkit

6 10/7/2019
MAP TOOL - Reports

8 10/7/2019
MAP TOOL – example – SQL Server
Summary

13 10/7/2019
MAP toolkit – additional info

Manual:
▪ https://www.interconnect.nl/wp-
content/uploads/2016/08/User-Manual-MAP-Toolkit.pdf
How to use the MAP tool:
▪ https://www.sqlshack.com/how-to-use-microsoft-assessment-
and-planning-map-toolkit-for-sql-server/
Use queries to generate the MAP reports:
▪ https://blogs.technet.microsoft.com/mapblog/2012/02/01/
using-the-map-toolkit-to-obtain-list-of-products-installed-
across-your-environment/

14 10/7/2019
INVENTORY LIST – alternatives

Using PowerShell:
▪ https://gallery.technet.microsoft.com/scriptcen
ter/powershell-for-sql-server-a9af7b91
▪ https://gallery.technet.microsoft.com/scriptcen
ter/PowerShell-SQL-Inventory-e9b92dac

Using T-SQL

15 10/7/2019
Best Practices
https://technet.microsoft.com/en-us/library/hh831400(v=ws.11).aspx

“Although best practice violations, even crucial


ones, are not necessarily problematic, they
indicate server configurations that can result in
poor performance, poor reliability, unexpected
conflicts, increased security risks, or other
potential problems.”

16 10/7/2019
Microsoft Best Practice Analyzer – Tool #2

17 10/7/2019
Microsoft Best Practice Analyzer

10/7/2019
Microsoft Best Practice Analyzer

10/7/2019
Microsoft Best Practice Analyzer

20 10/7/2019
Microsoft Best Practice Analyzer

You can specify any of the following


formats:
•XML
•HTML
•CSV

21 10/7/2019
Sql server Best Practices - Alternatives
PowerShell
▪ https://www.simple-talk.com/sql/database-
administration/automating-your-sql-server-best-practice-reports-the-
document/
▪ https://mcpmag.com/articles/2016/12/08/checking-sql-best-
practices.aspx

T-SQL

Policy-Based Management to monitor and enforce Best


Practices
▪ https://docs.microsoft.com/en-us/sql/relational-databases/policy-
based-management/monitor-and-enforce-best-practices-by-using-
policy-based-management

22 10/7/2019
Server Performance and capacity planning

➢ CPU levels
➢ Memory
➢ I/O
➢ Network
➢ SQL Server
✓Lock/Block/Deadlock
✓T-SQL performance

23 10/7/2019
Idera SQL Check - Tool #3

24 10/7/2019
Idera SQL Check

25 10/7/2019
DBAREPORTS - Tool #4

▪ https://github.com/sqlcollaborative/dbareports

27 10/7/2019
DBAReports - Links

How to install:
▪ https://www.youtube.com/watch?v=f0RvKPFbm68

Install and run PowerBi reports plus Cortana:


▪ https://www.youtube.com/watch?v=da6S1j32_Ok

SSRS reports for DBAreports:


▪ https://www.youtube.com/watch?v=tdDSPbkneHg
Test disk IO Performance

➢ Compared to what?
✓Current market Average
➢ Proper for expected load
➢ Proper for expected growth
➢ Scalability

29 10/7/2019
Microsoft Diskspd - Tool #5

▪ Replacing SQLIO tool

“ Vision for the DiskSpd tool

The DiskSpd tool provides the functionality needed to generate a wide


variety of disk request patterns, helpful in diagnosis and analysis of
storage-based performance issues. For example, it can be used to
simulate SQL Server I/O activity and more complex patterns of access
which change over time. It enables the user to analyze storage
performance without running a full end-to-end workload.
DiskSpd presents results in both a text summary and also a detailed XML
form suitable for automated result analysis. ”

30 10/7/2019
DISKSPD

31 10/7/2019
diskspd

32 10/7/2019
33 10/7/2019
DISKSPD - Resources

▪ https://sqlperformance.com/2015/08/io-
subsystem/diskspd-test-storage
▪ https://gallery.technet.microsoft.com/DiskSpd
-A-Robust-Storage-6ef84e62

34 10/7/2019
SentryOne Plan Explorer – Tool #6
Key Features
Standalone Windows application, contains many of the plan
analysis features included in the full SentryOne Platform
software but does not require a collector service or database.
▪ Index Analysis -- Determine the best index to support a given
query.
▪ Statistics Analysis -- Visualize query parameters and statistics.
▪ Plan Diagram -- See your query plan on your desktop or laptop
screen with full layout control.
▪ Query Performance Profiling and Playback -- Replay your
SQL Server queries with access to their live performance
statistics.
▪ And much more -- In the user guide.
SentryOne Plan Explorer - example

Explanation:
https://www.sentryone.com/blog/aaronbertrand/sql-sentry-
v10-index-analysis
Troubleshooting database and database
code

➢ What did I find before?


➢ Where to start?
➢ General vs specific
➢ Scripts, script, scripts….

42 10/7/2019
Sp_Whoisactive - Tool #7

▪ https://www.brentozar.com/responder/log-
sp_whoisactive-to-a-table/

43 10/7/2019
Sp_whoisactive - DEMO

44 10/7/2019
Sp_Blitz - Tool #8

▪ https://www.brentozar.com/blitz/

45 10/7/2019
Sp_blitz

46 10/7/2019
Sp_blitz

47 10/7/2019
Sp_blitz - DEMO
Troubleshooting DB Code – QUERY STORE

▪ Built-in - SQL 2016+ and Azure

49 10/7/2019
QUERY STORE - Tool #9

50 10/7/2019
QUERY STORE

51 10/7/2019
Common maintenance procedures

➢ Index maintenance
➢ Update statistics
➢ Integrity Checks
➢ Purge backup and job history
➢ Recycle Errorlog

52 10/7/2019
Ola Hallengren SPs - Tool #10
https://ola.hallengren.com/sql-server-index-and-statistics-maintenance.html

53 10/7/2019
Maintenace procedures - challenges

➢ Different workloads
➢ Versions and editions of SQL Server
➢ Locks/blocks/deadlocks
➢ Partitions
➢…

54 10/7/2019
Surprise – much more!

55 10/7/2019
Xsqlserver and script gallery

Script repository
▪ https://gallery.technet.microsoft.com/scriptcenter
▪ https://gallery.technet.microsoft.com/scriptcenter/site/sea
rch?f%5B0%5D.Type=RootCategory&f%5B0%5D.Value
=databases

xSQLServer and Desired State


Configuration(DSC) for SQL Server
▪ https://github.com/PowerShell/xSQLServer
▪ https://blogs.msdn.microsoft.com/troy_aults_blog/2015/08/31/
desired-state-configurationdsc-for-sql-server/

56 10/7/2019
XSQLSERVER

▪ Things which every DBA should be interested


in automating:
➢ Installation of SQL Server
➢ Configuration of SQL Server. (MaxMemory,
MaxDop, ect)
You can contribute and
➢ Security Compliance add more!

57 10/7/2019
https://gallery.technet.microsoft.com/xSQLServer-

Xsqlserver PowerShell-12d76584/view/Discussions

59 10/7/2019
SET STATISTICS IO, TIME ON https://statisticsparser.com/
Thank you!
[email protected]
▪ http://www.qdpma.co ▪ MDW Management
m/ Datawarehouse

You might also like