DB2 10.5 for Linux, UNIX, and Windows

sqlegdad API - Catalog a database in the database connection services (DCS) directory

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.

Authorization

One of the following authorities:
  • SYSADM
  • SYSCTRL

Required connection

None

API include file

sqlenv.h

API and data structure syntax

SQL_API_RC SQL_API_FN
  sqlegdad (
        struct sql_dir_entry * pDCSDirEntry,
        struct sqlca * pSqlca);

SQL_API_RC SQL_API_FN
  sqlggdad (
        struct sqlca * pSqlca,
        struct sql_dir_entry * pDCSDirEntry);

sqlegdad API parameters

pDCSDirEntry
Input. A pointer to an sql_dir_entry (Database Connection Services directory) structure.
pSqlca
Output. A pointer to the sqlca structure.

Usage notes

The DB2 Connect program provides connections to DRDA® Application Servers such as:
  • DB2® for OS/390® 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
  • OS/400® databases on Power® System Servers

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.

Note: 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 shared cache (server only) 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.

REXX API syntax

CATALOG DCS DATABASE dbname [AS target_dbname]
[AR arname] [PARMS parms] [WITH comment]

REXX API parameters

dbname
The local database name of the directory entry to be added.
target_dbname
The target database name.
arname
The application client name.
parms
Parameter string. If specified, the string must be enclosed by double quotation marks.
comment
Description associated with the entry. Maximum length is 30 characters. Enclose the comment by double quotation marks.