|
| 1 | +--- |
| 2 | +title: Collect data to analyze and troubleshoot SQL cluster (AG/FCI) scenario |
| 3 | +description: Learn how to gather information by using TSS for SQL cluster (AG/FCI) related issues. |
| 4 | +ms.date: 01/17/2025 |
| 5 | +manager: dcscontentpm |
| 6 | +audience: itpro |
| 7 | +ms.topic: troubleshooting |
| 8 | +ms.reviewer: kaushika, warrenw |
| 9 | +ms.custom: sap:Support Tools\TSS SHA |
| 10 | +appliesto: |
| 11 | + - <a href=https://learn.microsoft.com/windows/release-health/supported-versions-windows-client target=_blank>Supported versions of Windows Client</a> |
| 12 | + - <a href=https://learn.microsoft.com/windows/release-health/windows-server-release-info target=_blank>Supported versions of Windows Server</a> |
| 13 | +--- |
| 14 | +# Collect data to analyze and troubleshoot SQL cluster (AG/FCI) scenario |
| 15 | + |
| 16 | +This article introduces how to gather information by using the TroubleShootingScript (TSS) toolset for SQL cluster (AG/FCI) related issues. |
| 17 | + |
| 18 | +Before contacting Microsoft support, you can gather information about your issue. |
| 19 | + |
| 20 | +## Prerequisites |
| 21 | + |
| 22 | +Refer to [Introduction to TroubleShootingScript toolset (TSS)](introduction-to-troubleshootingscript-toolset-tss.md#prerequisites) for prerequisites for the toolset to run properly. |
| 23 | + |
| 24 | +## Scenario: Virtualization and Hyper-V |
| 25 | + |
| 26 | +### TSS cmdlet |
| 27 | + |
| 28 | +```powershell |
| 29 | +.\TSS.ps1 -SDP SQLbase |
| 30 | +``` |
| 31 | + |
| 32 | +### TSS cmdlet description |
| 33 | + |
| 34 | +1. Download [TSS](https://aka.ms/getTSS) and extract it in the *C:\\tss* folder. |
| 35 | +2. Open the *C:\\tss* folder from an elevated PowerShell command prompt. |
| 36 | + > [!NOTE] |
| 37 | + > Don't use the Windows PowerShell Integrated Scripting Environment (ISE). |
| 38 | +3. Run the following cmdlets: |
| 39 | + |
| 40 | + ```powershell |
| 41 | + Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass |
| 42 | + ``` |
| 43 | +
|
| 44 | + ```powershell |
| 45 | + .\TSS.ps1 -SDP SQLbase |
| 46 | + ``` |
| 47 | +
|
| 48 | +4. Enter *A* for "Yes to All" for the execution policy change. |
| 49 | +
|
| 50 | +> [!NOTE] |
| 51 | +> |
| 52 | +> - The time to collect this script on a given system may vary. It depends on system speed, system size, the number of virtual machines, the amount of data in logs, and so on. Depending on these factors, the average collection time is between 30 and 90 minutes, or even longer, especially if no skip commands are used. |
| 53 | +> - The collection is stored in a compressed file in the *C:\\MS_DATA* folder. After a support case is created, this file can be uploaded to the secure workspace for analysis. |
| 54 | +
|
| 55 | +## Optional parameters |
| 56 | +
|
| 57 | +Some parameters are optional to perform a quicker and more streamlined collection, which may help the script finish successfully if a certain section stops responding. |
| 58 | +
|
| 59 | +- This cmdlet skips running the Best Practices Analyzer and makes the collection faster. |
| 60 | +
|
| 61 | + ```powershell |
| 62 | + .\TSS.ps1 -SDP SQLbase -SkipSDPList skipBPA |
| 63 | + ``` |
| 64 | +
|
| 65 | +- This cmdlet skips some small collection items that may fail in a regular collection and makes the script more reliable. |
| 66 | +
|
| 67 | + ```powershell |
| 68 | + .\TSS.ps1 -SDP SQLbase -SkipSDPList skipHang |
| 69 | + ``` |
| 70 | +
|
| 71 | +- This cmdlet skips some additional collection parameters that may not be needed. |
| 72 | +
|
| 73 | + ```powershell |
| 74 | + .\TSS.ps1 -SDP SQLbase -SkipSDPList skipTS |
| 75 | + ``` |
| 76 | +
|
| 77 | +- This cmdlet skips testing Server Message Block (SMB) connectivity to any Cluster Shared Volumes (CSVs) in the failover cluster. |
| 78 | +
|
| 79 | + ```powershell |
| 80 | + .\TSS.ps1 -SDP SQLbase -SkipSDPList skipCsvSMB |
| 81 | + ``` |
| 82 | +
|
| 83 | +> [!NOTE] |
| 84 | +> You can combine multiple skip parameters with comma-separated items, such as the following example: |
| 85 | +> |
| 86 | +> ```powershell |
| 87 | +> .\TSS.ps1 -SDP SQLbase -SkipSDPList skipBPA,skipHang,skipTS,skipCsvSMB |
| 88 | +> ``` |
0 commit comments