Search code examples
sql-serverjdbcwindows-authenticationjtdssquirrel-sql

How to configure Squirrel SQL for SQL Server Windows authentication


I tried to connect Squirrel to MS SQL Server database which is based on Windows Authentication, not a regular username and password things. But it seems a bit tricky whit Windows Authentication. it would be great if someone put the step by step configuration for it.


Solution

  • Pre-Requisites:

    1. JDK 1.6 or above

      "You need JDK or JRE to install the SQuirreL if you do not have it already installed"

    2. SQuirreL Universal SQL Client

    3. jTDS JDBC Driver

    Setting up the driver in SQuirreL:

    1. Open up SQuirreL SQL Client and select Drivers on the left to pull up the drivers list

    2. Scroll down to jTDS Microsoft SQL and select it. Then click Modify the Selected Driver at the top. The icon looks like a pen or a pencil for this function.

    3. In the modal window that pops up, select the Extra Class Path tab. Click Add and navigate to the folder where you have downloaded the jTDS-version.jar file. Select OK to add it to the list.

    4. Click Add again and navigate to the folder where you have ntlmauth.dll downloaded to. Ensure you select the driver for the appropriate architecture (x86, x64, or ia64).

      Here is a picture for some easy reference.

    enter image description here

    Setting up the connection:

    1. Select Aliases on the left to pull up the aliases list. Click Create a new Alias at the top. The icon looks like a thick plus symbol for this function.

    2. In the modal window that pops up, give the connection a name.

    3. Select jTDS Microsoft SQL in the Driver drop down list. Enter your URL in the following format:

      jdbc:jtds:sqlserver://your.server.or.ip.address.com/;domain=YOURDOMAIN;

    Use your domain credentials for username and password and hit OK to save the connection