IP Library Granted Patent US 8,996,465
Granted Patent B2
US 8,996,465 · App. 13/415,433 · Granted Mar 31, 2015

Replicating data to a database

View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 8,996,465
App. No.
13/415,433
Granted
Mar 31, 2015
Kind
B2
Abstract

Techniques for replicating data to a database include determining a change to at least one database value in a database table on a source repository; updating, based on the change to the at least one database value, a snapshot value associated with the change to the at least one database value stored in a log table; incrementing a commit value associated with the snapshot value stored in a commit table, the commit table comprising a plurality of commit values associated with a plurality of corresponding snapshot values; initiating replication of the database from the source repository to a target repository; determining a maximum commit value of the plurality of commit values; and replicating the database value in the database table from the source repository to the target repository based on the commit value associated with the snapshot value being less than or equal to the maximum commit value.

Claims (72)

1. A method performed with a computing system for replicating data to a database, the method comprising:

determining a change to at least one database value in a database table of a database on a source repository;

updating, based on the change to the at least one database value, a snapshot value associated with the change to the at least one database value stored in a log table, the log table comprising the database value, a database key associated with the database value, and the snapshot value associated with the change to the at least one database value;

updating, based on the updated snapshot value, a change table comprising a plurality of snapshot values and a plurality of database table names, each of the plurality of snapshot values associated with a corresponding database table name;

incrementing, based on the update to the snapshot value, a commit value associated with the snapshot value stored in a commit table, the commit table comprising a plurality of commit values associated with a plurality of corresponding snapshot values;

generating the commit table comprising the plurality of commit values associated with the plurality of corresponding snapshot values, wherein the commit table is associated with a plurality of log tables;

initiating replication of the database from the source repository to a target repository;

determining, subsequent to initiating replication, a maximum commit value of the plurality of commit values; and

replicating the database value in the database table from the source repository to the target repository based on the commit value associated with the snapshot value being less than or equal to the maximum commit value.

2. The method of claim 1 , further comprising:

acquiring a lock on the database table during replication of the database value in the database table from the source repository to a target repository; and

substantially preventing changes to the at least one database value in the database table during lock.

3. The method of claim 1 , further comprising:

applying the replicated database value in the database table in the target repository to a corresponding database value in a corresponding database table in the target repository so that the corresponding database value matches the replicated database value.

4. The method of claim 3 , further comprising:

determining a change to a second database value in the database table;

updating, based on the change to the second database value, a second snapshot value associated with the change to the second database value stored in the log table;

incrementing, based on the update to the second snapshot value, a second commit value associated with the second snapshot value stored in the commit table; and

replicating the second database value from the source repository to the target repository based on the second commit value associated with the second snapshot value being less than or equal to the maximum commit value.

5. The method of claim 4 , wherein replicating the second database value in the database table from the source repository to the target repository occurs substantially in parallel with applying the replicated database value in the database table in the target repository to the corresponding database value in a corresponding database table in the target repository.

6. The method of claim 1 , wherein replicating the database value in the database table from the source repository to the target repository comprises replicating the database value in the database table from the source repository to the target repository at a read uncommitted transaction isolation level.

7. The method of claim 1 , further comprising:

generating the log table comprising the database value, the database key associated with the database value, and the snapshot value associated with the change to the at least one database value, the log table further comprising an operation value associated with the change to the at least one database value.

8. The method of claim 1 , wherein updating a change table comprises increasing a snapshot value of the plurality of snapshot values.

9. An apparatus comprising instructions embodied on a tangible, non-transitory computer-readable storage media, the instructions operable when executed to cause a computing system to perform operations comprising:

determining a change to at least one database value in a database table of a database on a source repository;

updating, based on the change to the at least one database value, a snapshot value associated with the change to the at least one database value stored in a log table, the log table comprising the database value, a database key associated with the database value, and the snapshot value associated with the change to the at least one database value;

updating, based on the updated snapshot value, a change table comprising a plurality of snapshot values and a plurality of database table names, each of the plurality of snapshot values associated with a corresponding database table name;

incrementing, based on the update to the snapshot value, a commit value associated with the snapshot value stored in a commit table, the commit table comprising a plurality of commit values associated with a plurality of corresponding snapshot values;

generating the commit table comprising the plurality of commit values associated with the plurality of corresponding snapshot values, wherein the commit table is associated with a plurality of log tables;

initiating replication of the database from the source repository to a target repository;

determining, subsequent to initiating replication, a maximum commit value of the plurality of commit values; and

replicating the database value in the database table from the source repository to the target repository based on the commit value associated with the snapshot value being less than or equal to the maximum commit value.

10. The apparatus of claim 9 , wherein the operations further comprise:

acquiring a lock on the database table during replication of the database value in the database table from the source repository to a target repository; and

substantially preventing changes to the at least one database value in the database table during lock.

11. The apparatus of claim 9 , wherein the operations further comprise:

applying the replicated database value in the database table in the target repository to a corresponding database value in a corresponding database table in the target repository so that the corresponding database value matches the replicated database value.

12. The apparatus of claim 11 , wherein the operations further comprise:

determining a change to a second database value in the database table;

updating, based on the change to the second database value, a second snapshot value associated with the change to the second database value stored in the log table;

incrementing, based on the update to the second snapshot value, a second commit value associated with the second snapshot value stored in the commit table; and

replicating the second database value from the source repository to the target repository based on the second commit value associated with the second snapshot value being less than or equal to the maximum commit value.

13. The apparatus of claim 12 , wherein replicating the second database value in the database table from the source repository to the target repository occurs substantially in parallel with applying the replicated database value in the database table in the target repository to the corresponding database value in a corresponding database table in the target repository.

14. The apparatus of claim 9 , wherein replicating the database value in the database table from the source repository to the target repository comprises replicating the database value in the database table from the source repository to the target repository at a read uncommitted transaction isolation level.

15. The apparatus of claim 9 , wherein the operations further comprise:

generating the log table comprising the database value, the database key associated with the database value, and the snapshot value associated with the change to the at least one database value, the log table further comprising an operation value associated with the change to the at least one database value.

16. The apparatus of claim 9 , wherein updating a change table comprises increasing a snapshot value of the plurality of snapshot values.

17. A computing system, comprising a memory, one or more processors, and instructions stored on the memory and operable when executed by the one or more processors to cause the computing system to perform operations comprising:

determining a change to at least one database value in a database table of a database on a source repository;

updating, based on the change to the at least one database value, a snapshot value associated with the change to the at least one database value stored in a log table, the log table comprising the database value, a database key associated with the database value, and the snapshot value associated with the change to the at least one database value;

updating, based on the updated snapshot value, a change table comprising a plurality of snapshot values and a plurality of database table names, each of the plurality of snapshot values associated with a corresponding database table name;

incrementing, based on the update to the snapshot value, a commit value associated with the snapshot value stored in a commit table, the commit table comprising a plurality of commit values associated with a plurality of corresponding snapshot values;

generating the commit table comprising the plurality of commit values associated with the plurality of corresponding snapshot values, wherein the commit table is associated with a plurality of log tables;

initiating replication of the database from the source repository to a target repository;

determining, subsequent to initiating replication, a maximum commit value of the plurality of commit values; and

replicating the database value in the database table from the source repository to the target repository based on the commit value associated with the snapshot value being less than or equal to the maximum commit value.

18. The system of claim 17 , wherein the operations further comprise:

acquiring a lock on the database table during replication of the database value in the database table from the source repository to a target repository; and

substantially preventing changes to the at least one database value in the database table during lock.

19. The system of claim 17 , wherein the operations further comprise:

applying the replicated database value in the database table in the target repository to a corresponding database value in a corresponding database table in the target repository so that the corresponding database value matches the replicated database value.

20. The system of claim 19 , wherein the operations further comprise:

determining a change to a second database value in the database table;

updating, based on the change to the second database value, a second snapshot value associated with the change to the second database value stored in the log table;

incrementing, based on the update to the second snapshot value, a second commit value associated with the second snapshot value stored in the commit table; and

replicating the second database value from the source repository to the target repository based on the second commit value associated with the second snapshot value being less than or equal to the maximum commit value.

21. The system of claim 20 , wherein replicating the second database value in the database table from the source repository to the target repository occurs substantially in parallel with applying the replicated database value in the database table in the target repository to the corresponding database value in a corresponding database table in the target repository.

22. The system of claim 17 , wherein replicating the database value in the database table from the source repository to the target repository comprises replicating the database value in the database table from the source repository to the target repository at a read uncommitted transaction isolation level.

23. The system of claim 17 , wherein the operations further comprise:

generating the log table comprising the database value, the database key associated with the database value, and the snapshot value associated with the change to the at least one database value, the log table further comprising an operation value associated with the change to the at least one database value.

24. The system of claim 17 , wherein updating a change table comprises increasing a snapshot value of the plurality of snapshot values.

Assignments (2)
CHANGE OF NAME Recorded Aug 26, 2014
From: SAP AG
To: SAP SE
Reel/Frame 033625/0223 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Mar 26, 2012
From: MIELENHAUSEN, BJOERN
To: SAP AG
Reel/Frame 027923/0865 →