Question
What happens when the Capture or Integrate process is stopped? Will the replication be impacted at restart?
Environment
Local Data Processing
Answer
Local Data Processing has internal recovery algorithms so that, when a Local Data Processing process is killed and restarted, it will always start again at the correct point. So there is no risk of losing data or duplicated changes due to Local Data Processing crashes. However, with Log-based capture, there is a related issue that must be considered: The retention of the database log files (Ingres journal files or Oracle archive files). When the capture job is stopped for some time it needs to revert to the Ingres journal files / Oracle archive files because the transaction log files (redo logs) are already overwritten. E.g. when the capture job is stopped yesterday and these files are thrown away each night, the capture job will fail when it is restarted today because it can not find the correct point in the available files. To recover from this the channel needs to be reinitialized using Initialize followed by a Refresh.
There are two ways of avoiding this:
- Keep the DBMS log files (e.g Oracle archive files) available for a couple days. As long as the transaction files are available we will start capturing them and integrating them. If you have already backed them up and removed them from them from the source and recovering them may be too time consuming you need to reinitialize the channel and refresh your target data.
- Use hvrlogrelease: A script that can be run from the crontab that makes private copies (hard-links) of the files that still might be needed be Local Data Processing.