Cataloging a database from a client by using the CLP
This task describes how to catalog a database from a client by using the command line processor (CLP).
Before you begin
Before a client application can access a remote database, the database must be cataloged on the client. When you create a database, the database is automatically cataloged on the server with a database alias that is the same as the database name, unless a different database alias was specified.
The information in the database directory, along with the information in the node directory (unless you are cataloging a local database where a node is not needed), is used on the IBM® data server client to establish a connection to the remote database.
- You require a valid Db2® user ID. Db2 does not support using root authority to catalog a database.
- You must have System Administrative (SYSADM) or System Controller (SYSCTRL) authority, or have the catalog_noauth option set to ON.
- You need the following information when cataloging a remote database:
- Database name
- Database alias
- Node name
- Authentication type (optional)
- Comment (optional)
- The following parameter values are applicable when cataloging
a local database:
- Database name
- Drive
- Database alias
- Authentication type (optional)
- Comment (optional)
Procedure
To catalog a database on the client:
Example
To catalog a remote database called SAMPLE so that it
has the local database alias MYSAMPLE, on the node DB2NODE using authentication SERVER,
enter the following commands:
db2 => catalog database sample as mysample at node db2node
authentication server
db2 => terminate