Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

[IBM][JDBC Driver] CLI0615E 1

Status
Not open for further replies.

gyhlee

Programmer
Joined
Aug 13, 2002
Messages
3
Location
HK
Why do I get this error when connecting to a remote db2 on a linux?
[IBM][JDBC Driver] CLI0615E Error receiving from socket, server is not responding. SQLSTATE=08S01

There is no problem when I access a remote db2 on AIX with the same piece of code.

import java.sql.*;
public class db2inst1 {
public static void main(String[] args)
{
try
{
//String url=&quot;jdbc:db2://<AIX>:6789/sample&quot;;
String url=&quot;jdbc:db2://<linux>:6790/sample&quot;;
Class.forName(&quot;COM.ibm.db2.jdbc.net.DB2Driver&quot;);
Connection con=DriverManager.getConnection(url,&quot;db2inst1&quot;,&quot;db2&quot;);
String mySQL = &quot;select count(*) from staff&quot;;
Statement stmt = con.createStatement();
ResultSet set = stmt.executeQuery(mySQL);
while (set.next()) {
int ss = set.getInt(1);
System.out.println(ss);
}
set.close();
stmt.close();
con.close();
}catch (Throwable e)
{
System.out.println(e.getMessage());
}
}
}

Thanks all experts in advance.
Please help.


gyhlee
 
the default DB2 UDB port number is 50000... have you set yours differently
 
the default DB2 UDB port number is 50000... have you set yours differently?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top