Library Version 18.1.40

DB_CONFIG configuration file
Prev | Chapter 9. The Berkeley DB Environment | Next

## DB_CONFIG configuration file

Almost all of the configuration information that can be specified to DB_ENV class methods can also be specified using a configuration file. `DB_ENV->open()` checks for a readable `DB_CONFIG` file in the environment home directory. If it can be opened it will be read for lines of the format NAME VALUE or NAME SUBNAME VALUE. Any settings found there will override configuration settings by the corresponding `DB_ENV` API calls.

One or more whitespace characters are used to delimit the two parts of the line, and leading and trailing whitespace characters are discarded. All empty lines or lines whose first non-whitespace character is a hash (#) character will be ignored. Each line must specify both the NAME and the VALUE of the pair. The specific NAME VALUE pairs are documented in the manual for the corresponding methods (for example, the DB_ENV->add_data_dir() documentation includes NAME VALUE pair information Berkeley DB administrators can use to configure locations for database files).

The DB_CONFIG configuration file is intended to allow database environment administrators to customize environments independent of applications using the environment. For example, a database administrator can move the database log and data files to a different location without application recompilation. In addition, because the DB_CONFIG file is read when the database environment is opened, it can be used to overrule application configuration done before that time. For example a database administrator could override the compiled-in application cache size to a size more appropriate for a specific machine.

Prev | Up | Next
Error support | Home | File naming