Driver version
7.2.1
SQL Server version
N/A
Client Operating System
N/A
JAVA/JVM version
1.8, 11
Table schema
N/A
Problem description
- Expected behaviour: when an error occurs the driver should throw a SQL exception with a 5 character SQL state
- Actual behaviour: SQL state is sometimes 6 characters due to this code: https://github.com/Microsoft/mssql-jdbc/blob/9c5cc97f661fe14de11df6be16c8acbc3379d1ff/src/main/java/com/microsoft/sqlserver/jdbc/SQLServerException.java#L364
The EXECUTE AS USER = 'DOMAIN/USER' can for example result in SQL state S00011 (6 chars!) and the message Could not obtain information about Windows NT group/user '[USER_NAME]', error code 0x4bc.
This was reported to us by a customer: See flyway/flyway#2275
We believe the driver's behavior is incorrect in this case as it violates the SQLSTATE standard.
Driver version
7.2.1
SQL Server version
N/A
Client Operating System
N/A
JAVA/JVM version
1.8, 11
Table schema
N/A
Problem description
The
EXECUTE AS USER = 'DOMAIN/USER'can for example result in SQL stateS00011(6 chars!) and the messageCould not obtain information about Windows NT group/user '[USER_NAME]', error code 0x4bc.This was reported to us by a customer: See flyway/flyway#2275
We believe the driver's behavior is incorrect in this case as it violates the SQLSTATE standard.