Oracle GoldenGate Processes – Part 2 – Extract
The extract process of Oracle GoldenGate is used to perform change data capture from the source database. The extract can be used to read the online transaction log (in Oracle the online redo logs) or the associated archive logs. The data that is extracted from the source database is then placed into an trail file (another topic for a post) for shipping to the apply sided.
To configure an extract process there needs to be a parameter file associated with it. The parameter file can be edited after adding the extract to the Oracle GoldenGate environment if needed. In order to configure an extract it needs to be added to the environment and assigned a local trail file location.
Adding an Extract and Local Trail File:
Using GGSCI:
$ cd $OGG_HOME
$ ./ggsci
GGSCI> add extract EXT, tranlog, begin now
GGSCI> add exttrail ./dirdat/lt, extract EXT, megabytes 200
Note: The trail file is required to be prefixed with a two letter prefix.
Edit Extract Parameter File:
From GGSCI:
$ cd $OGG_HOME
$ ./ggsci
GGSCI> edit params EXT
Edit Extract Parameter File from Command Line:
$ cd $OGG_HOME
$ cd ./dirprm
$ vi ./ext.prm
Example of Extract Parameter File:
EXTRACT EXT
USERID ggate, PASSWORD ggate
TRANLOGOPTIONS DBLOGREADER
SETENV (ORACLE_HOME=”/u01/app/oracle/product/11.2.0/db_3″)
SETENV (ORACLE_SID=”orcl”)
WARNLONGTRANS 1h, CHECKINTERVAL 30m
EXTTRAIL ./dirdat/lt
WILDCARDRESOLVE IMMEDIATE
TABLE SCOTT.*;
Start/Stop the Extract:
Start Extract:
$ cd $OGG_HOME
$ ./ggsci
GGSCI> start extract EXT
Stop Extract:
$ cd $OGG_HOME
$ ./ggsci
GGSCI> stop extract EXT
Enjoy!
about.me: http://about.me/dbasolved
Current Oracle Certs
Bobby Curtis
I’m Bobby Curtis and I’m just your normal average guy who has been working in the technology field for awhile (started when I was 18 with the US Army). The goal of this blog has changed a bit over the years. Initially, it was a general blog where I wrote thoughts down. Then it changed to focus on the Oracle Database, Oracle Enterprise Manager, and eventually Oracle GoldenGate.
If you want to follow me on a more timely manner, I can be followed on twitter at @dbasolved or on LinkedIn under “Bobby Curtis MBA”.