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 a Datapump process


Datapumps are secondary Extract processes which exist only in the GoldenGate source environments. These are optional processes. When the Datapump process is not configured, the Extract process does the job of extracting and transferring the data to the target environment. When the Datapump process is configured, it relieves the main Extract process from the task of transferring the data to the target environment. The Extract process can then solely focus on extracting the changes from the source database redo and write it to local trail files.

Getting ready

Before adding the Datapump extract, you must have a manager instance running. You should have added the main extract and a local trail location to the instance configuration. You will also need the target environment details, for example, hostname, manager port no., and the remote trail file location.

How to do it…

Just like other GoldenGate processes, the Datapump process requires creating a parameter file with some parameters. The following are the steps to configure a Datapump process in a GoldenGate source environment:

  1. From the GoldenGate Home, run the GoldenGate Software Command Line Interface (GGSCI) as follows:

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

    EDIT PARAMS PGGTEST1
    
  3. This command will open an editor window. You need to add the Datapump configuration parameters in this window as follows:

    EXTRACT <DATAPUMP_NAME>
    USERID <SOURCE_GG_USER>@SOURCEDB, PASSWORD ******
    RMTHOST <HOSTNAME_IP_TARGET_SYSTEM>, MGRPORT <TARGET_MGRPORT>
    RMTTRAIL <specification>
    TABLE <replicated_table_specification>;
    

    For example:

    EXTRACT PGGTEST1
    USERID GGATE_ADMIN@DBORATEST, PASSWORD ******
    RMTHOST stdby1-ol6-112.localdomain, MGRPORT 7809
    RMTTRAIL /u01/app/ggate/dirdat/rt
    TABLE scott.*;
    
  4. Save the file and exit the editor window.

  5. Add the Datapump extract to the GoldenGate instance as follows:

    ADD EXTRACT PGGTEST1, EXTTRAILSOURCE /u01/app/ggate/dirdat/tt
    
  6. Add the remote trail to the Datapump configuration as follows:

    ADD RMTTRAIL /u01/app/ggate/dirdat/rt, EXTRACT PGGTEST1
    
  7. Start the Datapump process as follows:

    GGSCI> START EXTRACT PGGTEST1
    

How it works…

Once you have added the parameters to the Datapump parameter file and saved it, you need to add the process to the GoldenGate instance. This is done using the ADD EXTRACT command in step 5. In step 6,, we associate a remote trail with the Datapump process and in step 7 we start the Datapump process. When you start the Datapump process you will see the following output:

GGSCI (prim1-ol6-112.localdomain) 10> start extract PGGTEST1
Sending START request to MANAGER ...
EXTRACT PGGTEST1 starting

You can check the status of the Datapump process using the following command:

GGSCI (prim1-ol6-112.localdomain) 10> status extract PGGTEST1
EXTRACT PGGTEST1: RUNNING

Tip

If you are using virtual IPs in your environment for the target host, always configure the virtual IP in the datapump RMTHOST configuration. This virtual IP should also be resolved through DNS. This will ensure automatic discovery while configuring monitoring for GoldenGate configurations.

There's more…

The following are some additional parameters/options that can be specified in the datapump configuration:

  • RMTHOSTOPTIONS: Using this option for the RMTHOST parameter, you can configure additional features such as encryption and compression for trail file transfers.

  • EOFDELAY secs: This parameter controls how often GoldenGate should check the local trail file for new data.

  • MEGABYTES <N>: This parameter controls the size of a remote trail file.

  • PASSTHRU: This parameter is used to avoid lookup in database or definitions files in datapump are not doing any conversions and so on.

  • 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

  • Refer to the recipes, Encrypting database user passwords Encrypting the trail files in Chapter 2, Setting up GoldenGate Replication