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: docs/connect/odbc/dsn-connection-string-attribute.md
+21-21Lines changed: 21 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ description: How to connect using the ODBC driver. Find keywords for connection
4
4
author: David-Engel
5
5
ms.author: davidengel
6
6
ms.reviewer: v-chojas
7
-
ms.date: 07/31/2023
7
+
ms.date: 08/23/2024
8
8
ms.service: sql
9
9
ms.subservice: connectivity
10
10
ms.topic: conceptual
@@ -249,29 +249,29 @@ Specifies the use of a replication login on ODBC Driver version 17.8 and newer.
249
249
250
250
| Keyword Value | Description |
251
251
|-|-|
252
-
|No|(Default) Replication login won't be used. |
253
-
|Yes| Triggers with the `NOT FOR REPLICATION` option won't fire on the connection. |
252
+
|No|(Default) Replication login isn't used. |
253
+
|Yes| Triggers with the `NOT FOR REPLICATION` option don't fire on the connection. |
254
254
255
255
### RetryExec
256
256
257
257
Configurable retry logic is available starting in version 18.1. It automatically re-executes specific ODBC function calls based on configurable conditions. This feature can be enabled through the connection string using the **RetryExec** keyword, along with a list of retry rules. Each retry rule has three colon separated components: an error match, retry policy, and a query match.
258
258
259
-
The query match determines the retry rule to be used for a given execution, and is matched with the incoming command text (SQLExecDirect) or the prepared command text in the statement object (SQLExecute). If more than one rule matches, the first matching one in the list is used. This allows rules to be listed in order of increasing generality. If no rule matches, then no retry is applied.
259
+
The query match determines the retry rule to be used for a given execution, and is matched with the incoming command text (SQLExecDirect) or the prepared command text in the statement object (SQLExecute). If more than one rule matches, the first matching one in the list is used. This behavior allows rules to be listed in order of increasing generality. If no rule matches, then no retry is applied.
260
260
261
-
When the execution results in an error, and there is an applicable retry rule, its error match is used to determine if the execution should be retried.
261
+
When the execution results in an error, and there's an applicable retry rule, its error match is used to determine if the execution should be retried.
262
262
263
-
The value of the RetryExec keyword is a list of semicolon seperated retry rules.
263
+
The value of the RetryExec keyword is a list of semicolon separated retry rules.
264
264
`RetryExec={rule1;rule2}`
265
265
266
266
A retry rule is as follows: `<errormatch>:<retrypolicy>:<querymatch>`
267
267
268
-
**Error Match:** A comma seperated list of error codes. For example, specifying **1000,2000** would be the error codes you want to retry.
268
+
**Error Match:** A comma separated list of error codes. For example, specifying **1000,2000** would be the error codes you want to retry.
269
269
270
-
**Retry Policy:** Specifies the delay until the next retry. The first parameter would be the number of retries while the second would be the delay. For example **3,10+7** would be 3 tries starting at 10 and each following retry would increment by 7 seconds. Note that if +7 isn't specified, then each following retry is exponentially doubled.
270
+
**Retry Policy:** Specifies the delay until the next retry. The first parameter would be the number of retries while the second would be the delay. For example,**3,10+7** would be 3 tries starting at 10 and each following retry would increment by 7 seconds. If +7 isn't specified, then each following retry is exponentially doubled.
271
271
272
272
**Query Match:** Specifies the query you want to match with. If nothing is specified, then it applies to all queries. Specifying **SELECT** would mean for all queries that start with select.
273
273
274
-
Combining all 3 above components together to use in a connection string would be:
274
+
Combining all three above components together to use in a connection string would be:
275
275
276
276
`RetryExec={1000,2000:3,10+7:SELECT}`
277
277
@@ -281,21 +281,21 @@ Which would mean: "For errors 1000 and 2000, on a query that starts with SELECT.
281
281
282
282
`40501,40540:4,5`
283
283
284
-
For errors 40501 and 40540, retry up to 4 times, with an initial delay of 5 seconds, and exponential doubling between each retry. This applies to all queries.
284
+
For errors 40501 and 40540, retry up to four times, with an initial delay of 5 seconds, and exponential doubling between each retry. This rule applies to all queries.
285
285
286
286
`49919:2,10+:CREATE`
287
287
288
-
For error 49919 on a query that starts with CREATE, retry at most twice, initially after 10s, and then 20s.
288
+
For error 49919 on a query that starts with CREATE, retry at most twice, initially after 10 seconds, and then 20 seconds.
289
289
290
290
`49918,40501,10928:5,10+5:SELECT c1`
291
291
292
-
For errors, 49918, 40501, and 10928 on queries starting with SELECT c1, retry up to 5 times, waiting 10 seconds on the first retry and increasing the wait by 5 seconds thereafter.
292
+
For errors, 49918, 40501, and 10928 on queries starting with SELECT c1, retry up to five times, waiting 10 seconds on the first retry and increasing the wait by 5 seconds thereafter.
293
293
294
-
The above 3 rules can be specified together in the connection string as follows:
294
+
The above three rules can be specified together in the connection string as follows:
Note that the most general (match-all) rule has been placed at the end, to allow the two more specific rules before it to match their respective queries.
298
+
The most general (match-all) rule is placed at the end, to allow the two more specific rules before it to match their respective queries.
299
299
300
300
## ClientCertificate
301
301
@@ -311,26 +311,26 @@ In case if certificate is in PFX format and private key inside the PFX certifica
311
311
312
312
## ClientKey
313
313
314
-
Specifies a file location of the private key for `PEM` or `DER` certificates that are specified by the ClientCertificate attribute. Format:
314
+
Specifies a file location of the private key for `PEM` or `DER` certificates specified by the ClientCertificate attribute. Format:
315
315
316
316
| Option Value | Description |
317
317
|-|-|
318
318
|`file:<file_location>[,password:<password>`]| Specifies location of the private key file. |
319
319
320
-
In case if private key file is password protected then password keyword is required. If the password contains any "`,`" characters, an extra "`,`" character is added immediately after each one. For example, if the password is "`a,b,c`", the escaped password present in the connection string is "`a,,b,,c`".
320
+
In case if private key file is password protected then password keyword is required. If the password contains any `,` characters, an extra `,` character is added immediately after each one. For example, if the password is `a,b,c`, the escaped password present in the connection string is `a,,b,,c`.
321
321
322
322
323
323
### HostnameInCertificate
324
324
325
-
Specifies the hostname to be expected in the server's certificate when [encryption](../../database-engine/configure-windows/configure-sql-server-encryption.md) is negotiated, if it's different from the default value derived from Addr/Address/Server.
325
+
Specifies the hostname to be expected in the server's certificate when [encryption](../../database-engine/configure-windows/configure-sql-server-encryption.md) is negotiated, if it's different from the default value derived from Addr/Address/Server. The HostnameInCertificate option is ignored when using the ServerCertificate option.
326
326
327
327
### IpAddressPreference
328
328
329
-
Available starting with version 18.1, this option allows the user to specify the type of IP Address they want to prioritize for connections. The possible options are "IpAddress= [ IPv4First | IPv6First | UsePlatformDefault]." UsePlatformDefault connects to addresses in the order they are provided by the system call to resolve the server name. The default value is IPv4First, which corresponds to the behavior in previous versions.
329
+
Available starting with version 18.1, this option allows the user to specify the type of IP Address they want to prioritize for connections. The possible options are "IpAddress= [ IPv4First | IPv6First | UsePlatformDefault]." UsePlatformDefault connects to addresses in the order they're provided by the system call to resolve the server name. The default value is IPv4First, which corresponds to the behavior in previous versions.
330
330
331
331
### ServerCertificate
332
332
333
-
Available starting with version 18.1, this option can be used with the strict encryption mode. The **ServerCertificate** keyword is used to specify the path to a certificate file to match against the SQL Server TLS/SSL certificate. The accepted certificate formats are PEM, DER, and CER. If specified, the SQL Server certificate is checked by seeing if the **ServerCertificate** provided is an exact match.
333
+
Available starting with version 18.1, this option can be used with the strict encryption mode. The **ServerCertificate** keyword is used to specify the path to a certificate file to match against the SQL Server TLS/SSL certificate. The match is done instead of standard certificate validation (expiry, host name, trust chain, etc.) The accepted certificate formats are PEM, DER, and CER. If specified, the SQL Server certificate is checked by seeing if the **ServerCertificate** provided is an exact match.
334
334
335
335
### SQL_COPT_SS_ACCESS_TOKEN
336
336
@@ -359,7 +359,7 @@ Loads a keystore provider library for Always Encrypted, or retrieves the names o
359
359
360
360
### SQL_COPT_SS_ENLIST_IN_XA
361
361
362
-
To enable XA transactions with an XA-compliant Transaction Processor (TP), the application needs to call **SQLSetConnectAttr** with SQL_COPT_SS_ENLIST_IN_XA and a pointer to an `XACALLPARAM` object. This option is supported on Windows (17.3 and above), Linux, and macOS.
362
+
To enable XA transactions with an XA-compliant Transaction Processor (TP), the application needs to call **SQLSetConnectAttr** with SQL_COPT_SS_ENLIST_IN_XA and a pointer to an `XACALLPARAM` object. This option is supported on Windows (17.3+), Linux, and macOS.
|XACALLPARAM object*|The pointer to `XACALLPARAM` object.|Windows, Linux, and macOS|
377
-
|TRUE|Associates the XA transaction with the ODBC connection. All related database activities will be performed under the protection of the XA transaction.|Windows|
377
+
|TRUE|Associates the XA transaction with the ODBC connection. All related database activities are performed under the protection of the XA transaction.|Windows|
378
378
|FALSE|Disassociates the transaction with the ODBC connection.|Windows|
379
379
380
380
For more information about XA transactions, see [Using XA Transactions](use-xa-with-dtc.md).
0 commit comments