sqleuncd API - Uncatalog a database from the system database directory
Deletes an entry from the system database directory.
Authorization
- SYSADM
- SYSCTRL
Required connection
None
API include file
sqlenv.h
API and data structure syntax
SQL_API_RC SQL_API_FN
sqleuncd (
_SQLOLDCHAR * pDbAlias,
struct sqlca * pSqlca);
SQL_API_RC SQL_API_FN
sqlguncd (
unsigned short DbAliasLen,
struct sqlca * pSqlca,
_SQLOLDCHAR * pDbAlias);
sqleuncd API parameters
- pDbAlias
- Input. A string containing the database alias that is to be uncataloged.
- pSqlca
- Output. A pointer to the sqlca structure.
sqlguncd API-specific parameters
- DbAliasLen
- Input. A 2-byte unsigned integer representing the length in bytes of the database alias.
Usage notes
Only entries in the system database directory can be uncataloged. Entries in the local database directory can be deleted using the sqledrpd API.
To recatalog the database, use the sqlecadb API.
To list the databases that are cataloged on a node, use the db2DbDirOpenScan, db2DbDirGetNextEntry, and db2DbDirCloseScan APIs.
The authentication type of a database, used when communicating with an earlier server, can be changed by first uncataloging the database, and then cataloging it again with a different type.
If directory caching is enabled using the dir_cache configuration parameter, 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 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
UNCATALOG DATABASE dbname
REXX API parameters
- dbname
- Alias of the database to be uncataloged.