IBM Support

How to update an entry in the Database Directory or Node Directory

Troubleshooting


Problem

As there is no 'update db directory' or 'update node directory' command, how can a Database or Node directory parameter be updated? In prior versions of DB2 LUW, you might use the Configuration Assistant, but that tool is not included with DB2 LUW 10.1

Symptom

Need to update Database Directory or Node Directory entry. For example, the IP address of the database server in the Node Directory has changed.

Resolving The Problem

To change an entry in the Database or Node directory, it must first be uncataloged and then cataloged again with the new parameter value.

In the example of updating an IP address of a Node directory entry, the Node entry must be uncataloged and then cataloged again with the new IP address.


For example:

  1. Run the following command to list the current node entry:

    db2 list node directory

    Node name = DBSERV1
    Comment =
    Directory entry type = LOCAL
    Protocol = TCPIP
    Hostname = 192.124.11.102
    Service name = 50002
  2. db2 UNCATALOG NODE DB2SERV1
  3. db2 CATALOG TCPIP NODE DB2SERV1 REMOTE 192.124.11.152 SERVER 50002
  4. db2 TERMINATE

You would run similar commands to modify the Database directory, for example.
  1. db2 uncatalog db sample
  2. db2 catalog db sample at new_node
  3. db2 terminate

Note that the final 'db2 terminate' command is important. It stops the command line processor's backend process and flushes the old directory information from its cache.

Additional Note: However if you wish to only change the comment on the database catalog entry, you can do so using the CHANGE command. In this particular case there is no need to uncatalog if you are only changing the comment.

Example.

db2 "change db sample comment with 'new string'"


Related information

Configuration Assistant
CATALOG DATABASE command
CATALOG TCPIP NODE command
UNCATALOG DATABASE command
UNCATALOG NODE command
TERMINATE command
CHANGE DATABASE COMMENT command

Document information

More support for: DB2 for Linux, UNIX and Windows

Component: Connectivity - Cataloging

Software version: 9.7, 10.1, 10.5, 11.1

Operating system(s): AIX, HP-UX, Linux, Solaris, Windows

Software edition: Enterprise Server, Express, Personal, Personal Developer's, Workgroup Server

Reference #: 1381896

Modified date: 25 January 2019