Professional Documents
Culture Documents
|
ORACLE GOLDENGATE
Oracle GoldenGate, IRcTC
(Incompatible Record cum Trail Corruption)
Veeratteshwaran Sridhar
Oracle GoldenGate, IRcTC (Incompatible Record cum Trail Corruption)
Oracle India Pvt Ltd
June 10, 2017
veeratteshwaran.sridhar@oracle.com
Blogger - www.oracle-scn.com
OTN community - ORASCN
Copyright 2014, Oracle and/or its affiliates. All rights reserved. | Oracle Confidential Internal/Restricted/Highly Restricted
Safe Harbor Statement
The following is intended to outline our general product direction. It is intended for
information purposes only, and may not be incorporated into any contract. It is not a
commitment to deliver any material, code, or functionality, and should not be relied upon
in making purchasing decisions. The development, release, and timing of any features or
functionality described for Oracles products remains at the sole discretion of Oracle.
Trail Files
MANAGER MANAGER
Transactions
EXTRACT REPLICAT
N
E
T
W
O
R
K
DATAPUMP COLLECTOR
STORAGE STORAGE
GGS tokens:
SCN TokenID x52 'R' ORAROWID Info x00 Length 20
4141 4156 6172 4141 4541 4141 4146 4c41 4142 0001 | AAAVarAAEAAAAFLAAB..
TokenID x74 't' ORATAG Info x01 Length 0
TokenID x4c 'L' LOGCSN Info x00 Length 7
3333 3733 3438 33 | 3373483
TokenID x36 '6' TRANID Info x00 Length 9
TRANSACTION
ID
RBA Information.
Logdump 1 >GHDR ON - The record header contains information about the transaction
Logdump 2 >DETAIL ON - Column information includes the number and length in hex and ASCII
Logdump 4 >USERTOKEN ON - User tokens are custom user-defined information that is specified in a
TABLE or FILE mapping statement and stored in the trail file for specific purposes.
Logdump 5 >GGSTOKEN ON - Oracle GoldenGate automatically generated tokes include the transaction ID (XID), the
row id for DML operations, the fetching status (if applicable), and tag value.
file_name is either the relative name or fully qualified name of the file, including the file sequence
number.
For example:
open /home/ggs/dirdat/jd000000
Logdump 8 >NEXT
Logdump 9 >N
Logdump 10 >SCANFORHEADER
Logdump 11 >SFH
10. To scan for the end of a transaction, enter the following command,
Logdump 12 >SCANFORENDTRANS
Logdump 13 >SFET
11. To go to a specific RBA in the file, you can do either of the following,
Logdump 18 >COUNT
Logdump 22 >COUNT
LogTrail /vol3/ogg/dirdat/et000000 has 7 records
Total Data Bytes 8217
Avg Bytes/Record 1173
Delete 1
DDL 5
Others 1
Before Images 1
After Images 5
Average of 7 Transactions
Bytes/Trans ..... 1221
Records/Trans ... 1
Files/Trans ..... 1
13. To save the whole file, enter the following command, where file is the name of the new file
14. To close the current file and open the next one in the trail, enter the following command.,
Logdump 18 >NEXTTRAIL
Logdump 19 >NT
Logdump 22 >ENV
Version : Linux, x64, 64bit (optimized) on Sep 24 2013 18:18:53
Logdump 23 >EXIT
Logdump 24 >QUIT
EXTRACT ext1
USERIDALIAS ggs_admin REPLCAT rep1
DDL include mapped USERIDALIAS ggs_replicat
RMTTRAIL ./dirdat/et DDL include all
TABLE hr.*; MAP hr.*, TARGET hr.*;
No SourceDefs
No AssumeTargetDefs
No more SOURCEDEFS
Simpler to configure replication
Eliminates the SOURCEDEFS or ASSUMETARGETDEFS parameters
Supports replication even if source and target have different structures or different databases
TDR DDR Each trail file contains a Table Definition Record (TDR)
DML TDR before first occurrence of a DML record for a particular
table
- TDR contains table and column definition
including column number, data types, column
lengths, etc.
Ref TDR
DML records have a reference to the TDR and no
longer contain the object name
Default is USE_TRAILDEFS
6b79
Column 0 (x0000), Len 5 (x0005)
| ky Transactional Record
0000 0005 0000 0001 3200 0100 0900 0000 0576 6963 | ........2........vic
GGS tokens:
TokenID x52 'R' ORAROWID Info x00 Length 20
4141 4158 6b48 4141 4541 4141 4139 3941 4142 0001 | AAAXkHAAEAAAA99AAB..
TokenID x74 't' ORATAG Info x01 Length 0
TokenID x4c 'L' LOGCSN Info x00 Length 7
3634 3530 3833 34 | 6450834
TokenID x36 '6' TRANID Info x00 Length 9
362e 3235 2e33 3431 39 | 6.25.3419
Classic Integrated
If this shows High water mark SCN, then do a next and note
down the RBA. This means there are no transactions between LWM
and HWM
Logdump>n
Copyright 2015 Oracle and/or its affiliates. All rights reserved. |
REPOSITION THE PROCESSES
On Source
ggsci> alter extract <pump_name, extseqno <seqno>, extrba <rba>
ggsci> info <pump_name>, showch and note down write checkpoint seqno
On Target
Alter replicat <rep_name>, extseqno<write checkpoint seqno> extrba 0
Any missing trails are now automatically rebuilt by bouncing the Extract Pump.
Once trail files have been restored, restart the Replicat Do not use
NOFILTERDUPTRANSACTIONS
Use when Extract was repositioned to a new start point (ATCSN or AFTERCSN
option of "START EXTRACT") and you are confident that there are duplicate
transactions in the trail that could cause Replicat to abend.
If the database is Oracle, this option is valid only for Replicat in nonintegrated
mode.