JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Oracle Fusion Middleware Command-Line Usage Guide for Oracle Unified Directory 11g Release 1 (11.1.1)
search filter icon
search icon

Document Information

Preface

1.  Server Administration Commands

2.  Data Administration Commands

backup

Synopsis

Description

Options

Task Back End Connection Options

Task Scheduling Options

Command Input/Output Options

General Options

Examples

Exit Codes

Using a Properties File

Location

Related Commands

base64

Synopsis

Description

Subcommands

Global Options

Examples

Exit Codes

Location

dbtest

Synopsis

Description

Subcommands

Global Options

Examples

Exit Codes

Location

Related Commands

export-ldif

Synopsis

Description

Options

Task Back End Connection Options

Task Scheduling Options

Command Input/Output Options

General Options

Examples

Exit Codes

Using a Properties File

Location

Related Commands

import-ldif

Synopsis

Description

Options

Task Back End Connection Options

Task Scheduling Options

Command Input/Output Options

General Options

Examples

Exit Codes

Using a Properties File

Location

Related Commands

list-backends

Synopsis

Description

Options

Command Options

General Options

Examples

Exit Codes

Location

manage-account

Synopsis

Description

Subcommands

Options

LDAP Connection Options

General Options

Examples

Exit Codes

Location

Related Commands

rebuild-index

Synopsis

Description

Options

Command Options

Task Back End Connection Options

Task Scheduling Options

Utility Input/Output Options

General Options

Examples

Exit Codes

Location

Related Commands

restore

Synopsis

Description

Options

Task Back End Connection Options

Task Scheduling Options

Command Input/Output Options

General Options

Examples

Exit Codes

Using a Properties File

Location

Related Commands

split-ldif

Synopsis

Description

Options

Global Index Options

Split Options

General Options

Examples

Location

Related Commands

verify-index

Synopsis

Description

Options

Command Options

General Options

Examples

Exit Codes

Location

Related Commands

3.  LDAP Client Commands

4.  Other Commands

5.  General Command-Line Usage Information

rebuild-index

The rebuild-index command rebuilds a directory server index.

This command is not supported for the proxy.

Synopsis

rebuild-index options

Description

The rebuild-index command is used to rebuild directory server indexes. Indexes are files that contain lists of values, where each value is associated with a list of entry identifiers to suffixes in the directory server database. When the directory server processes a search request, it searches the database using the list of entry identifiers in the indexes, thus speeding up the search. If indexes did not exist, the directory server would have to look up each entry in the database, which dramatically degrades performance.

The rebuild-index command is useful in the following cases:

The rebuild-index command can be run with the server online. However, the backend database is unavailable while rebuild-index is running. Also, the rebuild-index command usually runs faster with the server offline, especially if the --rebuildAll option is specified.

Options

The rebuild-index command accepts an option in either its short form (for example, -b baseDN) or its long form equivalent (for example, --baseDN baseDN).

Command Options

-b, --baseDN baseDN

Specify the base DN of a back end that supports indexing. The rebuild operation is performed on indexes within the scope of the given base DN.

-i, --index index

Specify the name of the indexes to rebuild. For an attribute index, this is simply an attribute name. At least one index must be specified for rebuild.

--rebuildAll

Rebuild all indexes that are contained in the back end that is specified by the base DN. This option not only re-indexes all attribute indexes but also the dn2id system index, any extensible and VLV indexes, and the dn2uri index. The rebuildAll option cannot be used with the -i option.

--tmpDirectory

Specify the location of a temporary work directory for scratch index files. The default temporary work directory is install-dir/import-tmp.

Task Back End Connection Options

Rebuilding an index online requires access to the tasks back end. Access to the tasks back end is provided over SSL through the administration connector. These connection options are used when the rebuild runs online.

-D, --bindDN bindDN

Use the bind DN to authenticate to the directory server. This option is used when performing simple authentication and is not required if SASL authentication is used. The default value for this option is cn=Directory Manager.

-h, --hostname hostname

Contact the directory server on the specified hostname or IP address. If this option is not provided, a default of localhost is used.

-j, --bindPasswordFile filename

Use the bind password in the specified file when authenticating to the directory server. This option must not be used in conjunction with --bindPassword.

-K, --keyStorePath path

Use the client keystore certificate in the specified path.

-N, --certNickname nickname

Use the specified certificate for client authentication.

-o, --saslOption name=value

Use the specified options for SASL authentication .

-p, --port port

Contact the directory server at the specified administration port. If this option is not provided, the default administration port of 4444 is used.

-P, --trustStorePath path

Use the client trust store certificate in the specified path. This option is not needed if --trustAll is used, although a trust store should be used when working in a production environment.

-T, --trustStorePassword password

Use the password needed to access the certificates in the client trust store. This option is only required if --trustStorePath is used and the specified trust store requires a password in order to access its contents (which most trust stores do not require). This option must not be used in conjunction with --trustStorePasswordFile.

-u, --keyStorePasswordFile filename

Use the password in the specified file to access the certificates in the client keystore. This option is only required if --keyStorePath is used. This option must not be used in conjunction with --keyStorePassword.

-U, --trustStorePasswordFile filename

Use the password in the specified file to access the certificates in the client trust store. This option is only required if --trustStorePath is used and the specified trust store requires a password in order to access its contents (most trust stores do not require this). This option must not be used in conjunction with --trustStorePassword.

-w, --bindPassword password

Use the bind password when authenticating to the directory server. This option can be used for simple authentication as well as password-based SASL mechanisms. This option must not be used in conjunction with --bindPasswordFile. To prompt for the password, type -w -.

-W, --keyStorePassword password

Use the password needed to access the certificates in the client keystore. This option is only required if --keyStorePath is used. This option must not be used in conjunction with --keyStorePasswordFile.

-X, --trustAll

Trust all server SSL certificates that the directory server presents. This option can be used for convenience and testing purposes, but for security reasons a trust store should be used to determine whether the client should accept the server certificate.

Task Scheduling Options

These options are used when you specify that the index should be rebuilt as a scheduled task.

--completionNotify emailAddress

Specify the email address of a recipient to be notified when the task completes. This option can be specified more than once in a single command.

--dependency taskId

Specify the ID of a task upon which this task depends. A task does not start executing until all of its dependencies have completed execution.

--errorNotify emailAddress

Specify the email address of a recipient to be notified if an error occurs when this task executes. This option can be specified more than once in a single command.

--failedDependencyAction action

Specify the action that this task will take if one of its dependent tasks fails. The value must be one of PROCESS, CANCEL, or DISABLE. If no value is specified, the default action is CANCEL.

--recurringTask schedulePattern

Indicates that the task is recurring and will be scheduled according to the schedulePattern, expressed as a crontab(5) compatible time and date pattern.

-t, --start startTime

Indicates the date and time at which the operation starts when scheduled as a directory server task expressed in the format YYYYMMDDhhmmss. A value of 0 schedules the task for immediate execution. When this option is specified, the operation is scheduled to start at the specified time after which the command exits immediately.

Utility Input/Output Options

--propertiesFilePath propertiesFilePath

Path to the file containing default property values used for command line

--noPropertiesFile

No properties file will be used to get default command line argument values.

General Options

-?, -H, --help

Display command-line usage information for the command and exit without making any attempt to stop or restart the directory server.

-V, --version

Display the version information for the directory server and exit rather than attempting to run this command.

Examples

The following examples show how to use the directory server commands. See System Requirements and Certification in Oracle Fusion Middleware Installation Guide for Oracle Unified Directory for more information.

Example 2-35 Rebuilding an Index

First, display a list of indexes by using the dsconfig command. The command specifies the subcommand list-je-indexes, the port (-p), the back-end name userRoot (-n), the bind DN (-D), and the bind password (-w) and displays the indexes for the given back end:

$ dsconfig -h localhost -p 4444 -D "cn=Directory Manager" -w password -X -n \
  list-local-db-indexes --backend-name userRoot

Local DB Index  : Type    : index-type
----------------:---------:--------------------
aci             : generic : presence
cn              : generic : equality, substring
ds-sync-hist    : generic : ordering
entryUUID       : generic : equality
givenName       : generic : equality, substring
mail            : generic : equality, substring
member          : generic : equality
objectClass     : generic : equality
sn              : generic : equality, substring
telephoneNumber : generic : equality, substring
uid             : generic : equality
uniqueMember    : generic : equality

The following command rebuilds indexes (-i) with a base DN (-b).

Because this command runs offline, the directory server must be stopped before you run it.

$ rebuild-index -b dc=example,dc=com -i uid -i mail

[31/Jul/2007:01:51:59 -0500] category=BACKEND severity=NOTICE msgID=8388745 msg
Rebuild of index(es) uid, mail started with 320 total records to process
[31/Jul/2007:01:52:00 -0500] category=BACKEND severity=NOTICE msgID=8388741 msg
Rebuild complete. Processed 320 records in 0 seconds (average rate 445.7/sec)

Example 2-36 Rebuilding All Indexes

This example uses the --rebuildAll option to rebuild all indexes.

$ rebuild-index -b "dc=example,dc=com" --rebuildAll

Example 2-37 Rebuilding Extensible Indexes

You can rebuild an extensible index in any of three ways:

Exit Codes

An exit code of 0 indicates that the operation completed successfully. An exit code of 1 indicates that an error occurred during processing.

Location

Related Commands