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
Newsletter Hub
Free Learning
Arrow right icon
timer SALE ENDS IN
0 Days
:
00 Hours
:
00 Minutes
:
00 Seconds
Oracle Goldengate 11g Complete Cookbook
Oracle Goldengate 11g Complete Cookbook

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.

eBook
€31.99 €45.99
Paperback
€58.99
Subscription
Free Trial
Renews at €18.99p/m

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Table of content icon View table of contents Preview book icon Preview Book

Oracle Goldengate 11g Complete Cookbook

Chapter 2. Setting up GoldenGate Replication

The following recipes will be covered in this chapter:

  • Setting up a simple GoldenGate replication configuration between two single node databases

  • Setting up a GoldenGate replication with multiple process groups

  • Configuring an Extract process to read from an Oracle ASM instance

  • Setting up a GoldenGate replication between Oracle RAC databases

  • Determining the size of trail file areas

  • Verifying the data transfer on the target system

  • Generating encryption keys

  • Encrypting database user passwords

  • Encrypting the trail files

  • Setting up a GoldenGate replication between tables with different structures using defgen

Introduction


There are various steps in configuring a GoldenGate environment. Some of the steps of this setup can be different for different database environments and requirements. In this chapter, we will go through the steps that should be performed for a simple replication and a complex one. We will also look into how to divide the load into multiple process groups for a busy system. Further, we will cover the set up required for ASM and RAC environments, and also how to encrypt the password and trail files. We will also look into the steps required for replication between tables with different structures.

Setting up a simple GoldenGate replication configuration between two single node databases


In this recipe we will look at how to configure GoldenGate for continuous replication between two single node databases.

Getting ready

For this setup, we make the following assumptions:

  1. The source and target database have already been set up.

  2. Both the databases have a schema called SCOTT which is in a consistent state. No transformations will be performed in this recipe.

  3. Oracle GoldenGate binaries are already installed in both sites.

  4. The extract method used in this example will be classic capture.

  5. Supplemental Logging is enabled at database and table level for all the objects to be replicated.

How to do it...

We will follow these steps to set up this replication configuration.

Perform the following steps in the source database:

  1. Set up the GoldenGate user. Run the following command in the source database:

    sqlplus sys/**** as sysdba
    CREATE USER GGATE_ADMIN identified by GGATE_ADMIN;
    GRANT CREATE SESSION, ALTER SESSION...

Setting up a GoldenGate replication with multiple process groups


If your source system is a very busy OLTP system, with a high rate of data changes, then you will find that a single set of GoldenGate processes is not sufficient to replicate the load to the target environment in real time. In such a situation Oracle recommends splitting the load into multiple process groups.

Getting ready

For this recipe we will use the Order Entry demo schema. This schema has been created in both source and target databases, and is in the same state. The GoldenGate binaries, the GoldenGate Admin user, and manager instance have also been set up in the source and target environment.

How to do it...

In this recipe we will set up the following configuration for replicating the Order Entry schema:

As you can see from the preceding diagram, the replication setup performed here will consist of two Extract processes, two Datapumps, and four Replicat processes.

Perform the following steps in the source database:

  1. Create...

Configuring an Extract process to read from an Oracle ASM instance


If your source database is on ASM and the archive logs reside in an ASM diskgroup, the GoldenGate extract requires some additional configuration to be able to read them. In this recipe we will look at the additional parameters that you need to specify in the extract parameter file for this.

How to do it…

The setup required for reading archive logs from ASM depends on the version of the source database.

For Oracle 10gR2 (10.2.0.5 or later) / Oracle 11gR2 (11.2.0.2 or later):

  1. Modify the extract parameter files to use the TRANSLOGOPTIONS parameter:

    ./ggsci
    EDIT PARAMS EGGTEST1
    EXTRACT EGGTEST1
    USERID GGATE_ADMIN@DBORATEST, PASSWORD AADAAAAAAAAAAAFAQCFIIDLCUELFNFECLITBSCAHYBBHHEUGKDNICDCCDCFELJDJFFEAUHUBFGWIUJGCAJJDNDPDZEOHGILBIIWCUIBHHGPBKBHB, AES256, ENCRYPTKEY dbkey1
    EXTTRAIL /u01/app/ggate/dirdat/st
    TRANSLOGOPTIONS DBLOGREADER
    TABLE scott.*;
  2. Save the file and exit the editor window.

  3. Start the Extract process:

    GGSCI> START EGGTEST1...

Setting up a GoldenGate replication between Oracle RAC databases


High Availability is the buzz word in today's world. The systems need to be available all the time. The applications store their data in the databases, so it becomes quite critical for the databases to be fault tolerant and always available. Oracle RAC is a popular choice when companies want to build resilience in their systems. More and more applications are becoming RAC aware and it is quite common to see companies migrating most of their applications to Oracle RAC-based database environments.

Replicating the data between Oracle RAC databases requires some additional setup. In this recipe we will look into what configuration steps are required to setup replication between Oracle RAC environments. We will not cover the set up required to make the GoldenGate replication highly available itself as there are many ways to do it and will be covered in separate recipes in Chapter 5, Oracle GoldenGate High Availability.

Getting ready...

Determining the size of trail file areas


You would most likely create an Extract process with a dedicated Datapump process in the source environment. The Datapump process can suffer an outage in case of any network issue. However, it, resumes the trail file transfer to the remote site when it is up again. In such a situation you would want the Extract process to continue extracting the data into the trail files on the source system.

The trail files are stored in the filesystem which would be finite in space. The size of the trail file area will determine how many trail files can be stored, which in effect will determine how long the Extract process can continue generating the trail files while the Datapump process is down. This will determine the overall network outage capacity of your replication infrastructure. Clearly, it is quite important to size the trail file areas appropriately to avoid the situations where the Extract process has to be stopped because of lack of available space on...

Verifying the data transfer on the target system


This recipe will show you how to verify data transfer on a target system.

Getting ready

For this recipe we will use the continuous replication setup for the SCOTT schema done in Setting up a simple GoldenGate replication configuration between two single node databases earlier in this chapter.

How to do it...

Perform the following steps in the source database:

  1. Check the number of employees whose salary is greater than 3000:

    SQL> select * from EMP where sal>3000;
    
    EMPNO  ENAME   JOB     MGR  HIREDATE  SAL  COMM  DEPTNO
    -----  -----    ---      ---  --------  ---  ----  ------
    7839   KING      PRESIDENT   17-NOV-81	 5000         10
  2. Perform some updates in the source database. Here we increase the salary for all employees by 1000:

    SQL> update SCOTT.EMP set sal=sal+1000;
    14 rows updated.
    
    SQL> commit;
    Commit complete.
  3. Check the Extract process statistics:

    GGSCI (prim1-ol6-112.localdomain) 3> stats EGGTEST1 hourly
    
    Sending STATS request to...

Generating encryption keys


GoldenGate uses encryption keys for encrypting the passwords and trail files. You can use default keys or define custom encryption keys. Oracle recommends using custom encryption keys for encrypting passwords and trail files. In this recipe you will learn how to generate encryption keys using the keygen tool.

How to do it…

  1. As the GoldenGate software owner, change the current directory to GoldenGate Home directory:

    cd $GG_HOME
  2. Generate the encryption key using the keygen utility:

    ./keygen <length> <number>

    for example

     ./keygen 128 1
  3. Copy the generated encryption key to the ENCKEYS file under $GG_HOME and give this key a logical name:

    dbkey1 0xC2052964C5C2C1309FEF5042E306716A
  4. If you are going to use encryption for encrypting the trail files or for Datapump transfers, then you must copy the ENCKEYS file to the target server:

    scp $GG_HOME/ENCKEYS stdby1-ol6-112:/u01/app/ggate/

How it works…

The encryption keys are generated using the keygen utility which is enclosed...

Encrypting database user passwords


GoldenGate requires an Oracle user password to connect to the source and target databases. In this recipe you will learn how to encrypt the database passwords using the ENCRYPT utility.

Getting ready

You need to generate the encryption keys and store them in the ENCKEYS file before generating encrypted passwords. Follow the steps in the Generating encryption keys recipe to generate and store a 256-bit key called dbkey1 in the ENCKEYS file.

Tip

Although you can generate encrypted passwords using the DEFAULT encryption keys, Oracle recommends using custom encryption keys for all production systems.

How to do it…

Encrypting the database user password involves the following steps:

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

    ./ggsci
  2. Run the ENCRYPT PASSWORD command as follows:

    ENCRYPT PASSWORD *** <ALGORITHM> ENCRYPTKEY <key|DEFAULT>
    

    for example:

    ENCRYPT PASSWORD TIGER AES256 dbkey1
    Encrypted password:  AADAAAAAAAAAAAFAQCFIIDLCUELFNFECLITBSCAHYBBHHEUGKDNICDCCDCFELJDJFFEAUHUBFGWIUJGCAJJDNDPDZEOHGILBIIWCUIBHHGPBKBHB...

Encrypting the trail files


The trail files are the key component in the GoldenGate configuration. Since these files hold the data that is extracted by the Extract process, keeping them in the default format poses a security risk. We can overcome this security risk by encrypting the trail files using various algorithms. In this recipe we will learn how to configure the automatic encryption of the trail files.

Getting ready

You need to generate the encryption keys and store them in the ENCKEYS file before encrypting the trail files. Follow the steps in the Generating encryption keys recipe to generate and store a 256-bit key called dbkey1 in the ENCKEYS file.

How to do it…

Here are the steps to configure the encryption and decryption of trail files.

Perform the following steps in the source environment:

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

    ./ggsci
  2. Edit the Extract process configuration:

    EDIT PARAMS EGGTEST1
  3. Add the ENCRYPTTRAIL command before the EXTTRAIL...

Setting up a GoldenGate replication between tables with different structures using defgen


By default, GoldenGate expects the table definitions in your source and target environments to be similar. However, this may not always be the case. If you have defined the mapping between different tables in the source and target environments or the mapped tables have dissimilar structures, you would need to do some extra configuration to make GoldenGate replication work. In this recipe we will look into the additional steps that are required for this.

Getting ready

For this recipe we will use the continuous replication setup for the SCOTT schema done in the Setting up a simple GoldenGate replication configuration between two single node databases recipe earlier in this chapter. We will create two additional tables in the target database with the following structures:

  • EMP_DIFFCOL_ORDER: EMP table with different column order

  • EMP_EXTRACOL: EMP table with an additional column LAST_UPDATE_TIME

We will replicate...

Left arrow icon Right arrow icon

Key benefits

  • Various recipes that will help you to set up Goldengate in various environments
  • Practical examples of Goldengate management tasks
  • Step by step instructions with various examples and scripts

Description

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.

Who is this book for?

Oracle Goldengate 11g Complete Cookbook is aimed at Database Administrators, Architects, and Middleware Administrators who are keen to know more about Oracle Goldengate. Whether you are handling Goldengate environments on a day-to-day basis, or using it just for migration, this book provides the necessary information required to successfully complete your administration tasks. The reader is expected to have some knowledge of Oracle databases.

What you will learn

  • Configure DML and DDL Goldengate replication
  • Tune and Troubleshoot Goldengate replication
  • Cross Platform replication using Goldengate
  • Monitor Goldengate Replication using OEM 12c
  • What to do when GoldenGate replication breaks
  • Reverse changes applied by Goldengate
  • High Availability Setup for Goldengate
  • Learn about GoldenGate Veridata and GoldenGate Director
  • Migrate Oracle Streams environment to Goldengate

Product Details

Country selected
Publication date, Length, Edition, Language, ISBN-13
Publication date : Sep 26, 2013
Length: 362 pages
Edition : 1st
Language : English
ISBN-13 : 9781849686150
Vendor :
Oracle
Category :
Languages :
Concepts :
Tools :

What do you get with eBook?

Product feature icon Instant access to your Digital eBook purchase
Product feature icon Download this book in EPUB and PDF formats
Product feature icon Access this title in our online reader with advanced features
Product feature icon DRM FREE - Read whenever, wherever and however you want
OR
Modal Close icon
Payment Processing...
tick Completed

Billing Address

Product Details

Publication date : Sep 26, 2013
Length: 362 pages
Edition : 1st
Language : English
ISBN-13 : 9781849686150
Vendor :
Oracle
Category :
Languages :
Concepts :
Tools :

Packt Subscriptions

See our plans and pricing
Modal Close icon
€18.99 billed monthly
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Simple pricing, no contract
€189.99 billed annually
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts
€264.99 billed in 18 months
Feature tick icon Unlimited access to Packt's library of 7,000+ practical books and videos
Feature tick icon Constantly refreshed with 50+ new titles a month
Feature tick icon Exclusive Early access to books as they're written
Feature tick icon Solve problems while you work with advanced search and reference features
Feature tick icon Offline reading on the mobile app
Feature tick icon Choose a DRM-free eBook or Video every month to keep
Feature tick icon PLUS own as many other DRM-free eBooks or Videos as you like for just €5 each
Feature tick icon Exclusive print discounts

Frequently bought together


Stars icon
Total 153.97
Oracle Database 12c Backup and Recovery Survival Guide
€48.99
Oracle GoldenGate 11g Implementer's guide
€45.99
Oracle Goldengate 11g Complete Cookbook
€58.99
Total 153.97 Stars icon

Table of Contents

9 Chapters
Installation and Initial Setup Chevron down icon Chevron up icon
Setting up GoldenGate Replication Chevron down icon Chevron up icon
DDL Replication and Initial Load Chevron down icon Chevron up icon
Mapping and Manipulating Data Chevron down icon Chevron up icon
Oracle GoldenGate High Availability Chevron down icon Chevron up icon
Monitoring, Tuning, and Troubleshooting GoldenGate Chevron down icon Chevron up icon
Advanced Administration Tasks – I Chevron down icon Chevron up icon
Advanced Administration Tasks – Part II Chevron down icon Chevron up icon
GoldenGate Veridata, Director, and Monitor Chevron down icon Chevron up icon

Customer reviews

Top Reviews
Rating distribution
Full star icon Full star icon Full star icon Half star icon Empty star icon 3.7
(9 Ratings)
5 star 33.3%
4 star 33.3%
3 star 11.1%
2 star 11.1%
1 star 11.1%
Filter icon Filter
Top Reviews

Filter reviews by




Amazon Customer Apr 19, 2016
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Fabulous book- very user friendly! Love how well concepts are broken down for easy understanding :)
Amazon Verified review Amazon
BIKRAMJIT BHULLAR Apr 04, 2014
Full star icon Full star icon Full star icon Full star icon Full star icon 5
Majority of the cookbooks cater to seasoned programmers so they can quickly lookup a solution without having to reinvent the wheel. However, this particular cookbook can also be used by less experienced Administrator as part of "How It Work and How to do it." methodology.After learning the Oracle GoldenGate. I would read the problem statement and then try to implement the solution by myself. I would compare my solution to that of the author's. Or in certain cases, cheat by copying the given solution.I found it to be a complete guide to the concepts, architecture, configuration, maintenance, troubleshooting and performance considerations for Oracle GoldenGate.Instead of navigating through links and multiple documents in Oracle documentation, I was able to get the necessary operational details in this one book.A very helpful guide for anyone who wants to setup replication using Oracle Goldengate or perform maintenance, monitoring and troubleshooting of an Oracle GoldenGate environment.I would recommend this book to anybody who is interested in mastering in Oracle GoldenGate.
Amazon Verified review Amazon
Amazon Customer May 09, 2016
Full star icon Full star icon Full star icon Full star icon Full star icon 5
As an Oracle Consultant, finding books that are clear and concise and not based on entry level descriptions it is nice to come across a book that pays homage to the basics but is not afraid to delve in to subject matter that is a bit beyond the obvious/initial concerpts.Ankur's book delivers stage by stage guides to building a strong working knowledge of Oracle Golden Gate [OGG] showing the depth and flexibility that can be achieved using OGG as part of your replication strategy [or by extension, your DR strategy]The book is well laid out, each chapter builds on the previous whilst also allowing you to jump directly to areas of interest that go beyond the initial stumbling blocks encountered whilst getting to grips with OGG.A strong recommendation for anyone who's been aware of OGG but yet not gotten truly involved with large scale, complex, replication projects. Anyone upgrading from a streams environment to OGG should definitely look at the Advanced Administration Guide for some well worked examples of how to consider a upgrade.
Amazon Verified review Amazon
Amazon Customer Apr 10, 2016
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
I best thing I like about the book is its organization and easy-to-find sections. The sections I first used in the book was the GoldenGate HA chapter. I had referred to a couple of other reference documents but couldn't get it right at first go. I found instructions by Ankur pretty close to what I wanted to do. Ever since I have used the book as a ready reckoner for anything GoldenGate related. Thanks Ankur.
Amazon Verified review Amazon
Tomas Frastia Dec 21, 2013
Full star icon Full star icon Full star icon Full star icon Empty star icon 4
I really like books that have a simple and straightforward description of what and how i.e. exactly how to install, how to set it and what it means, etc.and in my personal opinion, this book fully meets that definition. The Oracle GoldenGate 11g Complete Cookbook is intended primarily for people who have very good administration and development experience with Oracle databases. The book is very easy to read with well written, examples are very well written and explained exactly how to proceed. I thing with this book you get very greate introduction to Oracle Gate, how to setup datapums, how to use the data filtering and mapping, how to store the transaction history etc.. Personally, the most interesting chapters for me was: “5. Oracle GoldenGate High Availability” – where are described how to create a highly available GoldenGate configuration with different file systems e.g. ocfs2, dbfx, acfs, etc. “7.Advanced Administration Task-1″ – where are described how to use the revese utility, how to a downstream database wth Integrated Capture etc. I was surprised (but praise for it), that the authors of this book, do not forget, how to monitor the GolgenGate with OEM12c and described it in the last chapter. So my conclusion is that if you want to use Oracle Golden Gate, or if you already use this tool, then you must have this book.
Amazon Verified review Amazon
Get free access to Packt library with over 7500+ books and video courses for 7 days!
Start Free Trial

FAQs

How do I buy and download an eBook? Chevron down icon Chevron up icon

Where there is an eBook version of a title available, you can buy it from the book details for that title. Add either the standalone eBook or the eBook and print book bundle to your shopping cart. Your eBook will show in your cart as a product on its own. After completing checkout and payment in the normal way, you will receive your receipt on the screen containing a link to a personalised PDF download file. This link will remain active for 30 days. You can download backup copies of the file by logging in to your account at any time.

If you already have Adobe reader installed, then clicking on the link will download and open the PDF file directly. If you don't, then save the PDF file on your machine and download the Reader to view it.

Please Note: Packt eBooks are non-returnable and non-refundable.

Packt eBook and Licensing When you buy an eBook from Packt Publishing, completing your purchase means you accept the terms of our licence agreement. Please read the full text of the agreement. In it we have tried to balance the need for the ebook to be usable for you the reader with our needs to protect the rights of us as Publishers and of our authors. In summary, the agreement says:

  • You may make copies of your eBook for your own use onto any machine
  • You may not pass copies of the eBook on to anyone else
How can I make a purchase on your website? Chevron down icon Chevron up icon

If you want to purchase a video course, eBook or Bundle (Print+eBook) please follow below steps:

  1. Register on our website using your email address and the password.
  2. Search for the title by name or ISBN using the search option.
  3. Select the title you want to purchase.
  4. Choose the format you wish to purchase the title in; if you order the Print Book, you get a free eBook copy of the same title. 
  5. Proceed with the checkout process (payment to be made using Credit Card, Debit Cart, or PayPal)
Where can I access support around an eBook? Chevron down icon Chevron up icon
  • If you experience a problem with using or installing Adobe Reader, the contact Adobe directly.
  • To view the errata for the book, see www.packtpub.com/support and view the pages for the title you have.
  • To view your account details or to download a new copy of the book go to www.packtpub.com/account
  • To contact us directly if a problem is not resolved, use www.packtpub.com/contact-us
What eBook formats do Packt support? Chevron down icon Chevron up icon

Our eBooks are currently available in a variety of formats such as PDF and ePubs. In the future, this may well change with trends and development in technology, but please note that our PDFs are not Adobe eBook Reader format, which has greater restrictions on security.

You will need to use Adobe Reader v9 or later in order to read Packt's PDF eBooks.

What are the benefits of eBooks? Chevron down icon Chevron up icon
  • You can get the information you need immediately
  • You can easily take them with you on a laptop
  • You can download them an unlimited number of times
  • You can print them out
  • They are copy-paste enabled
  • They are searchable
  • There is no password protection
  • They are lower price than print
  • They save resources and space
What is an eBook? Chevron down icon Chevron up icon

Packt eBooks are a complete electronic version of the print edition, available in PDF and ePub formats. Every piece of content down to the page numbering is the same. Because we save the costs of printing and shipping the book to you, we are able to offer eBooks at a lower cost than print editions.

When you have purchased an eBook, simply login to your account and click on the link in Your Download Area. We recommend you saving the file to your hard drive before opening it.

For optimal viewing of our eBooks, we recommend you download and install the free Adobe Reader version 9.