Skip to Main Content

Java Database Connectivity (JDBC)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

MSSQL Server 2000 JDBC: Error establishing socket

843854Sep 24 2003 — edited Jul 30 2004
Ok, I've seen several topics on this problem on a lots of forums. Nowhere have I found a suggestion for a solution that really works for me.

I have a SQL Server 2000 running at a machine. It listens to TCP/IP and I can connect to it without any problems using the usual clients (using TCP/IP). Also, I can use Microsofts SQL Server JDBC driver in a standalone Java application where I retrieve a Connection using the DriverManager. No problem at all using this method.

But when using Tomcat (or JWSDP-1.2 really) and adding a DataSource in Tomcat Server Administration interface (under DataSource), I receive an SQLException with the message "[Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.". I used the same connection URL as with my standalone application. I've also tried every possible combination of connection-string properties listed by Microsoft for their JDBC driver. NOTHING works and I get the same error all the time.

If I use the JdbcOdbc driver to connect to the SQL Server, it works fine. Also, when using a third-party driver, like TWFreeTDS 1.3, it works fine. The problem is that these drivers are not acceptable for various reasons.

I've done all the usual thing to find a cause for the problem. Connecting to the server using telnet to ensure that a connection really is possible. The drivers .jar files are included in catalina.corepolicy with AllPermissions so that is not the problen either.

Please. If anyone has any solution to this I would be really grateful.

regards
Erik
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 27 2004
Added on Sep 24 2003
7 comments
318 views