SQL Server Connectivity Issues using Windows Authentication From Linux
To preface everything I am trying to connect to a database one of our customer networks, I can also connect using the with a quick script I wrote in python using the module pymsql without a problem http://pymssql.org/en/stable/.
So I started here https://blog.jetbrains.com/datagrip/2016/06/21/connecting-datagrip-to-ms-sql-server/ and I tried both drivers, however I made some extra alterations to the setting for each driver and got farther but hit another dead end each way.
What I have done so far Microsoft Driver:
1. I followed the guide http://pymssql.org/en/stable/ for instructions with the Microsoft driver with the exception that the instance did not auto fill, so I got the instance and domain name from the python script I mentioned earlier and filled the Instance name in there and the server name in the advanced settings to the domain and also because the "Use Windows Authentication" check mark didn't show up I set integratedSecurity to true in the advanced settings.
result -> [08S01] This driver is not configured for integrated authentication.
2. I found some instructions deep in Microsofts forums about changing the authenticationScheme from nativeAuthentication to javaKeberos, so after doing that I get a different slightly more promising error.
result -> [08S01] Integrated authentication failed
3. Change every setting in advances setting just to see what happens to no avail
What I have done with the jTds Driver:
1. I followed the guide http://pymssql.org/en/stable/ for instructions with the jTds driver and using windows authentication. I got the instance and domain using the python script I wrote earlier.
result -> [28000][18452] Login failed. The login is from an untrusted domain and cannot be used with Windows authentication.
2. Change every setting in advances setting just to see what happens to no avail
Note: I am doing this through and ssh tunnel I have tried both using datagrips tunneling setup and my own using ssh -L, I am also on Ubuntu 16.04
This is incredibly frustrating because I can connect so easily using the python module pymssql however I can't find an sql IDE leveraging that, actually for that matter it's really hard to find one that isn't written in Java. Please help if you can this is really slowing me down.
请先登录再写评论。
Hi,
For Windows Auth you need additional jar file, e.g. for jTds:
For MS SQL Driver:
Thank you.
Thanks for the help Vasily
However I placed the additional jars beside there companions as shown below with no change in the error codes I am receiving for either driver.
jTDS:
~/.DataGrip2017.1/config/jdbc-drivers/jTDS (SQL Server and Sybase)/1.3.1/jtds-win-auth.jar
SQL Server:
~/.DataGrip2017.1/config/jdbc-drivers/SQL Server/6.0.8112.100/sqlserver6-win-auth.jar
EDIT:
I found in the driver settings you can add extra JDBC drivers for each driver and I did that still with no success for either driver.
Could you connect to your databases with SSMS?
I am on Linux, Sql Server Management Studio is only available on Windows.
Edit: Within a Windows VM I installed SSMS and yes I could connect to the DB.
Is there any additional help that can be provided on this issue? It is an outstanding issue for my entire team.
Solved https://stackoverflow.com/questions/34599607/how-to-set-sql-server-authentication-method-in-datagrip