Before a client application can access a remote database, the database must be cataloged on the host system node and on any DB2 Connect workstation nodes that will connect to it. When you create a database, it is automatically cataloged on the host with the database alias (database_alias) the same as the database name (database_name). The information in the database directory, along with the information in the node directory, is used on the DB2 Connect workstation to establish a connection to the remote database.
To catalog a database on the DB2 Connect Workstation, perform the following steps.
Step 1. | Log on to the system as a user with System Administrative (SYSADM) or System Controller (SYSCTRL) authority. | ||||||||||||||||
Step 2. | Fill in the Your Value column in the following
worksheet.
Table 7. Worksheet: Parameter Values for Cataloging Databases
| ||||||||||||||||
Step 3. | Set up the instance environment and invoke the DB2 command line processor. Run the start-up script as follows: . INSTHOME/sqllib/db2profile (for Bourne or Korn shell) source INSTHOME/sqllib/db2cshrc (for C shell) where INSTHOME is the home directory of the instance. | ||||||||||||||||
Step 4. | Catalog the database by entering the following commands in the command line processor: db2 catalog database database_name as database_alias at node node_name db2 terminate For example, to catalog the DCS known database ny so that it has the local database alias localny, on the node db2node, enter the following commands: db2 catalog database ny as localny at node db2node db2 terminate
|