- Using Oracle GoldenGate Classic Architecture with Oracle Database
- Configuring the Initial Load for Classic Architecture
- Configuring a Load from an Input File to SQL*Loader
Configuring a Load from an Input File to SQL*Loader
With this method, an initial-load Extract extracts source records from the source tables and writes them to an extract file in external ASCII format. The files are read by SQL*Loader. During the load, the change-synchronization groups that you configured in Chapter 4 replicate incremental changes, which are then reconciled with the results of the load. As part of the load procedure, Oracle GoldenGate uses the initial-load Replicat to create run and control files required by the database utility. Any data transformation must be performed by the initial-load Extract on the source system because the control files are generated dynamically and cannot be pre-configured with transformation rules.
To Configure a Load from File to SQL*Loader
- On the source and target systems, run GGSCI.
- Start Manager on both systems.
START MANAGER
- On the source system, create the initial-load Extract parameter file.
EDIT PARAMS
initial-load Extract
- Enter the initial-load Extract parameters in the order shown, starting a new line for each parameter statement. This example shows a three-part table name associated with a multitenant container database.
SOURCEISTABLE USERIDALIAS tiger1 RMTHOST fin1, MGRPORT 7809 ENCRYPT AES192, KEYNAME securekey2 ENCRYPTTRAIL AES192 FORMATASCII, SQLLOADER RMTFILE /ggs/dirdat/ie TABLE hq.hr.*;
Parameter Description SOURCEISTABLE
Designates Extract as an initial load process that extracts records directly from the source tables.
USERIDALIAS
alias
Specifies the alias of the database login credential that is assigned to Extract. This credential must exist in the Oracle GoldenGate credential store, see Establishing Oracle GoldenGate Credentials
RMTHOST
hostname
, MGRPORT
portnumber
[, ENCRYPT
algorithm
KEYNAME
keyname
]
Specifies the target system, the port where Manager is running, and optional encryption of data across TCP/IP.
ENCRYPTTRAIL
algorithm
Encrypts the data in the remote file. For more information.
FORMATASCII, SQLLOADER
Produces a fixed-length, ASCII-formatted remote file that is compatible with SQL*Loader. This parameter must be listed before
RMTFILE
.RMTFILE
path
Specifies the absolute or full path name of an extract file that Extract creates and to which it writes the load data.
TABLE
[container.]schema.table
;
Specifies the tables to capture.
-
container
is the name of the pluggable database, if this is a multitenant container database. You can use theSOURCECATALOG
parameter to specify a default pluggable database instead of using three-part names. -
schema
is the schema name. -
table
is the table name.
-
- Save and close the parameter file.
- On the target system, create the initial-load Replicat parameter file.
EDIT PARAMS
initial-load Replicat
- Enter the initial-load Replicat parameters in the order shown, starting a new line for each parameter statement. This example shows a three-part source table name associated with a multitenant container database.
GENLOADFILES sqlldr.tpl USERIDALIAS tiger2 EXTFILE /ggs/dirdat/ie ASSUMETARGETDEFS MAP hq.hr.*, TARGET hr2.*;
Parameter Description GENLOADFILES
template
Generates run and control files for the database utility.
USERIDALIAS
alias
Specifies the alias of the database login credential of the user that is assigned to Replicat. This credential must exist in the Oracle GoldenGate credential store, see Establishing Oracle GoldenGate Credentials
EXTFILE
path
Specifies the extract file that you specified with the Extract parameter
RMTFILE
.ASSUMETARGETDEFS
Assumes the source and target tables are identical, including semantics. If source and target definitions are different, you must create and specify a source-definitions file that both the change-synchronization and initial-load processes will use.
MAP
[container.]schema.table
, TARGET
schema.table;
Specifies a relationship between a source and target table or tables.
-
If the source is a multitenant container database,
container
is the name of the pluggable database that contains the source objects specified with thisMAP
statement. You can use theSOURCECATALOG
parameter to specify a default source pluggable database instead of using three-part names. -
schema
is the schema name. -
table
is the table name.
-
- Save and close the parameter file.
Parent topic: Configuring the Initial Load for Classic Architecture