RE: error establishing socket error



Hello,

For some common causes of this exception and troubleshooting, please see:
http://support.microsoft.com/?id=313178

I would also recommend testing with Query Analyzer from the machine that
has a problem and forcing TCP/IP for the connection. That will tell you
whether this problem is specific to the JDBC driver or if you just cannot
reach the target SQL Server over TCP/IP at all.

To do so, use tcp:servername in the SQL Server dropdown when connecting
with Query Analyzer.

Thanks,
Kamil

Kamil Sykora [MSFT]
Microsoft Developer Support - Webdata

This posting is provided "AS IS", with no warranties, and confers no
rights.

Please do not send email directly to this alias. This alias is for
newsgroup
purposes only.
--------------------
| From: jkaturi@xxxxxxxxxxx
| Newsgroups: microsoft.public.sqlserver.jdbcdriver
| Subject: error establishing socket error
| Date: 21 Dec 2005 06:25:06 -0800
|
| import java.sql.*;
| public class SqlTest
| {
| public SqlTest() throws Exception
| {
| //Loading the driver
| // DriverManager.registerDriver(new
| com.microsoft.jdbc.sqlserver.SQLServerDriver());
|
| Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
| // Estalishing the connection URL , USERNAME , PASSWORD
| Connection conn =
|
DriverManager.getConnection("jdbc:microsoft:sqlserver://localhost:1433","sa"
,"bushel90");
|
| if (conn!= null)
| {
| System.out.println("SQL SEVER ");
| System.out.println("Successfully connected");
| }
| }
| public static void main (String args[]) throws Exception
| {
| SqlTest test = new SqlTest();
| }
| }
|
| The Exact excption is like this......
|
|
| Exception in thread "main" java.sql.SQLException: [Microsoft][SQLServer
| 2000 Driver for JDBC]Error establishing socket.
| at
| com.microsoft.jdbc.base.BaseExceptions.createException(Unknown Source)
| at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown
| Source)
| at com.microsoft.jdbc.base.BaseExceptions.getException(Unknown
| Source)
| at
| com.microsoft.jdbc.sqlserver.tds.TDSConnection.<init>(Unknown Source)
| at
| com.microsoft.jdbc.sqlserver.SQLServerImplConnection.open(Unknown
| Source)
| at
| com.microsoft.jdbc.base.BaseConnection.getNewImplConnection(Unknown
| Source)
| at com.microsoft.jdbc.base.BaseConnection.open(Unknown Source)
| at com.microsoft.jdbc.base.BaseDriver.connect(Unknown Source)
| at java.sql.DriverManager.getConnection(Unknown Source)
| at java.sql.DriverManager.getConnection(Unknown Source)
| at SqlTest.<init>(SqlTest.java:17)
| at SqlTest.main(SqlTest.java:30)
|
|

.



Relevant Pages

  • Re: Weblogic JDBC driver seems to ignore set xact_abort on
    ... It is concerning Weblogic SQL Server JDBC driver. ... public class SQLTest { ... Some drivers may buffer up the update counts and if they find an error packet while they are buffering, they immediately throw the exception. ...
    (microsoft.public.sqlserver.jdbcdriver)
  • error establishing socket error
    ... public SqlTest() throws Exception ... public static void main throws Exception ... 2000 Driver for JDBC]Error establishing socket. ...
    (microsoft.public.sqlserver.jdbcdriver)
  • Re: windows error codes
    ... Driver Development Tools: Windows DDK ... This indicates that a kernel-mode program generated an exception which the error handler did not catch. ... For a complete list of exception codes, see the ntstatus.h file located in the inc directory of the Windows DDK. ... This article describes how to troubleshoot a "STOP 0x0000001E KMODE_EXCEPTION_NOT_HANDLED" error message. ...
    (microsoft.public.windowsxp.general)
  • RE: getting Kmode Exception Not Handled error
    ... The address at which the exception occurred 0xf7163ab0 ... Faulty device driver or system service. ... Disabling memory caching of the BIOS might also resolve the error. ...
    (microsoft.public.win2000.setup)
  • Re: BSOD
    ... This indicates that a kernel-mode program generated an exception which the ... the inc directory of the Windows Driver Kit. ... Make sure you have enough disk space. ... with your hardware vendor for any BIOS updates. ...
    (microsoft.public.windows.server.general)