Installing driver for Squirrel sql client on linux to connect to MS sql server

12,178

Solution 1

You want to get the JDBC driver from Microsoft and add it to the Squirrel classpath.

  • Download the driver from http://www.microsoft.com/en-us/download/details.aspx?id=11774
  • Get the .tar.gz for the 4.0 driver or 4.1 preview.
  • Expand the .tar.gz file on your Linux system.
  • Open Squirrel SQL
  • Click the Drivers tab in the upper left and find the entry for Microsoft MSSQL Server JDBC Driver
  • Double click the entry to open the settings for it
  • Click the Extra Class Path button
  • Click the Add button and select the sqljdbc4.jar or sqljdbc41.jar extracted above
  • In the Class Name field, enter com.microsoft.sqlserver.jdbc.SQLServerDriver

Edit: adding JDBC URL example - The JDBC URL syntax for the Microsoft driver is explained here.

The general form of the connection URL is

jdbc:sqlserver://[serverName[\instanceName][:portNumber]][;property=value[;property=value]]

Solution 2

its a lot easier to just drop the driver jar into the squirrel lib folder. squirrel will find it and use it.

Share:
12,178

Related videos on Youtube

mrk m
Author by

mrk m

Updated on June 04, 2022

Comments

  • mrk m
    mrk m almost 2 years

    I am trying to connect to MS SQL server database from linux. I can connect with Microsoft SQL server management studio on windows to same. I am trying to use squirrel sql client. I am not sure about the driver I need to use and how to install it.

  • mrk m
    mrk m over 9 years
    Thanks for your answer. Now when I am tryig to connect to MS SQL server I am getting sql exception that URL is invalid. The URL is jdbc:microsoft:mssql://myserver.mydomain.com:1433 The server to which I am trying to connect needs odbc driver. I will need different(odbc) driver I think. Is that jTDS MSSQL driver ?
  • aqn
    aqn over 8 years
    mrk m: I still can't add a MSSQL deriver to my SQuirrelSQL, but WRT to your issue, I think the URL needs to say jdbc:sqlserver://<server_name>:1433;databaseName=<db_name> ?
  • Eric Hedstrom
    Eric Hedstrom over 8 years
    Yes, for example jdbc:sqlserver://localhost:1433;databaseName=AdventureWorks; . You can also add user=myUsername;password=myPassword; to include your authentication info.
  • Chisko
    Chisko almost 7 years
    Thank you! I spent almost a day in the docs trying to figure this out. Their documentation surely sucks.