Enable TCP/IP communcations on DB2

Our db2 instance user is smadmin

Edit /etc/services file to have the desired port set. I used 50000 and service name db2c_smadmin

db2c_smadmin    50000/tcp

Su over to the db2 user and run the following:

db2set DB2COMM=tcpip
db2 update database manager configuration using svcename db2c_smadmin

Restart the DB2 instance:

db2stop force
db2start

Check if the desired port is open:

telnet localhost 50000
Trying 127.0.0.1…
Connected to localhost.
Escape character is ‘^]’.

If the operation was successful the connection is successful as it is in the example above.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.