Chapter 5.  The DB_ENV Handle

The DB_ENV object is the handle for a Berkeley DB environment — a collection including support for some or all of caching, locking, logging and transaction subsystems, as well as databases and log files. Methods of the DB_ENV handle are used to configure the environment as well as to operate on subsystems and databases in the environment.

DB_ENV handles are created using the db_env_create method, and are opened using the DB_ENV->open() method.

When you are done using your environment, close it using the DB_ENV->close() method. Before closing your environment, make sure all open database handles are closed first. See the DB->close() method for more information.

Database Environments and Related Methods