Common Exceptions in Real-Time Disaster Recovery
Due to certain uncontrollable reasons, data may be inconsistent when data in both the databases is changed at the same time during DR. This section describes common data exceptions. The dr1 and dr2 databases are used as examples in the following scenarios.
Scenario 1: In dual-active DR mode, operations are performed on the same row in the two databases at the same time. As a result, multiple data records are generated.
- The following figure shows the initial data (seqno is the primary key and column1 is the non-primary key).
Figure 1 Initial data in the dr1 and dr2 databases
- Perform the following operations on both databases:
- dr1: update dr1 set seqno=5 where column1=8;
- dr2: update dr2 set seqno=6 where column1=8;
- After the operations are performed, the data in the databases is consistent but an additional row is generated.
Figure 2 Data in the dr1 and dr2 databases
Scenario 2: In dual-active DR mode, operations are performed on the same row in both databases at the same time. As a result, data records become inconsistent.
- The following figure shows the initial data (seqno is the primary key and column1 is the non-primary key).
Figure 3 Initial data
- Perform the following operations on both databases:
- dr1: insert into dr1 values(101, 100);
- dr2: insert into dr2 values(101, 102);
- After the operations are performed, the data in the databases is shown in the following figure.
Figure 4 Data in the dr1 database
Figure 5 Data in the dr2 database
Scenario 3: In dual-active DR mode, DDL operations are performed. As a result, data records become inconsistent.
- Perform the following operations on both databases:
- dr1: truncate table dr1;
- dr2: insert into dr2 values(5,5,5);
- After the operations are performed, the data in the databases becomes inconsistent.
Figure 6 Data in the dr1 database
Figure 7 Data in the dr2 database
More scenarios are being added.
Real-Time Disaster Recovery FAQs
- What Are RPO and RTO of DRS Disaster Recovery?
- How Do I Select Active Database 1 and 2 for Dual-Active DR?
- What Is the Meaning of Forward and Backward Subtasks in Dual-Active Disaster Recovery?
- Common Exceptions in Real-Time Disaster Recovery
- Is a Primary/Standby Switchover Triggered Automatically or Manually for DR Tasks?
- Can Real-Time DR Be Performed for Specified Databases?
- Why Does a Real-Time DR Task Not Support Triggers and Events?
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.
more