• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

SQLSTATE=08S01

 
mike hsieh
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
HI,
COM.ibm.db2.jdbc.net.DB2Exception: [IBM][JDBC Driver] CLI0616E Error opening socket. SQLSTATE=08S01
I have a problem to get the connection from the mainframe db2.
Class.forName("COM.ibm.db2.jdbc.net.DB2Driver").newInstance();
Connection db2conn = DriverManager.getConnection("jdbc b2://gateway_host_ip_address ort/database");
I am running my java ap on NT box and I have the db2java.zip in my classpath.
What else I can do to get this working
Thanks
 
Michael Matola
whippersnapper
Ranch Hand
Posts: 1826
5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
mike_hsieh,
Please adjust your displayed name to meet the JavaRanch Naming Policy. You can do so here.
 
Jamie Robertson
Ranch Hand
Posts: 1879
MySQL Database Suse
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
try changing
"jdbcb2://gateway_host_ip_address:port/database"
to
"jdbcb2://gateway_host_ip_address:port:database"
not sure where your username and password are though?
Jamie
[ October 07, 2002: Message edited by: Jamie Robertson ]
 
mike hsieh
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I change it to
DriverManager.getConnection("jdbc b2://gateway_host_ip_address ort atabase",userid,password);
but I still got the same error, especially
Error opening socket.
What else I can do.
Do I have to configure the database alias name at my local PC?

Thanks
 
Jamie Robertson
Ranch Hand
Posts: 1879
MySQL Database Suse
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
make sure that
1. the database is running AND listening to the port specified
2. you have permissions to connect to the database
3. you don't have any firewall issues that may be interfering with your connection.
Jamie
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic