# US 11,308,070 B2 · Database change capture with transaction-consistent order

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 11,308,070 B2
- Document ID: US11308070B2
- Status: Granted
- Kind: B2
- Application number: 16/851,227
- Filed: 2020-04-17
- Published: 2020-08-06
- Granted: 2022-04-19
- Earliest claimed: 2018-04-03
- Assignees: Sap SE
- Applicants: Sap SE
- Inventors: Juchang Lee; Chang Gyoo Park; Hyoung Jun Na
- Web page: https://patentgrep.com/patent/US11308070B2

## CPC

- G06F 16/2358: {Change logging, detection, and notification (replication G06F16/27)}
- G06F 16/2282: {Tablespace storage structures; Management thereof}
- G06F 16/27: Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
- G06F 16/284: {Relational databases}
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Techniques are described for use in database and data management systems to efficiently capture and replicate changes that occur in database tables. The changes are captured in a transaction-consistent order, and in a format that may easily be searched and accessed using common relational queries.

## Claims

### Claim 1

A computer program product, the computer program product being tangibly embodied on a non-transitory computer-readable storage medium and comprising instructions that, when executed, are configured to cause at least one computing device to:
detect a first database change operation of a first transaction of the transactions, the first database change operation writing first record data to a source table of a database instance using a record buffer that temporarily stores the first record data during the first database change operation;
extract the first record data from the record buffer;
generate, using the extracted first record data, a first replication log entry that includes first metadata characterizing the first record data, including a corresponding first transaction commit identifier (CID) for the first transaction; and
store the first replication log entry within a replication log table storing a change history of transactions for the source table.

### Claim 2 (depends on 1)

The computer program product of claim 1, wherein the instructions, when executed, are further configured to cause the at least one computing device to:
store the first replication log entry within the replication log table, together with a second replication log entry that includes second metadata characterizing second record data of a second database change operation of a second transaction of the transactions, and including a second transaction CID that identifies the second transaction as occurring subsequently to the first transaction.

### Claim 3 (depends on 1)

The computer program product of claim 1, wherein the instructions, when executed, are further configured to generate the first replication log entry, including causing the at least one computing device to:
generate the first replication log entry including the first record data and the first metadata.

### Claim 4 (depends on 3)

The computer program product of claim 3, wherein the instructions, when executed, are further configured to cause the at least one computing device to:
provide the first replication log entry to a subscriber to the replication log table for the source table, and based on a relational query specifying the first replication log entry.

### Claim 5 (depends on 1)

The computer program product of claim 1, wherein the instructions, when executed, are further configured to generate the first replication log entry, including causing the at least one computing device to:
generate the first replication log entry including the first metadata; and
store the first replication log entry in the replication log table, without copying the first record data to the replication log table.

### Claim 6 (depends on 5)

The computer program product of claim 5, wherein the instructions, when executed, are further configured to cause the at least one computing device to:
provide the first record data from the source table to a subscriber to the replication log table for the source table, in response to a relational query and based on the first replication log entry, the first metadata, and the source table.

### Claim 7 (depends on 1)

The computer program product of claim 1, wherein the instructions, when executed, are further configured to generate the first replication log entry, including causing the at least one computing device to:
generate the first replication log entry including the first metadata; and
store the first transaction CID within a transaction CID column of the source table.

### Claim 8 (depends on 7)

The computer program product of claim 7, wherein the instructions, when executed, are further configured to cause the at least one computing device to:
provide the first record data from the source table to a subscriber to the replication log table for the source table, in response to a relational query and based on the first replication log entry, the first metadata, and the first transaction CID within the transaction CID column of the source table.

### Claim 9 (depends on 1)

The computer program product of claim 1, wherein the instructions, when executed, are further configured to cause the at least one computing device to:
generate a second replication log entry that includes second metadata characterizing second record data of a second database change operation of the first transaction of the transactions, without waiting for completion of storage of the first replication log entry; and
wait for storage of the first replication log entry and the second replication log entry to the replication log table before proceeding with a transaction commit of the first transaction of the transactions.

### Claim 10 (depends on 1)

The computer program product of claim 1, wherein the source table and the replication log table are both located within the database instance.

### Claim 11

A computer-implemented method, comprising:
detecting a first database change operation of a first transaction of the transactions, the first database change operation writing first record data to a source table of a database instance using a record buffer that temporarily stores the first record data during the first database change operation;
extracting the first record data from the record buffer;
generating, using the extracted first record data, a first replication log entry that includes first metadata characterizing the first record data, including a corresponding first transaction commit identifier (CID) for the first transaction; and
storing the first replication log entry within a replication log table storing a change history of transactions for the source table.

### Claim 12 (depends on 11)

The method of claim 11, further comprising:
storing the first replication log entry within the replication log table, together with a second replication log entry that includes second metadata characterizing second record data of a second database change operation of a second transaction of the transactions, and including a second transaction CID that identifies the second transaction as occurring subsequently to the first transaction.

### Claim 13 (depends on 11)

The method of claim 11, comprising:
generating the first replication log entry including the first record data and the first metadata; and
providing the first replication log entry to a subscriber to the replication log table for the source table, and based on a relational query specifying the first replication log entry.

### Claim 14 (depends on 11)

The method of claim 11, comprising:
generating the first replication log entry including the first metadata;
storing the first replication log entry in the replication log table, without copying the first record data to the replication log table; and
providing the first record data from the source table to a subscriber to the replication log table for the source table, in response to a relational query and based on the first replication log entry, the first metadata, and the source table.

### Claim 15 (depends on 11)

The method of claim 11, comprising:
generating the first replication log entry including the first metadata
storing the first transaction CID within a transaction CID column of the source table; and
providing the first record data from the source table to a subscriber to the replication log table for the source table, in response to a relational query and based on the first replication log entry, the first metadata, and the first transaction CID within the transaction CID column of the source table.

### Claim 16 (depends on 11)

The method of claim 11, comprising:
generating a second replication log entry that includes second metadata characterizing second record data of a second database change operation of the first transaction of the transactions, without waiting for completion of storage of the first replication log entry; and
waiting for storage of the first replication log entry and the second replication log entry to the replication log table before proceeding with a transaction commit of the first transaction of the transactions.

### Claim 17 (depends on 11)

The method of claim 11, wherein the source table and the replication log table are both located within the database instance.

### Claim 18

A system comprising:
at least one processor; and
a memory communicatively coupled to the at least one processor, the memory storing instructions which, when executed, cause the at least one processor to perform operations comprising:
detecting a first database change operation of a first transaction of the transactions, the first database change operation writing first record data to a source table of a database instance using a record buffer that temporarily stores the first record data during the first database change operation;
extracting the first record data from the record buffer;
generating, using the extracted first record data, a first replication log entry that includes first metadata characterizing the first record data, including a corresponding first transaction commit identifier (CID) for the first transaction; and
storing the first replication log entry within a replication log table storing a change history of transactions for the source table.

### Claim 19 (depends on 18)

The system of claim 18, wherein the instructions, when executed, cause the at least one processor to perform operations comprising:
storing the first replication log entry within the replication log table, together with a second replication log entry that includes second metadata characterizing second record data of a second database change operation of a second transaction of the transactions, and including a second transaction CID that identifies the second transaction as occurring subsequently to the first transaction.

### Claim 20 (depends on 18)

The system of claim 18, wherein the instructions, when executed, cause the at least one processor to perform operations comprising:
generating the first replication log entry including the first record data and the first metadata; and
providing the first replication log entry to a subscriber to the replication log table for the source table, and based on a relational query specifying the first replication log entry.
