I would like to run liquibase and connect to SQL Server with Integrated Security. I have checked documentation ms-sql-server-windows-integrated-security and prepared command:
liquibase --log-level=FINE status --verbose --changelog-file=sql/changelog.xml --driver=com.microsoft.sqlserver.jdbc.SQLServerDriver --url="jdbc:sqlserver://$HOST:1433;IntegratedSecurity=true;databaseName=$DB;trustServerCertificate=true;encrypt=true" --username=$USER --password=$PASS
I use official docker image: liquibase/liquibase:4.29
Unfortunately I get an error:
Caused by: com.microsoft.sqlserver.jdbc.SQLServerException: This driver is not configured for integrated authentication. ClientConnectionId:edae05fd-1aa8-4120-91d8-7cc60a2d4cbf
at com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(SQLServerConnection.java:4266)
at com.microsoft.sqlserver.jdbc.AuthenticationJNI.<init>(AuthenticationJNI.java:78)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(SQLServerConnection.java:5345)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.access$300(SQLServerConnection.java:94)
at com.microsoft.sqlserver.jdbc.SQLServerConnection$LogonCommand.doExecute(SQLServerConnection.java:5334)
at com.microsoft.sqlserver.jdbc.TDSCommand.execute(IOBuffer.java:7739)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(SQLServerConnection.java:4384)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectHelper(SQLServerConnection.java:3823)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.login(SQLServerConnection.java:3348)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connectInternal(SQLServerConnection.java:3179)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.connect(SQLServerConnection.java:1953)
at com.microsoft.sqlserver.jdbc.SQLServerDriver.connect(SQLServerDriver.java:1263)
at liquibase.database.jvm.JdbcConnection.open(JdbcConnection.java:42)
... 32 more
Caused by: java.lang.UnsatisfiedLinkError: Unable to load authentication DLL mssql-jdbc_auth-12.6.1.x64
at com.microsoft.sqlserver.jdbc.AuthenticationJNI.<clinit>(AuthenticationJNI.java:67)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(SQLServerConnection.java:5344)
... 42 more
I don’t understand this log, how can I load dll to linux machine and where I should copy this file mssql-jdbc_auth-12.6.1.x64.dll
?
How to connect within docker container to mssql server using Integrated Security?