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!

getting db2 to listen for jdbc connections

Status
Not open for further replies.

mattohope

Technical User
Mar 12, 2005
8
0
0
GB
Hi All,

I'm new to DB2, we've just started using it for a BI project and I need some help. (db2 is running on a linux server)

One of our developers needs to make a JDBC connection to the test database "enttest". He's tried writing an applcation to connect to port 50000 but has no joy.

Looking at the results of netstat -a I can't see anything listening on port 50000.

After looking around i've added a tcp/ip entry in /etc/services called db2cdb2inst1 for port 50000 and set the tcp/ip service in the db2 database manager configuration to point at this entry. after a server/db2 restart still no connection. Any idea's
 
If you used the graphical installer, I would have expected the entry in /etc/services to have been created for you. It sounds to me as if you may have a more general problem. I wonder if you installed DB2 to use tcp/ip?

In case you haven't done this, check that the dbm cfg parameter SVCENAME is set to that specified in /etc/services.

Can you connect from another machine using a db2 client? Try installing the db2 client on another machine and (assuming no firewalls) you should be able to use Control Centre to see and register your instance and databases.
 
mattohope,

have you done anything with your registry settings
type db2set and see what is returned.

You may depending on the results wish to issue the following command

db2set DB2COMM=tcpip

Cheers
Greg
 
Hi Guy's,

Here's the results of you questions

dbm cfg parameter:
TCP/IP Service name (SVCENAME) = db2cdb2inst1

/etc/services entry:
# Local services
db2cdb2inst1 50000/tcp #db2 jdbc connection

result of db2set command:
DB2COMM=tcpip

I've tried connecting to the database frm another linux server in the Control Center, i can make a connection fine.
 
mattohope,

If you can connect from a remote control center, I would suggest that DB2 is configured fine and maybe you have an application problem?

Cheers
Greg
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top