IBM Books

Administrative API Reference

sqlfudb - Update Database Configuration

Modifies individual entries in a specific database configuration file.

A database configuration file resides on every node on which the database has been created.

Scope

This API only affects the node on which it is issued.

Authorization

One of the following:

Required Connection

Instance. An explicit attachment is not required. If the database is listed 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: Update Database Configuration */
/* ... */
SQL_API_RC SQL_API_FN
  sqlfudb (
    _SQLOLDCHAR * pDbAlias,
    unsigned short NumItems,
    struct sqlfupd * pItemList,
    struct sqlca * pSqlca);
/* ... */
 

Generic API Syntax



/* File: sqlutil.h */
/* API: Update Database Configuration */
/* ... */
SQL_API_RC SQL_API_FN
  sqlgudb (
    unsigned short DbAliasLen,
    unsigned short NumItems,
    unsigned short * pItemListLens,
    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 being modified. The minimum valid value is 1.

pItemListLens
Input. An array of 2-byte unsigned integers representing the length of each of the new configuration field values in the pItemList. It is necessary to provide lengths for those fields that contain strings only, such as newlogpath. If, for example, newlogpath is the fifth element in the pItemList array, its length must be the fifth element in the pItemListLens array.

pItemList
Input. Pointer to an array of NumItems sqlfupd structures, each containing a token field indicating which value to update, and a pointer field indicating the new 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.

REXX API Syntax



UPDATE DATABASE CONFIGURATION FOR dbname USING :values 

REXX API Parameters

dbname
Alias of the database associated with the configuration file.

values
A compound REXX host variable containing tokens indicating which configuration fields are to be modified. The application provides the token and the new value for each field. The following are elements of a variable, where XXX represents the host variable name:

XXX.0
Twice the number of fields supplied (number of data elements in the remainder of the variable)

XXX.1
First token

XXX.2
Value supplied for the first field

XXX.3
Second token

XXX.4
Value supplied for the second field

XXX.5
and so on.

Sample Programs

C
\sqllib\samples\c\dbconf.c

COBOL
\sqllib\samples\cobol\dbconf.cbl

FORTRAN
\sqllib\samples\fortran\dbconf.f

REXX
\sqllib\samples\rexx\dbconf.cmd

Usage Notes

To view or print a list of the database configuration parameters, use sqlfxdb - Get Database Configuration.

To view the default values for database configuration parameters, use sqlfddb - Get Database Configuration Defaults.

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

The default values of these parameters may differ for each type of database node configured (server, client, or server with remote clients). See the Administration Guide for the ranges and the default values that can be set on each node type. The valid token values for each configuration entry are listed in Table 51.

Not all parameters can be updated.

Most changes to the database configuration file become effective only after they are loaded into memory. All applications must disconnect from the database before this can occur.

If an error occurs, the database configuration file does not change.

The database configuration file cannot be updated if the checksum is invalid. This may occur if the database configuration file is changed without using the appropriate API. If this happens, the database must be restored to reset the database configuration file.

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

See Also

sqlfddb - Get Database Configuration Defaults

sqlfrdb - Reset 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 ]