Book Image

Oracle Goldengate 11g Complete Cookbook

By : Ankur Gupta
Book Image

Oracle Goldengate 11g Complete Cookbook

By: Ankur Gupta

Overview of this book

Oracle Goldengate 11g Complete Cookbook is your complete guide to all aspects of Goldengate administration. The recipes in this book will teach you how to setup Goldengate configurations for simple and complex environments requiring various filtering and transformations. It also covers various aspects of tuning and troubleshooting the replication setups using exception handling, custom fields, and logdump utility.The book begins by explaining some basic tasks like Installation and Process groups setup. You will then be introduced to some further topics including DDL replication and various options to perform Initial Loads. You will then learn some advanced administration tasks such as Multi Master replication setup and conflict resolution. Further recipes, contain the cross platform replication and high availability options for Goldengate.
Table of Contents (16 chapters)
Oracle GoldenGate 11g Complete Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
Index

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:

  1. Enabled database minimum supplemental logging.

  2. Enabled supplemental logging for tables to be replicated.

  3. Set up a manager instance.

  4. Created a directory for source trail files.

  5. Decided a two-letter initial for naming source trail files.

  6. 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:

  1. From the GoldenGate Home directory, run the GoldenGate software command line interface (GGSCI) as follows:

    ./ggsci
    
  2. Edit the Extract process configuration as follows:

    EDIT PARAMS EGGTEST1
    
  3. 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.*;
    
  4. Save the file and exit the editor window.

  5. 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
    
  6. 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
    
  7. Add the local trail to the Integrated Capture configuration as follows:

    ADD EXTTRAIL /u01/app/ggate/dirdat/st, EXTRACT EGGTEST1
    
  8. 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