Command Reference

CATALOG DCS DATABASE

Stores information about remote databases in the Database Connection Services (DCS) directory. These databases are accessed through an Application Requester (AR), such as DB2 Connect. Having a DCS directory entry with a database name matching a database name in the system database directory invokes the specified AR to forward SQL requests to the remote server where the database resides. For more information about DB2 Connect and DCS directory entries, see the DB2 Connect User's Guide.

Authorization

One of the following:

Required Connection

None

Command Syntax

>>-CATALOG DCS----+-DATABASE-+--database-name------------------->
                  '-DB-------'
 
>-----+---------------------------+---+-------------------+----->
      '-AS--target-database-name--'   '-AR--library-name--'
 
>-----+----------------------------+---------------------------->
      '-PARMS--"parameter-string"--'
 
>-----+-------------------------+------------------------------><
      '-WITH--"comment-string"--'
 

Command Parameters

DATABASE database-name
Specifies the alias of the target database to catalog. This alias must match the database name entered during the remote cataloging of this database in the system database directory.

AS target-database-name
Specifies the name of the target host database to catalog.

AR library-name
Specifies the name of the Application Requester library that is loaded and used to access a remote database listed in the DCS directory.
Note:If using the DB2 Connect AR, do not specify a library name. The default value will cause DB2 Connect to be invoked.

If not using DB2 Connect, specify the library name of the AR, and place that library on the same path as the database manager libraries. On OS/2 or the Windows operating system, the path is drive:\sqllib\dll. On UNIX based systems, the path is $HOME/sqllib/lib of the instance owner.

PARMS "parameter-string"
Specifies a parameter string that is to be passed to the AR when it is invoked. The parameter string must be enclosed by double quotation marks.

WITH "comment-string"
Describes the DCS directory entry. Any comment that helps to describe the database cataloged in this directory 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 double quotation marks.

Examples

The following example catalogs information about the DB1 database, which is a DB2 for MVS host database, into the DCS directory:

   db2 catalog dcs database db1 as dsn_db_1
      with "DB2/MVS location name DSN_DB_1"

Usage Notes

The DB2 Connect program provides connections to DRDA Application Servers such as:

The database manager creates a Database Connection Services directory if one does not exist. This directory is stored on the path that contains the database manager instance that is being used. The DCS directory is maintained outside of the database.

The database must also be cataloged as a remote database in the system database directory.

List the contents of the DCS directory using LIST DCS DIRECTORY.
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.

See Also

UNCATALOG DCS DATABASE.


[ Top of Page | Previous Page | Next Page ]