Skip to content

Commit f4e9e03

Browse files
committed
Update Linked service properties section in SQL server doc
1 parent bd84f0f commit f4e9e03

File tree

1 file changed

+46
-29
lines changed

1 file changed

+46
-29
lines changed

articles/data-factory/connector-sql-server.md

Lines changed: 46 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ ms.service: data-factory
88
ms.subservice: data-movement
99
ms.topic: conceptual
1010
ms.custom: synapse
11-
ms.date: 03/22/2022
11+
ms.date: 07/20/2022
1212
---
1313

1414
# Copy and transform data to and from SQL Server by using Azure Data Factory or Azure Synapse Analytics
@@ -83,32 +83,44 @@ The following sections provide details about properties that are used to define
8383

8484
## Linked service properties
8585

86-
The following properties are supported for the SQL Server linked service:
86+
This SQL server connector supports the following authentication types. See the corresponding sections for details.
87+
88+
- [Windows authentication](#windows-authentication)
89+
- [SQL authentication](#sql-authentication)
90+
91+
>[!TIP]
92+
>If you hit an error with the error code "UserErrorFailedToConnectToSqlServer" and a message like "The session limit for the database is XXX and has been reached," add `Pooling=false` to your connection string and try again.
93+
94+
### Windows authentication
95+
96+
To use Windows authentication, the following properties are supported:
8797

8898
| Property | Description | Required |
8999
|:--- |:--- |:--- |
90100
| type | The type property must be set to **SqlServer**. | Yes |
91-
| connectionString |Specify **connectionString** information that's needed to connect to the SQL Server database by using either SQL authentication or Windows authentication. Refer to the following samples.<br/>You also can put a password in Azure Key Vault. If it's SQL authentication, pull the `password` configuration out of the connection string. For more information, see the JSON example following the table and [Store credentials in Azure Key Vault](store-credentials-in-key-vault.md). |Yes |
92-
| userName |Specify a user name if you use Windows authentication. An example is **domainname\\username**. |No |
93-
| password |Specify a password for the user account you specified for the user name. Mark this field as **SecureString** to store it securely. Or, you can [reference a secret stored in Azure Key Vault](store-credentials-in-key-vault.md). |No |
101+
| connectionString | Specify **connectionString** information that's needed to connect to the SQL Server database by using Windows authentication. Refer to the following samples.<br/>You also can put a password in Azure Key Vault. For more information, see the JSON example following the table and [Store credentials in Azure Key Vault](store-credentials-in-key-vault.md). |Yes |
102+
| userName | Specify a user name. An example is **domainname\\username**. |Yes |
103+
| password | Specify a password for the user account you specified for the user name. Mark this field as **SecureString** to store it securely. Or, you can [reference a secret stored in Azure Key Vault](store-credentials-in-key-vault.md). |Yes |
94104
| 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 |
95105
| connectVia | This [integration runtime](concepts-integration-runtime.md) is used to connect to the data store. Learn more from [Prerequisites](#prerequisites) section. If not specified, the default Azure integration runtime is used. |No |
96106

97107
> [!NOTE]
98108
> Windows authentication is not supported in data flow.
99109
100-
>[!TIP]
101-
>If you hit an error with the error code "UserErrorFailedToConnectToSqlServer" and a message like "The session limit for the database is XXX and has been reached," add `Pooling=false` to your connection string and try again.
102-
103-
**Example 1: Use SQL authentication**
110+
**Example: Use Windows authentication**
104111

105112
```json
106113
{
107114
"name": "SqlServerLinkedService",
108115
"properties": {
109116
"type": "SqlServer",
110117
"typeProperties": {
111-
"connectionString": "Data Source=<servername>\\<instance name if using named instance>;Initial Catalog=<databasename>;Integrated Security=False;User ID=<username>;Password=<password>;"
118+
"connectionString": "Data Source=<servername>\\<instance name if using named instance>;Initial Catalog=<databasename>;Integrated Security=True;",
119+
"userName": "<domain\\username>",
120+
"password": {
121+
"type": "SecureString",
122+
"value": "<password>"
123+
}
112124
},
113125
"connectVia": {
114126
"referenceName": "<name of Integration Runtime>",
@@ -118,23 +130,27 @@ The following properties are supported for the SQL Server linked service:
118130
}
119131
```
120132

121-
**Example 2: Use SQL authentication with a password in Azure Key Vault**
133+
### SQL authentication
134+
135+
To use SQL authentication, the following properties are supported:
136+
137+
| Property | Description | Required |
138+
|:--- |:--- |:--- |
139+
| type | The type property must be set to **SqlServer**. | Yes |
140+
| connectionString | Specify **connectionString** information that's needed to connect to the SQL Server database by using either SQL authentication. Specify a login name as your user name, and ensure the database that you want to connect is mapped to this login. Refer to the following samples. | Yes |
141+
| password | If you want to put a password in Azure Key Vault, pull the `password` configuration out of the connection string. For more information, see the JSON example following the table and [Store credentials in Azure Key Vault](store-credentials-in-key-vault.md). |Yes |
142+
| 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 |
143+
| connectVia | This [integration runtime](concepts-integration-runtime.md) is used to connect to the data store. Learn more from [Prerequisites](#prerequisites) section. If not specified, the default Azure integration runtime is used. |No |
144+
145+
**Example: Use SQL authentication**
122146

123147
```json
124148
{
125149
"name": "SqlServerLinkedService",
126150
"properties": {
127151
"type": "SqlServer",
128152
"typeProperties": {
129-
"connectionString": "Data Source=<servername>\\<instance name if using named instance>;Initial Catalog=<databasename>;Integrated Security=False;User ID=<username>;",
130-
"password": { 
131-
"type": "AzureKeyVaultSecret", 
132-
"store": { 
133-
"referenceName": "<Azure Key Vault linked service name>", 
134-
"type": "LinkedServiceReference" 
135-
}, 
136-
"secretName": "<secretName>" 
137-
}
153+
"connectionString": "Data Source=<servername>\\<instance name if using named instance>;Initial Catalog=<databasename>;Integrated Security=False;User ID=<username>;Password=<password>;"
138154
},
139155
"connectVia": {
140156
"referenceName": "<name of Integration Runtime>",
@@ -143,20 +159,22 @@ The following properties are supported for the SQL Server linked service:
143159
}
144160
}
145161
```
146-
147-
**Example 3: Use Windows authentication**
162+
**Example: Use SQL authentication with a password in Azure Key Vault**
148163

149164
```json
150165
{
151166
"name": "SqlServerLinkedService",
152167
"properties": {
153168
"type": "SqlServer",
154169
"typeProperties": {
155-
"connectionString": "Data Source=<servername>\\<instance name if using named instance>;Initial Catalog=<databasename>;Integrated Security=True;",
156-
"userName": "<domain\\username>",
157-
"password": {
158-
"type": "SecureString",
159-
"value": "<password>"
170+
"connectionString": "Data Source=<servername>\\<instance name if using named instance>;Initial Catalog=<databasename>;Integrated Security=False;User ID=<username>;",
171+
"password": {
172+
"type": "AzureKeyVaultSecret",
173+
"store": {
174+
"referenceName": "<Azure Key Vault linked service name>",
175+
"type": "LinkedServiceReference"
176+
},
177+
"secretName": "<secretName>"
160178
}
161179
},
162180
"connectVia": {
@@ -166,8 +184,7 @@ The following properties are supported for the SQL Server linked service:
166184
}
167185
}
168186
```
169-
170-
**Example 4: Use Always Encrypted**
187+
**Example: Use Always Encrypted**
171188

172189
```json
173190
{

0 commit comments

Comments
 (0)