How Does HVR Handle an Oracle Database Rollback?
Question
If I roll back an Oracle source database to a restore point, does HVR automatically return to the same capture position? How do I recover replication, and do I need a new initial load?
Environment
- HVR 6
- Source: Oracle
Answer
HVR capture position
HVR stores its capture checkpoint separately from the source database. After an Oracle rollback, HVR still holds the system change number (SCN) it saved before the rollback.
Database restore detection
After you flash back the source database to a restore point, you must open it with OPEN RESETLOGS. HVR may detect the reset, but Capture can't continue if the resetlogs ID changes and the new log address is lower than the last address HVR captured.
In this case, capture jobs may fail with an error such as F_JT0400. For an example, see Error: F_JT0400: Log Scanning Error F_JZ117C.
In an Active Data Guard failover that uses OPEN RESETLOGS, the secondary instance starts a new redo incarnation from the failover point. With Flashback, Oracle starts the new incarnation from the earlier restore point.
Manual recovery
Reactivate replication to sync HVR with the restored source database metadata and establish a capture position in the new redo incarnation.
Initial load requirement
We recommend a new initial load after a rollback. The target likely still contains changes that Oracle rolled back on the source.
Procedure
To recover HVR after an Oracle rollback:
- Stop any running HVR capture jobs for the channel.
- Perform Activate Replication with all replication components selected, including Capture Time and Transaction Files. For Capture Start Moment, select Rewind to Start of Source Databases' Oldest Transaction and Emit from Now.
- Perform a full Refresh to bring the target back in sync with the source.