<?xml version="1.0" encoding="UTF-8"?>
<!--
! CCPL HEADER START
!
! This work is licensed under the Creative Commons
! Attribution-NonCommercial-NoDerivs 3.0 Unported License.
! To view a copy of this license, visit
! http://creativecommons.org/licenses/by-nc-nd/3.0/
! or send a letter to Creative Commons, 444 Castro Street,
! Suite 900, Mountain View, California, 94041, USA.
!
! You can also obtain a copy of the license at
! trunk/opendj3/legal-notices/CC-BY-NC-ND.txt.
! See the License for the specific language governing permissions
! and limitations under the License.
!
! If applicable, add the following below this CCPL HEADER, with the fields
! enclosed by brackets "[]" replaced with your own identifying information:
! Portions Copyright [yyyy] [name of copyright owner]
!
! CCPL HEADER END
!
! Copyright 2011-2012 ForgeRock AS
! Portions Copyright 2013 Jens Elkner
!
-->
<refentry xml:id="dbtest-1" xmlns="http://docbook.org/ns/docbook" version="5.0"
xml:lang="en" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://docbook.org/ns/docbook http://docbook.org/xml/5.0/xsd/docbook.xsd"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xi="http://www.w3.org/2001/XInclude">
<xi:include href="common.xml" xpointer='xpointer(//info[@name="info"])'/>
<refmeta>
<refentrytitle><application>dbtest</application></refentrytitle>
<xi:include href="common.xml" xpointer='xpointer(//manvolnum[@name="v1m"])'/>
</refmeta>
<refnamediv>
<refname><application>dbtest</application></refname>
<refpurpose>gather OpenDJ JE database debugging information</refpurpose>
</refnamediv>
<refsynopsisdiv>
<cmdsynopsis>
<command>dbtest</command>
<xi:include href="common.xml"
xpointer='xpointer(//para[@name="s-general"]/*)'/>
</cmdsynopsis>
<cmdsynopsis>
<command>dbtest</command>
<arg choice="plain">dump-database-container</arg>
<arg>-n <replaceable class="parameter">backendId</replaceable></arg>
<arg>-b <replaceable class="parameter">baseDN</replaceable></arg>
<arg>-d <replaceable class="parameter">dbName</replaceable></arg>
<arg>-p</arg>
<arg>-q</arg>
<arg>-K <replaceable class="parameter">maxKeyVal</replaceable></arg>
<arg>-k <replaceable class="parameter">minKeyVal</replaceable></arg>
<arg>-S <replaceable class="parameter">maxDataSz</replaceable></arg>
<arg>-s <replaceable class="parameter">minDataSz</replaceable></arg>
<xi:include href="common.xml"
xpointer='xpointer(//para[@name="s-general"]/*)'/>
</cmdsynopsis>
<cmdsynopsis>
<command>dbtest</command>
<arg choice="plain">list-database-containers</arg>
<arg>-n <replaceable class="parameter">backendId</replaceable></arg>
<arg>-b <replaceable class="parameter">baseDN</replaceable></arg>
<xi:include href="common.xml"
xpointer='xpointer(//para[@name="s-general"]/*)'/>
</cmdsynopsis>
<cmdsynopsis>
<command>dbtest</command>
<arg choice="plain">list-entry-containers</arg>
<arg>-n <replaceable class="parameter">backendId</replaceable></arg>
<xi:include href="common.xml"
xpointer='xpointer(//para[@name="s-general"]/*)'/>
</cmdsynopsis>
<cmdsynopsis>
<command>dbtest</command>
<arg choice="plain">list-index-status</arg>
<arg>-n <replaceable class="parameter">backendId</replaceable></arg>
<arg>-b <replaceable class="parameter">baseDN</replaceable></arg>
<xi:include href="common.xml"
xpointer='xpointer(//para[@name="s-general"]/*)'/>
</cmdsynopsis>
<cmdsynopsis>
<command>dbtest</command>
<arg choice="plain">list-root-containers</arg>
<xi:include href="common.xml"
xpointer='xpointer(//para[@name="s-general"]/*)'/>
</cmdsynopsis>
</refsynopsisdiv>
<refsection>
<title>Description</title>
<para>
This utility can be used to debug the JE database.
</para>
</refsection>
<refsection>
<title>Subcommands</title>
<para>
The following subcommands are supported.
</para>
<variablelist>
<varlistentry>
<term><command>dbtest dump-database-container</command></term>
<listitem>
<para>
Dump records from a database container.
The following options are supported:
</para>
<variablelist>
<varlistentry>
<term><option>-n, --backendID</option> <replaceable
class="parameter">backendName</replaceable></term>
<listitem>
<para>
The backend ID of the JE backend to debug.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-b, --baseDN</option> <replaceable
class="parameter">baseDN</replaceable></term>
<listitem>
<para>
The base DN of the entry container to debug.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-d, --databaseName</option> <replaceable
class="parameter">dbName</replaceable></term>
<listitem>
<para>
The name of the database container to debug.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-p, --skipDecode</option></term>
<listitem>
<para>
Do not try to decode the JE data to their appropriate types.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-q, --statsOnly</option></term>
<listitem>
<para>
Do not display the JE data, just statistics.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-K, --maxKeyValue</option> <replaceable
class="parameter">value</replaceable></term>
<listitem>
<para>
Only show records with keys that should be ordered before the provided value
using the comparator for the database container.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-k, --minKeyValue</option> <replaceable
class="parameter">value</replaceable></term>
<listitem>
<para>
Only show records with keys that should be ordered after the provided value
using the comparator for the database container.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-S, --maxDataSize</option> <replaceable
class="parameter">value</replaceable></term>
<listitem>
<para>
Only show records whose data is no larger than the provided value (Default: -1).
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-s, --minDataSize</option> <replaceable
class="parameter">value</replaceable></term>
<listitem>
<para>
Only show records whose data is no smaller than the provided value (Default: -1).
</para>
</listitem>
</varlistentry>
</variablelist>
</listitem>
</varlistentry>
<varlistentry>
<term><command>dbtest list-database-containers</command></term>
<listitem>
<para>
List the database containers for an entry container.
The following options are supported:
</para>
<variablelist>
<varlistentry>
<term><option>-n, --backendID</option> <replaceable
class="parameter">backendName</replaceable></term>
<listitem>
<para>
The backend ID of the JE backend to debug.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><option>-b, --baseDN</option> <replaceable
class="parameter">baseDN</replaceable></term>
<listitem>
<para>
The base DN of the entry container to debug.
</para>
</listitem>
</varlistentry>
</variablelist>
</listitem>
</varlistentry>
<varlistentry>
<term><command>dbtest list-entry-containers</command></term>
<listitem>
<para>
List the entry containers for a root container.
The following options are supported:
</para>
<variablelist>
<varlistentry>
<term><option>-n, --backendID</option> <replaceable
class="parameter">backendName</replaceable></term>
<listitem>
<para>
The backend ID of the JE backend to debug.
</para>
</listitem>
</varlistentry>
</variablelist>
</listitem>
</varlistentry>
<varlistentry>
<term><command>dbtest list-index-status</command></term>
<listitem>
<para>
List the status of indexes in an entry container.
The following options are supported:
</para>
<variablelist>
<varlistentry>
<term><option>-n, --backendID</option> <replaceable
class="parameter">backendName</replaceable></term>
<listitem>
<para>
The backend ID of the JE backend to debug.
</para>
</listitem>
</varlistentry>
</variablelist>
<varlistentry>
<term><option>-b, --baseDN</option> <replaceable
class="parameter">baseDN</replaceable></term>
<listitem>
<para>
The base DN of the entry container to debug.
</para>
</listitem>
</varlistentry>
</listitem>
</varlistentry>
<varlistentry>
<term><command>dbtest list-root-containers</command></term>
<listitem>
<para>
List the root containers used by all JE backends.
</para>
</listitem>
</varlistentry>
</variablelist>
</refsection>
<refsection>
<title>Options</title>
<para>
The following global options are supported.
</para>
<variablelist>
<xi:include href="common.xml"
xpointer='xpointer(//para[@name="l-general"]/*)'/>
</variablelist>
</refsection>
<refsection>
<title>Examples</title>
<informalexample>
<para>
The following example displays debugging information about the equality index
for <acronym>sudoUser</acronym>.
</para>
<literallayout><prompt
>$ </prompt><command>dbtest dump-database-container -n userRoot \
-b dc=example,dc=com -d sudoUser.equality</command></literallayout>
<screen>
Indexed Value (6 bytes): %admin
Entry ID List (8 bytes): 165
Indexed Value (5 bytes): %sudo
Entry ID List (8 bytes): 164
Indexed Value (4 bytes): root
Entry ID List (8 bytes): 163
Total Records: 3
Total / Average Key Size: 13 bytes / 4 bytes
Total / Average Data Size: 24 bytes / 8 bytes
</screen>
</informalexample>
</refsection>
<xi:include href="common.xml" xpointer='xpointer(//refsection[@name="env"])'/>
<xi:include href="common.xml" xpointer='xpointer(//refsection[@name="exit-0-gt0"])'/>
<xi:include href="common.xml" xpointer='xpointer(//refsection[@name="seeAlso"])'/>
</refentry>