RE: java.sql.SQLException (Error establishing socket)

From: Carb Simien [MSFT] (CarbinoS_at_online.microsoft.com)
Date: 11/16/04

  • Next message: Sue Purkis: "Re: MS JDBC vs DataDirect Driver"
    Date: Tue, 16 Nov 2004 19:19:41 GMT
    
    

    --------------------
    | From: Mostafa (mostafa_showky@hotmail.com)
    | Subject: java.sql.SQLException (Error establishing socket)
    | Message-ID: <#msDnAXyEHA.2764@TK2MSFTNGP10.phx.gbl>
    | Newsgroups: microsoft.public.sqlserver.jdbcdriver
    | Date: Sat, 13 Nov 2004 03:01:38 -0800
    | NNTP-Posting-Host: shared2.orcsweb.com 66.129.69.1
    | Lines: 1
    | Path:
    cpmsftngxa10.phx.gbl!TK2MSFTFEED02.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP10
    phx.gbl
    | Xref: cpmsftngxa10.phx.gbl microsoft.public.sqlserver.jdbcdriver:6465
    | X-Tomcat-NG: microsoft.public.sqlserver.jdbcdriver
    |
    | 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 Sou
    | rce)
    | at
    com.microsoft.jdbc.base.BaseConnection.getNewImplConnection(Unknown S
    | ource)
    | at com.microsoft.jdbc.base.BaseConnection.open(Unknown Source)
    | at com.microsoft.jdbc.base.BaseDriver.connect(Unknown Source)
    | at java.sql.DriverManager.getConnection(DriverManager.java:512)
    | at java.sql.DriverManager.getConnection(DriverManager.java:171)
    | at MakeConnection.<init>(MakeConnection.java:27)
    | at MakeConnection.main(MakeConnection.java:65)
    | Error: No active Connection
    | Exception in thread "main" java.lang.NullPointerException
    | at MakeConnection.displayDbProperties(MakeConnection.java:118)
    | at MakeConnection.main(MakeConnection.java:66)
    |
    | This Exception is throws when i run my connection over Internet but in
    localHost not make that
    | Thanks for your help
    |
    | **********************************************************************
    | Sent via Fuzzy Software @ http://www.fuzzysoftware.com/
    | Comprehensive, categorised, searchable collection of links to ASP &
    ASP.NET resources...
    |

    Hello,

    Since you are making connections to a remote SQL Server via the Internet,
    it is entirely possible that a connection may not be possible at times.
    This error could be thrown if there is some problem in the network when
    trying to establish the connection. If the network is fine, then it could
    also occur if there is a database problem when trying to make the
    connection. Ensure that all of the network components under your control
    are working properly. You should test connections to SQL Servers in your
    local network as well as to other SQL Servers at the remote site if
    available. This way, you can see if the problem is specific to your local
    network or to the specific remote SQL Server. You could also check the SQL
    Server error logs and possibly the event logs on the SQL Server machine to
    see if there are any database errors at the time of the failure.

    Carb Simien, MCSE MCDBA MCAD
    Microsoft Developer Support - Web Data

    Please reply only to the newsgroups.
    This posting is provided "AS IS" with no warranties, and confers no rights.

    Are you secure? For information about the Strategic Technology Protection
    Program and to order your FREE Security Tool Kit, please visit
    http://www.microsoft.com/security.


  • Next message: Sue Purkis: "Re: MS JDBC vs DataDirect Driver"

    Relevant Pages

    • Re: Connection from remote computer to network SQL Server
      ... There is no firewall on the W2K machine acting as the SQL server. ... I tried making the SQL machine a "trusted" on the router. ... connection works. ... To find the IP address of your computer inside the network, ...
      (microsoft.public.access.adp.sqlserver)
    • Cant connect to SQL Server from Novell workstation
      ... My customer is trying to get my VB.net program to access SQL Server 2000 ... over a Novell network and they're getting a connection error. ...
      (microsoft.public.sqlserver.connect)
    • Re: Pass-through queries fail even after SQL Server reconnected
      ... indicates network connectivity problems. ... ODBC is a pretty old way to connect to SQL Server. ... pass-through queries fail due to intermittent connection failures. ... I can easily restablish a connection for ADO. ...
      (comp.databases.ms-access)
    • RE: ASP .Net connection to Sql Server
      ... Using "dbmssocn" tells it to use the TCP/IP network driver, ... It is connecting via a connection string similiar to: ... > string to our production SQL server and everything runs fine. ...
      (microsoft.public.dotnet.framework.aspnet)
    • Re: Set up home network (xp professional and 2000)
      ... There's no need to set up any kind of network connection to use Remote ... * PLEASE post all messages and replies in the newsgroups ...
      (microsoft.public.win2000.networking)

    Loading