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
>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
+
### SQL authentication
95
+
96
+
To use SQL authentication, the following properties are supported:
87
97
88
98
| Property | Description | Required |
89
99
|:--- |:--- |:--- |
90
100
| 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. 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 |
102
+
| 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). |No |
94
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 |
95
104
| 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 |
96
105
97
-
> [!NOTE]
98
-
> Windows authentication is not supported in data flow.
99
-
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**
106
+
**Example: Use SQL authentication**
104
107
105
108
```json
106
109
{
@@ -117,8 +120,7 @@ The following properties are supported for the SQL Server linked service:
117
120
}
118
121
}
119
122
```
120
-
121
-
**Example 2: Use SQL authentication with a password in Azure Key Vault**
123
+
**Example: Use SQL authentication with a password in Azure Key Vault**
122
124
123
125
```json
124
126
{
@@ -127,13 +129,13 @@ The following properties are supported for the SQL Server linked service:
127
129
"type": "SqlServer",
128
130
"typeProperties": {
129
131
"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>"
132
+
"password": {
133
+
"type":"AzureKeyVaultSecret",
134
+
"store": {
135
+
"referenceName":"<Azure Key Vault linked service name>",
136
+
"type":"LinkedServiceReference"
137
+
},
138
+
"secretName":"<secretName>"
137
139
}
138
140
},
139
141
"connectVia": {
@@ -143,8 +145,49 @@ The following properties are supported for the SQL Server linked service:
143
145
}
144
146
}
145
147
```
148
+
**Example: Use Always Encrypted**
146
149
147
-
**Example 3: Use Windows authentication**
150
+
```json
151
+
{
152
+
"name": "SqlServerLinkedService",
153
+
"properties": {
154
+
"type": "SqlServer",
155
+
"typeProperties": {
156
+
"connectionString": "Data Source=<servername>\\<instance name if using named instance>;Initial Catalog=<databasename>;Integrated Security=False;User ID=<username>;Password=<password>;"
157
+
},
158
+
"alwaysEncryptedSettings": {
159
+
"alwaysEncryptedAkvAuthType": "ServicePrincipal",
160
+
"servicePrincipalId": "<service principal id>",
161
+
"servicePrincipalKey": {
162
+
"type": "SecureString",
163
+
"value": "<service principal key>"
164
+
}
165
+
},
166
+
"connectVia": {
167
+
"referenceName": "<name of Integration Runtime>",
168
+
"type": "IntegrationRuntimeReference"
169
+
}
170
+
}
171
+
}
172
+
```
173
+
174
+
### Windows authentication
175
+
176
+
To use Windows authentication, the following properties are supported:
177
+
178
+
| Property | Description | Required |
179
+
|:--- |:--- |:--- |
180
+
| type | The type property must be set to **SqlServer**. | Yes |
181
+
| connectionString | Specify **connectionString** information that's needed to connect to the SQL Server database. Refer to the following samples.
182
+
| userName | Specify a user name. An example is **domainname\\username**. |Yes |
183
+
| 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 |
184
+
| 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 [Using Always Encrypted](#using-always-encrypted) section. If not specified, the default always encrypted setting is disabled. |No |
185
+
| 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 |
186
+
187
+
> [!NOTE]
188
+
> Windows authentication is not supported in data flow.
189
+
190
+
**Example: Use Windows authentication**
148
191
149
192
```json
150
193
{
@@ -167,22 +210,24 @@ The following properties are supported for the SQL Server linked service:
167
210
}
168
211
```
169
212
170
-
**Example 4: Use Always Encrypted**
213
+
**Example: Use Windows authentication with a password in Azure Key Vault**
171
214
172
215
```json
173
216
{
174
217
"name": "SqlServerLinkedService",
175
218
"properties": {
219
+
"annotations": [],
176
220
"type": "SqlServer",
177
221
"typeProperties": {
178
-
"connectionString": "Data Source=<servername>\\<instance name if using named instance>;Initial Catalog=<databasename>;Integrated Security=False;User ID=<username>;Password=<password>;"
179
-
},
180
-
"alwaysEncryptedSettings": {
181
-
"alwaysEncryptedAkvAuthType": "ServicePrincipal",
182
-
"servicePrincipalId": "<service principal id>",
183
-
"servicePrincipalKey": {
184
-
"type": "SecureString",
185
-
"value": "<service principal key>"
222
+
"connectionString": "Data Source=<servername>\\<instance name if using named instance>;Initial Catalog=<databasename>;Integrated Security=True;",
223
+
"userName": "<domain\\username>",
224
+
"password": {
225
+
"type": "AzureKeyVaultSecret",
226
+
"store": {
227
+
"referenceName": "<Azure Key Vault linked service name>",
0 commit comments