一、SQL Server Performance Dashboard 简介
1.1 SQL Server Performance Dashboard的作用
SQL Server Performance Dashboard,可以快速的洞察SQL Server的数据库实例性能状态。
SQL Server Performance Dashboard帮助快速识别 SQL Server 遇到的性能瓶颈。如果发现瓶颈,则可以轻松捕获解决问题所需的其他诊断数据。
性能仪表板可帮助识别的一些常见性能问题包括:
- CPU 瓶颈(以及哪些查询消耗最多的 CPU)
- I/O 瓶颈(以及哪些查询执行最多的 I/O)
- 查询优化器生成的索引建议(缺失索引)
- 阻塞
- 资源争用(包括闩锁争用)
- 性能仪表板还可以帮助识别可能之前执行过的昂贵查询,并且有多个指标可用于定义高成本:CPU、逻辑写入、逻辑读取、持续时间、物理读取和 CLR 时间。
1.2 SQL Server Performance Dashboard分为以下部分和子报告
- 系统 CPU 利用率
- 当前等待请求
当前活跃情况
- 用户请求
- 用户会话
- 缓存命中率
历史信息
- 等待
- 闩锁
- I/O统计
- 昂贵的查询
其他信息
- 活动踪迹
- 活动 XEvent 会话
- 数据库
缺少索引
二、SQL Server Performance Dashboard的安装
2.1 下载Performance Dashboard
注意:Performance Dashboard仅支持SQL SERVER 2008及以上的版本
--下载地址: https://www.microsoft.com/en-us/download/details.aspx?id=29063
2.2 安装Performance Dashboard
- 在windows中双击运行SQLServer2012_PerformanceDashboard.msi,点击next直到完成。
这里的安装路径是可以自定义的,我这里安装在如下路径:
C:\Program Files (x86)\Microsoft SQL Server\110\Tools\Performance Dashboard\
- 安装后会弹出readme.txt
2.3 在所需观察性能的实例中配置Performance Dashboard
根据readme.txt的内容配置
Getting Started With the Performance Dashboard Reports
- Each SQL Server instance you plan to monitor must contain the procedures and functions used by the queries in the reports. Using SQL Server Management Studio (SSMS), open the setup.sql script from your installation directory (default of %ProgramFiles(x86)%\Microsoft SQL Server\110\Tools\Performance Dashboard) and run the script. Close the query window once it completes.
In the Object Explorer pane in SSMS, right mouse click on the SQL Server instance node, then choose Reports-Custom Reports. Browse to the installation directory and open the performance_dashboard_main.rdl file. Explore the health of your server by clicking on the various charts and hyperlinks in the report.
All of the remaining reports are accessed as drill through operations from the main page or one of its children. For a detailed explanation of all installation requirements and guidance on how to use the reports, please see the help file, PerformanceDashboardHelp.chm.
- 打开安装Performance Dashboard的路径上,运行setup.sql文件
- 这里可以点击确定
- 点击【执行】按钮,运行完会看到Script completed!
三、SQL Server Performance Dashboard的使用
在需要查看性能问题的实例上,右键,点击【报表】,点击【自定义报表】
打开安装Performance Dashboard的路径,选择【performance_dashboard_main.rdl】,点击【打开】
- 这里就可以看到一个性能报表的总览,就可以看到【系统CPU使用信息】、【当前等待请求】【当前活跃情况】、【历史信息】、【其他信息】,
- 具体的报表内容的解析,留到下回分解
参考文档:
https://learn.microsoft.com/en-us/sql/relational-databases/performance/monitor-and-tune-for-performance?view=sql-server-ver16
https://www.microsoft.com/en-us/download/details.aspx?id=29063
本文由mdnice多平台发布
**粗体** _斜体_ [链接](http://example.com) `代码` - 列表 > 引用
。你还可以使用@
来通知其他用户。