Precise Instantiation Using the Initial Load Method for Db2 for i
Oracle GoldenGate supports instantiation using initial load method and database utilities. The following topics describe the steps to perform instantiation using the initial load method.
Parameter Settings for Initial Load Extract and Replicat
To use Replicat to establish the target data, you use an initial-load Extract to capture records from the source tables and write them to an Extract file in canonical format. From the file, an initial-load Replicat loads the data using the database interface. During the load, the change-synchronization groups capture and replicate incremental changes, which are then reconciled with the results of the load.
During the load, the records are applied to the target database one record at a time, so this method may be considerably slower than using a native Db2 for i load utility. This method permits data transformation to be done on either the source or target system.
To Configure a Load from File to Replicat
Perform Instantiation from File to Replicat Using Initial Laod
-
Make certain that you have addressed the requirements in Prerequisites for Instantiating for Db2 for i.
-
Connect to the source deployment, in not connected already.
-
On the source system, start the primary Extract or Extract groups to start change extraction.
START EXTRACT primary Extract group name
-
From the directory where Oracle GoldenGate is installed on the source system, start the initial-load Extract as follows:
$ START EXTRACT
initial-load Extract name
REPORTFILEpath name
Where:
initial-load Extract name
is the name of the initial-load Extract that you used when creating the parameter file, andpath name
is the relative or fully qualified name of the Extract report file. -
Verify the progress and results of the initial extraction by viewing the Extract report file using the operating system's standard method for viewing files.
-
Wait until the initial extraction is finished.
-
On the target system, start the initial-load Replicat.
$ START REPLICAT
initial-load Replicat name
REPORTFILEpath name
Where:
initial-load Replicat name
is the name of the initial-load Replicat that you used when creating the parameter file, andpath name
is the relative or fully qualified name of the Replicat report file. -
When the initial-load Replicat is finished running, verify the results by viewing the Replicat report file using the operating system's standard method for viewing files.
-
On the target system, start change replication.
START REPLICAT
Replicat group name
-
On the target system, issue the following command to verify the status of change replication.
INFO REPLICAT
Replicat group name
-
Continue to issue the
INFO REPLICAT
command until you have verified that Replicat posted all of the change data that was generated during the initial load. For example, if the initial-load Extract stopped at 12:05, make sure Replicat posted data up to that point. -
On the target system, issue the following command to turn off the
HANDLECOLLISIONS
parameter and disable the initial-load error handling.SEND REPLICAT
Replicat group name
, NOHANDLECOLLISIONS -
On the target system, edit the Replicat parameter file to remove the
HANDLECOLLISIONS
parameter. This preventsHANDLECOLLISIONS
from being enabled again the next time Replicat starts.Caution:
Do not use the
VIEW PARAMS
orEDIT PARAMS
command to view or edit an existing parameter file that is in a character set other than that of the local operating system (such as one where theCHARSET
option was used to specify a different character set). View the parameter file from outside Admin Client if this is the case; otherwise, the contents may become corrupted. -
Save and close the parameter file.
From this point forward, Oracle GoldenGate continues to synchronize data changes.