|Skip Navigation Links|
|Exit Print View|
|Oracle Fusion Middleware Command-Line Usage Guide for Oracle Unified Directory 11g Release 1 (11.1.1)|
The verify-index command validates directory index data.
This command is not supported for the proxy.
The verify-index command can be used to check the consistency between the index and entry data within the directory server database. This command also provides information about the number of index keys that have reached the index entry limit.
The command checks the following information:
All entries are properly indexed
All index data reference entries exist
Data matches the corresponding index data
At the present time, this command is only available for a directory server back end that uses Oracle Berkeley DB Java Edition to store its information. None of the other back end types currently available maintain on-disk indexes. Therefore, there is no need to have any command that can verify index consistency.
Directory administrators can use this command when the directory server is running or stopped. Note, however, that using verify-index when the server is running impacts the overall performance of the directory server as well as the command. For example, on a very busy online server, the verify-index command could take significantly longer to process compared to running the command on an offline, or stopped, directory server.
To use this command, the --baseDN option must be used to specify the base DN of the back end below which to perform the validation.
The verify-index command accepts an option in either its short form (for example, -b baseDN) or its long form equivalent (for example, --baseDN baseDN).
Specify the base DN for which to perform the verification. The provided value must be a base DN for a back end based on the Berkeley DB Java Edition. This is a required option, and only one base DN may be provided.
Verify that an index is “clean”, which means that all of the entry IDs in all of the index keys refer to entries that actually exist and match the criteria for that index key. If this option is provided, then exactly one index should be specified using the --index option. If this option is not given, then the verification process will clean the id2entry database (which is a mapping of each entry ID to the actual data for that entry) and ensure that all of the entry contents are properly indexed.
Count the number of errors found during the verification and return that value as the exit code. Values greater than 255 will be returned as 255 due to exit code restrictions.
Specify the name of an index for which to perform the verification. If the --clean option is provided, then this argument must be provided exactly once. Otherwise, it may be specified zero or more times. If the option is not provided, then all indexes will be checked. For an attribute index, the index name should be the name of the attribute, and an index must be configured for that attribute in the associated back end. You can also specify the following internal indexes, which are used internally on the server:
A mapping of entry DNs to their corresponding entry IDs.
A mapping of the entry ID for an entry to the entry IDs of its immediate children.
A mapping of the entry ID for an entry to the entry IDs of all of its subordinates.
Display command-line usage information for the command and exit without making any attempt to stop or restart the server.
Display the version information for the directory server and exit rather than attempting to run this command.
The following examples show how to use the directory server commands. For more information, see System Requirements and Certification in Oracle Fusion Middleware Installation Guide for Oracle Unified Directory.
Example 2-44 Verifying an Index
The following command verifies that the uid index (-i uid) under dc=example,dc=com (-b dc=example,dc=com) is “clean” (-c). This “clean” option checks that each entry in the uid index maps to an actual database entry with the uid attribute.
$ verify-index -b dc=example,dc=com -c -i uid [26/Jul/2007:16:42:31 -0500] category=BACKEND severity=NOTICE msgID=8388709 msg=Checked 150 records and found 0 error(s) in 0 seconds (average rate 331.1/sec)
Example 2-45 Verifying an Index and Counting Errors
The following command counts the number of discrepancies (--countErrors) in the sn (surname) index (-i sn) under the dc=example,dc=com base DN (-b dc=example,dc=com):
$ verify-index -b dc=example,dc=com -c -i sn --countErrors [31/Jul/2007:02:23:52 -0500] category=BACKEND severity=NOTICE msgID=8388709 msg= Checked 466 records and found 0 error(s) in 0 seconds (average rate 1298.1/sec) [31/Jul/2007:02:23:52 -0500] category=BACKEND severity=NOTICE msgID=8388710 msg= Number of records referencing more than one entry: 225 [31/Jul/2007:02:23:52 -0500] category=BACKEND severity=NOTICE msgID=8388711 msg= Number of records that exceed the entry limit: 0 [31/Jul/2007:02:23:52 -0500] category=BACKEND severity=NOTICE msgID=8388712 msg= Average number of entries referenced is 2.59/record [31/Jul/2007:02:23:52 -0500] category=BACKEND severity=NOTICE msgID=8388713 msg= Maximum number of entries referenced by any record is 150
An exit code of 0 indicates that the operation completed successfully. An exit code of 1 or greater indicates that an error occurred during processing.
UNIX and Linux: instance-dir/OUD/bin/verify-index