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 Mike Lewis 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
Aug 13, 2002
3
0
0
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top