How to set SQL Server Authentication Method in DataGrip?

bigtunacan picture bigtunacan · Jan 4, 2016 · Viewed 9.3k times · Source

Is there a way to specify the authentication method (SQL Server or Windows Authentication) when connecting to SQL Server with DataGrip?

I have tried configuring using both the SQL Server(jTDS) and the SQL Server(Microsoft) drivers and don't see an option on either.

Answer

pwae picture pwae · Jan 7, 2016

With the jTDS Driver:

This is dependent on the settings for the connection/data source.

i.e. To set up a connection for Windows Authentication:

  1. In the "General" tab, if specify your Windows/AD Username in the User field.
  2. on the "Advanced" tab, in the DOMAIN property, specify the domain for the Windows account you put in Step 1.
  3. You may need to set USENTLMV2=true if Kerberos authentication isn't enabled on your network

If you don't specify the domain in step 2, it will assume you are doing a SQL Server Authentication login attempt.

With the Microsoft Driver:

I couldn't get this to work on OS X, but most people seem to have no issues on Windows.

  1. In the "Advanced" tab for the data source, set integratedSecurity to true.

n.b. you may have to also set this property for the actual Driver as well, on OS X i was getting continually "This driver is not configured for Integrated Authentication", but that could be OS X thing.

Hope this helps.