Integrated Capture is a new form of GoldenGate Extract process which works directly with the database log mining server to receive the data changes in the form of LCRs. This functionality is based on the Oracle Streams technology. For this, the GoldenGate Admin user requires access to the log miner dictionary objects. This Capture mode supports extracting data from the source databases using compression. It also supports some object types that are not supported by the Classic Capture. In this recipe, you will learn how to set up an Integrated Capture process in a GoldenGate instance.
Before adding the Integrated Capture Extract, ensure that you have completed the following steps in the source database environment:
Enabled database minimum supplemental logging.
Enabled supplemental logging for tables to be replicated.
Set up a manager instance.
Created a directory for source trail files.
Decided a two-letter initial for naming source trail files.
Created a GoldenGate Admin database user with extra privileges required for Integrated Capture in the source database.
From the GoldenGate
Homedirectory, run the GoldenGate software command line interface (GGSCI) as follows:
Edit the Extract process configuration as follows:
EDIT PARAMS EGGTEST1
This command will open an editor window. You need to add the extract configuration parameters in this window as follows:
EXTRACT <EXTRACT_NAME> USERID <SOURCE_GG_USER>@SOURCEDB, PASSWORD ****** TRANLOGOPTIONS MININGUSER <MINING_DB_USER>@MININGDB, & MININGPASSWORD ***** EXTTRAIL <specification> TABLE <replicated_table_specification>;
EXTRACT EGGTEST1 USERID GGATE_ADMIN@DBORATEST, PASSWORD ****** TRANLOGOPTIONS MININGUSER OGGMIN@MININGDB, & MININGPASSWORD ***** EXTTRAIL /u01/app/ggate/dirdat/st TABLE scott.*;
Save the file and exit the editor window.
Register the Integrated Capture Extract process to the database as follows:
DBLOGIN USERID <SOURCE_GG_USER>@SOURCEDB, PASSWORD ****** MININGDBLOGIN USERID <MININGUSER>@MININGDB, PASSWORD ****** REGISTER EXTRACT <EXTRACT_NAME> DATABASE
Add the Integrated Capture Extract to the GoldenGate instance as follows:
ADD EXTRACT <EXTRACT_NAME>, INTEGRATED TRANLOG, <BEGIN_SPEC>
ADD EXTRACT EGGTEST1, INTEGRATED TRANLOG, BEGIN NOW
Add the local trail to the Integrated Capture configuration as follows:
ADD EXTTRAIL /u01/app/ggate/dirdat/st, EXTRACT EGGTEST1
Start the Integrated Capture Extract process as follows:
GGSCI> START EXTRACT EGGTEST1
The steps for configuring an Integrated Capture process are broadly the same as the ones for the Classic Capture process. We first create a parameter file in steps 1 to 4. In step 5, we add the extract to the GoldenGate instance. In step 6, we add a local extract trail file and in the next step we start the Extract process.
When you start the Extract process you will see the following output:
GGSCI (prim1-ol6-112.localdomain) 11> start extract EGGTEST1 Sending START request to MANAGER ... EXTRACT EGGTEST1 starting
You can check the status of the Extract process using the following command:
GGSCI (prim1-ol6-112.localdomain) 10> status extract EGGTEST1 EXTRACT EGGTEST1: RUNNING
As described earlier, an Integrated Capture process can be configured with the mining dictionary in the source database or in a separate database called a downstream mining database. When you configure the Integrated Capture Extract process in the downstream mining database mode, you need to specify the following parameter in the extract configuration file:
TRANLOGOPTIONS MININGUSER OGGMIN@MININGDB, MININGPASSWORD *****
You will also need to connect to
MININGUSER before registering the Extract process:
MININGDBLOGIN USERID <MININGUSER>@MININGDB, PASSWORD ******
This mining user has to be set up in the same way as the GoldenGate Admin user is set up in the source database.
TRANLOGOPTIONS INTEGRATEDPARAMS (MAX_SGA_SIZE 164)
The recipe Creating an Integrated Capture with a downstream database for compressed tables in Chapter 7, Advanced Administration Tasks – I