Library Version 12.1.6.2

Impacts on Utility Programs
Prev | Chapter 2. Berkeley DB Server | Next

## Impacts on Utility Programs

All Berkeley DB utility programs can be run on environments and databases managed by Berkeley DB servers. For example, you can use `db_hotbackup` to backup databases, or `db_stat` to get database statistics.

The following constraints apply when running utility programs on managed environments and databases that are accessed simultaneously by other processes:

### Note

Constraints do not apply if the accessed environment or database has no client handles opened or if the server is offline.

- db_archive

  No constraint applies.

  ### Note

  If root.data and/or root.log are different from root.home, you need a `DB_CONFIG` file which sets the proper paths using the `add_data_dir` , or `set_lg_dir` configuration parameters.

- db_dump

  Options `-d, -R` and `-r` cannot be used on databases actively accessed by clients.

- db_load

  `db_load` cannot be used on databases actively accessed by clients.

  ### Note

  If root.blob is different from root.home, you need to set the proper blob path using the `-b` option.

- db_log_verify

  No constraint applies.

  ### Note

  If root.log is different from root.log, you need a `DB_CONFIG` file which sets the proper path using the `set_lg_dir` configuration parameter.

- db_printlog

  No constraint applies.

  ### Note

  If root.log is different from root.log, you need a `DB_CONFIG` file which sets the proper path using the `set_lg_dir` configuration parameter.

- db_recover

  `db_recover` cannot be used on environments actively accessed by clients.

  `db_recover` must have exclusive access to the environment being recovered. An alternative way to perform normal recovery of an environment is to open the environment with the `DB_RECOVER` flag from a client application.

- db_replicate

  `db_replicate` cannot be used on databases managed by Berkeley DB servers.

  ### Note

  Replication is not supported by Berkeley DB servers. Therefore, even when the server is offline, `db_replicate` still cannot be used on databases managed by Berkeley DB server.

- db_sql_codegen

  `db_sql_codegen` does not access environments or databases, and is irrelevant.

- dbsql

  `dbsql` cannot be used on databases managed by Berkeley DB servers because they are not created with the SQL APIs.

- db_stat

  Options `-r` and `-R` cannot be used on databases managed by Berkeley DB servers because replication is not supported.

- db_upgrade

  `db_upgrade` cannot be used on databases actively accessed by clients.

- db_verify

  `db_verify` cannot be used on databases actively accessed by clients.

  ### Note

  If root.blob is different from root.home, you need to set the proper blob path using the `-b` option.

- sqlite3

  `sqlite3` cannot be used on databases managed by Berkeley DB servers.

## Secondary Databases

To manage secondary keys created for secondary databases, an auxiliary database is maintained on the server for each secondary database. If the secondary database is file based, the auxiliary database is also file based. If the secondary database is in-memory, the auxiliary database is also in-memory.

For file-based auxiliary databases, its file name is constructed by appending `"__aux.db"` to the file name of its corresponding secondary database. For example, if the file name of a secondary database is `"secondary"`, the file name of its corresponding auxiliary database is `"secondary__aux.db"`.

Make sure that the auxiliary database is in sync with its corresponding secondary databases. Otherwise, operations on the secondary database may fail. For example, when backing up or restoring databases, the secondary databases and their corresponding auxiliary databases must be backed up or restored together. When restoring databases, the databases must be restored together.

Prev | Up | Next
Configuring the Server | Home | Chapter 3. Berkeley DB Client Driver APIs