Inspect the contents of Directory Server local DB backends that store their information in Berkeley DB Java Edition databases. Only backends of type local DB can be inspected by this tool.
Each local DB backend has a root container, identified by backend ID. Each root container has an entry container for each base DN in the backend, identified by base DN. Each entry container has a number of database containers that store entries, attribute indexes and system indexes. The dbtest command allows the contents of root containers, entry containers and database containers to be inspected.
List all information about all local DB backends and their containers:
dbtest list-all
List and analyze all local DB backends and their containers:
dbtest list-all --analyze
List the root containers of all local DB backends:
dbtest list-root-containers
List the entry containers of the userRoot backend:
dbtest list-entry-containers --backendID userRoot
List the database containers of all the entry containers of the userRoot backend:
dbtest list-database-containers --backendID userRoot
List and analyze the database containers of all the entry containers of the userRoot backend and print statistical information:
dbtest list-database-containers --backendID userRoot --analyze
Dump the id2entry database container of the entry container with base DN 'dc=example,dc=com' in the userRoot backend:
dbtest dump-database-container --backendID userRoot --baseDN dc=example,dc=com \ --databaseName id2entry
List the status of indexes in the userRoot backend that are in the entry container with the base DN 'dc=example,dc=com':
dbtest list-index-status --backendID userRoot --baseDN dc=example,dc=com
Dump information about the attribute description tokens defined for a backend
Dump information about the attribute description tokens defined in the 'userRoot' backend:
dbtest dump-attribute-tokens --backendID userRoot
-n {backendName}
--backendID {backendName}
Description | The backend ID of the local DB backend to debug |
Required | Yes |
Multi-Valued | No |
Dump records from a database container
There are options to dump only records in a specified key range or to dump only records with a minimum or maximum data size
Dump the id2entry database container of the entry container with base DN 'dc=example,dc=com' in the userRoot backend:
dbtest dump-database-container --backendID userRoot --baseDN dc=example,dc=com \ --databaseName id2entry
-n {backendName}
--backendID {backendName}
Description | The backend ID of the local DB backend to debug |
Required | Yes |
Multi-Valued | No |
-b {baseDN}
--baseDN {baseDN}
Description | The base DN of the entry container to debug |
Required | Yes |
Multi-Valued | No |
-d {databaseName}
--databaseName {databaseName}
Description | The name of the database container to debug |
Required | Yes |
Multi-Valued | No |
-p
--skipDecode
Description | Do not try to decode the JE data to their appropriate types |
-K {maxKeyValue}
--maxKeyValue {maxKeyValue}
Description | Only show records with keys that should be ordered before the provided value using the comparator for the database container |
Required | No |
Multi-Valued | No |
-k {minKeyValue}
--minKeyValue {minKeyValue}
Description | Only show records with keys that should be ordered after the provided value using the comparator for the database container |
Required | No |
Multi-Valued | No |
-S {maxDataSize}
--maxDataSize {maxDataSize}
Description | Only show records whose data is no larger than the provided value |
Default Value | -1 |
Required | No |
Multi-Valued | No |
-s {minDataSize}
--minDataSize {minDataSize}
Description | Only show records whose data is no smaller than the provided value |
Default Value | -1 |
Required | No |
Multi-Valued | No |
-l
--onlyExceedingLimit
Description | Only dump index information for keys that have exceeded the index entry limit |
--entryFilter {filter}
Description | An optional filter that can be used to indicate which entries to include in the output. This is only applicable when dumping the id2entry database container, and if it is not provided, then all entries will be included |
Required | No |
Multi-Valued | No |
-u
--summarize
Description | Only print a summary of each record in the specified database |
Dump information about the parent DN tokens defined in a backend
-n {backendName}
--backendID {backendName}
Description | The backend ID of the local DB backend to debug |
Required | Yes |
Multi-Valued | No |
Dump information from a backend's metadata database
Dump information about the metadata database for the 'userRoot' backend:
dbtest dump-metadata --backendID userRoot
-n {backendName}
--backendID {backendName}
Description | The backend ID of the local DB backend to debug |
Required | Yes |
Multi-Valued | No |
Dump information about the object class set tokens defined for a backend
Dump information about the object class set tokens defined in the 'userRoot' backend:
dbtest dump-object-class-tokens --backendID userRoot
Dump information about the parent DN tokens defined in the 'userRoot' backend:
dbtest dump-object-class-tokens --backendID userRoot
-n {backendName}
--backendID {backendName}
Description | The backend ID of the local DB backend to debug |
Required | Yes |
Multi-Valued | No |
List all information about all local DB backends and their containers
The information listed includes the backend ID and the database directory for all root containers, the base DN, the JE database prefix, and the number of entries for all entry containers, the database name, type, and the number of records for all database containers. Depending on the number of backends, indexes, and entries, this operation could take a while to complete
List all information about all local DB backends and their containers:
dbtest list-all
List and analyze all local DB backends and their containers:
dbtest list-all --analyze
-a
--analyze
Description | Analyze all database containers and include total key/data size, average key/data size, max key/data size, and the histogram of the overall distribution of key/data sizes in the output. Analyzing large databases with millions of entries may take a significantly longer time to complete |
List the database containers for an entry container
Information listed for a database container includes the database name and type, and the number of records in the database container
List the database containers of all the entry containers of the userRoot backend:
dbtest list-database-containers --backendID userRoot
List and analyze the database containers of all the entry containers of the userRoot backend and print statistical information:
dbtest list-database-containers --backendID userRoot --analyze
-n {backendName}
--backendID {backendName}
Description | The backend ID of the local DB backend to debug |
Required | Yes |
Multi-Valued | No |
-b {baseDN}
--baseDN {baseDN}
Description | The base DN of the entry container to debug |
Required | No |
Multi-Valued | No |
-d {databaseName}
--databaseName {databaseName}
Description | The name of the database container to debug |
Required | No |
Multi-Valued | No |
-a
--analyze
Description | Analyze all database containers and include total key/data size, average key/data size, max key/data size, and the histogram of the overall distribution of key/data sizes in the output. Analyzing large databases with millions of entries may take a significantly longer time to complete |
List the entry containers for a root container
The information listed for an entry container includes the base DN, the JE database prefix and the number of entries
List the entry containers of the userRoot backend:
dbtest list-entry-containers --backendID userRoot
-n {backendName}
--backendID {backendName}
Description | The backend ID of the local DB backend to debug |
Required | Yes |
Multi-Valued | No |
List the status of indexes in an entry container
Information listed for an index includes the index name and an indication as to whether the contents of the index are trusted. If the contents of an index are not trusted, then it must be rebuilt with the rebuild-index command
List the status of indexes in the userRoot backend that are in the entry container with the base DN 'dc=example,dc=com':
dbtest list-index-status --backendID userRoot --baseDN dc=example,dc=com
-n {backendName}
--backendID {backendName}
Description | The backend ID of the local DB backend to debug |
Required | Yes |
Multi-Valued | No |
-b {baseDN}
--baseDN {baseDN}
Description | The base DN of the entry container to debug |
Required | Yes |
Multi-Valued | Yes |
List the root containers used by all local DB backends
The information listed for a root container includes the backend ID and the database directory