CATALOG LOCAL NODE command
The 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
- SYSADM
- SYSCTRL
Required connection
None
Command syntax
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, and LINUX.
Examples
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): - Create a local database at
inst1
:db2 create database mydb1
- Catalog another server instance on this workstation:
db2 catalog local node mynode2 instance inst2
- 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 the shared cache in Db2, stop (db2stop) and then restart (db2start) the database manager. To refresh the directory cache for another application, stop and then restart that application.