- This topic has 3 replies, 2 voices, and was last updated 7 years, 11 months ago by support-swapna.
-
AuthorPosts
-
EmptyParticipantI am using MyEclipse Enterprise Workbench Version 2015 Stable 3.0 (Build id: 13.0.0-20160113).
I want to connect to DB2 from MyEclipse Database Explorer remotely. I am using IBM DB2 (Universal Driver) db2jcc4.jar (driver: com.ibm.db2.jcc.DB2Driver). URL is jdbc:db2://<SERVER>:50000/<DBNAME>.
Am I using the correct port number? I am getting the error message:
Error while performing database login with the driver:
[jcc][t4][2043][11550][4.11.77] Exception java.net.ConnectionException: Error opening socket to server /<SERVER> on port 50,000 with message: Connection refused: connect. ERRORCODE=-4499, SQLSTATE=08001Please let me know if you need any other detail.
Thanks,
V
support-swapnaModeratorV,
Sorry that you are this issue. The default port number for DB2 is 50000.
Please check the suggestions in this thread to find out which port the DB2 is listening to:
http://stackoverflow.com/questions/8242891/how-to-identify-db2-port-numberIf you can connect to the DB2 locally and have trouble connecting remotely, then please check if there is any network error. Make sure the firewalls are configured to open the ports which DB2 is using.
telnet <serverIP> <portnumber>
on the client to confirm that you can connect to the port on the server.Also ensure that the TCP/IP is properly enabled on the DB2 server. On the DB2 server, find the current DB2 settings by running the following inside a command prompt:
db2set -all
If the TCP/IP is configured correctly, then there will be an entry similar to:
DB2COMM=TCPIP. If there is no entry for TCPIP then you should configure the DB2 server to allow TCP/IP connections by running db2set DB2COMM=TCPIP command.Please also check with your DB2 administrator if you need more protocols than just TCPIP.Hope this helps. Please let us know how it works for you.
–Swapna
MyEclipse Support
EmptyParticipantI am connecting IBMi/AS400. Can this make any difference on how I connect to DB2?
Thanks,
V
support-swapnaModeratorV,
Please make sure you are using the correct JDBC driver for connecting to DB2 on iSeries.
jt400.jar is the one to connect to DB2 on IBMi/AS400.Please refer to this technote for more information : http://www-01.ibm.com/support/docview.wss?uid=swg21398042
I also suggest you check on dev forums like stackoverflow.com or DB2 related forums for driver specific queries.Hope this helps. Please let us know how it works for you.
–Swapna
MyEclipse Support -
AuthorPosts