IBM Books

Command Reference

CATALOG LOCAL NODE

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

ADMIN
Specifies that a local administration server node is to be cataloged.

NODE nodename
A local alias for the node to be cataloged. This is an arbitrary name on the user's workstation, used to identify the node. It should be a meaningful name to make it easier to remember. The name must conform to database manager naming conventions (see Appendix B. Naming Conventions).

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: OS2, AIX, WIN95, NT, HPUX, SUN, MVS, OS400, VM, VSE, SNI, SCO, and SGI.

WITH "comment-string"
Describes the node entry in the node directory. Any comment that helps to describe the node can be entered. Maximum length is 30 characters. A carriage return or a line feed character is not permitted. The comment text must be enclosed by single or double quotation marks.

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
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.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]

[ DB2 List of Books | Search the DB2 Books ]