Driver version
Provide the JDBC driver version - the latest
SQL Server version
Database: Azure Synapse "serverless"
Server: Microsoft SQL Server 12.00.2531, Microsoft Azure SQL Data Warehouse - 10.0.15318.0
Client Operating System
Windows 10
Problem description
One of our users has problem with data transfer operation in the NOT auto-commit mode in our program because we use the standard Connection method - rollback.
dbeaver/dbeaver#18820
The issue that he has during this method execution:
com.microsoft.sqlserver.jdbc.SQLServerException: '@@TRANCOUNT' is not supported.
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(SQLServerException.java:262)
at com.microsoft.sqlserver.jdbc.TDSTokenHandler.onEOF(tdsparser.java:283)
at com.microsoft.sqlserver.jdbc.TDSParser.parse(tdsparser.java:129)
at com.microsoft.sqlserver.jdbc.TDSParser.parse(tdsparser.java:37)
at com.microsoft.sqlserver.jdbc.TDSParser.parse(tdsparser.java:26)
at com.microsoft.sqlserver.jdbc.SQLServerConnection$1ConnectionCommand.doExecute(SQLServerConnection.java:3316)
at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:7418)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:3274)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectionCommand(SQLServerConnection.java:3320)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.rollback(SQLServerConnection.java:3516)
As I can see in the documentation
This syntax is not supported by serverless SQL pool in Azure Synapse Analytics.
The user uses not the latest driver, but I do not see in the code any conditions for the serverless databases:
|
public void rollback() throws SQLServerException { |
|
loggerExternal.entering(loggingClassName, "rollback"); |
|
if (loggerExternal.isLoggable(Level.FINER) && Util.isActivityTraceOn()) { |
|
loggerExternal.finer(toString() + ACTIVITY_ID + ActivityCorrelator.getNext().toString()); |
|
} |
|
checkClosed(); |
|
|
|
if (databaseAutoCommitMode) { |
|
SQLServerException.makeFromDriverError(this, this, SQLServerException.getErrString("R_cantInvokeRollback"), |
|
null, true); |
|
} else |
|
connectionCommand("IF @@TRANCOUNT > 0 ROLLBACK TRAN", "Connection.rollback"); |
|
loggerExternal.exiting(loggingClassName, "rollback"); |
|
} |
Expected behavior
Using another function for the Azure Synapse "serverless" database
Driver version
Provide the JDBC driver version - the latest
SQL Server version
Database: Azure Synapse "serverless"
Server: Microsoft SQL Server 12.00.2531, Microsoft Azure SQL Data Warehouse - 10.0.15318.0
Client Operating System
Windows 10
Problem description
One of our users has problem with data transfer operation in the NOT auto-commit mode in our program because we use the standard Connection method - rollback.
dbeaver/dbeaver#18820
The issue that he has during this method execution:
As I can see in the documentation
The user uses not the latest driver, but I do not see in the code any conditions for the serverless databases:
mssql-jdbc/src/main/java/com/microsoft/sqlserver/jdbc/SQLServerConnection.java
Lines 4374 to 4387 in f636770
Expected behavior
Using another function for the Azure Synapse "serverless" database