IBM Books

Administrative API Reference

sqlfddb - Get Database Configuration Defaults

Returns the default values of individual entries in a database configuration file.

Authorization

None

Required Connection

Instance. It is not necessary to call ATTACH before getting the configuration of a remote database. If the database is cataloged as remote, an instance attachment to the remote node is established for the duration of the call.

Version

sqlutil.h

C API Syntax



/* File: sqlutil.h */
/* API: Get Database Configuration Defaults */
/* ... */
SQL_API_RC SQL_API_FN
  sqlfddb (
    char * pDbAlias,
    unsigned short NumItems,
    struct sqlfupd * pItemList,
    struct sqlca * pSqlca);
/* ... */
 

Generic API Syntax



/* File: sqlutil.h */
/* API: Get Database Configuration Defaults */
/* ... */
SQL_API_RC SQL_API_FN
  sqlgddb (
    unsigned short DbAliasLen,
    unsigned short NumItems,
    struct sqlfupd * pItemList,
    struct sqlca * pSqlca,
    char * pDbAlias);
/* ... */
 

API Parameters

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

NumItems
Input. Number of entries to be returned. The minimum valid value is 1.

pItemList
Input/Output. Pointer to an array of NumItems sqlfupd structures, each containing a token field indicating which value to return, and a pointer field indicating where to place the configuration value. For more information about this structure, see SQLFUPD.

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

pDbAlias
Input. A string containing the database alias.

Sample Programs

C
\sqllib\samples\c\d_dbconf.c

COBOL
\sqllib\samples\cobol\d_dbconf.cbl

FORTRAN
\sqllib\samples\fortran\d_dbconf.f

Usage Notes

The application is responsible for allocating sufficient memory for each data element returned. For example, the value returned for newlogpath can be up to 242 bytes in length.

DB2 returns the current value of non-updatable parameters.

If an error occurs, the information returned is not valid. If the configuration file is invalid, an error message is returned. The database must be restored from a backup version.

To set the database configuration parameters to the recommended database manager defaults, use sqlfrdb - Reset Database Configuration.

For a brief description of the database configuration parameters, see the Command Reference. For more information about tuning these parameters, see the Administration Guide.

See Also

sqlfrdb - Reset Database Configuration

sqlfudb - Update Database Configuration

sqlfxdb - Get Database Configuration.


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

[ DB2 List of Books | Search the DB2 Books ]