Hello Samuel
This is a large topic and I cannot really discuss all the potential scenarios in all the details in this reply. If you need further help you should consult IBM or a business partner with expertise in this area to assist you with DR planning.
There are some things you should know
1) CDC keeps its bookmark on the target. The bookmark for an iSeries source indicates the journal receiver and sequence number that has been committed
2) The iSeries engine is scraping the local journal. However the local journal on the standby system recording the changes made to the files by whatever HA software is being used will not have the same sequence numbers or receivers as the local journal on the primary. So if the iSeries is switched over the bookmark by itself cannot be used. [The only way to avoid this is to have some low-level disk synchronous replication or switchable disk, which you clearly do not have from your post]
3) The restart position for replication can be specified manually for an iSeries source using the SETJRNPOS command, either by sequence number or timestamp
4) iSeries has something called a remote journal which is a copy maintained synchronously or asynchronously by the OS - many software-based HA solutions rely on it to transport the changes to the standby iSeries and the HA solution then applies the changes to the files on the standby system, generating entries in the standby local journal that can be scraped in the event of a switchover.
Most switchovers are planned switchovers in which the AS/400 standby is up to date with the AS/400 primary, the target primary is up to date with the AS/400 primary and the target standby is up to date with the target standby. In this scenario you are either testing your switchover procedures or making the source application (and target application possibly) available when the primary systems are down for routine maintenance. Since all four systems are aligned, you can switch over just the primary AS/400 or just the primary target or both.
Unplanned switchovers are by their nature harder to deal with as there is no guarantee with anything other than synchronous replication that any standby will be aligned with its primary or that the target systems will be aligned with the source systems. If the secondary AS/400 is ahead of the target database, then the only challenge is to determine from where to restart the replication using SETJRNPOS. If you have a remote journal you can look at the this to determine the timestamp relating to the target bookmark. If you do not have a remote journal and you do not record the latest apply timestamp in the target data, you will have to set the position to some arbitrary point in the past and probably repeat transactions (which is better than losing transactions). If the standby iSeries is behind the target database, then you have to refresh to avoid data loss. On the other hand the standby iSeries is now the version of the truth and data applied to the target after the source position no longer reflects real events. Unless you are using LiveAudit or writing to flatfiles or Kafka, or have a way of using the target database transaction log to undo, you cannot really undo these changes.
From my experience, the chances of having to perform an unplanned switchover in anger are very small. and generally the HA replication is ahead of the CDC replication when the HA replication is running continuously
Optimising the refresh of a 100 Gb file is possible but outside the scope of this reply.
Hope this helps
Robert
------------------------------
Robert Philo
------------------------------
Original Message:
Sent: Fri December 31, 2021 03:53 AM
From: Samuel SUM
Subject: IBM CDC i-series DR Planning (Situation: Target ahead AS400 Source)
I am planning a new environment with IBM CDC between AS400 and Linux (DB2).
As the diagram is showing the situation, Journal A04 was the producton latest journal position. Unfortunately, it is possible for the DR not synchonized up to the point A04 and say A02.
Then, the target may be synchonized up to A03. How do I recover the CDC replication (w/o full initial load)? Can I get the journal positon of A02 to modify the target database?
It is possible to have a large table with 100G. The downtime for reinitialization is really a concern. Is there any clue for solving this possible situation?
------------------------------
Samuel SUM
------------------------------
#DataIntegration
#DataReplication