Thursday, March 26, 2009

Microsoft SQL Server (Microsoft Driver)

Today I wanted to configure WSO2 Registry to run with MSSQL server. To do that I had to specifically use sqljdbc.jar 1.2 driver. I had to struggle few minutes to find correct connection parameters. Most of the connection details mentioned in the web are outdated or invalid. So I waisted around 1 hour due to my laziness to debug the application. To the benefit of others I will publish the connection details here. (at least to save others time)

Driver Class: com.microsoft.sqlserver.jdbc.SQLServerDriver

Default Port: 1433

JDBC URL

jdbc:sqlserver://host:1433;databasename=db

or

jdbc:sqlserver://host:port;databasename=db;user=yourUser;password=yourPwd

If you set the incorrect connection URL probable you will end up with "java.sql.SQLException: No suitable driver" exception.

No comments: