16 Instantiating Oracle GoldenGate with an Initial Load
This chapter includes the following sections: Overview of the Initial-Load Procedure Loading Data with a Database Utility Loading Data with Oracle Data Pump Loading Data from File to Replicat Loading Data from File to Database Utility Loading Data with an Oracle GoldenGate Direct Load Loading Data with a Direct Bulk Load to SQL*Loader Loading Data with Teradata Load Utilities Overview of the Initial-Load Procedure Loading Data with a Database Utility Loading Data with Oracle Data Pump Loading Data from File to Replicat Loading Data from File to Database Utility Loading Data with an Oracle GoldenGate Direct Load Loading Data with a Direct Bulk Load to SQL*Loader Loading Data with Teradata Load Utilities
16.1 Overview of the Initial-Load Procedure
You can use Oracle GoldenGate to:
Perform a standalone batch load to populate database tables for migration or other purposes.
Load data into database tables as part of an initial synchronization run in preparation for change synchronization with Oracle GoldenGate.
Parent topic: Instantiating Oracle GoldenGate with an Initial Load
16.1.1 Improving the Performance of an Initial Load
For all initial load methods except those performed with a database utility, you can load large databases more quickly by using parallel Oracle GoldenGate processes. To use parallel processing, take the following steps.
- Follow the directions in this chapter for creating an initial-load Extract and an initial-load Replicat for each set of parallel processes that you want to use.
-
With the
TABLE andMAP parameters, specify a different set of tables for each pair of Extract-Replicat processes, or you can use theSQLPREDICATE option ofTABLE to partition the rows of large tables among the different Extract processes.
For all initial load methods, testing has shown that using the
TCPBUFSIZE option in the
RMTHOST parameter produced three times faster throughput than loads performed without it. Do not use this parameter if the target system is NonStop.
Parent topic: Overview of the Initial-Load Procedure
16.1.2 Prerequisites for Initial Load
Verify that you meet the prerequisites for executing an initial load that are described in the following sections.
Parent topic: Overview of the Initial-Load Procedure
16.1.2.1 Disable DDL Processing
Before executing an initial load, disable DDL extraction and replication. DDL processing is controlled by the
DDL parameter in the Extract and Replicat parameter files.
Parent topic: Prerequisites for Initial Load
16.1.2.2 Prepare the Target Tables
The following are suggestions that can make the load go faster and help you to avoid errors.
Data: Make certain that the target tables are empty. Otherwise, there may be duplicate-row errors or conflicts between existing rows and rows that are being loaded.
Constraints: Disable foreign-key constraints and check constraints. Foreign-key constraints can cause errors, and check constraints can slow down the loading process. Constraints can be reactivated after the load concludes successfully.
Indexes: Remove indexes from the target tables. Indexes are not necessary for inserts. They will slow down the loading process significantly. For each row that is inserted into a table, the database will update every index on that table. You can add back the indexes after the load is finished.
Note:
A primary index is required for all applications that access DB2 for z/OS target tables. You can delete all other indexes from the target tables, except for the primary index.
Keys: For Oracle GoldenGate to reconcile the replicated incremental data changes with the results of the load, each target table must have a primary or unique key. If you cannot create a key through your application, use the
KEYCOLS option of the
TABLE and
MAP parameters to specify columns as a substitute key for Oracle GoldenGate's purposes. A key helps identify which row to process. If you cannot create keys, the source database must be quiesced for the load.
Parent topic: Prerequisites for Initial Load
16.1.2.3 Configure the Manager Process
On the source and target systems, configure and start a Manager process. One Manager can be used for the initial-load processes and the change-synchronization processes. See Configuring Manager and Network Communications for more information.
Parent topic: Prerequisites for Initial Load
16.1.2.4 Create Change-synchronization Groups
To prepare for the capture and replication of transactional changes during the initial load, create online Extract and Replicat groups. You will start these groups during the load procedure. See Configuring Online Change Synchronization for more information.
Note:
If the load is performed from a quiet source database and will not be followed by continuous change synchronization, you can omit these groups.
Do not start the Extract or Replicat groups until instructed to do so in the initial-load instructions. Change synchronization keeps track of transactional changes while the load is being applied, and then the target tables are reconciled with those changes.
Note:
The first time that Extract starts in a new Oracle GoldenGate configuration, any open transactions will be skipped. Only transactions that begin after Extract starts are captured.
Parent topic: Prerequisites for Initial Load
16.1.2.5 Sharing Parameters between Process Groups
Some of the parameters that you use in a change-synchronization parameter file also are required in an initial-load Extract and initial-load Replicat parameter file. You can copy those parameters from one parameter file to another, or you can store them in a central file and use the
OBEY parameter in each parameter file to retrieve them. Alternatively, you can create an Oracle GoldenGate macro for the shared parameters and then call the macro from each parameter file with the
MACRO parameter.
See
Getting Started with the Oracle GoldenGate Process Interfaces for more information about using
OBEY and using macros.
Parent topic: Prerequisites for Initial Load
16.2 Loading Data with a Database Utility
To use a database copy utility to establish the target data, you start a change-synchronization Extract group to extract ongoing data changes while the database utility makes and applies a static copy of the data. When the copy is finished, you start the change-synchronization Replicat group to re-synchronize rows that were changed while the copy was being applied. From that point forward, both Extract and Replicat continue running to maintain data synchronization. This method does not involve any special initial-load Extract or Replicat processes.
Description of the illustration initsync_copyutil.jpg
Note:
The objects and data types being loaded in this method must be supported by Oracle GoldenGate for your database and also by the database utility that is being used. For items that are supported for your database, see the Oracle GoldenGate installation and configuration documentation for that database. For items that are supported by the database utility, see the database vendor's documentation.

Description of the illustration initsyncreplicat.jpg
Description of the illustration initsyncbulk.jpg
Description of the illustration initsync_dirload.jpg