Salesforce

How to determine the correct ai extent number to apply to target first?

« Go Back

Information

 
TitleHow to determine the correct ai extent number to apply to target first?
URL NameP128467
Article Number000129817
EnvironmentProduct: OpenEdge Replication
Version: 10.x, 11.x
OS: All supported platforms
Other: DSRUTIL recovery agent
Question/Problem Description
How to determine the correct LOCKED AI extent number to apply to a target replication enabled database first?
Which extent to use for DSRUTIL target -C ApplyExtent
Steps to Reproduce
Clarifying Information
Error Message
Defect NumberEnhancement OE00164214 / PSC00197133
Enhancement Number
Cause
Resolution
An Enhancement has been raised for consideration in future products to include the after-image file name in dsrutil -C recovery agent output.

Provided replication enabled source database ai files are still available, before transitioning a target database it may be necessary to first apply remaining LOCKED ai extents that have not yet been applied to the replication enabled target database with DSRUTIL target -C applyextent.  For further description and use-case information on this utility refer to  What is DSRUTIL applyextent?  

In order to achieve this, information from the output of "dsrutil target -C recovery agent" needs to be triangulated while the target database is in PRE-TRANSITION mode.

Example:
  Replication local agent information:
    Last Block:                     Incomplete
    Last block received location:   area: 16, seq: 119, loc: 2736128, offset: 0
    Last block processed location:  area: 0, seq: 0, loc: 0, offset: 0
    Last block ACKed location:      area: 16, seq: 119, loc: 819200, offset: 0
    Last block received:            no date
    Last block ACKed:               no date
    ID of the last TX begin:        366
    ID of the last TX end:          367
    Time of last TX end:           
Tue Jan 29 13:01:23 2013
    Last AI Extent processed
      AIMAGE BEGIN date:            Mon Jan 21 12:16:20 2013
      AIMAGE NEW date:              Tue Jan 29 12:58:11 2013
      After-Image File Number:      119
      File Last Opened:             Tue Jan 29 12:58:11 2013

      Completely Applied to Target: No

METHOD 1: Use the Storage Area Number from 
dsrutil -C recovery agent output
 
Effectively, each AI file is given a Storage Area Number. In this example "area:16" equates to the 4th ai file: source.a4
Last block ACKed location:      area: 16, seq: 119, loc: 819200, offset: 0

The following VST code can be used to query ai extent area numbers:
 
FOR EACH _area WHERE _area._area-type =7 NO-LOCK:
   DISPLAY _area._area-name _area._area-num .
END.

METHOD 2: Use the AI Sequence Number from dsrutil -C recovery agent output

As AI files are re-used, the Sequence Number increments. In this example, the ai SEQUENCE number is 119:
After-Image File Number:      119

If the source database is accessible, parse the following output for the Sequence number:
$  rfutil source -C aimage list

Otherwise, scan the ai files and parse for the sequence number:
            
$   rfutil source -C aimage scan -a repl\source\source.a4 
 
 This is aimage file number 119 since the last AIMAGE BEGIN. (1642)

METHOD 3: Use the AIMAGE NEW date from dsrutil -C recovery agent output

When an AI file is switched to, the date timestamp is recorded. In this example transaction notes starting Tue Jan 29 12:58:11 2013
AIMAGE NEW date:              Tue Jan 29 12:58:11 2013

Parse the source.lg file (if available) for the timestamp + 3777 messages.
Confirm the 3778 message with the sequence number above.

12:58:11.026+0100] P-3420 T-800   I Usr     5: (3777)  Switched to ai extent repl\source\source.a4.
12:58:11.026+0100] P-3420 T-800   I Usr     5: (3778)  This is after-image file number 119 since the last AIMAGE BEGIN


 
Workaround
Notes
Keyword Phrase
Last Modified Date11/20/2020 7:32 AM

Powered by