Skip to content

Commit 3e59a45

Browse files
authored
Fix code block description and refresh articles (#34788)
2 parents 54e02d5 + 38ad0be commit 3e59a45

File tree

8 files changed

+337
-309
lines changed

8 files changed

+337
-309
lines changed

docs/connect/ado-net/enable-eventsource-tracing.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,8 +55,7 @@ Starting with **Microsoft.Data.SqlClient** v3.0, event tracing can be enabled wi
5555

5656
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:
5757

58-
```cs
59-
58+
```csharp
6059
// Enables trace events:
6160
EventSource.SendCommand(eventSource, (EventCommand)8192, null);
6261

@@ -69,7 +68,7 @@ EventSource.SendCommand(eventSource, (EventCommand)(8192 | 16384), null);
6968

7069
The following example enables event tracing in native SNI DLLs.
7170

72-
```cs
71+
```csharp
7372
// Native SNI tracing example
7473
using System;
7574
using System.Diagnostics.Tracing;

docs/connect/ado-net/sqlclient-troubleshooting-guide.md

Lines changed: 46 additions & 45 deletions
Large diffs are not rendered by default.
Lines changed: 34 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,38 +1,42 @@
11
---
2-
title: "isSparseColumnSet Method (SQLServerResultSetMetaData)"
3-
description: "isSparseColumnSet Method (SQLServerResultSetMetaData)"
2+
title: "IsSparseColumnSet Method (SQLServerResultSetMetaData)"
3+
description: Indicates if a column in a result set is a sparse column set.
44
author: David-Engel
55
ms.author: davidengel
6-
ms.date: "01/19/2017"
6+
ms.reviewer: randolphwest
7+
ms.date: 07/24/2025
78
ms.service: sql
89
ms.subservice: connectivity
910
ms.topic: reference
1011
---
1112
# isSparseColumnSet Method (SQLServerResultSetMetaData)
12-
[!INCLUDE[Driver_JDBC_Download](../../../includes/driver_jdbc_download.md)]
13-
14-
Indicates if a column in a result set is a sparse column set.
15-
16-
## Syntax
17-
18-
```scr
19-
public boolean isSparseColumnSet(int column)
20-
```
21-
22-
#### Parameters
23-
*column*
24-
25-
The (one-based) index of the column.
26-
27-
## Return Value
28-
**true** if a column in a result set is a sparse column set, otherwise **false**.
29-
30-
## Remarks
31-
This method does not retrieve information from the database.
32-
33-
## See Also
34-
[SQLServerResultSetMetaData Methods](../../../connect/jdbc/reference/sqlserverresultsetmetadata-methods.md)
35-
[SQLServerResultSetMetaData Members](../../../connect/jdbc/reference/sqlserverresultsetmetadata-members.md)
36-
[SQLServerResultSetMetaData Class](../../../connect/jdbc/reference/sqlserverresultsetmetadata-class.md)
37-
38-
13+
14+
[!INCLUDE [Driver_JDBC_Download](../../../includes/driver_jdbc_download.md)]
15+
16+
Indicates if a column in a result set is a sparse column set.
17+
18+
## Syntax
19+
20+
```java
21+
public boolean isSparseColumnSet(int column)
22+
```
23+
24+
#### Parameters
25+
26+
*column*
27+
28+
The (one-based) index of the column.
29+
30+
## Return value
31+
32+
**true** if a column in a result set is a sparse column set, otherwise **false**.
33+
34+
## Remarks
35+
36+
This method doesn't retrieve information from the database.
37+
38+
## Related content
39+
40+
- [SQLServerResultSetMetaData Methods](sqlserverresultsetmetadata-methods.md)
41+
- [SQLServerResultSetMetaData Members](sqlserverresultsetmetadata-members.md)
42+
- [SQLServerResultSetMetaData Class](sqlserverresultsetmetadata-class.md)
Lines changed: 33 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,48 @@
11
---
2-
title: Known issues for the ODBC driver on Linux and macOS
2+
title: Known Issues for the ODBC Driver on Linux and macOS
33
description: "Learn about known issues with the Microsoft ODBC Driver for SQL Server on Linux and macOS and steps for troubleshooting connectivity issues."
44
author: David-Engel
55
ms.author: davidengel
6-
ms.date: 02/17/2022
6+
ms.reviewer: randolphwest
7+
ms.date: 07/24/2025
78
ms.service: sql
89
ms.subservice: connectivity
9-
ms.custom: linux-related-content
1010
ms.topic: conceptual
11+
ms.custom:
12+
- linux-related-content
1113
helpviewer_keywords:
1214
- "known issues"
1315
---
1416

1517
# Known issues for the ODBC driver on Linux and macOS
1618

17-
[!INCLUDE[Driver_ODBC_Download](../../../includes/driver_odbc_download.md)]
19+
[!INCLUDE [Driver_ODBC_Download](../../../includes/driver_odbc_download.md)]
1820

1921
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.
2022

2123
## Known issues
2224

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).
2426

2527
- 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).
2628

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).
2830

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).
3032

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`.
3234

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.
3436

35-
## <a id="connectivity"></a> Troubleshooting connection problems
37+
<a id="connectivity"></a>
3638

37-
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.
3842

3943
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.
4044

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:
4246

4347
```ini
4448
[ODBC]
@@ -48,7 +52,7 @@ TraceFile = (path to log file, or /dev/stdout to output directly to the terminal
4852

4953
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:
5054

51-
```log
55+
```output
5256
[ODBC][28783][1321576347.077780][SQLDriverConnectW.c][290]
5357
Entry:
5458
Connection = 0x17c858e0
@@ -63,42 +67,41 @@ If you get another connection failure and don't see a log file, there (possibly)
6367

6468
If the ASCII character encoding isn't UTF-8, for example:
6569

66-
```log
70+
```output
6771
UNICODE Using encoding ASCII 'ISO8859-1' and UNICODE 'UCS-2LE'
6872
```
6973

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.
7175

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:
7477

75-
```text
78+
```output
7679
[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]
7780
[08001][Microsoft][ODBC Driver 17 for SQL Server]Client unable to establish connection (0) (SQLDriverConnect)
7881
```
7982

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.
8184

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]`:
8386

84-
```shell
87+
```bash
8588
rm -rf $(brew --prefix)/opt/openssl
8689
version=$(ls $(brew --prefix)/Cellar/[email protected] | grep "1.1")
8790
ln -s $(brew --prefix)/Cellar/[email protected]/$version $(brew --prefix)/opt/openssl
8891
```
8992

93+
## Related tasks
94+
9095
For more information about resolving connection failures, see:
9196

9297
- [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)
95100
- [SQL Server Authentication Troubleshooter](/archive/blogs/sqlsecurity/sql-server-authentication-troubleshooter)
96101

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
103103

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)
106+
- [Programming Guidelines](programming-guidelines.md)
107+
- [Release Notes for the Microsoft ODBC Driver for SQL Server on Linux and macOS](release-notes-odbc-sql-server-linux-mac.md)

0 commit comments

Comments
 (0)