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.
4
votes
2 Answers
6
votes
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]]