cancel
Showing results for 
Search instead for 
Did you mean: 

JDBC Communication channel : Error establishing socket

Former Member
0 Kudos

Dear friends,

Im using JDBC comm channel. JDBC driver has been insatlled for SQL Server 2000 (SP3) .

However for the JDBC comm. channel i get an error

"SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.'

following parameters are used :

JDBC driver: com.microsoft.jdbc.sqlserver.SQLServerDriver

DB connection :

jdbc:microsoft:sqlserver://<ip address>:1433;databaseName=<dbname>

i looked up some blogs in SDN, & tried some other options,

eg: com.microsoft.sqlserver.jdbc.SQLServerDriver

DB name:

jdbc:microsoft:sqlserver://<ip address>:1433;DatabaseName=<dbname>

However still get the same error

Can somebody help ?

Accepted Solutions (0)

Answers (1)

Answers (1)

prateek
Active Contributor
0 Kudos

Similar problem with solution

Regards,

Prateek

Former Member
0 Kudos

hi Prateek,

i looked at the blogs.

telnet local host 1433 doesnt work - cannot open connection.

anyway in my case the SQL Server is on a separate host.

so im putting the ip of the SQL database server in db connection

how do i know which port to use ? or if post 1433 is ok ?

Former Member
0 Kudos

Hi Prasenjit ,

This error comes when Xi server is unable to access the Data base server .Please check if port 1433 is open from your Xi server .

Format for Connection string

jdbc:microsoft:sqlserver:,<database path>:1433;DatabaseName=,<dbname>;AuthenticationMethod=type2

Thanks ,

Suvarna

null

Former Member
0 Kudos

Hi

The following should fix your problem

<i>I had this problem using SQLServer 2000 Driver for JDBC and finally solved it. Here's what I did:

1. Make sure that SQL Server is set to mixed authentication. To do this, open enterprise manager, right click on server/properties; go to security tab and select SQL Server and Windows Authentication. Apparently, the driver from Microsoft cannot handle windows integrated authentication.

2. Keeping the server properties dialog up, go to the general tab and push the network configuration button. <b>Enable TCP/IP (it is disabled by default). If you wish, press properties to change the default port (1433).</b>

3. Add an SQL Server login account (NOT a WINDOWS account (see 1)). You can also use your sa account, but I don't recommend it.

4. Use the login setup in step 3.

Some final notes:

(1) I've seen ads for third party drivers that can use Windows integrated authentication. Try one if you need this feature.

(2) One responder suggested telneting to port 1433 to verify TCP connectivity. The connection is refused on my machine even though I can connect through the driver. And this is how it should be; otherwise there'd be a security risk.</i>

Courtesy:

Regards

krishna

<i>Note:Reward points if helpful</i>

prateek
Active Contributor
0 Kudos

M sure u had already deployed the drivers (msbase.jar, mssqlserver.jar, msutil.jar).

Have a look at SAP Note 730870

Some tips:

- The connection should be like

jdbc:microsoft:sqlserver://ServerName:1433;DatabaseName=dbName

- For the drivers:

http://developers.sun.com/product/jdbc/drivers

- Try port 1434 also

- Database related username and password check

<i>[Reward if useful]</i>

Regards,

Prateek

Former Member
0 Kudos

Hi Krishna,

points 1. 2 are ok.

point 3 im not sure how to check or set that up - but i think we have sql server logon user.

default port on sql server is not 1433 but 2433- do u think that can be any issue?

thanks

Former Member
0 Kudos

>>default port on sql server is not 1433 but 2433

Sure. Chane the port number in communication channel to 2433.

What is the user Id you are using to access SQL server? Is it the windows id? If so, you need to create a user Id in mixed mode for SQL server and use this id in communication channel.

Regards,

Jai Shankar