Resending a PLOG

 How do we resend a PLOG?

 A PLOG can be resent from the MINE process to the APPLY process by using an internal engine command. Please see Internal Commands for more information.

The process is:

  1. Stop the MINE and APPLY processes
  2. In the console type (use the PLOG sequence instead of X):

    dbvrep> ENGINE MINE RESET TO PLOG X
  3. On the target or apply database, run:

    SQL> delete dbvrep.dbrsapply_plog_history where sequence>=X;

    Please create a dummy dbrsapply_plog_history table before executing above command for backup purpose. ( i.e. dbrsapply_plog_history_temp)

  4. On the target or Apply server, move all the plogs >= sequence X that are in the "apply" directory to another location for backup purposes. 
  5. On the source or Mine server, move all the plogs >= sequence X that are in the "mine" directory to another location for backup purposes.  
  6. Restart MINE process
  7. Restart APPLY process

The following message in the log file may indicate that a PLOG needs to be resent if this message does not progress: 

WARN-2403: Incomplete PLOG X, but not an online log. Rerequesting it from mine, sleeping and trying again

How to determine what is X?

You can set plog sequence X to the most recent uncorrupted plog. Usually X should be equal to the plog sequence APPLY was processing before shutdown. But if you are not sure you can always set X 2-3 sequences behind the actual APPLY plog. There is no issue with this. Replicate is aware of the changes that have already been applied to the target and will not try to re-apply them. However, it will have to read through any previously applied plogs to determine this, and that may take some time, depending on the size of the plogs and the data contained within. Generally speaking there is usually no reason to set X too far in the past. Whatever plog sequence you choose you need to ensure that the corresponding archlogs exist.

MINE will re-mine all plogs from and including sequence X. APPLY will process all plogs from and including sequence X.