I want to find DB2 port in windows, please help. Some information:
- DB2 v 9.7 Personal Edition – new/fresh install
- netstat command does not list db2 port.
- db2 entry missing was missing in system32\drivers\etc\services file so, made an entry – "db2c_DB2 50000/tcp"
- able to start db2 using control center and create tables and insert rows
- able to start db2 using CLP and perform opertaions
Actually, I'm trying to connect to DB2 using "jdbc:db2://127.0.0.1:50000/TEST" as connect URL from Java but, I get an error:
"Exception java.net.ConnectException: Error opening socket to server /127.0.0.1 on port 50,000 with message: Connection ref
used: connect. ERRORCODE=-4499, SQLSTATE=08001"
I find that DB is up and running but, not listening on port 50000, though mentioned in services file. So, db2 is listening on some other port but,
- what's the port it's using?
- why it's not using port #50000 as mentioned in services file?
- why netstat command is not listing db2 service and port information?
Thanks much in advance.
Best Answer
Firstly make sure TCP comms is set on,
You can check if it's not using the default port,
Should get a line like this,
The above would should a port number if it was not set to default port, as you can see my config is default (=50000)