Friday, July 20, 2012

Java not connecting to Microsoft SQL Server 2008 R2 Express

Although Microsoft SQL Server 2008 R02 Express was configured correctly to accept TCP/IP connections (SQL Server Configuration Manager > SQL Server Network Configuration > Protocols for SQLEXPRESS), a test connection from Squirrel SQL is just hanging with “Connecting…” message.

My context:

Process Explorer showing that SQuirrel SQL (javaw.exe) was in fact it connected on port 1433, but not able to finish the connection process. That was also confirmed by the fact that when restarting SQL Express server, SQuirrel SQL was coming back promptly.

Most of the answers on the Internet will tell you how to configure SQL Express for TCP/IP connections and that you might need to add a rule to the firewall - that wasn’t really necessary in my case as I only needed local connections.

Eventually I found this post on where a user reports having similar problems with Java 1.6.0_29:

Related post on Microsoft JDBC team blog:

Updating my environment to use Java 1.6.0_33 solved the problem.

1 comment :

  1. Thanks for your post; you gave me the solution after hours of head-banging !!!