By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,610 Members | 2,310 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,610 IT Pros & Developers. It's quick & easy.

how to set/configure ip for DB2 on windows for remote JDBC

P: n/a
Hi All

I'm new to set up DB2 though using JDBC for years.
my question is:

supposed there are 3 computers in local-net, named A,B,C (they are Windows
2000 families). DB2 installed in A (port is db2c_DB2 50000/tcp) which hosts
a web, named www.abc.com, using dynamic ip, like 1.2.3.4 for a week them
2.3.4.5 for another week
when using JDBC within local-net by using,
Class.forName("COM.ibm.db2.jdbc.net.DB2Driver");
Connection conn = DriverManager.getConnection("jdbc:db2://A/datainstance");
three of them work as expected; but if replace
"jdbc:db2://A/datainstance" with "jdbc:db2://www.abc.com/datainstance" or
"jdbc:db2://www.abc.com:50000/datainstance"
none of them works.
Error message were " CLI0616E Error opening socket" and "no suitable
driver" respectively.
Actually the router has been set port 50000 to point to A and opened to
public.

Can any one tell me how to fix it?

--
Thanks lots in advance

John Woo
Toronto
Nov 12 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
The .net.DB2Driver does not communicate through port 50000. Check your
system running UDB and see what port db2jstrt (the JDBC server) is
using. I suspect that the //A/datainstance connection is automagically
determining the correct port for you where your specification of 50000
is incorrect.

The recommended default port for db2jstrt is 6789.

See Application Development Guide: Building and Running Applications
(db2axe80.pdf):
Chapter 4; JDBC; Building JDBC applets
for additional details

Phil Sherman

John wrote:
Hi All

I'm new to set up DB2 though using JDBC for years.
my question is:

supposed there are 3 computers in local-net, named A,B,C (they are Windows
2000 families). DB2 installed in A (port is db2c_DB2 50000/tcp) which hosts
a web, named www.abc.com, using dynamic ip, like 1.2.3.4 for a week them
2.3.4.5 for another week
when using JDBC within local-net by using,
Class.forName("COM.ibm.db2.jdbc.net.DB2Driver");
Connection conn = DriverManager.getConnection("jdbc:db2://A/datainstance");
three of them work as expected; but if replace
"jdbc:db2://A/datainstance" with "jdbc:db2://www.abc.com/datainstance" or
"jdbc:db2://www.abc.com:50000/datainstance"
none of them works.
Error message were " CLI0616E Error opening socket" and "no suitable
driver" respectively.
Actually the router has been set port 50000 to point to A and opened to
public.

Can any one tell me how to fix it?

--
Thanks lots in advance

John Woo
Toronto


Nov 12 '05 #2

P: n/a
"Philip Sherman" <ps******@ameritech.net> wrote in message
news:qf*******************@newssvr28.news.prodigy. com...
The .net.DB2Driver does not communicate through port 50000. Check your
system running UDB and see what port db2jstrt (the JDBC server) is
using. I suspect that the //A/datainstance connection is automagically
determining the correct port for you where your specification of 50000
is incorrect.

The recommended default port for db2jstrt is 6789.
Thanks lots Philip Sherman. YES, port for db2jstrt is 6789 is also for my
computer.
one more question, hope you won't mind asking:
when checking the net-ports statuc, I got from my windows, for db2
Proto Local Address Foreign Address State
TCP A:db2c_DB2 A:0
what's is the numeric port for this db2c_DB2? in some programs/editors,
we're supposed to input numbers.

--
Best Regards
John Woo
Toronto
See Application Development Guide: Building and Running Applications
(db2axe80.pdf):
Chapter 4; JDBC; Building JDBC applets
for additional details

Phil Sherman

John wrote:
Hi All

I'm new to set up DB2 though using JDBC for years.
my question is:

supposed there are 3 computers in local-net, named A,B,C (they are Windows 2000 families). DB2 installed in A (port is db2c_DB2 50000/tcp) which hosts a web, named www.abc.com, using dynamic ip, like 1.2.3.4 for a week them 2.3.4.5 for another week
when using JDBC within local-net by using,
Class.forName("COM.ibm.db2.jdbc.net.DB2Driver");
Connection conn = DriverManager.getConnection("jdbc:db2://A/datainstance"); three of them work as expected; but if replace
"jdbc:db2://A/datainstance" with "jdbc:db2://www.abc.com/datainstance" or "jdbc:db2://www.abc.com:50000/datainstance"
none of them works.
Error message were " CLI0616E Error opening socket" and "no suitable
driver" respectively.
Actually the router has been set port 50000 to point to A and opened to
public.

Can any one tell me how to fix it?

--
Thanks lots in advance

John Woo
Toronto

Nov 12 '05 #3

P: n/a
Ian
John wrote:
"Philip Sherman" <ps******@ameritech.net> wrote in message
news:qf*******************@newssvr28.news.prodigy. com...
The .net.DB2Driver does not communicate through port 50000. Check your
system running UDB and see what port db2jstrt (the JDBC server) is
using. I suspect that the //A/datainstance connection is automagically
determining the correct port for you where your specification of 50000
is incorrect.

The recommended default port for db2jstrt is 6789.


Thanks lots Philip Sherman. YES, port for db2jstrt is 6789 is also for my
computer.
one more question, hope you won't mind asking:
when checking the net-ports statuc, I got from my windows, for db2
Proto Local Address Foreign Address State
TCP A:db2c_DB2 A:0
what's is the numeric port for this db2c_DB2? in some programs/editors,
we're supposed to input numbers.


That's defined in the services file. /etc/services on unix, or
\WINDOWS\system32\drivers\etc\services on Windows.


-----= Posted via Newsfeeds.Com, Uncensored Usenet News =-----
http://www.newsfeeds.com - The #1 Newsgroup Service in the World!
-----== Over 100,000 Newsgroups - 19 Different Servers! =-----
Nov 12 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.