Main Note - Supplemental Logging and TRANDATA for OGG
(Doc ID 1537838.1)
Last updated on JULY 23, 2021
Applies to:Oracle GoldenGate - Version 9.5_EA and later
Information in this document applies to any platform.
Prior to extracting data from the Oracle logs, it is necessary to issue the ADD TRANDATA commands via GGSCI. This requires a DBLOGIN:
By default, Oracle only logs changed columns for update operations. Normally, this means that primary key columns are not logged during an update operation. However, REPLICAT requires the primary key columns in order to apply the update on the target system. The ADD TRANDATA command in GGSCI is used to cause Oracle to log primary key columns for all updates. To add supplemental log data, issue the following commands on Unix. Table names may be wildcarded. All tables that will have captured data must have the TRANDATA added.
$ cd /ggs $ ggsci
GGSCI (unixserver) > DBLOGIN USERID userid
GGSCI (unixserver) > ADD TRANDATA schema.<table-name>
Log Extract templates for Oracle non-DDL Extraction
-- this is a template for extraction of data from an Oracle database via logs
-- it does not include extraction of DDL
-- it does not include ALO mode
-- it is NOT for a bi-directional configuration.
-- add extract xlog, begin now, tranlog
-- add exttrail ./dirdat/lt, extract xlog, megabytes 1000
-- name the extract. It must match the <xlog>.prm file name
-- point to the proper SID
-- point to Oracle_home
-- set the language attribute even if it is standard and default ad matches the target database
-- ! NLS_LANG the parameter should be put in a line BEFORE login USERID parameter.
-- set userid and password
USERID ggs, PASSWORD ggspw
-- specify the local trail to write to
-- if the database is using ASM, uncomment the next line and populate it correctly
-- Tranlogoptions ASMUSER SYS@ASM, ASMPASSWORD ASMpw
-- for asm, tranlogoptions dblogreader for oracle 10.2.0.5 on f10g, and 184.108.40.206 on 11g.
-- should be considered. this will be the trend in future for ASM.
-- set reporting options
Reportcount every 10000 records
-- exclude and tables from the following wildcards
-- Tableexclude <schema.tablename>
-- list wildcarded schema and table subsets to capture.
-- add individual tables including previously excluded ones that you really want
See also Document 1276058.1
To view full details, sign in with your My Oracle Support account.
Don't have a My Oracle Support account? Click to get started!
In this Document