468,117 Members | 1,584 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,117 developers. It's quick & easy.

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

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
3 7627
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
"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
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.

Similar topics

2 posts views Thread by Darko Jovisic | last post: by
1 post views Thread by Markus Wollny | last post: by
13 posts views Thread by didacticone | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.