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
>>-CATALOG DCS----+-DATABASE-+--database-name-------------------> '-DB-------' >-----+---------------------------+---+-------------------+-----> '-AS--target-database-name--' '-AR--library-name--' >-----+----------------------------+----------------------------> '-PARMS--"parameter-string"--' >-----+-------------------------+------------------------------>< '-WITH--"comment-string"--'
Command Parameters
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.
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