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:
Required Connection
None
Command Syntax
>>-CATALOG--+-------+--LOCAL NODE--nodename---------------------> '-ADMIN-' >-----+-------------------------+---+----------------------+----> '-INSTANCE--instancename--' '-SYSTEM--system-name--' >-----+--------------------------------+------------------------> '-OSTYPE--operating-system-type--' >-----+-------------------------+------------------------------>< '-WITH--"comment-string"--'
Command Parameters
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):
db2 create database mydb1
db2 catalog local node mynode2 instance inst2
db2 attach to mynode2 db2 create database mydb2
Usage Notes
Note: | If directory caching is enabled (see the configuration parameter dir_cache in GET DATABASE MANAGER CONFIGURATION), 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 may 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.