Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

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.

like image 567
mrk m Avatar asked Mar 17 '23 23:03

mrk m


1 Answers

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]]
like image 74
Eric Hedstrom Avatar answered Mar 21 '23 08:03

Eric Hedstrom