Claims
- 1. A method for synchronizing a target database with a source database in a database replication system wherein the source database is on-line during the synchronization, the target database thus receiving replication data during the synchronization, the source database being located at a first node of the system, and the target database being located at a second node of the system, the method comprising:
(a) sending successive blocks of data from the first node to the target database, each block of data having a key range, each block of data including one or more rows of data; (b) posting the successively sent blocks of data to the target database; (c) storing the total key range of the blocks of data received at the target database; and (d) posting any replication data received at the target database only if the row of data, or a key range inclusive of the row of data, corresponding to the received data has been previously posted to the target database through the synchronizing process.
- 2. The method of claim 1 wherein the target database is being resynchronized and thus is not initially empty, wherein step (b) further comprises for each block of data sent from the first node, comparing the corresponding key range in the target database, and processing the block of data as follows:
(i) if a row in the block of data is not present in the target database, inserting the row and its content into the target database, (ii) if a row in the block of data is present in the target database but has content that does not match the content of the row in the block of data, updating the row with the new content; and (iii) if any rows are missing from the block of data but are present in the target database, then deleting such rows from the target database.
- 3. The method of claim 1 wherein the target database and the source database are both on-line during the synchronization.
- 4. The method of claim 1 wherein the successive blocks of data in step (a) are sent to the target database directly from the source database.
- 5. A method for synchronizing a target database with a source database and replicating the source database to the target database in a database replication system, wherein the source database is on-line during the synchronization, the source database being located at a first node of the system, and the target database being located at a second node of the system, the method comprising:
(a) replicating changes in the source database to the target database by sending a replication stream from the first node to the second node; (b) sending successive blocks of data from the first node to the target database to synchronize or resynchronize the target database with the source database, each block of data including one or more rows of data; (c) inserting the successively sent blocks of data into the replication stream at a point when the respective blocks of data are current or consistent in the source database; and (d) posting the replication stream to the target database, the method thereby allowing synchronization or resynchronization to occur simultaneously with replication.
- 6. The method of claim 5 wherein a marker is assigned to each of the blocks of data and is sent to the second node, wherein step (c) further comprises inserting the successively sent blocks of data into the replication stream at a point when the marker arrives at the second node.
- 7. The method of claim 6 wherein the markers are sent to the second node along with their respective blocks of data.
- 8. The method of claim 5 wherein the target database and the source database are both on-line during the synchronization or resynchronization and replication.
- 9. A method for synchronizing a target database with a source database and replicating the source database to the target database in a database replication system, wherein the source database is on-line during the synchronization, the source database being located at a first node of the system, and the target database being located at a second node of the system, the method comprising:
(a) replicating changes in the source database to the target database by sending a replication stream from the first node to the second node; (b) sending successive blocks of data from the first node to the target database to synchronize or resynchronize the target database with the source database, each block of data including one or more rows of data, the successively sent blocks of data defining a loading stream; and (c) posting the successively sent blocks of data into the target database when the replication stream is occurring slower than the loading stream, the method thereby allowing synchronization or resynchronization to occur simultaneously with replication.
- 10. The method of claim 9 wherein the target database and the source database are both on-line during the synchronization or resynchronization and replication.
- 11. An article of manufacture for synchronizing a target database with a source database in a database replication system wherein the source database is on-line during the synchronization, the target database thus receiving replication data during the synchronization, the source database being located at a first node of the system, and the target database being located at a second node of the system, the article of manufacture comprising a computer-readable medium holding computer-executable instructions for performing the steps of:
(a) sending successive blocks of data from the first node to the target database, each block of data having a key range, each block of data including one or more rows of data; (b) posting the successively sent blocks of data to the target database; (c) storing the total key range of the blocks of data received at the target database; and (d) posting any replication data received at the target database only if the row of data, or a key range inclusive of the row of data, corresponding to the received data has been previously posted to the target database through the synchronizing process.
- 12. The article of manufacture of claim 11 wherein the target database is being resynchronized and thus is not initially empty, wherein step (b) further comprises for each block of data sent from the first node, comparing the corresponding key range in the target database, and processing the block of data as follows:
(i) if a row in the block of data is not present in the target database, inserting the row and its content into the target database, (ii) if a row in the block of data is present in the target database but has content that does not match the content of the row in the block of data, updating the row with the new content; and (iii) if any rows are missing from the block of data but are present in the target database, then deleting such rows from the target database.
- 13. The article of manufacture of claim 11 wherein the target database and the source database are both on-line during the synchronization.
- 14. The article of manufacture of claim 11 wherein the successive blocks of data in step (a) are sent to the target database directly from the source database.
- 15. An article of manufacture for synchronizing a target database with a source database and replicating the source database to the target database in a database replication system, wherein the source database is on-line during the synchronization, the source database being located at a first node of the system, and the target database being located at a second node of the system, the article of manufacture comprising a computer-readable medium holding computer-executable instructions for performing the steps of:
(a) replicating changes in the source database to the target database by sending a replication stream from the first node to the second node; (b) sending successive blocks of data from the first node to the target database to synchronize or resynchronize the target database with the source database, each block of data including one or more rows of data; (c) inserting the successively sent blocks of data into the replication stream at a point when the respective blocks of data are current or consistent in the source database; and (d) posting the replication stream to the target database, the method thereby allowing synchronization or resynchronization to occur simultaneously with replication.
- 16. The article of manufacture of claim 15 wherein a marker is assigned to each of the blocks of data and is sent to the second node, wherein step (c) further comprises inserting the successively sent blocks of data into the replication stream at a point when the marker arrives at the second node.
- 17. The article of manufacture of claim 16 wherein the markers are sent to the second node along with their respective blocks of data.
- 18. The article of manufacture of claim 15 wherein the target database and the source database are both on-line during the synchronization or resynchronization and replication.
- 19. An article of manufacture for synchronizing a target database with a source database and replicating the source database to the target database in a database replication system, wherein the source database is on-line during the synchronization, the source database being located at a first node of the system, and the target database being located at a second node of the system, the article of manufacture comprising a computer-readable medium holding computer-executable instructions for performing the steps of:
(a) replicating changes in the source database to the target database by sending a replication stream from the first node to the second node; (b) sending successive blocks of data from the first node to the target database to synchronize or resynchronize the target database with the source database, each block of data including one or more rows of data, the successively sent blocks of data defining a loading stream; and (c) posting the successively sent blocks of data into the target database when the replication stream is occurring slower than the loading stream, the method thereby allowing synchronization or resynchronization to occur simultaneously with replication.
- 20. The article of manufacture of claim 19 wherein the target database and the source database are both on-line during the synchronization or resynchronization and replication.
CROSS-REFERENCE TO RELATED APPLICATIONS
[0001] This application is a continuation of U.S. application Ser. No. 09/930,641 filed Aug. 15, 2001 entitled “SYNCHRONIZATION OF PLURAL DATABASES IN A DATABASE REPLICATION SYSTEM,” now U.S. Pat. No. 6,745,209, the entire disclosure of which is incorporated herein by reference.
Continuations (1)
|
Number |
Date |
Country |
Parent |
09930641 |
Aug 2001 |
US |
Child |
10853086 |
May 2004 |
US |