摘要 |
A computer-implemented method for controlling a system comprising a source database (118) and a target database (138), the system being configured to asynchronously replicate (102) data changes of at least one part of the source database to the target database, the replication comprising evaluating, by a capture engine (114), a log (120) of the source database for identifying (104) the unreplicated data changes of the at least one part, transferring (106) the identified data changes to an apply engine (116) and applying, by the apply engine, the transferred data changes in the target database, the method comprising: detecting a trigger event (402); in response to the trigger event and regardless of the number of log records the capture engine has not evaluated yet, triggering the apply engine to stop applying data changes of the at least one part in the target database (403); in response to having stopped the applying of the data changes of the at least one part, triggering an inserting of a start load signal into the log (404); in response to the insertion of the start load signal and regardless of the number of log records the capture engine has not evaluated yet, initializing a loading of the complete data content of the at least one part to the target database, whereby during the loading, performing concurrent write statements on the at least one part of the source database is permitted (406); while the loading is performed, triggering a storing of all write statements which are executed on the at least one part of the source database after the start load signal (SLS) and before the end load signal (ELS) in a queue (408); after the loading has completed, triggering an inserting of an end load signal (ELS) into the log at a current head of log position (410); after the loading has completed, triggering an applying of the queued write statements in the target database, said applying comprising identifying and skipping all write statements whose resulting data changes were already transferred to the target database by the loading (412). |