Topic Can't connect to MS SQL Server with Windows Authentication

Sue started the topic:
2018-10-09 12:46

Can't connect to MS SQL Server with Windows Authentication

I'm trying to connect to an MS SQL Server database that uses Windows Authentication, but when I provide my login credentials when defining the datastore, I get a Login Failed error. I've tried both the provided jtds driver as well as the Microsoft driver that I downloaded, but neither work.

I can connect to an MS SQL Server database that doesn't use Windows Authentication.

What do I need to do to connect to SQL Server databases with Windows Authentication?
Arjan replied:
2018-10-10 09:41
Hi Sue,

You should be able to get it to work using the official MS SQL Server driver, but it requires some extra configuration outside DataCleaner. I was able to get it to work using some hints from this stackoverflow discussion: jdbc-connection-to-mssql-server-in-windows-authentication-mode.

So in short:
* Download sqljdbc_auth.dll which is part of a zip file available onDownload Microsoft JDBC Driver 6.0 for SQL Server from Official Microsoft Download Center.
* Copy it to your \Windows\System32 folder.
* Then in DataCleaner create a SQL server connection using the official MS SQL Server driver (the one with driver class name com.microsoft.sqlserver.jdbc.SQLServerDriver.
* For the connection string fill in somethink like this: jdbc:sqlserver://localhost;databaseName=datacleaner;integratedSecurity=true, make sure to add the ";integratedSecurity=true" part.
* Fill in your username (I had to include domain, so for me it looked a bit like this: "MYDOMAIN\arjans".
* And fill in your windows password.

For me that worked.

Good luck,
Arjan Seijkens
cyr1l replied:
2018-10-17 13:13
Hi,

Thank you for the explanation, I asked myself the same question!

You are not signed in.
You need to be signed in to participate in the discussion.