Skip to content

Commit 54137f4

Browse files
committed
Merge branch 'main' of https://github.com/MicrosoftDocs/sql-docs-pr into issue-7154
2 parents 5396f30 + 4103856 commit 54137f4

59 files changed

Lines changed: 690 additions & 175 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

docs/big-data-cluster/release-notes-big-data-cluster.md

Lines changed: 36 additions & 34 deletions
Large diffs are not rendered by default.

docs/big-data-cluster/release-notes-cumulative-update-15.md

Lines changed: 360 additions & 0 deletions
Large diffs are not rendered by default.

docs/connect/jdbc/jdbc-driver-support-for-high-availability-disaster-recovery.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Support for High Availability, disaster recovery
33
description: This article discusses Microsoft JDBC Driver for SQL Server support for high-availability, disaster recovery (AlwaysOn Availability Groups).
44
ms.custom: ""
5-
ms.date: 07/13/2020
5+
ms.date: 01/26/2022
66
ms.prod: sql
77
ms.prod_service: connectivity
88
ms.reviewer: ""
@@ -72,8 +72,6 @@ Note:
7272

7373
- Increase the value of **loginTimeout** to accommodate for failover time and reduce application connection retry attempts.
7474

75-
- Distributed transactions aren't supported.
76-
7775
If read-only routing isn't in effect, connecting to a secondary replica location in an availability group will fail in the following situations:
7876

7977
- If the secondary replica location isn't configured to accept connections.

docs/connect/jdbc/microsoft-jdbc-driver-for-sql-server.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ ms.topic: conceptual
88
author: David-Engel
99
ms.author: v-davidengel
1010
ms.reviewer: ""
11-
ms.custom: FY21Q2Fresh
11+
ms.custom: FY22Q2Fresh
1212
ms.date: 12/10/2021
1313
---
1414
# Microsoft JDBC Driver for SQL Server

docs/connect/odbc/linux-mac/install-microsoft-odbc-driver-sql-server-macos.md

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Install the Microsoft ODBC driver for SQL Server (macOS)
33
description: Learn how to install the Microsoft ODBC Driver for SQL Server on macOS clients to enable database connectivity.
4-
ms.date: 08/02/2021
4+
ms.date: 01/26/2022
55
ms.prod: sql
66
ms.prod_service: connectivity
77
ms.technology: connectivity
@@ -21,7 +21,7 @@ This article explains how to install the Microsoft ODBC Driver for SQL Server on
2121
This article provides commands for installing the ODBC driver from the bash shell. If you want to download the packages directly, see [Download ODBC Driver for SQL Server](../download-odbc-driver-for-sql-server.md).
2222

2323
> [!Note]
24-
> The Microsoft ODBC driver for SQL Server on macOS is only supported on the x64 architecture through version 17.7. The Apple M1 (ARM64) is supported starting with version 17.8. The architecture will be detected and the correct package will be automatically installed by the Homebrew formula. If your command prompt is running in x64 emulation mode on the M1, the x64 package will be installed. If you're not running in emulation mode in your command prompt, the ARM64 package will be installed.
24+
> The Microsoft ODBC driver for SQL Server on macOS is only supported on the x64 architecture through version 17.7. Apple M1 (ARM64) support was added starting with version 17.8. The architecture will be detected and the correct package will be automatically installed by the Homebrew formula. If your command prompt is running in x64 emulation mode on the M1, the x64 package will be installed. If you're not running in emulation mode in your command prompt, the ARM64 package will be installed.
2525
2626
## Microsoft ODBC 17
2727

@@ -60,24 +60,26 @@ The ODBC driver on macOS consists of the following components:
6060
|---------------|-----------------|
6161
|libmsodbcsql.17.dylib or libmsodbcsql.13.dylib|The dynamic library (`dylib`) file that contains all of the driver's functionality. This file is installed in `/usr/local/lib/`.|
6262
|`msodbcsqlr17.rll` or `msodbcsqlr13.rll`|The accompanying resource file for the driver library. This file is installed in `[driver .dylib directory]../share/msodbcsql17/resources/en_US/` for Driver 17 and in `[driver .dylib directory]../share/msodbcsql/resources/en_US/` for Driver 13. |
63-
|msodbcsql.h|The header file that contains all of the new definitions needed to use the driver.<br /><br /> **Note:** You cannot reference msodbcsql.h and odbcss.h in the same program.<br /><br /> msodbcsql.h is installed in `/usr/local/include/msodbcsql17/` for Driver 17 and in `/usr/local/include/msodbcsql/` for Driver 13. |
63+
|msodbcsql.h|The header file that contains all of the new definitions needed to use the driver.<br /><br /> **Note:** You can't reference msodbcsql.h and odbcss.h in the same program.<br /><br /> msodbcsql.h is installed in `/usr/local/include/msodbcsql17/` for Driver 17 and in `/usr/local/include/msodbcsql/` for Driver 13. |
6464
|LICENSE.txt|The text file that contains the terms of the End-User License Agreement. This file is placed in `/usr/local/share/doc/msodbcsql17/` for Driver 17 and in `/usr/local/share/doc/msodbcsql/` for Driver 13. |
6565
|RELEASE_NOTES|The text file that contains release notes. This file is placed in `/usr/local/share/doc/msodbcsql17/` for Driver 17 and in `/usr/local/share/doc/msodbcsql/` for Driver 13. |
6666

6767
## Resource file loading
6868

69-
The driver needs to load the resource file in order to function. This file is called `msodbcsqlr17.rll` or `msodbcsqlr13.rll` depending on the driver version. The location of the `.rll` file is relative to the location of the driver itself (`so` or `dylib`), as noted in the table above. As of version 17.1 the driver will also attempt to load the `.rll` from the default directory if loading from the relative path fails. The default resource file path on macOS is `/usr/local/share/msodbcsql17/resources/en_US/`
69+
The driver needs to load the resource file in order to function. This file is called `msodbcsqlr17.rll` or `msodbcsqlr13.rll` depending on the driver version. The location of the `.rll` file is relative to the location of the driver itself (`so` or `dylib`), as noted in the component table. As of version 17.1 the driver will also attempt to load the `.rll` from the default directory if loading from the relative path fails. The default resource file path on macOS is `/usr/local/share/msodbcsql17/resources/en_US/`
7070

7171
## Troubleshooting
7272

73-
Some users encounter an issue when trying to connect after installing the ODBC driver and receive an error like: `"[01000] [unixODBC][Driver Manager]Can't open lib 'ODBC Driver 17 for SQL Server' : file not found (0) (SQLDriverConnect)"`. It may be the case that unixODBC is not configured correctly to find registered drivers. In these cases, creating a couple symbolic links can resolve the issue.
73+
Some users encounter an issue when trying to connect after installing the ODBC driver and receive an error like: `"[01000] [unixODBC][Driver Manager]Can't open lib 'ODBC Driver 17 for SQL Server' : file not found (0) (SQLDriverConnect)"`. It may be the case that unixODBC isn't configured correctly to find registered drivers. In these cases, creating symbolic links can resolve the issue.
7474

7575
```bash
7676
sudo ln -s /usr/local/etc/odbcinst.ini /etc/odbcinst.ini
7777
sudo ln -s /usr/local/etc/odbc.ini /etc/odbc.ini
7878
```
7979

80-
For additional cases where you are unable to make a connection to SQL Server using the ODBC driver, see the known issues article on [troubleshooting connection problems](known-issues-in-this-version-of-the-driver.md#connectivity).
80+
For additional cases where you're unable to make a connection to SQL Server using the ODBC driver, see the known issues article on [troubleshooting connection problems](known-issues-in-this-version-of-the-driver.md#connectivity).
81+
82+
If brew is having trouble finding the formulas, make sure you didn't skip the install step: `brew tap microsoft/mssql-release https://github.com/Microsoft/homebrew-mssql-release`
8183

8284
## Next steps
8385

docs/connect/odbc/linux-mac/known-issues-in-this-version-of-the-driver.md

Lines changed: 46 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
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."
4-
ms.date: 09/01/2020
4+
ms.date: 01/26/2022
55
ms.prod: sql
66
ms.reviewer: ""
77
ms.technology: connectivity
@@ -22,54 +22,61 @@ This article contains a list of known issues with the Microsoft ODBC Driver 13,
2222

2323
Additional issues will be posted on the [SQL Server Drivers blog](https://techcommunity.microsoft.com/t5/SQL-Server/bg-p/SQLServer/label-name/SQLServerDrivers).
2424

25-
- Due to system library limitations, Alpine Linux supports fewer character encodings and locales. For example, en_US.UTF-8 is not available. See [musl libc - functional differences from glibc](https://wiki.musl-libc.org/functional-differences-from-glibc.html) for more information.
25+
- 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).
2626

2727
- 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).
2828

29-
- If the client encoding is UTF-8, the driver manager does not always correctly convert from UTF-8 to UTF-16. Currently, data corruption occurs when one or more characters in the string are not 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 will not attempt this conversion when calling the SQLWCHAR versions of the ODBC API (for example, SQLDriverConnectW).
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).
3030

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

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 cannot 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* cannot be greater than 8000 for the `varchar(n)` type.
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.
3434

35-
## <a id="connectivity"></a> Troubleshooting connection problems
35+
## <a id="connectivity"></a> Troubleshooting connection problems
36+
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.
38+
39+
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.
3640

37-
If you are 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-
39-
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-
4141
Enable the connection log by editing your `/etc/odbcinst.ini` file to contain the following section with these items:
4242

43-
```
43+
```ini
4444
[ODBC]
4545
Trace = Yes
4646
TraceFile = (path to log file, or /dev/stdout to output directly to the terminal)
47-
```
48-
49-
If you get another connection failure and do not see a log file, there (possibly) are two copies of the driver manager on your computer. Otherwise, the log output should be similar to the following:
50-
5147
```
52-
[ODBC][28783][1321576347.077780][SQLDriverConnectW.c][290]
53-
Entry:
54-
Connection = 0x17c858e0
55-
Window Hdl = (nil)
56-
Str In = [DRIVER={ODBC Driver 17 for SQL Server};SERVER={contoso.com};Trusted_Connection={YES};WSID={mydb.contoso.com};AP...][length = 139 (SQL_NTS)]
57-
Str Out = (nil)
58-
Str Out Max = 0
59-
Str Out Ptr = (nil)
60-
Completion = 0
61-
UNICODE Using encoding ASCII 'UTF8' and UNICODE 'UTF16LE'
62-
```
63-
64-
If the ASCII character encoding is not UTF-8, for example:
65-
48+
49+
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:
50+
51+
```log
52+
[ODBC][28783][1321576347.077780][SQLDriverConnectW.c][290]
53+
Entry:
54+
Connection = 0x17c858e0
55+
Window Hdl = (nil)
56+
Str In = [DRIVER={ODBC Driver 17 for SQL Server};SERVER={contoso.com};Trusted_Connection={YES};WSID={mydb.contoso.com};AP...][length = 139 (SQL_NTS)]
57+
Str Out = (nil)
58+
Str Out Max = 0
59+
Str Out Ptr = (nil)
60+
Completion = 0
61+
UNICODE Using encoding ASCII 'UTF8' and UNICODE 'UTF16LE'
62+
```
63+
64+
If the ASCII character encoding isn't UTF-8, for example:
65+
66+
```log
67+
UNICODE Using encoding ASCII 'ISO8859-1' and UNICODE 'UCS-2LE'
68+
```
69+
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.
71+
72+
Some macOS users encounter the following error with driver version 17.8 or older:
73+
74+
```text
75+
[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]
76+
[08001][Microsoft][ODBC Driver 17 for SQL Server]Client unable to establish connection (0) (SQLDriverConnect)
6677
```
67-
UNICODE Using encoding ASCII 'ISO8859-1' and UNICODE 'UCS-2LE'
68-
```
69-
70-
There is more than one Driver Manager installed and your application is using the wrong one, or the Driver Manager was not built correctly.
7178

72-
Some users encounter the following issue: `OperationalError: ('08001', '[08001] [Microsoft][ODBC Driver 17 for SQL Server]Client unable to establish connection (0) (SQLDriverConnect)')`. The error is related to the version of OpenSSL that macOS uses. OpenSSL typically is installed through Brew, and it contains the openssl, openssl@1.1, and openssl@3 binaries.
79+
The error can happen when OpenSSL 3.0 is installed. OpenSSL typically is installed through Brew, and it contains the openssl, openssl@1.1, and openssl@3 binaries.
7380

7481
To resolve this error, change the symlink of the openssl binary to openssl@1.1:
7582

@@ -79,15 +86,12 @@ version=$(ls /usr/local/Cellar/openssl@1.1 | grep "1.1")
7986
ln -s /usr/local/Cellar/openssl@1.1/$version /usr/local/opt/openssl
8087
```
8188

82-
For more information about resolving connection failures, see:
89+
For more information about resolving connection failures, see:
8390

84-
- [Steps to troubleshoot SQL connectivity issues](/archive/blogs/sql_protocols/steps-to-troubleshoot-sql-connectivity-issues)
85-
86-
- [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)
87-
88-
- [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)
89-
90-
- [SQL Server Authentication Troubleshooter](/archive/blogs/sqlsecurity/sql-server-authentication-troubleshooter)
91+
- [Steps to troubleshoot SQL connectivity issues](/archive/blogs/sql_protocols/steps-to-troubleshoot-sql-connectivity-issues)
92+
- [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)
93+
- [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)
94+
- [SQL Server Authentication Troubleshooter](/archive/blogs/sqlsecurity/sql-server-authentication-troubleshooter)
9195

9296
## Next steps
9397

0 commit comments

Comments
 (0)