RE: error establishing socket error
- From: kamils@xxxxxxxxxxxxxxxxxxxx (Kamil Sykora [MSFT])
- Date: Thu, 12 Jan 2006 15:26:22 GMT
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)
|
|
.
- Prev by Date: Re: Exception while using MS SQL SERVER 2005
- Next by Date: RE: can i use setString() for a text type column in the prepareStateme
- Previous by thread: Re: Exception while using MS SQL SERVER 2005
- Next by thread: RE: can i use setString() for a text type column in the prepareStateme
- Index(es):
Relevant Pages
|