Skip to main content

I have been exploring the new features or the enhancements of Oracle GoldenGate 21c and have written a few articles that are below,

  • Unified Build for Oracle Database

  • https://www.oracle-scn.com/oracle-goldengate-21c-new-feature-oracle-database-unified-build-support/

  • OGG 21c – Classic Architecture deprecated

  • https://www.oracle-scn.com/oracle-goldengate-21c-classic-architecture-deprecated/

  • Oracle GoldenGate 21c Microservices Installation

  • https://www.oracle-scn.com/oracle-goldengate-21c-microservices-installation/

    There is another minor enhancement in OGG 21c. A token “DB_UNIQUE_NAME” got added to the TRAIL FILE HEADER.

    What is TRAIL FILE HEADER?

    We cannot open the trail file by using vi editor. It leads to corruption of the trail file. So, we need to use the utility called LOGDUMP.

    To know more about LOGDUMP, please check the below link,

    https://www.oracle-scn.com/oracle-goldengate-logdump/

    “When you open the trail file the first you see is the FILE HEADER. But you need to enable it by using the below command,

    FILEHEADER OFF		-	No details of header tokens are displayed
    FILEHEADER ON 		-	Displays the main header tokens
    FILEHEADER DETAIL	-	Displays the main header tokens along with the sub tokens 

    When you enable FILEHEADER, it displays the contents of the header tokens of the trail file currently opened. It is stored as a record in the trail file. The data which is stored in the trail header are the information which are required for the OGG process to identify the records are in a format that the current version of OGG supports. These data are stored as TOKENS. You can also retrieve the values of these tokens and store them in a table.

    The main header tokens are,

    TrailInfo
    MachineInfo
    DatabaseInfo
    ProducerInfo
    ContinunityInfo 

    Below is a simple example of the TRAIL FILE HEADER with DETAIL option. You could see Main tokens along with sub tokens.

    2020/12/30 12:10:25.095.549 FileHeader           Len  1412 RBA 0 
    Name: *FileHeader* 
     3000 0308 3000 0008 4747 0d0a 544c 0a0d 3100 0002 | 0...0...GG..TL..1...  
     0006 3200 0004 2000 0000 3300 0008 02f2 dddc 3cf5 | ..2... ...3.......<.  
     6d7d 3400 0030 002e 7572 693a 6f67 6731 3963 2d32 | m}4..0..uri:ogg19c-2  
     3a6c 6f63 616c 646f 6d61 696e 3a3a 7530 313a 6170 | :localdomain::u01:ap  
     703a 6f67 6731 3233 3a49 4e45 5854 3600 0016 0014 | p:ogg123:INEXT6.....  
     2e2f 6469 7264 6174 2f61 6130 3030 3030 3030 3033 | ./dirdat/aa000000003  
     3700 0001 0138 0000 0400 0000 0339 ff00 0800 0000 | 7....8.......9......  
    
    GroupID x30 '0' TrailInfo        Info x00  Length  776 
     3000 0308 3000 0008 4747 0d0a 544c 0a0d 3100 0002 | 0...0...GG..TL..1...  
     0006 3200 0004 2000 0000 3300 0008 02f2 dddc 3cf5 | ..2... ...3.......<.  
     6d7d 3400 0030 002e 7572 693a 6f67 6731 3963 2d32 | m}4..0..uri:ogg19c-2  
     3a6c 6f63 616c 646f 6d61 696e 3a3a 7530 313a 6170 | :localdomain::u01:ap  
     703a 6f67 6731 3233 3a49 4e45 5854 3600 0016 0014 | p:ogg123:INEXT6.....  
     2e2f 6469 7264 6174 2f61 6130 3030 3030 3030 3033 | ./dirdat/aa000000003  
     3700 0001 0138 0000 0400 0000 0339 ff00 0800 0000 | 7....8.......9......  
     0000 0000 003a 0000 8101 3000 0000 0000 0000 0000 | .....:....0.........  
     0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 | ....................  
     0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 | ....................  
     0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 | ....................  
     0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 | ....................  
     0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 | ....................  
     0000 0000 0000 0000 0000 0000 0000 0000 0000 3bff | ..................;.  
     0081 0000 0000 0000 0000 0000 0000 0000 0000 0000 | ....................  
     0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 | ....................  
     0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 | ....................  
     0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 | ....................  
     0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 | ....................  
     0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 | ....................  
     0000 0000 0000 0000 0000 003c 0000 0800 0000 0000 | ...........<........  
     0000 003d ff00 0800 0000 0000 0000 003e 0000 8107 | ...=...........>....  
     3333 3638 3638 3900 0000 0000 0000 0000 0000 0000 | 3368689.............  
     0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 | ....................  
     0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 | ....................  
     0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 | ....................  
     0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 | ....................  
     0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 | ....................  
     0000 0000 0000 0000 3f00 0008 0000 0000 0000 0004 | ........?...........  
     40ff 0081 0000 0000 0000 0000 0000 0000 0000 0000 | @...................  
     0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 | ....................  
     0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 | ....................  
     0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 | ....................  
     0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 | ....................  
     0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 | ....................  
     0000 0000 0000 0000 0000 0000 0041 0000 08ff ffff | .............A......  
     ffff ffff ff42 0000 3300 002c 2e2e 2e2e 2e2e 2e2e | .....B..3..,........  
     2e2e 2e2e 2e2e 2e2e 2e2e 2e2e 2e2e 2e2e 2e2e 2e2e | ....................  
     2e2e 2e2e 2e2e 2e2e 2e2e 2e2e 2e2e 2e2e           | ................  
    TokenID x30 '0' Signature        Info x00  Length    8 
     4747 0d0a 544c 0a0d                               | GG..TL..  
    TokenID x31 '1' Compatibility    Info x00  Length    2 
     0006                                              | ..  
    TokenID x32 '2' Charset          Info x00  Length    4 
     2000 0000                                         |  ...  
    TokenID x33 '3' CreationTime     Info x00  Length    8 
     02f2 dddc 3cf5 6d7d                               | ....<.m}  
    TokenID x34 '4' URI              Info x00  Length   48 
     002e 7572 693a 6f67 6731 3963 2d32 3a6c 6f63 616c | ..uri:ogg19c-2:local  
     646f 6d61 696e 3a3a 7530 313a 6170 703a 6f67 6731 | domain::u01:app:ogg1  
     3233 3a49 4e45 5854                               | 23:INEXT  
    TokenID x36 '6' Filename         Info x00  Length   22 
     0014 2e2f 6469 7264 6174 2f61 6130 3030 3030 3030 | .../dirdat/aa0000000  
     3033                                              | 03  
    TokenID x37 '7' MultiPart        Info x00  Length    1 
     01                                                | .  
    TokenID x38 '8' Seqno            Info x00  Length    4 
     0000 0003                                         | ....  
    TokenID x39 '9' FileSize         Info xff  Length    8 
     0000 0000 0000 0000                               | ........  
    TokenID x3a ':' FirstCSN         Info x00  Length  129 
     0130 0000 0000 0000 0000 0000 0000 0000 0000 0000 | .0..................  
     0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 | ....................  
     0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 | ....................  
     0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 | ....................  
     0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 | ....................  
     0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 | ....................  
     0000 0000 0000 0000 00                            | .........  
    TokenID x3b ';' LastCSN          Info xff  Length  129 
     0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 | ....................  
     0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 | ....................  
     0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 | ....................  
     0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 | ....................  
     0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 | ....................  
     0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 | ....................  
     0000 0000 0000 0000 00                            | .........  
    TokenID x3c '<' FirstIOTime      Info x00  Length    8 
     0000 0000 0000 0000                               | ........  
    TokenID x3d '=' LastIOTime       Info xff  Length    8 
     0000 0000 0000 0000                               | ........  
    TokenID x3e '>' LOGBSN           Info x00  Length  129 
     0733 3336 3836 3839 0000 0000 0000 0000 0000 0000 | .3368689............  
     0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 | ....................  
     0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 | ....................  
     0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 | ....................  
     0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 | ....................  
     0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 | ....................  
     0000 0000 0000 0000 00                            | .........  
    TokenID x3f '?' BITFLAGS         Info x00  Length    8 
     0000 0000 0000 0004                               | ........  
    TokenID x40 '@' UNUSEDSEQUENCE   Info xff  Length  129 
     0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 | ....................  
     0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 | ....................  
     0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 | ....................  
     0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 | ....................  
     0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 | ....................  
     0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 | ....................  
     0000 0000 0000 0000 00                            | .........  
    TokenID x41 'A' InputCheckpoint  Info x00  Length    8 
     ffff ffff ffff ffff                               | ........  
    TokenID x42 'B' TrailEncryption  Info x00  Length   51 
     0000 2c2e 2e2e 2e2e 2e2e 2e2e 2e2e 2e2e 2e2e 2e2e | ..,.................  
     2e2e 2e2e 2e2e 2e2e 2e2e 2e2e 2e2e 2e2e 2e2e 2e2e | ....................  
     2e2e 2e2e 2e2e 2e00 0000 00                       | ...........  
    
    GroupID x31 '1' MachineInfo      Info x00  Length  130 
     3100 0082 3000 0007 0005 4c69 6e75 7831 0000 1600 | 1...0.....Linux1....  
     146f 6767 3139 632d 322e 6c6f 6361 6c64 6f6d 6169 | .ogg19c-2.localdomai  
     6e32 0000 2400 2234 2e31 342e 3335 2d31 3930 322e | n2..$."4.14.35-1902.  
     3330 332e 342e 312e 656c 3775 656b 2e78 3836 5f36 | 303.4.1.el7uek.x86_6  
     3433 0000 2500 2323 3220 534d 5020 4672 6920 4d61 | 43..%.##2 SMP Fri Ma  
     7920 3239 2031 343a 3536 3a34 3120 5044 5420 3230 | y 29 14:56:41 PDT 20  
     3230 3400 0008 0006 7838                          | 204.....x8  
    TokenID x30 '0' Sysname          Info x00  Length    7 
     0005 4c69 6e75 78                                 | ..Linux  
    TokenID x31 '1' Nodename         Info x00  Length   22 
     0014 6f67 6731 3963 2d32 2e6c 6f63 616c 646f 6d61 | ..ogg19c-2.localdoma  
     696e                                              | in  
    TokenID x32 '2' Release          Info x00  Length   36 
     0022 342e 3134 2e33 352d 3139 3032 2e33 3033 2e34 | ."4.14.35-1902.303.4  
     2e31 2e65 6c37 7565 6b2e 7838 365f 3634           | .1.el7uek.x86_64  
    TokenID x33 '3' Version          Info x00  Length   37 
     0023 2332 2053 4d50 2046 7269 204d 6179 2032 3920 | .##2 SMP Fri May 29   
     3134 3a35 363a 3431 2050 4454 2032 3032 30        | 14:56:41 PDT 2020  
    TokenID x34 '4' Hardware         Info x00  Length    8 
     0006 7838 365f 3634                               | ..x86_64  
    
    GroupID x32 '2' DatabaseInfo     Info x00  Length  362 
     3200 016a 3000 0002 0007 3100 0007 0005 4f52 434c | 2..j0.....1.....ORCL  
     5432 0000 0700 056f 7263 6c74 3300 0004 0000 0000 | T2.....orclt3.......  
     3400 0002 000c 3500 0002 0002 3600 00e7 00e5 4f72 | 4.....5.....6.....Or  
     6163 6c65 2044 6174 6162 6173 6520 3132 6320 456e | acle Database 12c En  
     7465 7270 7269 7365 2045 6469 7469 6f6e 2052 656c | terprise Edition Rel  
     6561 7365 2031 322e 322e 302e 312e 3020 2d20 3634 | ease 12.2.0.1.0 - 64  
     6269 7420 5072 6f64 7563 7469 6f6e 0a50 4c2f 5351 | bit Production.PL/SQ  
     4c20 5265 6c65 6173 6520 3132 2e32 2e30 2e31 2e30 | L Release 12.2.0.1.0  
     202d 2050 726f 6475 6374 696f 6e0a 434f 5245 0931 |  - Production.CORE.1  
     322e 322e 302e 312e 3009 5072 6f64 7563 7469 6f6e | 2.2.0.1.0.Production  
     0a54 4e53 2066 6f72 204c 696e 7578 3a20 5665 7273 | .TNS for Linux: Vers  
     696f 6e20 3132 2e32 2e30 2e31 2e30 202d 2050 726f | ion 12.2.0.1.0 - Pro  
     6475 6374 696f 6e0a 4e4c 5352 544c 2056 6572 7369 | duction.NLSRTL Versi  
     6f6e 2031 322e 322e 302e 312e 3020 2d20 5072 6f64 | on 12.2.0.1.0 - Prod  
     7563 7469 6f6e 0a37 0000 0400 0000 0038 0000 0c00 | uction.7.......8....  
     0a31 322e 322e 302e 312e 3039 0000 0400 0000 013a | .12.2.0.1.09.......:  
     0000 0200 003b 0000 0400 0000 013c 0000 1400 0000 | .....;.......<......  
     1014 1414 1414 1414 1414 1414 1411 1414 143d 0000 | .................=..  
     0500                                              | ..  
    TokenID x30 '0' Vendor           Info x00  Length    2 
     0007                                              | ..  
    TokenID x31 '1' Name             Info x00  Length    7 
     0005 4f52 434c 54                                 | ..ORCLT  
    TokenID x32 '2' Instance         Info x00  Length    7 
     0005 6f72 636c 74                                 | ..orclt  
    TokenID x33 '3' Charset          Info x00  Length    4 
     0000 0000                                         | ....  
    TokenID x34 '4' MajorVersion     Info x00  Length    2 
     000c                                              | ..  
    TokenID x35 '5' MinorVersion     Info x00  Length    2 
     0002                                              | ..  
    TokenID x36 '6' VerString        Info x00  Length  231 
     00e5 4f72 6163 6c65 2044 6174 6162 6173 6520 3132 | ..Oracle Database 12  
     6320 456e 7465 7270 7269 7365 2045 6469 7469 6f6e | c Enterprise Edition  
     2052 656c 6561 7365 2031 322e 322e 302e 312e 3020 |  Release 12.2.0.1.0   
     2d20 3634 6269 7420 5072 6f64 7563 7469 6f6e 0a50 | - 64bit Production.P  
     4c2f 5351 4c20 5265 6c65 6173 6520 3132 2e32 2e30 | L/SQL Release 12.2.0  
     2e31 2e30 202d 2050 726f 6475 6374 696f 6e0a 434f | .1.0 - Production.CO  
     5245 0931 322e 322e 302e 312e 3009 5072 6f64 7563 | RE.12.2.0.1.0.Produc  
     7469 6f6e 0a54 4e53 2066 6f72 204c 696e 7578 3a20 | tion.TNS for Linux:   
     5665 7273 696f 6e20 3132 2e32 2e30 2e31 2e30 202d | Version 12.2.0.1.0 -  
     2050 726f 6475 6374 696f 6e0a 4e4c 5352 544c 2056 |  Production.NLSRTL V  
     6572 7369 6f6e 2031 322e 322e 302e 312e 3020 2d20 | ersion 12.2.0.1.0 -   
     5072 6f64 7563 7469 6f6e 0a                       | Production.  
    TokenID x37 '7' ClientCharset    Info x00  Length    4 
     0000 0000                                         | ....  
    TokenID x38 '8' ClientVerString  Info x00  Length   12 
     000a 3132 2e32 2e30 2e31 2e30                     | ..12.2.0.1.0  
    TokenID x39 '9' ClientNCharset   Info x00  Length    4 
     0000 0001                                         | ....  
    TokenID x3a ':' DbLocale         Info x00  Length    2 
     0000                                              | ..  
    TokenID x3b ';' DbNCharset       Info x00  Length    4 
     0000 0001                                         | ....  
    TokenID x3c '<' DbObjNameMetadata Info x00  Length   20 
     0000 0010 1414 1414 1414 1414 1414 1414 1114 1414 | ....................  
    TokenID x3d '=' DbTimeZone       Info x00  Length    5 
     0003 474d 54                                      | ..GMT  
    
    GroupID x33 '3' ProducerInfo     Info x00  Length  116 
     3300 0074 3000 0007 0005 494e 4558 5431 0000 0200 | 3..t0.....INEXT1....  
     0332 0000 0200 0c33 0000 0200 0334 0000 0200 0035 | .2.....3.....4.....5  
     0000 0200 0136 0000 0200 0437 0000 4100 3f56 6572 | .....6.....7..A.?Ver  
     7369 6f6e 2031 322e 332e 302e 312e 3420 4f47 4743 | sion 12.3.0.1.4 OGGC  
     4f52 455f 3132 2e33 2e30 2e31 2e30 5f50 4c41 5446 | ORE_12.3.0.1.0_PLATF  
     4f52 4d53 5f31 3830 3431 352e 3033 3539           | ORMS_180415.0359  
    TokenID x30 '0' Name             Info x00  Length    7 
     0005 494e 4558 54                                 | ..INEXT  
    TokenID x31 '1' DataSource       Info x00  Length    2 
     0003                                              | ..  
    TokenID x32 '2' MajorVersion     Info x00  Length    2 
     000c                                              | ..  
    TokenID x33 '3' MinorVersion     Info x00  Length    2 
     0003                                              | ..  
    TokenID x34 '4' MaintLevel       Info x00  Length    2 
     0000                                              | ..  
    TokenID x35 '5' BugFixLevel      Info x00  Length    2 
     0001                                              | ..  
    TokenID x36 '6' BuildNumber      Info x00  Length    2 
     0004                                              | ..  
    TokenID x37 '7' VerString        Info x00  Length   65 
     003f 5665 7273 696f 6e20 3132 2e33 2e30 2e31 2e34 | .?Version 12.3.0.1.4  
     204f 4747 434f 5245 5f31 322e 332e 302e 312e 305f |  OGGCORE_12.3.0.1.0_  
     504c 4154 464f 524d 535f 3138 3034 3135 2e30 3335 | PLATFORMS_180415.035  
     395f 4642 4f                                      | 9_FBO  
    
    GroupID x34 '4' ContinunityInfo  Info x00  Length    8 
     3400 0008 3000 0004                               | 4...0...  
    TokenID x30 '0' RecoveryMode     Info x00  Length    4 
     0000 0001       
    

    As I mentioned earlier, a new token "DB_UNIQUE_NAME" got added to the FILE HEADER under the DatabaseInfo and this is useful when troubleshooting replication issues in an active-active (Bi-Directional) mode of replication environments. The DB_NAME might be the same, but we can easily differentiate it using the DB_UNIQUE_NAME.

    Below is an example of the DatabaseInfo in a FILE HEADER version OGG 12.3

    Below is an example of the DatabaseInfo in a FILE HEADER version OGG 21c

    You can see the DB_UNIQUE_NAME in the above image.

    Cheers 🙂

Leave a Reply

© 2020 ORACLE-SCN. All Rights Reserved.