Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ This driver is documented on [Microsoft Docs](https://docs.microsoft.com/sql/con
For samples, please see the `src\sample` directory.

### Download the DLLs
For some features (e.g. Integrated Authentication and Distributed Transactions), you may need to use the `sqljdbc_xa` and `mssql-jdbc_auth-<version>.<arch>` DLLs. They can be found in the package that can be downloaded from [Microsoft](https://aka.ms/downloadmssqljdbc). `mssql-jdbc_auth-<version>.<arch>` can also be downloaded from [Maven](https://mvnrepository.com/artifact/com.microsoft.sqlserver/mssql-jdbc_auth).
For some features (e.g. Integrated Authentication), you may need to use the `mssql-jdbc_auth-<version>.<arch>` DLL. It can be found in the package that can be downloaded from [Microsoft](https://aka.ms/downloadmssqljdbc). `mssql-jdbc_auth-<version>.<arch>` can also be downloaded from [Maven](https://mvnrepository.com/artifact/com.microsoft.sqlserver/mssql-jdbc_auth). For Distributed Transactions (XA), the required extended stored procedures are built into SQL Server 2017 and later and can be installed by running `EXEC sp_sqljdbc_xa_install` on the server.
Comment thread
Copilot marked this conversation as resolved.
Outdated

### Download the driver
Don't want to compile anything?
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

/**
*
* This class is used to handle exceptions that may be received from mssql-jdbc_auth DLL and sqljdbc_xa DLL.
* This class is used to handle exceptions that may be received from the mssql-jdbc_auth DLL.
*
*/
class DLLException extends Exception {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ private static boolean isXANotInstalledError(Throwable e) {
if ((msg != null && msg.toLowerCase().contains("xp_sqljdbc_xa")) ||
(fullMsg != null && fullMsg.toLowerCase().contains("xp_sqljdbc_xa"))) {
System.out.println("XA not supported: XA stored procedures not found");
System.out.println(" Solution: Run xa_install.sql script on SQL Server");
System.out.println(" Solution: Enable XA on SQL Server 2017+ by running EXEC sp_sqljdbc_xa_install");
return true;
}

Expand All @@ -207,7 +207,7 @@ private static boolean isXANotInstalledError(Throwable e) {
fullMsg.toLowerCase().contains("xa control connection") ||
fullMsg.toLowerCase().contains("could not load the dll")))) {
System.out.println("XA not supported: " + msg);
System.out.println(" Solution: Install sqljdbc_xa.dll in SQL Server Binn directory and unblock it");
System.out.println(" Solution: Enable XA on SQL Server 2017+ by running EXEC sp_sqljdbc_xa_install");
return true;
}

Expand Down Expand Up @@ -270,7 +270,7 @@ void testRandomizedXATransactions() throws Exception {
logTestProgress("testRandomizedXATransactions - Checking XA support");
boolean xaSupported = isXASupported(connectionString);
Assumptions.assumeTrue(xaSupported,
"XA distributed transactions not supported - install xa_install.sql on SQL Server");
"XA distributed transactions not supported - enable XA on SQL Server 2017+ via EXEC sp_sqljdbc_xa_install");
logTestProgress("testRandomizedXATransactions - XA support confirmed");

SQLServerXADataSource ds = new SQLServerXADataSource();
Expand Down
Loading