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.