()

Fixing OGG-05500 Detected Database Metadata Mismatch Between Current Trail File


In this blog we will perform require steps to resolve ERROR OGG-05500 Detected database metadata mismatch between current trail file


OGG Setup – Source (Window Server)

GGSCI (test-machine01) 153> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING
EXTRACT     RUNNING     EC232       00:00:00      00:00:08
EXTRACT     RUNNING     PJ173       00:00:04      00:00:09


OGG Setup – Target (Linux Server)

GGSCI (test-machine02) 156> info RC232

REPLICAT   RC232     Last Started 2021-04-04 10:46   Status ABENDED
Checkpoint Lag       00:00:00 (updated 60:32:53 ago)
Log Read Checkpoint  File /u01/ggate/p_file_C232/ra000123
                     2021-04-01 12:25:37.610605  RBA 838641597


Step 1. Replicat Process Abended in Target: As you will notice Replicat RC232 Status is ABENDED, Check replicat process rpt file to know the cause of ABEND. Use command show evn to get the rpt file location.

1GGSCI (test-machine02) 4> show evn

Parameter settings:

SET SUBDIRS    ON
SET DEBUG      OFF

Current directory: /u01/ggate/ucas

Using subdirectories for all process files

Editor:  vi

Reports (.rpt)                 /u01/ggate/ucas/dirrpt
Parameters (.prm)              /u01/ggate/ucas/dirprm
Stdout (.out)                  /u01/ggate/ucas/dirout
Replicat Checkpoints (.cpr)    /u01/ggate/ucas/dirchk
Extract Checkpoints (.cpe)     /u01/ggate/ucas/dirchk
Process Status (.pcs)          /u01/ggate/ucas/dirpcs
SQL Scripts (.sql)             /u01/ggate/ucas/dirsql
Database Definitions (.def)    /u01/ggate/ucas/dirdef


GGSCI (test-machine02) 5>

[oracle@test-machine02 dirrpt]$ cd /u01/ggate/ucas/dirrpt
[oracle@test-machine02 dirrpt]$ vi RC232.rpt

: [/u01/ggate/ucas/replicat(__gxx_personality_v0+0x342) [0x4c4caa]]

2021-04-04 09:46:37  ERROR   OGG-05500  Detected database metadata mismatch between current trail file /u01/ggate/p_file_C232/ra000124 and the previous sequence.
*DBCHARSET: [0]/[1003]
*DBCLIENTCHARSET: [0]/[1003].


Step 2. Take note of Current Trail Files in Source: Use the below command to get current trail files information for the Extract and Pump process. With the below command you will notice Extract process EC232 is writing to local trail file no 73 and Pump process PJ173 reading local trail file 73 and writing to remote trail file 126.

GGSCI (test-machine01) 154>

GGSCI (test-machine01) 172> info EC232 detail

EXTRACT    EC232     Last Started 2021-04-04 09:55   Status STOPPED
Checkpoint Lag       00:00:00 (updated 00:01:05 ago)
Log Read Checkpoint  Oracle Redo Logs
                     2021-04-04 09:56:49  Seqno 286, RBA 27162112
                     SCN 3.875304899 (13760206787)

  Target Extract Trails:

  Trail Name                                       Seqno        RBA     Max MB Trail Type

  E:\ggate\ext_file\ea                                73       1108       1000 EXTTRAIL




GGSCI (test-machine01) 173> info PJ173 detail

EXTRACT    PJ173     Last Started 2021-04-04 09:55   Status STOPPED
Checkpoint Lag       00:00:00 (updated 00:01:26 ago)
Log Read Checkpoint  File E:\ggate\ext_file\ea000073
                     2021-04-04 09:55:39.968000  RBA 1108

  Target Extract Trails:

  Trail Name                                       Seqno        RBA     Max MB Trail Type

  /u01/ggate/p_file_C232/ra                          126       1242       1000 RMTTRAIL

  Extract Source                          Begin             End


Step 3. Stop Extract and Pump Process in Source: Use the below command to stop both processes Extract and Pump.

GGSCI (test-machine01) 154> send extract EC232 logend

Sending LOGEND request to EXTRACT EC232 ...
YES.


GGSCI (test-machine01) 155>

GGSCI (test-machine01) 155> stop EC232

Sending STOP request to EXTRACT EC232 ...
Request processed.


GGSCI (test-machine01) 156>

GGSCI (test-machine01) 156> send extract PJ173 logend

Sending LOGEND request to EXTRACT PJ173 ...
YES.


GGSCI (test-machine01) 157>

GGSCI (test-machine01) 157> stop PJ173

Sending STOP request to EXTRACT PJ173 ...
Request processed.


GGSCI (test-machine01) 158>


Step 4. Perform ETROLLOVER on Extract and Pump Process in Source: With ETROLLOVER command new trail file will be created with new metadata. After the ETROLLOVER command you will notice both Extract and Process Trail files number incremented by 1. Now Extract EC232 local trail file number is 74 and Pump PJ173 remote trail file number is 127.

GGSCI (test-machine01) 175> ALTER EXTRACT EC232, ETROLLOVER

2021-04-04 10:01:22  INFO    OGG-01520  Rollover performed.  For each affected output trail of Version 10 or higher format, after starting the source extract, issue
ALTER EXTSEQNO for that trail's reader (either pump EXTRACT or REPLICAT) to move the reader's scan to the new trail file;  it will not happen automatically.
EXTRACT altered.


GGSCI (test-machine01) 176>
GGSCI (test-machine01) 176> info EC232 detail

EXTRACT    EC232     Initialized   2021-04-04 09:55   Status STOPPED
Checkpoint Lag       00:00:00 (updated 00:00:14 ago)
Log Read Checkpoint  Oracle Redo Logs
                     2021-04-04 09:56:49  Seqno 286, RBA 27162112
                     SCN 3.875304899 (13760206787)

  Target Extract Trails:

  Trail Name                                       Seqno        RBA     Max MB Trail Type

  E:\ggate\ext_file\ea                                74          0       1000 EXTTRAIL



GGSCI (test-machine01) 177> ALTER EXTRACT PJ173, ETROLLOVER

2021-04-04 10:02:21  INFO    OGG-01520  Rollover performed.  For each affected output trail of Version 10 or higher format, after starting the source extract, issue
ALTER EXTSEQNO for that trail's reader (either pump EXTRACT or REPLICAT) to move the reader's scan to the new trail file;  it will not happen automatically.
EXTRACT altered.


GGSCI (test-machine01) 178> info PJ173 detail

EXTRACT    PJ173     Initialized   2021-04-04 09:55   Status STOPPED
Checkpoint Lag       00:00:00 (updated 00:00:07 ago)
Log Read Checkpoint  File E:\ggate\ext_file\ea000073
                     2021-04-04 09:55:39.968000  RBA 1108

  Target Extract Trails:

  Trail Name                                       Seqno        RBA     Max MB Trail Type

  /u01/ggate/p_file_C232/ra                          127          0       1000 RMTTRAIL

  Extract Source                          Begin             End

  E:\ggate\ext_file\ea000073              * Initialized *   2021-04-04 09:55


Step 5. Update Pump PJ173 Process in Source: From the above output, you might have noticed Extract EC232 local trail file incremented to 74 but Pump PJ173 still showing as reading from 73 Local trail files. This we need to update manually. Use ALTER command to update pump PJ173.

GGSCI (test-machine01) 179> ALTER EXTRACT PJ173, EXTSEQNO 74, EXTRBA 0
EXTRACT altered.


Step 6. Update Replicat RC232 Process in Target: Follow the same procedure as above to update Replicat RC232 to read from new remote trail file 127.

GGSCI (test-machine02) 159> ALTER REPLICAT RC232, EXTSEQNO 127, EXTRBA 0
REPLICAT altered.


Step 7. Start Extract EC232 and Pump PJ173 Process in Source: After the above steps are done now we can start both Extract EC232 and Pump PJ173 processes in Source.

GGSCI (test-machine01) 181>

GGSCI (test-machine01) 181> start  EC232

Sending START request to MANAGER ...
EXTRACT EC232 starting


GGSCI (test-machine01) 182> start PJ173

Sending START request to MANAGER ...
EXTRACT PJ173 starting


GGSCI (test-machine01) 183> info all

Program     Status      Group       Lag at Chkpt  Time Since Chkpt

MANAGER     RUNNING
EXTRACT     RUNNING     EC232       00:00:00      00:00:01
EXTRACT     RUNNING     PJ173       00:00:00      00:00:09


GGSCI (test-machine01) 184>


Step 8. Start Replicat Process in Target: Start replicate process RC232 now in Target.

GGSCI (test-machine02) 160> start RC232

Sending START request to MANAGER ...
REPLICAT RC232 starting

GGSCI (test-machine02) 156> info RC232

REPLICAT   RC232     Last Started 2021-04-04 10:46   Status RUNNING
Checkpoint Lag       00:00:00 (updated 00:00:08 ago)
Log Read Checkpoint  File /u01/ggate/p_file_C232/ra000127
                     2021-04-04 10:46:39.968000  RBA 105


Reference MOS: OGG-05500 Detected Database Metadata Mismatch between Current Trail File (Doc ID 1605434.1)

 

This document is only for learning purpose and always validate in the LAB environment first before applying in the LIVE environment.


Hope so you like this article
!
Please share your valuable feedback/comments/subscribe and follow us below and don’t forget to click on the bell icon to get the most recent update. Click here to understand more about our pursuit.

Related Articles


Loading

How useful was this post?

Click on a star to rate it!

Average rating / 5. Vote count:

No votes so far! Be the first to rate this post.

As you found this post useful...

Follow us on social media!

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?

Jamsher Khan

Hello and welcome to DBsGuru,I’m Jamsher Khan working as Senior Oracle DBA based in KSA-Jeddah, I have working experience in Oracle DBA, SQL Server, MySql, PostgreSQL, Linux, Golden Gate, ODA.Thanks for the visits!Share Learn Grow!

Leave a Reply

Your email address will not be published. Required fields are marked *