Using the Oracle SQL*Loader to Load Initial-State Data

You can use the Oracle SQL*Loader to process and load initial-state data into an Oracle database. This process is supported in two modes: file mode and stream mode:

  • In file mode, initial-state data is received by the Event Replicator Target Adapter and stored in a DAT file prior to being sent to the Oracle SQL*Loader for processing. For more information about the DAT files created as part of this processing, read Processing Output

  • In stream mode, initial-state data is received by the Event Replicator Target Adapter and stored in memory prior to being sent to the Oracle SQL*Loader for processing. No DAT files are created.

Note:
The Oracle SQL*Loader can only be used with the Event Replicator Target Adapter to load initial-state data; it cannot be used for transactional data.

This document covers the following topics:


Prerequisites

The following prerequisites must be met before the Oracle SQL*Loader can be used to load initial-state data to an Oracle database, via the Event Replicator Target Adapter.

  • The Oracle utilities supporting the Oracle SQL*Loader must be installed on the same machine as the Event Replicator Target Adapter.

  • The Oracle Net Manager must be installed and configured if Oracle is running on a different machine than the Event Replicator Target Adapter.

  • If file mode is requested, be sure there is enough space to accommodate the DAT files that will be created by this processing.

Enabling Oracle SQL*Loader Initial-State Processing

Start of instruction setTo enable Oracle SQL*Loader initial-state processing:

  1. Using the Administration tool, configure a target definition for your Oracle database. For more information, read Configuring Target Definitions for Event Replicator Target Adapter.

  2. Using the Administration tool, create a specific target processing option definition for your Oracle database. For this definition you must:

    • Select the Use Loader check box (check it).

    • Provide a value for the Path field, identifying the full path of the Oracle SQL*Loader executable.

    • Specify the rows option in the Options field, specifying the number of rows you want to read from the data file before a data save is performed by the SQL*Loader.

    • Save the target processing option definition with the same name as the target definition you created in Step 1.

    You should also evaluate and optionally specify values for the following fields in this target processing option definition:

    • Service, which specifies the Oracle database service name that should be used with the Oracle SQL*Loader.

    • Environment File, which specifies the file name containing the Oracle environment variables that should be used with the Oracle SQL*Loader.

    • Use Stream, which indicates whether processing should be performed in stream mode or not.

    For more information about these options, read Specifying Target Database Processing Option Definitions.

  3. When all processing options are specified, start initial-state processing, directing the output to the Event Replicator Target Adapter via a GFFT you created (using the Data Mapping Tool or the Adabas Event Replicator Subsystem) for the Oracle database.

    For more information on this, read Requesting Initial-State Data.

    The Event Replicator Target Adapter will collect the initial-state records and send them to the Oracle SQL*Loader to be loaded to your Oracle database.

    Note:
    Some errors might prevent the Oracle SQL*Loader from restoring primary and foreign keys, indexes, and the unique index of tables. We recommend that you examine the Oracle SQL*Loader log files to determine if such an error occurred. For more information, read Processing Output.

Processing Output

The output from this processing includes:

  • Various Oracle SQL*Loader files used for its processing

  • Oracle SQL*Loader log files from the processing

  • DAT files containing the initial-state data received by the Event Replicator Target Adapter prior to being processed by the Oracle SQL*Loader.

All output files are written to the \logs subdirectory of your Event Replicator Target Adapter installation

This section covers the following topics:

Log Files

The Oracle SQL*Loader log files are stored in files that have names in the format xxxx_yymmdd_hhmmss.log, where xxxx is the table name, yymmdd is the date of the log file, and hhmmss is the time the log file was last written to.

We recommend that you review this log file carefully to ensure that the Oracle SQL*Loader had no problems restoring primary and foreign keys, indexes, or the unique index of tables.

DAT Files

DAT files are only created by the Event Replicator Target Adapter if you have selected Oracle SQL*Loader processing in file mode. If you select stream mode, these files are not created. These files can take a good deal of space, so make sure that there is enough space to accommodate them and be sure to manually delete them when initial-state processing has completed successfully.

The format of the DAT file names is xxxx_yymmdd_hhmmss.dat, where xxxx is the table name, yymmdd is the date of the DAT file, and hhmmss is the time the DAT file was last written to.