SQL Server Integrated Security?

Am I missing something within the driver configuration options or is this a bug? Set IS to true on the driver and on the data source and still receive:

Connection to SQL Server - _________ [2] failed
java.sql.SQLException: This driver is not configured for integrated authentication. ClientConnectionId:3b536b35-12cf-494b-b483-c44549b95340
at com.microsoft.sqlserver.jdbc.SQLServerConnection.terminate(SQLServerConnection.java:1667)
at com.microsoft.sqlserver.jdbc.AuthenticationJNI.<init>(AuthenticationJNI.java:60)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.logon(SQLServerConnection.java:2229)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.access$000(SQLServerConnection.java:41)
at..........

1
17 comments
Avatar
Permanently deleted user

I'm having the same issue - is there a different driver that should be used for MS SQL Server?

0
Avatar
Permanently deleted user

Use the jTDS driver.

0
Avatar
Permanently deleted user

I got it to work using this stack overflow answer :http://stackoverflow.com/questions/16364800/how-can-i-use-ms-sql-servers-integrated-authentication-in-intellij-idea-12

1) download the zipped driver from here http://www.microsoft.com/en-us/download/details.aspx?displaylang=en&id=11774
2) extract the driver from sqljdbc_4.0.2206.100_enu.tar.gz\sqljdbc_4.0.2206.100_enu.tar\sqljdbc_4.0\enu\auth\x86\sqljdbc_auth.dll,
3) stick it in C:\Program Files (x86)\JetBrains\0xDBE 138.551\jre\jre\bin

0
Avatar
Permanently deleted user

In my case it seems to instance specific.  I have a cluster with named instances with IP ports for each instance.  I am able to connect to all but a few with the built-in drivers.  I am taking a look at my agent config on the servers just to make sure that it is all on the up and up.  But it is interesting since it is using the same credentials just a different instance name to connect to the same cluster...

0
Avatar
Permanently deleted user

Adding that dll to the folder allows me to connect as long as I do runas.exe /netonly /user [username] prior to launching 0xdbe (since I am not joined to the domain).

0
Avatar
Permanently deleted user

This worked for me, also had to append "integratedSecurity=true;" to the url.

0
Avatar
Permanently deleted user

Where do you append.  I treid and got an error.

0
Avatar
Permanently deleted user

Here's an example:
jdbc:sqlserver://mysqlserver:1433;databaseName=Northwind;integratedSecurity=true;

0
Avatar
Permanently deleted user

Tried that just now and got an error SSO Failed: Native SSPI library not loaded and I'm using the jtds driver downloaded.

0
Avatar
Permanently deleted user

Use the other driver after you install that DLL to the folder.

0
Avatar
Permanently deleted user

This worked for me

0
Avatar
Permanently deleted user

That works for the Microsoft driver.

jTDS also requires a DLL to be added to your system path, it's in the zip on source forge under architecture/SSO. There's a README.SSO file in the root that explains the install.

For the integrated security you can set it to true in Advanced options for the Microsoft driver (after installing the dll), and then just leave the username password blank.

I'm not sure if you can use integrated security with the MS driver when you're not joined to the domain - but you can definitely do it with the jTDS driver, just set the DOMAIN in advanced and enter your username/password as usual. With jTDS when you are on the domain you shouldn't have to enter anything for the username/password.

jTDS driver also supports SQL 2000, whereas the MS one didn't.

Hope that helps, I've run into quite a few of these issues since I've been using MSSQL and PyCharm/IntelliJ.

0
Avatar
Permanently deleted user

jtds didn't work for me either.... Use Microsoft.

0
Avatar
Permanently deleted user

Thanks a lot for this link, this fixed it for me.

Next steps:

4) Data Sources -> Add -> SQL Server -> Microsoft
5) Type in hostname/database name/related connection information
6) Append to jdbc: connection string, 'integratedSecurity=true;'
7) Connection should now test successfully

0

I had the same problem after updating Microsoft SQL Drivers to version 8.2.2 on Datagrip

I resolved the problem following these steps:

  • Download Microsoft JDBC drivers from the website
  • Extract the .zip and locate the enu/auth/x64/mssql-jdbc_auth-8.2.2.x64.dll
  • Copy this file to: DataGrip\jbr\bin
  • Restart Datagrip

In that way I added the mssql-jdbc_auth-8.2.2.x64.dll to classpath and I resolved the problem

4

Also experienced problem after updating mssql drivers to 8.2.2. Matteogll's solution worked for me

1

We've got an issue https://youtrack.jetbrains.com/issue/DBE-10445
Fix will be available in the next DataGrip version.

0

Please sign in to leave a comment.