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/ado-net/enable-eventsource-tracing.md
+2-3Lines changed: 2 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -55,8 +55,7 @@ Starting with **Microsoft.Data.SqlClient** v3.0, event tracing can be enabled wi
55
55
56
56
With **Microsoft.Data.SqlClient** v2.1, event tracing needs to be enabled by configuring the `EventCommand` with an event source listener. The valid `EventCommand` values applicable to Native SNI are:
title: Known issues for the ODBC driver on Linux and macOS
2
+
title: Known Issues for the ODBC Driver on Linux and macOS
3
3
description: "Learn about known issues with the Microsoft ODBC Driver for SQL Server on Linux and macOS and steps for troubleshooting connectivity issues."
4
4
author: David-Engel
5
5
ms.author: davidengel
6
-
ms.date: 02/17/2022
6
+
ms.reviewer: randolphwest
7
+
ms.date: 07/24/2025
7
8
ms.service: sql
8
9
ms.subservice: connectivity
9
-
ms.custom: linux-related-content
10
10
ms.topic: conceptual
11
+
ms.custom:
12
+
- linux-related-content
11
13
helpviewer_keywords:
12
14
- "known issues"
13
15
---
14
16
15
17
# Known issues for the ODBC driver on Linux and macOS
This article contains a list of known issues with the Microsoft ODBC Driver 13, 13.1, 17, and 18 for SQL Server on Linux and macOS. It also contains steps for troubleshooting connectivity issues.
20
22
21
23
## Known issues
22
24
23
-
Additional issues will be posted on the [SQL Server Drivers blog](https://techcommunity.microsoft.com/t5/sql-server-blog/bg-p/SQLServer/label-name/SQLServerDrivers).
25
+
For additional issues, see the [SQL Server Drivers blog](https://techcommunity.microsoft.com/category/sql-server/blog/sqlserver).
24
26
25
27
- Due to system library limitations, Alpine Linux supports fewer character encodings and locales. For example, `en_US.UTF-8` isn't available. For more information, see [`musl libc` - functional differences from `glibc`](https://wiki.musl-libc.org/functional-differences-from-glibc.html).
26
28
27
-
- Windows, Linux, and macOS convert characters from the Private Use Area (PUA) or End User-Defined Characters (EUDC) differently. Conversions performed on the server within [!INCLUDE[tsql](../../../includes/tsql-md.md)] use the Windows conversion library. Conversions in the driver use the Windows, Linux, or macOS conversion libraries. Each library may produce different results when performing these conversions. For more information, see [End-User-Defined and Private Use Area Characters](/windows/desktop/Intl/end-user-defined-characters).
29
+
- Windows, Linux, and macOS convert characters from the Private Use Area (PUA) or End User-Defined Characters (EUDC) differently. Conversions performed on the server within [!INCLUDE[tsql](../../../includes/tsql-md.md)] use the Windows conversion library. Conversions in the driver use the Windows, Linux, or macOS conversion libraries. Each library can produce different results when performing these conversions. For more information, see [End-User-Defined and Private Use Area Characters](/windows/desktop/Intl/end-user-defined-characters).
28
30
29
-
- If the client encoding is UTF-8, the driver manager doesn't always correctly convert from UTF-8 to UTF-16. Currently, data corruption occurs when one or more characters in the string aren't valid UTF-8 characters. ASCII characters are mapped correctly. The driver manager attempts this conversion when calling the SQLCHAR versions of the ODBC API (for example, SQLDriverConnectA). The driver manager won't attempt this conversion when calling the SQLWCHAR versions of the ODBC API (for example, SQLDriverConnectW).
31
+
- If the client encoding is UTF-8, the driver manager doesn't always correctly convert from UTF-8 to UTF-16. Currently, data corruption occurs when one or more characters in the string aren't valid UTF-8 characters. ASCII characters are mapped correctly. The driver manager attempts this conversion when calling the SQLCHAR versions of the ODBC API (for example, SQLDriverConnectA). The driver manager doesn't attempt this conversion when calling the SQLWCHAR versions of the ODBC API (for example, SQLDriverConnectW).
30
32
31
-
- The *ColumnSize* parameter of **SQLBindParameter** refers to the number of characters in the SQL type, while *BufferLength* is the number of bytes in the application's buffer. However, if the SQL data type is `varchar(n)` or `char(n)`, the application binds the parameter as SQL_C_CHAR for the C type, and SQL_CHAR or SQL_VARCHAR for the SQL type, and the character encoding of the client is UTF-8, you may get a "String data, right truncation" error from the driver even if the value of *ColumnSize* is aligned with the size of the data type on the server. This error occurs since conversions between character encodings may change the length of the data. For example, a right apostrophe character (U+2019) is encoded in CP-1252 as the single-byte 0x92, but in UTF-8 as the 3-byte sequence 0xe2 0x80 0x99.
33
+
- The *ColumnSize* parameter of `SQLBindParameter` refers to the number of characters in the SQL type, while *BufferLength* is the number of bytes in the application's buffer. However, if the SQL data type is **varchar(*n*)** or **char(*n*)**, the application binds the parameter as `SQL_C_CHAR` for the C type, and `SQL_CHAR` or `SQL_VARCHAR` for the SQL type, and the character encoding of the client is UTF-8, you might get a `String data, right truncation` error from the driver even if the value of *ColumnSize* is aligned with the size of the data type on the server. This error occurs since conversions between character encodings can change the length of the data. For example, a right apostrophe character (`U+2019`) is encoded in CP-1252 as the single-byte `0x92`, but in UTF-8 as the 3-byte sequence `0xE2 0x80 0x99`.
32
34
33
-
For example, if your encoding is UTF-8 and you specify 1 for both *BufferLength* and *ColumnSize* in **SQLBindParameter** for an out-parameter, and then attempt to retrieve the preceding character stored in a `char(1)` column on the server (using CP-1252), the driver attempts to convert it to the 3-byte UTF-8 encoding, but can't fit the result into a 1-byte buffer. In the other direction, it compares *ColumnSize* with the *BufferLength* in **SQLBindParameter** before doing the conversion between the different code pages on the client and server. Because a *ColumnSize* of 1 is less than a *BufferLength* of (for example) 3, the driver generates an error. To avoid this error, ensure that the length of the data after conversion fits into the specified buffer or column. Note that*ColumnSize* can't be greater than 8000 for the `varchar(n)` type.
35
+
For example, if your encoding is UTF-8 and you specify 1 for both *BufferLength* and *ColumnSize* in `SQLBindParameter` for an out-parameter, and then attempt to retrieve the preceding character stored in a `char(1)` column on the server (using CP-1252), the driver attempts to convert it to the 3-byte UTF-8 encoding, but can't fit the result into a 1-byte buffer. In the other direction, it compares *ColumnSize* with the *BufferLength* in `SQLBindParameter` before doing the conversion between the different code pages on the client and server. Because a *ColumnSize* of 1 is less than a *BufferLength* of (for example) 3, the driver generates an error. To avoid this error, ensure that the length of the data after conversion fits into the specified buffer or column. *ColumnSize* can't be greater than 8000 for the `varchar(n)` type.
If you're unable to make a connection to [!INCLUDE[ssNoVersion](../../../includes/ssnoversion-md.md)] using the ODBC driver, use the following information to identify the problem.
39
+
## Troubleshoot connection problems
40
+
41
+
If you're unable to make a connection to [!INCLUDE [ssNoVersion](../../../includes/ssnoversion-md.md)] using the ODBC driver, use the following information to identify the problem.
38
42
39
43
The most common connection problem is to have two copies of the UnixODBC driver manager installed. Search /usr for libodbc\*.so\*. If you see more than one version of the file, you (possibly) have more than one driver manager installed. Your application might use the wrong version.
40
44
41
-
Enable the connection log by editing your `/etc/odbcinst.ini` file to contain the following section with these items:
45
+
Enable the connection log by editing your `/etc/odbcinst.ini` file, to contain the following section with these items:
42
46
43
47
```ini
44
48
[ODBC]
@@ -48,7 +52,7 @@ TraceFile = (path to log file, or /dev/stdout to output directly to the terminal
48
52
49
53
If you get another connection failure and don't see a log file, there (possibly) are two copies of the driver manager on your computer. Otherwise, the log output should be similar to:
@@ -63,42 +67,41 @@ If you get another connection failure and don't see a log file, there (possibly)
63
67
64
68
If the ASCII character encoding isn't UTF-8, for example:
65
69
66
-
```log
70
+
```output
67
71
UNICODE Using encoding ASCII 'ISO8859-1' and UNICODE 'UCS-2LE'
68
72
```
69
73
70
-
There's more than one driver manager installed and your application is using the wrong one, or the driver manager wasn't built correctly.
74
+
There's more than one driver manager installed, and your application is using the wrong one, or the driver manager wasn't built correctly.
71
75
72
-
Some macOS users encounter the following error with driver version 17.8 or older:\
73
-
(This error has been resolved in driver version 17.9+)
76
+
Some macOS users encounter the following error with driver version 17.8 or older:
74
77
75
-
```text
78
+
```output
76
79
[08001][Microsoft][ODBC Driver 17 for SQL Server]SSL Provider: [OpenSSL library could not be loaded, make sure OpenSSL 1.0 or 1.1 is installed]
77
80
[08001][Microsoft][ODBC Driver 17 for SQL Server]Client unable to establish connection (0) (SQLDriverConnect)
78
81
```
79
82
80
-
The error can happen when OpenSSL 3.0 is installed. OpenSSL typically is installed through Brew, and it contains the openssl, [email protected], and openssl@3 binaries.
83
+
The error can happen when OpenSSL 3.0 is installed. OpenSSL typically is installed through **Homebrew**, and it contains the `openssl`, `[email protected]`, and `openssl@3` binaries.
81
84
82
-
To resolve this error, change the symlink of the openssl binary to [email protected]:
85
+
To resolve this error, change the symlink of the OpenSSL binary to `[email protected]`:
For more information about resolving connection failures, see:
91
96
92
97
-[Steps to troubleshoot SQL connectivity issues](/archive/blogs/sql_protocols/steps-to-troubleshoot-sql-connectivity-issues)
93
-
-[SQL Server 2005 Connectivity Issue Troubleshoot - Part I](https://techcommunity.microsoft.com/t5/sql-server/sql-server-2005-connectivity-issue-troubleshoot-part-i/ba-p/383034)
94
-
-[Connectivity troubleshooting in SQL Server 2008 with the Connectivity Ring Buffer](https://techcommunity.microsoft.com/t5/sql-server/connectivity-troubleshooting-in-sql-server-2008-with-the/ba-p/383393)
98
+
-[SQL Server 2005 Connectivity Issue Troubleshoot - Part I](https://techcommunity.microsoft.com/blog/sqlserver/sql-server-2005-connectivity-issue-troubleshoot---part-i/383034)
99
+
-[Connectivity troubleshooting in SQL Server 2008 with the Connectivity Ring Buffer](https://techcommunity.microsoft.com/blog/sqlserver/connectivity-troubleshooting-in-sql-server-2008-with-the-connectivity-ring-buffe/383393)
95
100
-[SQL Server Authentication Troubleshooter](/archive/blogs/sqlsecurity/sql-server-authentication-troubleshooter)
96
101
97
-
## Next steps
98
-
99
-
For ODBC driver installation instructions, see the following articles:
100
-
101
-
-[Installing the Microsoft ODBC Driver for SQL Server on Linux](installing-the-microsoft-odbc-driver-for-sql-server.md)
102
-
-[Installing the Microsoft ODBC Driver for SQL Server on macOS](install-microsoft-odbc-driver-sql-server-macos.md)
102
+
## Related content
103
103
104
-
For more information, see the [Programming guidelines](programming-guidelines.md) and the [Release notes](release-notes-odbc-sql-server-linux-mac.md).
104
+
-[Install the Microsoft ODBC driver for SQL Server (Linux)](installing-the-microsoft-odbc-driver-for-sql-server.md)
105
+
-[Install the Microsoft ODBC driver for SQL Server (macOS)](install-microsoft-odbc-driver-sql-server-macos.md)
0 commit comments