大网数据广告活动
数据库与应用安全

SQL Server Tools to Troubleshoot On-Premises and Hybrid Issues

· 52CE 我爱测

SQL Server diagnostic tools help you collect and analyze logs for on-premises and hybrid issues, including performance, connectivity, and availability groups.

Applies to: SQL Server

Summary

SQL Server diagnostic tools help you collect and analyze logs for on-premises and hybrid troubleshooting on Windows and Linux. This article maps scenarios such as availability groups, performance, and connectivity to the logs to collect and tools to use.

Diagnostic tools for SQL Server

Scenario Basic logs to collect Tools to gather logs Tools to analyze logs
Availability group - Cluster logs- Event logs- System Monitor (Performance monitor logs)- SQL Server error logs- SQLDIAG XEL files- AlwaysOn Health session XEL files- System Health session XEL files- Extended Events for AG data movement- DMV and Catalog view snapshots for AG Windows:- Preferred: SQL LogScout. Use scenario AlwaysOn.Linux:- SQL LogScout Linux. Use scenario_static.scn. - Preferred: AGDiag. Scenarios to use: analyze failover and failures.- Alternative: SQL Nexus. Scenarios to use: performance, latency, health, and best practices.
Slow performance - Extended Event (XEvent) trace captures batch-level starting and completed events, errors and warnings, log growth and shrink, lock escalation and timeout, deadlock, login and logout- List of actively running SQL traces and Xevents- Snapshots of SQL DMVs that track waits and blocking and high CPU queries- Query Data Store info (if that is active)- tempdb contention info from SQL DMVs and system views- Linked Server metadata (SQL DMVs and system views)- Service Broker configuration information (SQL DMVs and system views) Windows:- Preferred: SQL LogScout. Use scenarios GeneralPerf, DetailedPerf, or LightPerf.Linux:- SQL LogScout Linux. Use scenario_sql_perf_general.scn, scenario_sql_perf_detailed.scn, or scenario_sql_perf_lite.scn. - Preferred: SQL Nexus. Scenarios to use: performance analysis, best practice recommendations, bottleneck analysis, blocking, and top queries.- Alternative: RML Utilities. Scenarios to use: query analysis to understand top resource-consuming queries.
Connection - BID Trace and Driver Traces- Network Trace- Auth Trace- SQL Server Error logs- Windows Event logs- Snapshots of NETSTAT and TASKLIST Windows:- Preferred: SQL Trace. Configure collection settings in the INI file.- Alternative: SQL LogScout. Use scenarios NetworkTrace and Basic.- Alternative: SSPICLIENT. Use this tool when encountering SSPI or Kerberos errors and log a detailed trace for analysis.Linux:- SQL LogScout Linux. Use scenario_static.scn.- logger.ini (add [Logger:security.kerberos] and [Logger:security.ldap] sections).- tcpdump (Linux network packet capture). - Preferred: SQL Network Analyzer UISQL Network Analyzer. Scenarios to use: read network packet capture files and produce a report highlighting potential areas of interest.- Alternative: SQLCHECK. Reports on any settings that might affect connectivity.- Alternative: SQLBENCH. Display timings for comparative analysis.- Alternative: DBTEST. Record how long it takes to connect and how long to execute a command.
Replication - SQL Server error logs- Replication, CDC, CT diagnostic info (SQL DMVs and system views) Windows:- Preferred: SQL LogScout. Use data collection scenario Replication.Linux:- SQL LogScout Linux. Use scenario_static.scn. - Preferred: SQL Nexus. Scenarios to use: replication reports, performance analysis, best practice recommendations, bottleneck analysis, blocking, and top queries.
Installation or setup - Setup Bootstrap folder with all the setup logs - Preferred: SQL LogScout. Use data collection scenario Setup.
Backup or restore - Backup and restore progress Xevent (backup_restore_progress_trace)- Trace flags for backup restore progress- SQL VSS Writer Log (on SQL Server 2019 and later versions)- VSS Admin (OS) logs for VSS backup-related scenarios- Performance Monitor Windows:- Preferred: SQL LogScout. Use data collection scenario BackupRestore.Linux:- SQL LogScout Linux. Use scenario_static.scn.
Memory usage - Memory clerks DMVs or DBCC MEMORYSTATUS- Performance Monitor Windows:- Preferred: SQL LogScout. Use data collection scenario Memory.Linux:- SQL LogScout Linux. Use scenario_sql_perf_general.scn. - Preferred: SQL Nexus. Scenarios to use: import memory output and view at Memory Brokers.
Memory dumps - Manual memory dumps captured for specific troubleshooting scenarios- Automatically generated memory dumps for exception scenarios Windows:- Preferred: SQL LogScout. Use data collection scenario DumpMemory.- Alternative: SQLDumperLinux:- SQL LogScout Linux. Use scenario_static.scn. - Preferred: WinDbg (Debugging tools for Windows). Scenarios to use: load and analyze memory dump.- Alternative: SQL CallStack Resolver
Database corruption - DBCC CHECKDB
SQL I/O pattern stress simulation Windows:- SQLIOSimLinux:- SQLIOSim for Linux

Source: Microsoft Learn / IT Pro troubleshooting by Microsoft and contributors. Documentation licensed CC BY 4.0. Code samples are covered by the MIT License. Converted from Markdown, with links normalized and embedded media omitted.

资料来源与适用范围

资料来源
Microsoft Learn / IT Pro troubleshooting
适用范围
See source applicability · Source date 11/09/2026
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY 4.0 (documentation), MIT (code samples)

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。