7321N/A<?xml version="1.0" encoding="UTF-8"?>
7321N/A<!--
7321N/A ! CCPL HEADER START
7321N/A !
7321N/A ! This work is licensed under the Creative Commons
7321N/A ! Attribution-NonCommercial-NoDerivs 3.0 Unported License.
7321N/A ! To view a copy of this license, visit
7321N/A ! http://creativecommons.org/licenses/by-nc-nd/3.0/
7321N/A ! or send a letter to Creative Commons, 444 Castro Street,
7321N/A ! Suite 900, Mountain View, California, 94041, USA.
7321N/A !
7321N/A ! You can also obtain a copy of the license at
7321N/A ! trunk/opendj3/legal-notices/CC-BY-NC-ND.txt.
7321N/A ! See the License for the specific language governing permissions
7321N/A ! and limitations under the License.
7321N/A !
7321N/A ! If applicable, add the following below this CCPL HEADER, with the fields
7321N/A ! enclosed by brackets "[]" replaced with your own identifying information:
7321N/A ! Portions Copyright [yyyy] [name of copyright owner]
7321N/A !
7321N/A ! CCPL HEADER END
7321N/A !
7321N/A ! Copyright 2011-2015 ForgeRock AS.
7321N/A !
7321N/A-->
7321N/A<refentry xml:id='dbtest-1'
7321N/A xmlns='http://docbook.org/ns/docbook'
7321N/A version='5.0' xml:lang='en'
7321N/A xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
7321N/A xsi:schemaLocation='http://docbook.org/ns/docbook
7321N/A http://docbook.org/xml/5.0/xsd/docbook.xsd'>
7321N/A <info><copyright><year>2011-2015</year><holder>ForgeRock AS.</holder></copyright></info>
7321N/A <refmeta>
7321N/A <refentrytitle>dbtest</refentrytitle><manvolnum>1</manvolnum>
7321N/A <refmiscinfo class="software">OpenDJ</refmiscinfo>
7321N/A <refmiscinfo class="version"><?eval ${docTargetVersion}?></refmiscinfo>
7321N/A </refmeta>
7321N/A <refnamediv>
7321N/A <refname>dbtest</refname>
7321N/A <refpurpose>gather OpenDJ JE database debugging information</refpurpose>
7321N/A </refnamediv>
7321N/A <refsynopsisdiv>
7321N/A <cmdsynopsis>
7321N/A <command>dbtest <replaceable>subcommand</replaceable></command> <arg>options</arg>
7321N/A </cmdsynopsis>
7321N/A </refsynopsisdiv>
7321N/A <refsect1>
7321N/A <title>Description</title>
7321N/A <para>This utility can be used to debug the JE database.</para>
7321N/A </refsect1>
7321N/A <refsect1>
7321N/A <title>Subcommands</title>
7321N/A <para>The following subcommands are supported.</para>
7321N/A <variablelist>
7321N/A <varlistentry>
7321N/A <term><command>dbtest dump-database-container</command></term>
7321N/A <listitem>
7321N/A <para>Dump records from a database container</para>
7321N/A
7321N/A <para>
7321N/A Depending on database size, this subcommand can generate lots of output.
7321N/A </para>
7321N/A </listitem>
7321N/A </varlistentry>
7321N/A <varlistentry>
7321N/A <term><command>dbtest list-database-containers</command></term>
7321N/A <listitem>
7321N/A <para>List the database containers for an entry container</para>
7321N/A </listitem>
7321N/A </varlistentry>
7321N/A <varlistentry>
7321N/A <term><command>dbtest list-entry-containers</command></term>
7321N/A <listitem>
7321N/A <para>List the entry containers for a root container</para>
7321N/A </listitem>
7321N/A </varlistentry>
7321N/A <varlistentry>
7321N/A <term><command>dbtest list-index-status</command></term>
7321N/A <listitem>
7321N/A <para>List the status of indexes in an entry container</para>
7321N/A
7321N/A <para>
7321N/A This command can take a long time to complete,
7321N/A as it reads all indexes for all backends.
7321N/A </para>
7321N/A
7321N/A <para>
7321N/A When you list index status, the result is a table,
7321N/A followed by a "Total", which is the total number of indexes,
7321N/A followed by a list of indexes with "Undefined keys" to show
7321N/A the values for which the number of entries exceeded the index entry limit.
7321N/A The table has the following columns.
7321N/A </para>
7321N/A
7321N/A <variablelist>
7321N/A <varlistentry>
7321N/A <term>Index Name</term>
7321N/A <listitem>
7321N/A <para>
7321N/A Name of the index,
7321N/A which takes the form <replaceable>attr.type</replaceable>
7321N/A for attribute indexes,
7321N/A and vlv.<replaceable>name</replaceable> for VLV indexes.
7321N/A Some indexes are for OpenDJ directory server's internal use.
7321N/A </para>
7321N/A
7321N/A <para>
7321N/A Example: <literal>givenName.substring</literal>
7321N/A </para>
7321N/A </listitem>
7321N/A </varlistentry>
7321N/A
7321N/A <varlistentry>
7321N/A <term>Index Type</term>
7321N/A <listitem>
7321N/A <para>
7321N/A Type of the index,
7321N/A which is <literal>Index</literal> for attribute indexes,
7321N/A and <literal>VLVIndex</literal> for VLV indexes.
7321N/A </para>
7321N/A </listitem>
7321N/A </varlistentry>
7321N/A
7321N/A <varlistentry>
7321N/A <term>JE Database Name</term>
7321N/A <listitem>
7321N/A <para>
7321N/A Name of the Berkeley Java Edition database,
7321N/A which reflects how OpenDJ directory server
7321N/A organizes the data in the database.
7321N/A </para>
7321N/A
7321N/A <para>
7321N/A Example: <literal>dc_example_dc_com_givenName.substring</literal>
7321N/A </para>
7321N/A </listitem>
7321N/A </varlistentry>
7321N/A
7321N/A <varlistentry>
7321N/A <term>Index Valid</term>
7321N/A <listitem>
7321N/A <para>
7321N/A This is <literal>true</literal> for valid indexes.
7321N/A If this is <literal>false</literal>,
7321N/A the index might be degraded.
7321N/A Verify the index, and rebuild the index if necessary.
7321N/A </para>
7321N/A </listitem>
7321N/A </varlistentry>
7321N/A
7321N/A <varlistentry>
7321N/A <term>Record Count</term>
7321N/A <listitem>
7321N/A <para>
7321N/A Number of indexed keys.
7321N/A Use the <command>dbtest dump-database-container</command> command
7321N/A to see how many entry IDs correspond to each key.
7321N/A </para>
7321N/A </listitem>
7321N/A </varlistentry>
7321N/A
7321N/A <varlistentry>
7321N/A <term>Undefined</term>
7321N/A <listitem>
7321N/A <para>
7321N/A Number of keys for which there are too many values
7321N/A to maintain an index, based on the index entry limit.
7321N/A This is recorded as <literal>-</literal> for VLV indexes.
7321N/A </para>
7321N/A
7321N/A <para>
7321N/A In other words, with the default index entry limit of 4000,
7321N/A if every user in your large directory has a mail address
7321N/A ending in <literal>@example.com</literal>,
7321N/A and a substring index is maintained for <literal>mail</literal>,
7321N/A then OpenDJ directory server does not maintain indexes for
7321N/A keys corresponding to substrings in <literal>@example.com</literal>.
7321N/A </para>
7321N/A
7321N/A <para>
7321N/A As a result, an LDAP search with the filter
7321N/A <literal>"(mail=*@example.com)"</literal> becomes an unindexed search
7321N/A even though a substring index exists for the mail attribute.
7321N/A By default OpenDJ directory server does not allow unindexed searches
7321N/A except by privileged users.
7321N/A This is usually exactly the behavior you want
7321N/A in order to prevent client applications for example
7321N/A from sending searches that return every user in the directory.
7321N/A Clients should refine their search filters instead.
7321N/A </para>
7321N/A </listitem>
7321N/A </varlistentry>
7321N/A
7321N/A <varlistentry>
7321N/A <term>95%, 90%, 85%</term>
7321N/A <listitem>
7321N/A <para>
7321N/A Number of keys for which the number of values is approaching
7321N/A the index entry limit, having reached the specified percentage.
7321N/A This is a measure of how full the entry ID lists are.
7321N/A </para>
7321N/A </listitem>
7321N/A </varlistentry>
7321N/A </variablelist>
7321N/A </listitem>
7321N/A </varlistentry>
7321N/A <varlistentry>
7321N/A <term><command>dbtest list-root-containers</command></term>
7321N/A <listitem>
7321N/A <para>List the root containers used by all JE backends</para>
7321N/A </listitem>
7321N/A </varlistentry>
7321N/A </variablelist>
7321N/A </refsect1>
7321N/A <refsect1>
7321N/A <title>Options</title>
7321N/A <para>The following global options are supported.</para>
7321N/A <para>For other options, see <command>dbtest
7321N/A <replaceable>subcommand</replaceable> --help</command>.</para>
7321N/A <variablelist>
7321N/A <varlistentry>
7321N/A <term><option>--version</option></term>
7321N/A <listitem>
7321N/A <para>Display version information</para>
7321N/A </listitem>
7321N/A </varlistentry>
7321N/A <varlistentry>
7321N/A <term><option>-?, -H, --help</option></term>
7321N/A <listitem>
7321N/A <para>Display usage information</para>
7321N/A </listitem>
7321N/A </varlistentry>
7321N/A </variablelist>
7321N/A </refsect1>
7321N/A <refsect1>
7321N/A <title>Exit Codes</title>
7321N/A <variablelist>
7321N/A <varlistentry>
7321N/A <term>0</term>
7321N/A <listitem>
7321N/A <para>The command completed successfully.</para>
7321N/A </listitem>
7321N/A </varlistentry>
7321N/A <varlistentry>
7321N/A <term>&gt; 0</term>
7321N/A <listitem>
7321N/A <para>An error occurred.</para>
7321N/A </listitem>
7321N/A </varlistentry>
7321N/A </variablelist>
7321N/A </refsect1>
7321N/A <refsect1>
7321N/A <title>Examples</title>
7321N/A <para>The following example displays debugging information about the
7321N/A equality index for <literal>sudoUser</literal>.</para>
7321N/A
7321N/A <screen>
7321N/A$ <userinput>dbtest dump-database-container -n userRoot -b dc=example,dc=com \
7321N/A -d sudoUser.equality</userinput>
7321N/A<computeroutput>Indexed Value (6 bytes): %admin
7321N/AEntry ID List (8 bytes): 165
7321N/A
7321N/AIndexed Value (5 bytes): %sudo
7321N/AEntry ID List (8 bytes): 164
7321N/A
7321N/AIndexed Value (4 bytes): root
7321N/AEntry ID List (8 bytes): 163
7321N/A
7321N/A
7321N/ATotal Records: 3
7321N/ATotal / Average Key Size: 13 bytes / 4 bytes
7321N/ATotal / Average Data Size: 24 bytes / 8 bytes</computeroutput>
7321N/A </screen>
7321N/A </refsect1>
7321N/A</refentry>