Interesting change in ALTER EXTRACT command

OraclegoldengateserviceALTEREXTRACT

Today, while helping a customer, we had to rebuild an extract.  The integrated extract that we rebuilt was stuck in a loop and displaying it was an initial load extract from the HTML5 page (AdminService).  The adminclient (cmd line), said it was working fine.  After the customer rebooted the their GoldenGate Service (GGS) environment, the integrated extract was still having problems.  

At this point, we executed an INFO EXTRACT <extract>, DETAIL and retrieved the sequence number (EXTSEQ) and the relative byte address (EXTRBA).  With this information in hand, we removed the extract and the associated parameter file.  After all, we were going to rebuilt the extract.

The customer the rebuilt the extract using Microsoft VSCode with the RESTful plug-in (makes it really easy and scriptable).  With the integrated extract rebuilt, we attempted to ALTER EXTRACT from the admin service, but there is no options (image 1).

Image 1: alter extract no seqno/rba option

alter_extract_no_seqnorba

This lead us to look at altering the extract from AdminClient within GGS.  The alter extract command that we use was:

adminclient> alter extract <extract>, extseq <num>, extrba <num>

This command caused a syntax error. For anyone and myself, doing GoldenGate for better part of 15 plus years, this was odd.  So, we went and looked up the documentation on ALTER EXTRACT in 19c (here).  The command syntax for ALTER EXTRACT for Admin Client is clearly the same as any veteran to Oracle GoldenGate would remember.

Admin Client Syntax (19c):

ALTER EXTRACT group-name
[, BEGIN (NOW | yyyy-mm-dd[ hh:mi:[ss[.cccccc]]]} |
EXTSEQNO sequence-number
[, EXTRBA archive-offset-number] [, ADD_EXTRACT_attribute] |
SCN value]
[, DESC
[, UPGRADE INTEGRATED TRANLOG]
[, DOWNGRADE INTEGRATED TRANLOG [THREADS number]]
[, THREAD number]

[, ETROLLOVER]
[, ENCRYPTIONPROFILE encryption-profile-name ]
[CRITICAL [ YES | NO ]
[PROFILE profile-name
| [AUTOSTART [ YES | NO ]
[DELAY delay-number]
[AUTORESTART [ YES | NO ]|
[RETRIES retries-number ]|
[WAITSECONDS wait-number ]|
[RESETSECONDS reset-number ]|
[DISABLEONFAILURE [ YES | NO ] ] ]
]

Then we realized or remembered that we were using GoldenGate Service (GGS) and there might have been a few things different from the 19c release to the 21c release. After all, Oracle GoldenGate Service (GGS) is running on 21c.  This prompted me to look at the 21c docs and I was sure it didn’t change; users needed a way to position an extract after rebuilding.  The documentation for 21c (here) provide what the syntax is for ALTER EXTRACT in 21c – there are minor differences:

Admin Client Syntax (21c):

ALTER EXTRACT group-name
[, BEGIN {NOW | yyyy-mm-dd[ hh:mi:[ss[.cccccc]]]} |
[, EXTRBA archive-offset-number] [, ADD_EXTRACT_attribute] |
SCN value]
[, DESC
[, THREAD number]
[, ETROLLOVER]
[, ENCRYPTIONPROFILE encryption-profile-name ]
[CRITICAL [ YES | NO ]
[PROFILE profile-name
| [AUTOSTART [ YES | NO ]
[DELAY delay-number]
[AUTORESTART [ YES | NO ]|
[RETRIES retries-number ]|
[WAITSECONDS wait-number ]|
[RESETSECONDS reset-number ]|
[DISABLEONFAILURE [ YES | NO ] ] ]
]
[, LOGNUM lognum]
[, LOGPOS logpos]

What this meant for the customer, is that the extract could be rebuilt; however, to find the correct position to start the extract from we needed to know how to get the correct System Change Number (SCN) or the correct Relative Byte Address (RBA).  

In discussions with the customer, we decided that it was best to use a known System Change Number (SCN).  With the information we had, the customer knew we could go back an hour.  From here, we used an old post which I wrote in 2014 on how to convert a timestamp to SCN (here).  After the retrieving the SCN, we start the rebuilt extract as follows:

adminclient> alter extract <extract>, scn <scn>

The extract started successfully, remained on the correct trail file (we were over 660ish files) and captured data as expected.

Lesson learned here was, between versions Oracle likes to change things and we need to keep up.  At the same time, we wish subtle differences like this do not get over looked in the release notes.

Please follow and like:
Comments
  • Vin88 proudly stands as one of Asia’s most renowned and high-quality online betting platforms, offering a wide range of trusted and diverse entertainment services such as live casino, sports betting, lottery, card games, jackpot slots, and many other exciting games.

    Highly rated for its credibility and service quality, Vin88 has attracted a large and growing community of players across the market — making it a go-to destination for premium online betting experiences.

  • Vipwin is a top-tier and highly trusted betting platform, offering a wide variety of games to suit every type of player. With hundreds of exciting games and a rich selection of bonuses and promotions, Vipwin ensures that every member enjoys both thrilling entertainment and rewarding opportunities.

  • When it comes to roof installation in Lancaster, Roof Installation Pros stands out for quality and reliability. Their expert team works with all roof types, delivering strong, protective installations that add value. Highly rated for affordable, on-time, and professional roofing work.

  • For dependable and expert roof installation services in Lancaster, Roof Installation Pros is your go-to choice. They specialize in all roofing types, delivering lasting solutions that safeguard your property and boost its value. Count on them for affordable, high-quality, and on-time service.

  • Need top-notch roof installation in Lancaster? Roof Installation Pros delivers professional services with a skilled team ready to handle all roof types. Their work is reliable, durable, and adds value to your home—trusted by many for timely and budget-friendly roofing solutions.

  • For dependable and expert roof installation services in Lancaster, Roof Installation Pros is your go-to choice. They specialize in all roofing types, delivering lasting solutions that safeguard your property and boost its value. Count on them for affordable, high-quality, and on-time service.

Leave a Reply

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

Enquire now

Give us a call or fill in the form below and we will contact you. We endeavor to answer all inquiries within 24 hours on business days.