IBM Books

Administrative API Reference

sqleuncd - Uncatalog Database

Deletes an entry from the system database directory.

Authorization

One of the following:

Required Connection

None

Version

sqlenv.h

C API Syntax



/* File: sqlenv.h */
/* API: Uncatalog Database */
/* ... */
SQL_API_RC SQL_API_FN
  sqleuncd (
    _SQLOLDCHAR * pDbAlias,
    struct sqlca * pSqlca);
/* ... */
 

Generic API Syntax



/* File: sqlenv.h */
/* API: Uncatalog Database */
/* ... */
SQL_API_RC SQL_API_FN
  sqlguncd (
    unsigned short DbAliasLen,
    struct sqlca * pSqlca,
    _SQLOLDCHAR * pDbAlias);
/* ... */
 

API Parameters

DbAliasLen
Input. A 2-byte unsigned integer representing the length in bytes of the database alias.

pSqlca
Output. A pointer to the sqlca structure. For more information about this structure, see SQLCA.

pDbAlias
Input. A string containing the database alias that is to be uncataloged.

REXX API Syntax



UNCATALOG DATABASE dbname

REXX API Parameters

dbname
Alias of the database to be uncataloged.

Sample Programs

C
\sqllib\samples\c\dbcat.c

COBOL
\sqllib\samples\cobol\dbcat.cbl

FORTRAN
\sqllib\samples\fortran\dbcat.f

REXX
\sqllib\samples\rexx\dbcat.cmd

Usage Notes

Only entries in the system database directory can be uncataloged. Entries in the local database directory can be deleted using sqledrpd - Drop Database.

To recatalog the database, use sqlecadb - Catalog Database.

To list the databases that are cataloged on a node, use sqledosd - Open Database Directory Scan, sqledgne - Get Next Database Directory Entry, and sqledcls - Close Database Directory Scan.

The authentication type of a database, used when communicating with a down-level server, can be changed by first uncataloging the database, and then cataloging it again with a different type.

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

sqlecadb - Catalog Database

sqledcls - Close Database Directory Scan

sqledgne - Get Next Database Directory Entry

sqledosd - Open Database Directory Scan.


[ Top of Page | Previous Page | Next Page | Table of Contents | Index ]

[ DB2 List of Books | Search the DB2 Books ]