Friday, March 20, 2020

Goldengate Tracing



To enable trace for EXT/PUMP/REPLICAT we can achieve in 2 ways

1.        Using trace/trace2 command
2.        Using Activity Logging


GGSCI (myoradev.domain.com) 2> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING
REPLICAT    RUNNING     RTRG1DB    82:10:06      00:00:00
REPLICAT    RUNNING     RTRG2DB    00:00:00      00:00:08

Add below trace command in your param file and the restart and wait for some time and stop the process then you see trace file with the path you specified is generated and you can view the file

TRACE /goldengate/home/dirrpt/trace.trc
(or)
TRACE2 /goldengate/home/dirrpt/trace2.trc

where
TRACE    :   Provides step-by-step processing information.
TRACE2  :   Identifies the code segments on which Extract or Replicat is spending the most time.

Or if you want to enable trace ONLINE without stopping the GG Process then use the below send command which will enable trace and then turn off whenever you want

GGSCI (myoradev.domain.com) 3> send RTRG1DB trace RTRG1DB_trace.txt

Sending trace request to REPLICAT RTRG1DB ...
Trace file /goldengate/home/RTRG1DB_trace.txt opened.

To Stop/Disable Trace :

GGSCI (myoradev.domain.com) 4> send RTRG1DB trace off

Sending trace request to REPLICAT RTRG1DB ...
Closing all trace files..

Activity tracing :

1. Please save the below xml file with your process name like gglog-EXTNAME.xml , the process name should be CAPITAL letters .
2. Copy gglog-EXTNAME.xml to the Oracle GoldenGate Installation Directory.
3. Start the process and perform the DML/DDL operations
4. Move the gglog-EXTNAME.xml file to different location. Then it will stop the logging.
5. There will be a log generated in the same Oracle GoldenGate installation directory with name gglog-EXTNAME.log

<?xml version="1.0"?>
<configuration reset="true">
<appender name="myAppender" class="RollingFileAppender">
<param name="File" value="gglog-%I.log"/>
<param name="MaxBackupIndex" value="9"/>
<param name="BufferedIO" value="false"/>
<param name="MaxFileSize" value="10MB" />
<layout class="PatternLayout">
<param name="Pattern" value="%d{%Y-%m-%d %H:%M:%S} %-5p|%-30.30c|%5L %-24.24C{2} | %m%n"/>
</layout>
</appender>
<root>
<level value="all"/>
<appender-ref name="myAppender"/>
</root>
</configuration>

Oracle Reference Doc: 
OGG Activity Logging Tracing (Doc ID 1204284.1)

0 comments:

Post a Comment

Auto Scroll Stop Scroll