Skip Headers
Oracle® Identity Management User Reference
10g Release 2 (10.1.2)
B15883-01
  Go To Documentation Library
Home
Go To Product List
Solution Area
Go To Table Of Contents
Contents
Go To Index
Index

Previous
Previous
Next
Next
 

4.2 bulkload

The bulkload command-line tool is useful for loading large number of entries into a directory server. It uses Oracle SQL*Loader to load the directory entries. The bulkload tool expects the input file to be in LDAP Data Interchange Format (LDIF). See Appendix A, "LDIF File Format" for the correct format and syntax of an LDIF file.

Overview of the Bulk Loading Tool Operations

The Bulk Loading Tool performs its operations in the following phases:

  1. Check

    In the check phase, all entries of LDIF files are verified for valid LDAP schema and duplicate entries. The Bulk Loading Tool will report any errors, which must be corrected before proceeding.

  2. Generate

    In the generate phase, the LDIF input is converted into intermediate files that can be used by SQL*Loader to load the data into the Oracle Internet Directory directory store.

  3. Load

    The Intermediate files generated in generate phase are loaded into the Oracle Internet Directory directory store. The Bulk Loading Tool supports two types of loading of data:

    • Incremental Mode Loading

      Incremental mode enables you to append data to existing directory data. Loading in this mode is faster than other add methods, but slower than bulk mode loading.

      Use this mode when you want to append a small amount of data. Here, small amount is a relative number. It depends upon existing data in directory, the amount of data to be loaded, and the hardware capabilities to handle the load.

      In this mode, the Bulk Loading Tool does not drop and rebuild catalog indexes. Instead, it uses SQL*Loader in insert mode to add data to the database and update indexes through inserts.

    • Bulk Mode Loading

      In bulk mode, you must be able to add or append large number of entries to a directory. By default, the Bulk Loading Tool runs in bulk mode. Bulk mode is faster than incremental mode.

      In bulk mode, all Oracle Internet Directory server instances should be stopped. In this mode, the Bulk Loading Tool drops existing indexes and re-creates them after loading of data. For data loading, it uses SQL*Loader direct-path mode.

  4. Index Creation

    After the load is complete, the indexes are re-created if the load was done in bulk mode. Also, the Bulk Loading Tool provides an option just to re-create all indexes. This is useful in case if previous index creation was unsuccessful for some reason.

  5. Directory Data Recovery

    A failure in the load phase can leave directory data in an inconsistent state. The Bulk Loading Tool can revert back to original state that existed prior to the invocation of bulkload.

Before Using the bulkload Tool

Before running the bulkload tool:

  1. Stop your Oracle Internet Directory server instance(s) before loading data in bulk mode.

  2. If loading data in incremental mode, you do not need to stop the directory server, although you will need to put the directory server in read-modify mode. Read-modify mode restricts add, delete, and modify DN operations.

  3. If loading an LDIF file with data from an older version of Oracle Internet Directory, see the Oracle Application Server Upgrade and Compatibility Guide for any special instructions about upgrading orclguids before you begin.

4.2.1 Syntax for bulkload

bulkload.sh -connect connect_string {-check -file_name ldif_file} |  {-generate -file_name ldif_file [-numthread number] [-restore]} | {-load [-append] [-parallel]} | -recover | -index} [-encode character_set]

4.2.2 Arguments for bulkload

-connect connect_string

Required. The directory database connect string. If you already have a tnsnames.ora file configured, then this is the net service name specified in that file, which is located in $ORACLE_HOME/network/admin. For loading data in single node, specify its connect string—for example orcl. For loading data in multiple nodes, specify connect strings of all nodes—for example, orcl1 orcl2 orcl3.

-check | -generate | -load | -recover | -index

Required. The operation to perform. The operations are:

  • -check - Checks the LDIF file provided for schema inconsistencies and for duplicate entry DNs. You must provide the full path and file name of an LDIF file. The check and generate operations can be issued at the same time.

  • -generate - Creates intermediate files suitable for loading entries into Oracle Internet Directory using SQL*Loader. You must provide the full path and file name of an LDIF file from which to generate entries. The check and generate operations can be issued at the same time.

  • -load - Loads the files generated in the generate operation into the database. You must run a generate operation before a load operation.

  • -recover - In case of a failure during a load operation, recovers the directory with the original data.

  • -index - Recreates indexes on all catalog tables.

-file_name ldif_file

Required for the check and generate operations. The fully qualified path and file name of the LDIF file that contains the entries you want to load.

-numthread number

Optional for the generate operation. The number of threads to create. The default value is the number of CPUs on the machine plus one.

-restore

Optional with the generate or check operation. Assumes operational attributes, such as orclguid, creatorsname, and createtimestamp, are already present in the specified LDIF file. When used with the generate operation, duplicate operational attribute values are not created in the output SQL*Loader files. When used with the check operation, errors associated pre-existing operational attribute values are suppressed.

-parallel

Optional with the load operation. Loads entries and creates indexes in parallel.

-append

Optional with the load operation. Loads entries in incremental mode rather than bulk mode, which is the default. Incremental mode appends data to existing directory data, and is intended for loading small amounts of data.

-encode "character_set"

Optional. The native character set encoding. Defaults to the character set of the user's terminal. Each supported character set has a unique acronym, for example, WE8MSWIN1252, JA16SJIS, or AL32UTF8.

4.2.3 Tasks and Examples for bulkload

Using the bulkload tool, you can perform the following tasks:

4.2.3.1 Loading Data in Bulk Mode for a Single Node

The typical usage scenario is to load directory data after Oracle Internet Directory installation. First check the LDIF file for schema errors, then generate the intermediate files, and finally load the data into the Oracle Internet Directory store.

The following example shows how to run a check, generate, and load operation in one invocation of the bulkload tool. You can also run each operation on its own. The parallel argument makes the load and index creation happen in parallel, which is faster.

Example:

bulkload.sh -connect orcl -check -generate -load -parallel ~/myfiles/data.ldif

4.2.3.2 Loading Data in Bulk Mode for Multiple Nodes

To bulk load data into multiple nodes at once, specify the connect strings of all the Oracle Internet Directory nodes involved. Enclose multiple connect strings in quotes. The Bulk Loading Tool operates on one node at a time. The first node must complete successfully before the next node begins.

Example:

bulkload.sh -connect "orcl1 orcl2 orcl3" -check -generate -load -parallel ~/myfiles/data.ldif

4.2.3.3 Loading Data for Multiple Nodes in a Replicated Environment

After generating a file with the generate option, you can use the load option to load multiple computers with the identical SQL*Loader file. Do this only when creating a new replica node.

When you load the same data into multiple nodes in a replicated network, ensure that the orclGUID parameter (global ID) is consistent across all the nodes. You can accomplish this by generating the bulk load data file once only (using the generate argument), and then using the same data file to load the other nodes (using the load argument).

4.2.3.4 Loading Data in Incremental Mode

If you need to add directory entries to an Oracle Internet Directory store already containing some user LDIF data, use the append argument to denote incremental mode. This mode is normally faster than other methods of adding entries to the directory. However, be sure that the directory server instances are in read-modify mode before you begin. The following example shows how to run bulkload in incremental mode.

Example:

bulkload.sh -connect orcl -check -generate -load -append ~/myfiles/data.ldif

4.2.3.5 Recreating Indexes

The load operation either updates or creates the indexes. However, due to issues like improper sizing, the indexes may not be updated or created properly. For this reason, the bulkload tool enables you to re-create all the indexes.

Example:

bulkload.sh -connect orcl -index

4.2.3.6 Recovering Data After a Load Error

Due to issues like improper disk sizing, the load operation may fail. If this happens, then directory data can be inconsistent. For this reason, bulkload enables you to recover the directory data to the state that existed prior to the invocation of bulkload.

Example:

bulkload.sh -connect orcl -recover

4.2.4 Related Command-Line Tools for bulkload