The CATALOG DCS DATABASE command stores information about remote host or System i® 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.


one of the following authorities:

Required connection


Command syntax

Read syntax diagramSkip visual syntax diagramCATALOG DCSDATABASEDBdatabase-nameAStarget-database-nameARlibrary-namePARMS"parameter-string"WITH"comment-string"

Command parameters

DATABASE database-name
Specifies the alias of the target database to catalog. This name should match the name of an entry in the database directory that is associated with the remote database partition server.
AS target-database-name
Specifies the name of the target host or System i 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.

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 Windows operating systems, the path is drive:\sqllib\bin. On Linux® and UNIX operating 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. For more information about the parameter string, refer to the "DCS directory values" topic through the Related concepts section.
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.


The following example catalogs information about the DB1 database, which is a Db2® for z/OS® database, into the DCS directory:
   db2 catalog dcs database db1 as dsn_db_1
      with "DB2/z/OS location name DSN_DB_1"

Usage notes

The Db2 Connect program provides connections to DRDA Application Servers such as:
  • Db2 for z/OS databases on System/370 and System/390® architecture host computers.
  • Db2 for VM and VSE databases on System/370 and System/390 architecture host computers.
  • System i databases on Application System/400 (System i) and System i computers.

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 thesystem database directory .

List the contents of the DCS directory using the LIST DCS DIRECTORY command.

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 the TERMINATE command. 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.