Skip to content

Commit 910c43c

Browse files
authored
Merge pull request #10060 from MicrosoftDocs/UpdateAGDiag_w_SQLLogScout_pijocoder_102825
AB#8078: Update with SQL LogScout info
2 parents a15d71a + cf6f4f7 commit 910c43c

File tree

2 files changed

+63
-33
lines changed

2 files changed

+63
-33
lines changed
Loading
Lines changed: 63 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -1,76 +1,106 @@
11
---
2-
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.
44
ms.date: 05/15/2023
55
ms.custom: sap:Always On Availability Groups (AG)
6-
ms.reviewer: cmathews, v-sidong
6+
ms.reviewer: cmathews, v-sidong, v-shaywood
77
---
88
# Use AGDiag to diagnose availability group health events
99

1010
> [!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).
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).
1212
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 the proper logs are provided from the availability group primary replica at the time of the health event.
13+
AGDiag is 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.
1414

15-
## Use TSS to generate logs for AGDiag to diagnose
15+
## Generate logs for AGDiag to diagnose
1616

17-
To diagnose an availability group health event, use the TSS to collect logs on the SQL Server instance that was in the primary role at the time of the event.
17+
You can use various methods to generate the logs that AGDiag takes as inputs. AGDiag relies on the following base logs to do analysis:
1818

19-
Follow these steps to accomplish this goal:
19+
- Windows Cluster Diagnostic logs
20+
- SQL Server Error logs
21+
- Windows System Event logs
22+
- System Health Extended Events (XEL) files
23+
- AlwaysOn Health Session XEL files
2024

21-
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).
25+
As an alternative method to manually collecting these logs, you can use either of the following log collection tools to capture them:
2226

23-
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.
27+
- LogScout
28+
- TSS
2429

25-
1. Open an elevated command prompt, change the directory to the TSS folder where the zip file *TSSv2.zip* was saved and extracted, run `TSS SDP:SQLBase`, and respond to the prompts.
30+
### Use SQL LogScout to capture logs for AGDiag analysis
2631

27-
:::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":::
32+
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:
2833

29-
1. Once the TSS SQLBase cab file has been created, extract the cab file into a folder.
34+
1. Download the latest [SQL LogScout](https://aka.ms/get-sqllogscout) as a .zip file.
35+
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.
36+
1. Open an elevated PowerShell Command Prompt window, and change the directory to the SQL LogScout folder in which you extracted the .zip file.
37+
1. Run the following command to capture the `Basic` scenario, and follow the prompts.
3038

31-
:::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":::
39+
```PowerShell
40+
.\SQL_LogScout.ps1 -Scenario "Basic" -ServerName "<Your_Sql_Instance_Name>"
41+
```
42+
43+
:::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+
45+
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+
47+
### Use TSS to generate logs for AGDiag to diagnose
48+
49+
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+
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).
52+
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.
54+
55+
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+
57+
:::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+
59+
1. After TSS creates the SQLBase .cab file, extract the .cab file into a folder.
60+
61+
:::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":::
3262

3363
## Download the AGDiag tool
3464

3565
To download AGDiag, follow these steps:
3666

3767
1. Open [Release AGDiag Windows Release October 2021 (signed)](https://github.com/microsoft/agdiag/releases/tag/Win2.0.0.23).
38-
1. Select the *agdiag.zip* link to download the tool.
68+
1. Select the **agdiag.zip** link to download the tool.
3969

40-
:::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":::
70+
:::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":::
4171

42-
## Launch AGDiag and feed it the unzipped TSS logs
72+
## Start AGDiag and feed it the unzipped TSS logs
4373

44-
Once the tool is downloaded, follow these steps to launch AGDiag and feed it the unzipped TSS logs:
74+
After you download the tool, follow these steps to launch AGDiag and feed it the unzipped TSS logs:
4575

46-
1. Extract the zip and double-click *agdiag.exe* to launch AGDiag.
76+
1. Extract the .zip file, and double-click *agdiag.exe* to start AGDiag.
4777

48-
A dialog appears like the following one:
78+
A dialog box that resembles the following box appears.
4979

50-
:::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":::
80+
:::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":::
5181

52-
1. Select **Select Log Folder**, drill into the folder you extracted the TSS SQL Base CAB files into, and then select **OK**.
82+
1. Select **Select Log Folder**, drill into the folder that you extracted the TSS SQLBase .cab files into, and then select **OK**.
5383

5484
## Interpret the AGDiag report
5585

56-
The AGDiag report should be launched in the default system browser. The following illustrations help you interpret the report.
86+
The default system browser opens the AGDiag report. The following illustrations help you interpret the report:
5787

58-
- The following AGDiag Splash Screen describes AGDiag capabilities and version information:
88+
- The following AGDiag Splash Screen describes AGDiag capabilities and version information.
5989

60-
:::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":::
90+
:::image type="content" source="media/use-agdiag-diagnose-availability-group-health-events/agdiag-splash-screen.png" alt-text="AGDiag Splash Screen." lightbox="media/use-agdiag-diagnose-availability-group-health-events/agdiag-splash-screen.png":::
6191

62-
- AGDiag reports on the logs analyzed in the initialize section. Select the triangles (highlighted in red boxes in the following image) to expand more detailed information.
92+
- 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).
6393

64-
:::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":::
94+
:::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":::
6595

66-
- The summary report lists the availability group health events from the cluster log. Select the numerical link (highlighted in red box in the following image) to jump to a specific health event's detailed report.
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).
6797

68-
:::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":::
98+
:::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":::
6999

70-
- There's a detailed report for each health event detected, which includes log findings that correlate to the health event, diagnosis, and recommendations. Select the triangles (highlighted in red boxes in the following image) to expand more detailed information.
100+
- 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).
71101

72-
:::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":::
102+
:::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":::
73103

74-
## Known issues with AGDiag
104+
## Known issues in AGDiag
75105

76-
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).
106+
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

Comments
 (0)