Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Oracle Goldengate 11g Complete Cookbook

You're reading from   Oracle Goldengate 11g Complete Cookbook Dig deep into administering Oracle Goldengate 11g using this comprehensive cookbook. From the very basics of installation to advanced features like migration, you'll learn the practical way through code scripts and examples.

Arrow left icon
Product type Paperback
Published in Sep 2013
Publisher Packt
ISBN-13 9781849686143
Length 362 pages
Edition 1st Edition
Languages
Arrow right icon
Author (1):
Arrow left icon
Ankur Gupta Ankur Gupta
Author Profile Icon Ankur Gupta
Ankur Gupta
Arrow right icon
View More author details
Toc

Table of Contents (16) Chapters Close

Oracle GoldenGate 11g Complete Cookbook
Credits
About the Author
About the Reviewers
www.PacktPub.com
Preface
1. Installation and Initial Setup FREE CHAPTER 2. Setting up GoldenGate Replication 3. DDL Replication and Initial Load 4. Mapping and Manipulating Data 5. Oracle GoldenGate High Availability 6. Monitoring, Tuning, and Troubleshooting GoldenGate 7. Advanced Administration Tasks – I 8. Advanced Administration Tasks – Part II 9. GoldenGate Veridata, Director, and Monitor Index

Setting up a Classic Capture Extract process


A GoldenGate Classic Capture Extract process runs on the source system. This process can be configured for initially loading the source data and for continuous replication. This process reads the redo logs in the source database and looks for changes in the tables that are defined in its configuration file. These changes are then written into a buffer in the memory. When the extract reads a commit command in the redo logs, the changes for that transaction are then flushed to the trail files on disk. In case it encounters a rollback statement for a transaction in the redo log, it discards the changes from the memory. This type of Extract process is available on all platforms which GoldenGate supports. This process cannot read the changes for compressed objects. In this recipe you will learn how to set up a Classic Capture process in a GoldenGate instance.

Getting ready

Before adding the Classic Capture Extract process, 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 the source trail files.

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

How to do it…

The following are the steps to configure a Classic Capture Extract process in the source database:

  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 ******
    EXTTRAIL <specification>
    TABLE <replicated_table_specification>;
    

    For example:

    EXTRACT EGGTEST1
    USERID GGATE_ADMIN@DBORATEST, PASSWORD ******
    EXTTRAIL /u01/app/ggate/dirdat/st
    TABLE scott.*;
    
  4. Save the file and exit the editor window.

  5. Add the Classic Capture Extract to the GoldenGate instance as follows:

    ADD EXTRACT <EXTRACT_NAME>, TRANLOG, <BEGIN_SPEC>
    

    For example:

    ADD EXTRACT EGGTEST1, TRANLOG, BEGIN NOW
    
  6. Add the local trail to the Classic Capture configuration as follows:

    ADD EXTTRAIL /u01/app/ggate/dirdat/st, EXTRACT EGGTEST1
    
  7. Start the Classic Capture Extract process as follows:

    GGSCI> START EXTRACT EGGTEST1
    

How it works…

In the preceding steps we have configured a Classic Capture Extract process to replicate all tables for a SCOTT user. For this we first configure an Extract process parameter file and add the configuration parameter to it. Once the parameter file is created, we then add the Extract process to the source manager instance. This is done using the ADD EXTRACT command in step 5. In step 6, we associate a local trail file with the Extract process and then we start it. 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: STARTED

There's more…

There are a few additional parameters that can be specified in the extract configuration as follows:

  • EOFDELAY secs: This parameter controls how often GoldenGate should check the source database redo logs for new data

  • 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.

If your source database ie this parameter to enable extract to build the metadata for each table when the exs a very busy OLTP production system and you cannot afford to add additional load of GoldenGate process on it, you can however offload GoldenGate processing to another server by adding some extra configuration. You will need to configure the source database to ship the redo logs to a standby site and set up a GoldenGate manager instance on that server. The Extract processes will be configured to read from the archived logs on the standby system. For this you specify an additional parameter as follows:

TRANLOGOPTIONS ARCHIVEDLOGONLY ALTARCHIVEDLOGDEST <path>

Tip

If you are using Classic Capture in ALO mode for the source database using ASM, you must store the archive log files on the standby server outside ASM to allow Classic Capture Extract to read them.

See also

  • The recipe, Configuring an Extract process to read from an Oracle ASM instance and the recipe, Setting up a GoldenGate replication with multiple process groups in Chapter 2, Setting up GoldenGate Replication

You have been reading a chapter from
Oracle Goldengate 11g Complete Cookbook
Published in: Sep 2013
Publisher: Packt
ISBN-13: 9781849686143
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image