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
Copy file name to clipboardExpand all lines: articles/data-factory/connector-sql-server.md
+62-2Lines changed: 62 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,7 @@ ms.service: data-factory
8
8
ms.subservice: data-movement
9
9
ms.topic: conceptual
10
10
ms.custom: synapse
11
-
ms.date: 06/17/2024
11
+
ms.date: 06/26/2024
12
12
---
13
13
14
14
# Copy and transform data to and from SQL Server by using Azure Data Factory or Azure Synapse Analytics
@@ -99,7 +99,7 @@ These generic properties are supported for a SQL server linked service when you
99
99
| type | The type property must be set to **SqlServer**. | Yes |
100
100
| server | The name or network address of the SQL server instance you want to connect to. | Yes |
101
101
| database | The name of the database. | Yes |
102
-
| authenticationType |The type used for authentication. Allowed values are [**SQL**](#sql-authentication) (default), [**Windows**](#windows-authentication). Go to the relevant authentication section on specific properties and prerequisites. | Yes |
102
+
| authenticationType |The type used for authentication. Allowed values are [**SQL**](#sql-authentication) (default), [**Windows**](#windows-authentication) and [**UserAssignedManagedIdentity**](#user-assigned-managed-identity-authentication) (only for [SQL Server on Azure VMs](/azure/azure-sql/virtual-machines)). Go to the relevant authentication section on specific properties and prerequisites. | Yes |
103
103
| alwaysEncryptedSettings | Specify **alwaysencryptedsettings** information that's needed to enable Always Encrypted to protect sensitive data stored in SQL server by using either managed identity or service principal. For more information, see the JSON example following the table and [Using Always Encrypted](#using-always-encrypted) section. If not specified, the default always encrypted setting is disabled. |No |
104
104
| encrypt |Indicate whether TLS encryption is required for all data sent between the client and server. Options: mandatory (for true, default)/optional (for false)/strict. | No |
105
105
| trustServerCertificate | Indicate whether the channel will be encrypted while bypassing the certificate chain to validate trust. | No |
@@ -280,6 +280,66 @@ To use Windows authentication, in addition to the generic properties that are de
>The user-assigned managed identity authentication only applies to [SQL Server on Azure VMs](/azure/azure-sql/virtual-machines).
287
+
288
+
A data factory or Synapse workspace can be associated with a [user-assigned managed identities](data-factory-service-identity.md#user-assigned-managed-identity) that represents the service when authenticating to other resources in Azure. You can use this managed identity for [SQL Server on Azure VMs](/azure/azure-sql/virtual-machines) authentication. The designated factory or Synapse workspace can access and copy data from or to your database by using this identity.
289
+
290
+
To use user-assigned managed identity authentication, in addition to the generic properties that are described in the preceding section, specify the following properties:
291
+
292
+
| Property | Description | Required |
293
+
|:--- |:--- |:--- |
294
+
| credentials | Specify the user-assigned managed identity as the credential object. | Yes |
295
+
296
+
You also need to follow the steps below:
297
+
298
+
1.[Grant permissions to your user-assigned managed identity](/azure/azure-sql/virtual-machines/windows/configure-azure-ad-authentication-for-sql-vm#grant-permissions).
299
+
300
+
1.[Enable Microsoft Entra authentication](/azure/azure-sql/virtual-machines/windows/configure-azure-ad-authentication-for-sql-vm#enable-microsoft-entra-authentication) to your [SQL Server on Azure VMs](/azure/azure-sql/virtual-machines).
301
+
302
+
1.[Create contained database users](/azure/azure-sql/database/authentication-aad-configure#create-contained-users-mapped-to-azure-ad-identities) for the user-assigned managed identity. Connect to the database from or to which you want to copy data by using tools like SQL Server Management Studio, with a Microsoft Entra identity that has at least ALTER ANY USER permission. Run the following T-SQL:
303
+
304
+
```sql
305
+
CREATE USER [your_resource_name] FROM EXTERNAL PROVIDER;
306
+
```
307
+
308
+
1. [Create one or multiple user-assigned managed identities](../active-directory/managed-identities-azure-resources/how-to-manage-ua-identity-portal.md) andgrant the user-assigned managed identity needed permissions as you normally do for SQL users and others. Run the following code. For more options, see [this document](/sql/relational-databases/system-stored-procedures/sp-addrolemember-transact-sql).
309
+
310
+
```sql
311
+
ALTER ROLE [role name] ADD MEMBER [your_resource_name];
312
+
```
313
+
1. Assign one or multiple user-assigned managed identities to your data factory and [create credentials](credentials.md) for each user-assigned managed identity.
314
+
315
+
1. Configure a SQL Server linked service.
316
+
317
+
**Example**
318
+
319
+
```json
320
+
{
321
+
"name": "SqlServerLinkedService",
322
+
"properties": {
323
+
"type": "SqlServer",
324
+
"typeProperties": {
325
+
"server": "<name or network address of the SQL server instance>",
0 commit comments