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

Adding custom fields to a replicated record using SQLEXEC


In this recipe we will look into how we can use SQLEXEC to populate a column using an SQL statement in the GoldenGate replication.

Getting ready

For this recipe we will use the EMP table that is delivered in the SCOTT schema with Oracle binaries. In the target environment, the EMP table has an extra column called AVG_SAL which will be the average salary of an employee's department calculated using SQL ran by SQLEXEC.

Source EMP Table

Target EMP Table

EMPNO

EMPNO

ENAME

ENAME

JOB

JOB

MGR

MGR

HIREDATE

HIREDATE

SAL

SAL

COMM

COMM

DEPTNO

DEPTNO

 

AVG_SAL

How to do it...

We will follow the following steps to demonstrate the use of the SQLEXEC command.

Run the following in the source environment:

  1. Create an Extract process parameter file as follows:

    EXTRACT EGGTEST1
    USERID GGATE_ADMIN@DBORATEST, PASSWORD GGATE_ADMIN
    EXTTRAIL /u01/app/ggate/dirdat/st
    TABLE scott.EMP;
  2. The Datapump process parameter file should look as follows:

    EXTRACT...
lock icon The rest of the chapter is locked
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