Setting up an Integrated Capture Extract process
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.
Getting ready
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.
How to do it…
You can follow the given steps to configure an Integrated Capture Extract process:
From the GoldenGate
Home
directory, run the GoldenGate software command line interface (GGSCI) as follows:./ggsci
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>;
For example:
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>
For example:
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
How it works…
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 MININGDB
using 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.
Tip
If you want to use Integrated Capture mode with a source database which is running on Oracle database Version 11.2.0.2 or earlier, you must configure the Integrated Capture process in the downstream mining database mode and the downstream database must be on Version 11.2.0.3 or higher.
There's more…
Some additional parameters that should be added to the extract configuration are as follows:
TRANLOGOPTIONS INTEGRATEDPARAMS
: Use this parameter to control how much memory you want to allocate to the log miner dictionary. This memory is allocated out of the Streams pool in the SGA:TRANLOGOPTIONS INTEGRATEDPARAMS (MAX_SGA_SIZE 164)
MEGABYTES <N>
: This parameter controls the size of the extract trail file.DYNAMICRESOLUTION
: Use this parameter to enable extract to build the metadata for each table when the extract encounters its changes for the first time.
See also
The recipe Creating an Integrated Capture with a downstream database for compressed tables in Chapter 7, Advanced Administration Tasks – I