You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
title: Use AGDiag to diagnose availability group health events
3
-
description: This article describes how to use AGDiag to diagnose availability group health events.
2
+
title: Use AGDiag to Diagnose Availability Group Health Events
3
+
description: This article discusses how to use AGDiag to diagnose availability group health events.
4
4
ms.date: 05/15/2023
5
5
ms.custom: sap:Always On Availability Groups (AG)
6
6
ms.reviewer: cmathews, v-sidong, v-shaywood
7
7
---
8
8
# Use AGDiag to diagnose availability group health events
9
9
10
10
> [!NOTE]
11
-
> To diagnose Always On availability group health issues that trigger availability group failover, see [Troubleshoot Always On Availability Groups failover](troubleshooting-availability-group-failover.md).
12
-
13
-
AGDiag is an application that automates the manual analysis described in the article (mentioned in the **Note** section). It analyzes the cluster log and correlates and reports pertinent events from the other logs (SQL Server error logs, Windows event logs, and so on). It generates a summary report of Windows Cluster and Always On health events and then provides more detailed analysis results for each health event detected. It automates much of the work described in the article (mentioned in the **Note** section) when you provide the proper logs from the availability group primary replica at the time of the health event.
11
+
> To diagnose Always On availability group health issues that trigger availability group failover, see [Troubleshoot Always On Availability Groups failover](troubleshooting-availability-group-failover.md). That article (in the **Note** section) describes AGDiag as an application that automates the manual analysis of cluster logs, and correlates and reports pertinent events from the other logs (SQL Server error logs, Windows event logs, and so on). AGDiag generates a summary report of Windows Cluster and Always On health events, and provides more detailed analysis results for each health event that's detected. It also automates much of its work when you provide the appropriate logs from the availability group primary replica at the time of the health event.
14
12
15
13
## Generate logs for AGDiag to diagnose
16
14
17
-
You can use multiple methods to generate the logs that AGDiag takes as inputs. AGDiag relies on the following base logs to do analysis:
15
+
You can use various methods to generate the logs that AGDiag takes as inputs. AGDiag relies on the following base logs to do analysis:
18
16
19
-
- Windows Cluster Diagnostic Logs
20
-
- SQL Server Error Logs
21
-
- Windows System Event Logs
17
+
- Windows Cluster Diagnostic logs
18
+
- SQL Server Error logs
19
+
- Windows System Event logs
22
20
- System Health Extended Events (XEL) files
23
21
- AlwaysOn Health Session XEL files
24
22
25
-
Besides manually collecting these logs, you can use either of the following log collection tools to capture them:
23
+
As an alternative method to manually collecting these logs, you can use either of the following log collection tools to capture them:
26
24
27
25
- LogScout
28
26
- TSS
@@ -31,76 +29,76 @@ Besides manually collecting these logs, you can use either of the following log
31
29
32
30
To diagnose an availability group health event, use SQL LogScout to collect logs on the SQL Server instance that was in the primary role at the time of the event:
33
31
34
-
1. Download the latest [SQL LogScout](https://aka.ms/get-sqllogscout) as zip file.
35
-
1. Save and extract the zip file on the machine where SQL Server hosts the primary replica. This system is where the failover started or the availability group was resolving.
36
-
1. Open an elevated PowerShell command (Run as Administrator), change the directory to the SQL LogScout folder where you extracted the zip file.
37
-
1. Run the following command to capture the `Basic` scenario and follow the prompts.
32
+
1. Download the latest [SQL LogScout](https://aka.ms/get-sqllogscout) as a .zip file.
33
+
1. Save and extract the .zip file on the computer on which SQL Server hosts the primary replica. This system is where the failover started or the availability group was resolving.
34
+
1. Open an elevated PowerShell Command Prompt window, and change the directory to the SQL LogScout folder in which you extracted the .zip file.
35
+
1. Run the following command to capture the `Basic` scenario, and follow the prompts.
:::image type="content" source="media/use-agdiag-diagnose-availability-group-health-events/launch-sql-log-scout-powershell.png" alt-text="Screenshot of starting SQL LogScout from an elevated PowerShell command window":::
41
+
:::image type="content" source="media/use-agdiag-diagnose-availability-group-health-events/launch-sql-log-scout-powershell.png" alt-text="Starting SQL LogScout from an elevated PowerShell Command Prompt window.":::
44
42
45
-
1. When the log capture process completes, you can point AGDiag to the `\output` folder created inside the SQL LogScout folder. This folder contains the logs collected by SQL LogScout.
43
+
1. When the log capture process finishes, you can point AGDiag to the `\output` folder that was created inside the SQL LogScout folder. This folder contains the logs that are collected by SQL LogScout.
46
44
47
45
### Use TSS to generate logs for AGDiag to diagnose
48
46
49
47
Alternatively, you can capture the logs by using TSS on the SQL Server instance that was in the primary role at the time of the event:
50
48
51
-
1. Download the toolset ([TSSv2.zip](https://aka.ms/getTSS)) as a zip file. For more information, see [Introduction to TroubleShootingScript toolset (TSSv2)](../../../windows-client/windows-troubleshooters/introduction-to-troubleshootingscript-toolset-tssv2.md).
49
+
1. Download the toolset ([TSSv2.zip](https://aka.ms/getTSS)) as a ,zip file. For more information, see [Introduction to TroubleShootingScript toolset (TSSv2)](../../../windows-client/windows-troubleshooters/introduction-to-troubleshootingscript-toolset-tssv2.md).
52
50
53
-
1. Save and extract the zip file to a folder on the SQL Server instance that hosted the availability group primary replica when the failover started or the availability group was resolving.
51
+
1. Save and extract the .zip file to a folder on the SQL Server instance that hosted the availability group primary replica when the failover started or the availability group was resolving.
54
52
55
-
1. Open an elevated command prompt, change the directory to the TSS folder where you saved and extracted the *TSSv2.zip* file, run `TSS SDP:SQLBase`, and respond to the prompts.
53
+
1. Open an elevated Command Prompt window, change the directory to the TSS folder where you saved and extracted the *TSSv2.zip* file, run `TSS SDP:SQLBase`, and respond to the prompts.
56
54
57
-
:::image type="content" source="media/use-agdiag-diagnose-availability-group-health-events/command-prompt-tss.png" alt-text="Screenshot of the elevated command prompt changing the directory to the TSS folder." lightbox="media/use-agdiag-diagnose-availability-group-health-events/command-prompt-tss.png":::
55
+
:::image type="content" source="media/use-agdiag-diagnose-availability-group-health-events/command-prompt-tss.png" alt-text="Using an elevated Command Prompt window to change the directory to the TSS folder." lightbox="media/use-agdiag-diagnose-availability-group-health-events/command-prompt-tss.png":::
58
56
59
-
1.When TSS creates the SQLBase cab file, extract the cab file into a folder.
57
+
1.After TSS creates the SQLBase .cab file, extract the .cab file into a folder.
60
58
61
-
:::image type="content" source="media/use-agdiag-diagnose-availability-group-health-events/extract-tss-sqlbase-cab.png" alt-text="Screenshot of extracting the SQLBase cab file to a folder." lightbox="media/use-agdiag-diagnose-availability-group-health-events/extract-tss-sqlbase-cab.png":::
59
+
:::image type="content" source="media/use-agdiag-diagnose-availability-group-health-events/extract-tss-sqlbase-cab.png" alt-text="Extracting the SQLBase cab file to a folder." lightbox="media/use-agdiag-diagnose-availability-group-health-events/extract-tss-sqlbase-cab.png":::
62
60
63
61
## Download the AGDiag tool
64
62
65
63
To download AGDiag, follow these steps:
66
64
67
65
1. Open [Release AGDiag Windows Release October 2021 (signed)](https://github.com/microsoft/agdiag/releases/tag/Win2.0.0.23).
68
-
1. Select the *agdiag.zip* link to download the tool.
66
+
1. Select the **agdiag.zip** link to download the tool.
69
67
70
-
:::image type="content" source="media/use-agdiag-diagnose-availability-group-health-events/agdiag-zip-download.png" alt-text="Screenshot of selecting the agdiag.zip link to download the tool." lightbox="media/use-agdiag-diagnose-availability-group-health-events/agdiag-zip-download.png":::
68
+
:::image type="content" source="media/use-agdiag-diagnose-availability-group-health-events/agdiag-zip-download.png" alt-text="Selecting the agdiag.zip link to download the tool." lightbox="media/use-agdiag-diagnose-availability-group-health-events/agdiag-zip-download.png":::
71
69
72
-
## Launch AGDiag and feed it the unzipped TSS logs
70
+
## Start AGDiag and feed it the unzipped TSS logs
73
71
74
72
After you download the tool, follow these steps to launch AGDiag and feed it the unzipped TSS logs:
75
73
76
-
1. Extract the zip and double-click *agdiag.exe* to launch AGDiag.
74
+
1. Extract the .zip file, and double-click *agdiag.exe* to start AGDiag.
77
75
78
-
A dialog appears like the following one:
76
+
A dialog box that resembles the following box appears.
79
77
80
-
:::image type="content" source="media/use-agdiag-diagnose-availability-group-health-events/agdiag-select-log-folder.png" alt-text="Screenshot of running the AGDiag tool." lightbox="media/use-agdiag-diagnose-availability-group-health-events/agdiag-select-log-folder.png":::
78
+
:::image type="content" source="media/use-agdiag-diagnose-availability-group-health-events/agdiag-select-log-folder.png" alt-text="Running the AGDiag tool." lightbox="media/use-agdiag-diagnose-availability-group-health-events/agdiag-select-log-folder.png":::
81
79
82
-
1. Select **Select Log Folder**, drill into the folder you extracted the TSS SQL Base CAB files into, and then select **OK**.
80
+
1. Select **Select Log Folder**, drill into the folder that you extracted the TSS SQLBase .cab files into, and then select **OK**.
83
81
84
82
## Interpret the AGDiag report
85
83
86
-
The default system browser launches the AGDiag report. The following illustrations help you interpret the report.
84
+
The default system browser opens the AGDiag report. The following illustrations help you interpret the report:
87
85
88
-
- The following AGDiag Splash Screen describes AGDiag capabilities and version information:
86
+
- The following AGDiag Splash Screen describes AGDiag capabilities and version information.
89
87
90
-
:::image type="content" source="media/use-agdiag-diagnose-availability-group-health-events/agdiag-splash-screen.png" alt-text="Screenshot of the AGDiag Splash Screen." lightbox="media/use-agdiag-diagnose-availability-group-health-events/agdiag-splash-screen.png":::
- AGDiag reports on the logs it analyzes in the initialize section. To see more detailed information, select the triangles (highlighted in red boxes in the following image).
90
+
- AGDiag reports on the logs that it analyzes in the initialize section. To see more detailed information, select the triangles (highlighted in red boxes in the following image).
93
91
94
-
:::image type="content" source="media/use-agdiag-diagnose-availability-group-health-events/agdiag-report.png" alt-text="Screenshot of the AGDiag reports on the logs." lightbox="media/use-agdiag-diagnose-availability-group-health-events/agdiag-report.png":::
92
+
:::image type="content" source="media/use-agdiag-diagnose-availability-group-health-events/agdiag-report.png" alt-text="The AGDiag reports on the logs." lightbox="media/use-agdiag-diagnose-availability-group-health-events/agdiag-report.png":::
95
93
96
-
- The summary report lists the availability group health events from the cluster log. To jump to a specific health event's detailed report, select the numerical link, highlighted in red box in the following image.
94
+
- The summary report lists the availability group health events from the cluster log. To jump to a specific health event's detailed report, select the numerical link (highlighted in red box in the following image).
97
95
98
-
:::image type="content" source="media/use-agdiag-diagnose-availability-group-health-events/availability-group-health-event-summary-report.png" alt-text="Screenshot of availability group health events." lightbox="media/use-agdiag-diagnose-availability-group-health-events/availability-group-health-event-summary-report.png":::
96
+
:::image type="content" source="media/use-agdiag-diagnose-availability-group-health-events/availability-group-health-event-summary-report.png" alt-text="Availability group health events." lightbox="media/use-agdiag-diagnose-availability-group-health-events/availability-group-health-event-summary-report.png":::
99
97
100
-
-There's a detailed report for each health event detected, which includes log findings that correlate to the health event, diagnosis, and recommendations. To see more detailed information, select the triangles, highlighted in red boxes in the following image.
98
+
-A detailed report exists for each health event that's detected. This report includes log findings that correlate to the health event, diagnosis, and recommendations. To see more detailed information, select the triangles (highlighted in red boxes in the following image).
101
99
102
-
:::image type="content" source="media/use-agdiag-diagnose-availability-group-health-events/alwayson-health-event.png" alt-text="Screenshot of AlwaysOn health events." lightbox="media/use-agdiag-diagnose-availability-group-health-events/alwayson-health-event.png":::
100
+
:::image type="content" source="media/use-agdiag-diagnose-availability-group-health-events/alwayson-health-event.png" alt-text="AlwaysOn health events." lightbox="media/use-agdiag-diagnose-availability-group-health-events/alwayson-health-event.png":::
103
101
104
-
## Known issues with AGDiag
102
+
## Known issues in AGDiag
105
103
106
-
For the latest information on documented issues and possible solutions, see [Known Issues with AGDiag](https://github.com/microsoft/agdiag/wiki/Known-Issues-with-AGDiag).
104
+
For the latest information about documented issues and possible solutions, see [Known Issues with AGDiag](https://github.com/microsoft/agdiag/wiki/Known-Issues-with-AGDiag).
0 commit comments