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
Version
sqlenv.h
C API Syntax
/* File: sqlenv.h */ /* API: Catalog DCS Database */ /* ... */ SQL_API_RC SQL_API_FN sqlegdad ( struct sql_dir_entry * pDCSDirEntry, struct sqlca * pSqlca); /* ... */ |
Generic API Syntax
/* File: sqlenv.h */ /* API: Catalog DCS Database */ /* ... */ SQL_API_RC SQL_API_FN sqlggdad ( struct sqlca * pSqlca, struct sql_dir_entry * pDCSDirEntry); /* ... */ |
API Parameters
REXX API Syntax
CATALOG DCS DATABASE dbname [AS target_dbname] [AR arname] [PARMS parms] [WITH comment] |
REXX API Parameters
Sample Programs
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 sqlegdsc - Open DCS Directory Scan, sqlegdge - Get DCS Directory Entry for Database, sqlegdgt - Get DCS Directory Entries, and sqlegdcl - Close DCS Directory Scan.
Note: | If directory caching is enabled (see the configuration parameter dir_cache in sqlfxsys - 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 DB2's shared cache (server only), 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
sqlegdel - Uncatalog DCS Database.