# US 2019/0317865 A1 · Database Recovery and Optimization with Batch Processing

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

- Number: US 2019/0317865 A1
- Document ID: US20190317865A1
- Status: Published application
- Kind: A1
- Application number: 15/953,856
- Filed: 2018-04-16
- Published: 2019-10-17
- Earliest claimed: 2018-04-16
- Assignees: Sap SE
- Applicants: Sap SE
- Inventors: Martin Heidel; Xin Liu; Christoph Roterring; Shiping Chen; Vivek Kandiyanallur; Stephan Kottler; Joern Schmidt
- Web page: https://patentgrep.com/patent/US20190317865A1

## CPC

- G06F 11/1469: {Backup restoration techniques}
- G06F 11/1471: involving logging of persistent data for recovery
- G06F 16/213: {with details for schema evolution support}
- G06F 16/2282: {Tablespace storage structures; Management thereof}
- G06F 16/2379: {Updates performed during online database operations; commit processing}
- G06F 16/24553: {of query operations}
- G06F 2201/80: Database-specific techniques
- G06F 2201/84: Using snapshots, i.e. a logical point-in-time copy of the data
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Disclosed herein are system, method, and computer program product embodiments for a database recovery and optimization with batch processing system. An embodiment operates by retrieving a database log that includes a plurality of operations for modifying data of a database stored across a plurality of tables. From the database log, a plurality of consecutive insert operations for inserting data into the database are identified. The consecutive insert operations are sorted by table. The sorted insert operations are grouped into a batch message. The batch message is transmit to the database for replay. An acknowledgement is received that the replay has completed.

## Claims

### Claim 1

A computer-implemented method, comprising:
retrieving a database log that includes a plurality of operations for modifying data of a database stored across a plurality of tables;
identifying, from the database log, a plurality of consecutive insert operations for inserting data into the database;
sorting the consecutive insert operations by table;
grouping the sorted insert operations into a batch message;
transmitting the batch message to the database for replay; and
receiving an acknowledgement that the replay has completed.

### Claim 2 (depends on 1)

The method of claim 1, wherein the identifying comprises:
identifying, from the database log, a non-insert operation subsequent to the consecutive insert operations.

### Claim 3 (depends on 2)

The method of claim 2, wherein the non-insert operation comprises a data update operation.

### Claim 4 (depends on 2)

The method of claim 2, wherein the non-insert operation comprises a schema change operation.

### Claim 5 (depends on 4)

The method of claim 4, further comprising:
transmitting the schema change operation;
receiving an acknowledgement that the schema change operation has completed;
grouping one or more insert operations subsequent to the schema change operation into a second batch message; and
transmitting the second batch message.

### Claim 6 (depends on 1)

The method of claim 1, wherein the grouping comprises combining a column of a first insert operation with a column of a second insert operation.

### Claim 7 (depends on 1)

The method of claim 1, wherein the retrieving comprises:
determining that a database failure event associated with the database has occurred,
wherein the database log comprises operations that were not persisted to the database prior to the failure event.

### Claim 8 (depends on 1)

The method of claim 1, wherein the grouping comprises:
grouping a first portion of the sorted insert operations into a first batch message corresponding to a first one of the plurality of tables; and
grouping a second portion of the sorted insert operations into a second batch message corresponding to a second one of the plurality of tables.

### Claim 9 (depends on 8)

The method of claim 8, wherein the receiving comprises:
receiving a second acknowledgement that the second batch message was processed by a second processor prior to receiving a first acknowledgement that the first batch message was processed by a first processor.

### Claim 10

A system, comprising:
a memory; and
at least one processor coupled to the memory and configured to:
retrieve a database log that includes a plurality of operations for modifying data of a database stored across a plurality of tables;
identify, from the database log, a plurality of consecutive insert operations for inserting data into the database;
sort the consecrative insert operations by table;
group the sorted insert operations into a batch message;
transmit the batch message to the database for replay; and
receive an acknowledgement that the replay has completed.

### Claim 11 (depends on 10)

The system of claim 10, wherein the processor that identifies is configured to:
identify, from the database log, a non-insert operation subsequent to the consecutive insert operations.

### Claim 12 (depends on 11)

The system of claim 11, wherein the non-insert operation comprises a data update operation.

### Claim 13 (depends on 11)

The system of claim 11, wherein the non-insert operation comprises a schema change operation.

### Claim 14 (depends on 13)

The system of claim 13, wherein the processor is further configured to:
transmit the schema change operation;
receive an acknowledgement that the schema change operation has completed;
group one or more insert operations subsequent to the schema change operation into a second batch message; and
transmit the second batch message.

### Claim 15 (depends on 10)

The system of claim 10, wherein the grouping comprises combining a column of a first insert operation with a column of a second insert operation.

### Claim 16 (depends on 10)

The system of claim 10, wherein the processor that retrieves is configured to:
determine that a database failure event associated with the database has occurred, wherein the database log comprises operations that were not persisted to the database prior to the failure event.

### Claim 17 (depends on 10)

The system of claim 10, wherein the processor that groups is configured to:
group a first portion of the sorted insert operations into a first batch message corresponding to a first one of the plurality of tables; and
group a second portion of the sorted insert operations into a second batch message corresponding to a second one of the plurality of tables.

### Claim 18 (depends on 17)

The system of claim 17, wherein the processor that receives is configured to:
receive a second acknowledgement that the second batch message was processed by a second processor prior to receiving a first acknowledgement that the first batch message was processed by a first processor.

### Claim 19

A non-transitory computer-readable device having instructions stored thereon that, when executed by at least one computing device, cause the at least one computing device to perform operations comprising:
retrieving a database log that includes a plurality of operations for modifying data of a database stored across a plurality of tables;
identifying, from the database log, a plurality of consecutive insert operations for inserting data into the database;
sorting the consecutive insert operations by table;
grouping the sorted insert operations into a batch message;
transmitting the batch message to the database for replay; and
receiving an acknowledgement that the replay has completed.

### Claim 20 (depends on 19)

The non-transitory computer-readable device of claim 19, wherein the identifying comprises:
identifying, from the database log, a non-insert operation subsequent o the consecutive insert operations.
