IBM Support

SQL30061N received when DB2 client connects to remote DB2 Database Server due to another application using the same port number as the DB2 Listener

Troubleshooting


Problem

Execution of db2 connect to sample user using fails with SQL30061N The database alias or database name "sample" was not found at the remote node. when connecting to a remote database server.

Symptom

SQL30061N The database alias or database name "sample" was not found at
the remote node.

Cause

The port number used by the DB2 Listener for the instance was being used by another application.

Environment

ALL

Diagnosing The Problem

netstat -an | grep <port svcename using>

Result:
TCP [::]:50001 [::]:0 LISTENING
TCP [::]:50001 [::]:0 LISTENING

If DB2 instance is stopped, netstat -an shows:
TCP [::]:50001 [::]:0 LISTENING

This indicates that another application is still using the port.

Resolving The Problem

Find a port that is not being used by another application, DB2 or otherwise.

To find the entry currently being used for the instance run:

db2 get dbm cfg | grep SVCENAME

If points to port number then run:

db2 update dbm cfg using SVCENAME <new port number>

If points to a string value the entry is found in /etc/services

Simply update the value in /etc/services to point to the new port number.

ie

db2c_db2inst1 50050/tcp

DB2 must be restarted after the port number is changed in order to start the DB2 Listener on the new port.

db2stop

db2start

Please note that all clients will need to recatalog the NODE used for the database to point to the new port number.

ie db2 uncatalog node TLBA12E

db2 catalog tcpip node TLBA12E remote <server name> server <new port# ie 50050 in this example>

Also check JDBC application connection strings, db2cli.ini and db2dsdriver.cfg configuration files.

Related Information

[{"Product":{"code":"SSEPGG","label":"Db2 for Linux, UNIX and Windows"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Component":"Connectivity - DRDA","Platform":[{"code":"PF002","label":"AIX"},{"code":"PF010","label":"HP-UX"},{"code":"PF016","label":"Linux"},{"code":"PF027","label":"Solaris"},{"code":"PF033","label":"Windows"}],"Version":"10.1;10.5;9.5;9.7","Edition":"","Line of Business":{"code":"LOB10","label":"Data and AI"}}]

Document Information

Modified date:
16 June 2018

UID

swg21697748