IP Library Granted Patent US 9,760,617
Granted Patent B2
US 9,760,617 · App. 14/290,421 · Granted Sep 12, 2017

Applying transaction log in parallel

Inventors: Heping Shang (Dublin, CA); Guo Gang Ye (Shanghai, CN); Zheng-wei Wang (Shanghai, CN)
Assignee: SAP SE
G06F17/30578
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 9,760,617
App. No.
14/290,421
Granted
Sep 12, 2017
Kind
B2
Abstract

System, method, computer program product embodiments and combinations and sub-combinations thereof for data replication in a database system environment are described. In an aspect, the data replication includes grouping, in-memory, a plurality of transactions to be replicated as a single transaction from a source database system to a target database system. A plurality of net row changes is compiled for the plurality of transactions, and data inconsistency detection and resolution within a command application order are performed. The plurality of net row changes are organized in segments and the segments can be applied simultaneously in bulk to the target database system.

Claims (33)

1. A method for data replication in a database system environment, the method comprising:

grouping, in-memory, a plurality of transactions from a source database system for replication to a target database system into a plurality of groups, wherein the grouping is based on a criterion, and wherein each transaction comprises a row change;

compiling a plurality of net row changes for the transactions in one of the groups based on a plurality of row changes included in the transactions, wherein a number of the net row changes is less than or equal to a number of the row changes;

organizing the compiled net row changes into a plurality of tables including an insert table, an update table, and a delete table, wherein the update table includes a plurality of update segments and wherein the insert table includes a plurality of insert segments, and wherein the applying the subset of the plurality of segments simultaneously to the target database system includes applying the plurality of update segments and insert segments simultaneously to the target database system; and

applying a plurality of the compiled net row changes from one of the tables simultaneously to the target database system.

2. The method of claim 1 , wherein a plurality of segments of one or more of the tables are based on referential constraints of the plurality of transactions to be replicated.

3. The method of claim 2 , wherein the plurality of segments are based on a per table basis.

4. The method of claim 1 , wherein the method further comprises determining that atomicity of the target database is intact after the applying to the target database.

5. The method of claim 4 , wherein the method further comprises un-doing the applying based on a determination that the atomicity of the replicate database is not intact upon application of the segments to the replicate database.

6. The method of claim 1 , wherein the criterion is based on a determination that a number of transactions in a group is less than a pre-determined amount.

7. The method of claim 1 , wherein the criterion is based on a determination that a transaction contains a non-compilable command, Wherein the compiling does not include compiling the non-compilable command, and wherein the non-compilable command is added to a non-compilable command table.

8. The method of claim 7 , further comprising:

applying the transaction including the non-compilable command independently from the compiled transactions and based on a transaction log associated with the plurality of transactions.

9. A system for data replication in a database system environment, the system comprising: a processor:

a source database;

a target database in communication with the source database; and

a replication server in communication with the source database and target database, the replication server:

grouping, in-memory, a plurality of transactions for replication as a single transaction from a source database system to a target database system into a plurality of groups, wherein the grouping is based on a criterion, and wherein each transaction comprises a row change,

compiling a plurality of net row changes for transactions in one of the groups based on a plurality of row changes included in the transactions,

organizing the compiled net row changes into a plurality of tables including an insert table, an update table, and a delete table, wherein the update table includes a plurality of update segments and wherein the insert table includes a plurality of insert segments, and wherein the applying the subset of the plurality of segments simultaneously to the target database system includes applying the plurality of update segments and insert segments simultaneously to the target database system, and

applying a plurality of the compiled net row changes from one of the tables simultaneously to the target database system.

10. The system of claim 9 , wherein a plurality of segments of one or more of the tables are based on referential constraints of the plurality of transactions to be replicated.

11. The system of claim 10 , wherein the plurality of segments are based on a per table basis.

12. The system of claim 9 , wherein the replication server further determines that the atomicity of the replicate database is intact after the applying to the target database.

13. The system of claim 9 , wherein the replication server further un-does the applying if it is determined that the atomicity of the replicate database is not intact upon application of the segments to the replicate database.

14. A computer-readable storage device having instructions stored thereon, execution of which, by a computing device, causes the computing device to perform operations comprising:

grouping, in-memory, a plurality of transactions from a source database system for replication to a target database system into a plurality of groups, wherein the grouping is based on a criterion, and wherein each transaction comprises a row change;

compiling a plurality of net row changes for the transactions in one of the groups based on a plurality of row changes included in the transactions;

organizing the compiled net row changes into a plurality of tables including an insert table, an update table, and a delete table, wherein the update table includes a plurality of update segments and wherein the insert table includes a plurality of insert segments, and wherein the applying the subset of the plurality of segments simultaneously to the target database system includes applying the plurality of update segments and insert segments simultaneously to the target database system; and

applying a plurality of the compiled net row changes from one of the tables simultaneously to the target database system.

15. The device of claim 14 , wherein a plurality of segments of one or more of the tables are based on referential constraints of the plurality of transactions to be replicated.

16. The device of claim 15 , wherein the plurality of segments are based on a per table bases.

17. The device of claim 14 , wherein the computer readable program code further enables a processor to determine that the atomicity of the replicate database is intact after the applying to the replicate database.

Assignments (2)
CHANGE OF NAME Recorded Jun 27, 2017
From: SAP AG
To: SAP SE
Reel/Frame 043016/0022 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Jul 14, 2014
From: SHANG, HEPING; YE, GUO GANG; WANG, ZHENG-WEI
To: SAP AG
Reel/Frame 033307/0460 →
Continuity (1)
Related Publication 20150347551A1 · Dec 3, 2015