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 Replicat process


The Replicat processes are the delivery processes which are configured in the target environment. These processes read the changes from the trail files on the target system and apply them to the target database objects. If there are any transformations defined in the replicat configuration, the Replicat process takes care of those transformations as well. You can define the mapping information in the replicat configuration. The Replicat process will then apply the changes to the target database based on the mappings.

Getting ready

Before setting up replicat in the target system, you must have configured and started the Manager process.

How to do it…

Follow the following steps to configure a replicat in the target environment:

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

    ./ggsci
    
  2. Log in to the target database through GGSCI as shown in the following code:

    GGSCI> DBLOGIN, USERID <USER> PASSWORD <PW>
    
  3. Add the Checkpoint table as shown in the following code:

    GGSCI> ADD CHECKPOINTTABLE <SCHEMA.TABLE>
    
  4. Edit the Replicat process configuration as shown in the following code:

    GGSCI> EDIT PARAMS RGGTEST1
    
  5. This command will open an editor window. You need to add the replicat configuration parameters in this window as shown in the following code:

    REPLICAT <REPLICAT_NAME>
    USERID <TARGET_GG_USER>@TARGETDB, PASSWORD ******
    DISCARDFILE <DISCARDFILE_SPEC>
    MAP <mapping_specification>;
    

    For example:

    REPLICAT RGGTEST1
    USERID GGATE_ADMIN@TGORTEST, PASSWORD ******
    DISCARDFILE /u01/app/ggate/dirrpt/RGGTEST1.dsc, APPEND, MEGABYTES 500
    MAP SCOTT.*, SCOTT.*;
    
  6. Save the file and exit the editor.

  7. Add the replicat to the GoldenGate instance as shown in the following code:

    GGSCI> ADD REPLICAT <REPLICAT> EXTTRAIL <PATH>
    

    For example:

    ADD REPLICAT RGGTEST1, EXTTRAIL /u01/app/ggate/dirdat/rt
    
  8. Start the Replicat process as shown in the following code:

    GGSCI> START REPLICAT <REPLICAT>
    

How it works…

In the preceding procedure we first create a Checkpoint table in the target database. As the name suggests, the Replicat process uses this table to maintain its checkpoints. In case the Replicat process crashes and it is restarted, it can read this Checkpoint table and start applying the changes from the point where it left.

Once you have added a Checkpoint table, you need to create a parameter file for the Replicat process. Once the process parameter file is created, it is then added to the GoldenGate instance. At this point, we are ready to start the Replicat process and apply the changes to the target database. You should see an output similar to the following:

GGSCI (stdby1-ol6-112.localdomain) 10> start replicat RGGTEST1
Sending START request to MANAGER ...
REPLICAT RGGTEST1 starting

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

GGSCI (stdby1-ol6-112.localdomain) 10> status replicat RGGTEST1
REPLICAT RGGTEST1: RUNNING

There's more…

Following are the common parameters that are specified in the replicat configuration:

  • DISCARDFILE: This parameter is used to specify the name of the discard file. If the Replicat process is unable to apply any changes to the target database due to any errors, it writes the record to the discard file.

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

  • REPORTCOUNT: This parameter controls how often the Replicat process writes its progress to the report file.

  • BATCHSQL: This parameter is used to specify the BATCHSQL mode for replicat.

  • ASSUMETARGETDEFS: This parameter tells the Replicat process to assume that the source and target database object structures are the same.

See also

  • Read Setting up GoldenGate replication between tables with different structures using defgen recipe in Chapter 2, Setting Up GoldenGate Replication

  • Steps to configure a BATCHSQL mode recipe in Chapter 6, Monitoring, Tuning, and Troubleshooting GoldenGate for further information

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