Skip to content

Commit 1c356fa

Browse files
authored
Merge pull request #221385 from WilliamDAssafMSFT/20221212-sql-link-creation-sami
20221213 initial troubleshooting doc
2 parents 9a5d13d + d884133 commit 1c356fa

File tree

5 files changed

+74
-1
lines changed

5 files changed

+74
-1
lines changed

articles/synapse-analytics/synapse-link/connect-synapse-link-sql-database.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ This article is a step-by-step guide for getting started with Azure Synapse Link
2727

2828
1. Go to your Azure SQL logical server, select **Identity**, and then set **System assigned managed identity** to **On**.
2929

30-
:::image type="content" source="../media/connect-synapse-link-sql-database/set-identity-sql-database.png" alt-text="Screenshot of turning on the system-assigned managed identity.":::
30+
:::image type="content" source="../media/connect-synapse-link-sql-database/set-identity-sql-database.png" alt-text="Screenshot of turning on the system assigned managed identity.":::
3131

3232
1. Go to **Networking**, and then select the **Allow Azure services and resources to access this server** checkbox.
3333

Loading
Loading
Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
---
2+
title: Troubleshooting guide for Azure Synapse Link creation for Azure SQL Database
3+
description: Learn how to troubleshoot Azure Synapse Link creation for Azure SQL Database
4+
author: WilliamDAssafMSFT
5+
ms.author: wiassaf
6+
ms.reviewer: imotiwala
7+
ms.service: synapse-analytics
8+
ms.topic: how-to
9+
ms.subservice: synapse-link
10+
ms.date: 12/19/2022
11+
---
12+
13+
# Troubleshoot: Azure Synapse Link creation for Azure SQL Database
14+
15+
This article is a guide to troubleshooting issues creating the Azure Synapse Link for Azure SQL Database.
16+
17+
## Symptom
18+
19+
During Azure Synapse Link connection creation, the link creation process may hang and without showing any error messages.
20+
21+
## Potential causes
22+
23+
1. Using the certificate for the managed identity used to sign the client assertion failed because the key used is expired. To confirm this is the cause query the [changefeed.change_feed_errors](/sql/relational-databases/system-tables/changefeed-change-feed-errors-transact-sql) dynamic management view and look for error number 22739. See sample query below:
24+
```sql
25+
SELECT session_id, error_number, error_message, source_task, entry_time
26+
FROM sys.dm_change_feed_errors
27+
WHERE error_number = 22739;
28+
```
29+
30+
2. The system assigned managed identity (SAMI) for the Azure SQL Database logical server has not been configured properly or not enabled. To confirm this is the cause query the [changefeed.change_feed_errors](/sql/relational-databases/system-tables/changefeed-change-feed-errors-transact-sql) dynamic management view and look for error number 22739. See the previous sample query.
31+
32+
3. An incorrect managed identity was provided in the Synapse Link creation.
33+
34+
4. The subscription moved from one tenant to another, and the managed identity is no longer valid.
35+
36+
## Resolution
37+
38+
If disabled, enable the [system assigned managed identity (SAMI)](/azure/azure-sql/database/authentication-azure-ad-user-assigned-managed-identity) for the Azure SQL Database logical server. If enabled, refresh the SAMI. Use either of the two following methods:
39+
40+
### Solution 1 via the Azure portal
41+
42+
1. In the Azure portal, navigate to your Azure SQL Server. Select **Identity** under **Security** on the left side bar.
43+
1. Review the **Status** setting for **system assigned managed identity** (SAMI).
44+
1. Set the **Status** to **On** to create and enable the SAMI.
45+
1. If the **Status** is already set to **On**, change it temporarily to **Off** and, then set it back to **On**.
46+
:::image type="content" source="media/troubleshoot-sql-link-creation/system-assigned-managed-identity-status.png" alt-text="A screenshot of the Azure portal where the system assigned managed identity can be enabled." lightbox="media/troubleshoot-sql-link-creation/system-assigned-managed-identity-status.png":::
47+
1. In the Azure portal, navigate to your Synapse Link for SQL connection in Azure Synapse Workspace. In the **Integrate** hub, under **Link connection**, select your link connection. In the General window, expand the **Advanced** section. Select the **Refresh** button. You will see a message with checked green tick indicating the SQL logical server resource ID and Managed identity ID have been refreshed.
48+
:::image type="content" source="media/troubleshoot-sql-link-creation/synapse-workspace-link-connection-running.png" alt-text="A screenshot of the Azure portal in the Synapse workspace. In the General section under Advanced, the Refresh button is highlighted." lightbox="media/troubleshoot-sql-link-creation/synapse-workspace-link-connection-running.png":::
49+
50+
### Solution 2 via PowerShell
51+
52+
1. Remove the stale identity from the Azure SQL Database logical server using the Az.Sql cmdlet [Set-AzSqlServer](/powershell/module/az.sql/set-azsqlserver). Set `-IdentityType 'None'`.
53+
```powershell
54+
Set-AzSqlServer -AssignIdentity -ResourceGroupName '<resource group>' `
55+
-ServerName '<server name>' -IdentityType 'None'
56+
```
57+
1. Set a new SAMI with `Set-AzSqlServer`, set `-IdentityType 'SystemAssigned'`.
58+
```powershell
59+
Set-AzSqlServer-ResourceGroupName '<resource group>' -ServerName '<server name>' `
60+
-AssignIdentity -IdentityType 'SystemAssigned'
61+
```
62+
1. In the Azure portal, navigate to your Synapse Link for SQL connection in Azure Synapse Workspace. In the **Integrate** hub, under **Link connection**, select your link connection. In the General window, expand the **Advanced** section. Select the **Refresh** button. You will see a message with checked green tick indicating the SQL logical server resource ID and Managed identity ID have been refreshed.
63+
:::image type="content" source="media/troubleshoot-sql-link-creation/synapse-workspace-link-connection-running.png" alt-text="A screenshot of the Azure portal in the Synapse workspace. In the General section under Advanced, the Refresh button is highlighted." lightbox="media/troubleshoot-sql-link-creation/synapse-workspace-link-connection-running.png":::
64+
65+
## Next steps
66+
67+
- [Get started with Azure Synapse Link for Azure SQL Database](../connect-synapse-link-sql-database.md)
68+
- [Managed identities in Azure AD for Azure SQL](/azure/azure-sql/database/authentication-azure-ad-user-assigned-managed-identity)
69+
- [Azure Synapse Link for SQL FAQ](../faq.yml)
70+
- [Known limitations and issues with Azure Synapse Link for SQL](../synapse-link-for-sql-known-issues.md)
71+
- [changefeed.change_feed_errors (Transact-SQL)](/sql/relational-databases/system-tables/changefeed-change-feed-errors-transact-sql)

articles/synapse-analytics/toc.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -906,6 +906,8 @@ items:
906906
href: ./synapse-link/troubleshoot/troubleshoot-sql-azure-active-directory.md
907907
- name: Troubleshoot initial snapshot
908908
href: ./synapse-link/troubleshoot/troubleshoot-sql-snapshot-issues.md
909+
- name: Troubleshoot creation
910+
href: ./synapse-link/troubleshoot/troubleshoot-sql-link-creation.md
909911
- name: SQL Server 2022
910912
items:
911913
- name: Configure Synapse Link

0 commit comments

Comments
 (0)