DB2 Version 9.7 for Linux, UNIX, and Windows

CATALOG LOCAL NODE command

Creates a local alias for an instance that resides on the same machine. A local node should be cataloged when there is more than one instance on the same workstation to be accessed from the user's client. Interprocess Communications (IPC) is used to access the local node.

Authorization

One of the following:
  • sysadm
  • sysctrl

Required connection

None

Command syntax

Read syntax diagramSkip visual syntax diagram
>>-CATALOG--+-------+--LOCAL NODE--nodename--------------------->
            '-ADMIN-'                         

>--+------------------------+--+---------------------+---------->
   '-INSTANCE--instancename-'  '-SYSTEM--system-name-'   

>--+-------------------------------+---------------------------->
   '-OSTYPE--operating-system-type-'   

>--+------------------------+----------------------------------><
   '-WITH--"comment-string"-'   

Command parameters

ADMIN
Specifies that a local administration server node is to be cataloged.
INSTANCE instancename
Name of the local instance to be accessed.
SYSTEM system-name
Specifies the DB2® system name that is used to identify the server machine.
OSTYPE operating-system-type
Specifies the operating system type of the server machine. Valid values are: AIX®, WIN, HPUX, SUN, OS390, OS400, VM, VSE, SNI, SCO, LINUX and DYNIX.

Examples

Workstation A has two server instances, inst1 and inst2. To create databases at both instances from a single CLP session, issue the following sequence of commands (assume the DB2INSTANCE environment variable is set to inst1):
  1. Create a local database at inst1:
       db2 create database mydb1
  2. Catalog another server instance on this workstation:
       db2 catalog local node mynode2 instance inst2
  3. Create a database at mynode2:
       db2 attach to mynode2
       db2 create database mydb2

Usage notes

If directory caching is enabled, database, node, and DCS directory files are cached in memory. An application's directory cache is created during its first directory lookup. Since the cache is only refreshed when the application modifies any of the directory files, directory changes made by other applications might not be effective until the application has restarted.

To refresh the CLP's directory cache, use TERMINATE. To refresh DB2's shared cache, stop (db2stop) and then restart (db2start) the database manager. To refresh the directory cache for another application, stop and then restart that application.