# US 2018/0322184 A1 · Tenant database replication

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

- Number: US 2018/0322184 A1
- Document ID: US20180322184A1
- Status: Published application
- Kind: A1
- Application number: 15/589,720
- Filed: 2017-05-08
- Published: 2018-11-08
- Earliest claimed: 2017-05-08
- Assignees: Sap SE
- Applicants: Sap SE
- Inventors: Stefan VOSS; Reiner SINGER; Markus BEHRENS; Frank HUBER; Tilman GIESE; Uwe HAHN; Werner THESING; Eduard BARTSCH
- Web page: https://patentgrep.com/patent/US20180322184A1

## CPC

- G06F 16/275: {Synchronous replication}
- G06F 11/1474: in transactions (updating of structured data in databases G06F16/23)
- G06F 11/2097: {maintaining the standby controller/processing unit updated (initialisation or re-synchronisation thereof G06F11/1658 and subgroups)}
- G06F 16/214: {Database migration support}
- G06F 16/2358: {Change logging, detection, and notification (replication G06F16/27)}
- G06F 16/273: {Asynchronous replication or reconciliation}
- G06F 16/278: {Data partitioning, e.g. horizontal or vertical partitioning}
- G06F 11/2023: {Failover techniques}
- G06F 2201/80: Database-specific techniques
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Replicating a tenant database includes receiving at a source system a first request from a target system for replicating a first tenant database of the source system, which includes one or more first servers. Characteristics of the one or more first servers are sent to the target system to generate at the target system a second tenant database including one or more second servers. Each second server corresponds to one first server and has the same characteristics as the corresponding first server. Information from each first server is replicated, in an asynchronous mode, to the corresponding second server through a communication channel that is established between each first server and the second server. Upon receiving a second request for stopping the replication, a synchronous mode of processing statements from client applications of the first tenant database is entered. Related apparatus, systems, techniques and articles are described.

## Claims

### Claim 1

A computer-implemented method for replicating a tenant database from a source system to a target system, the method comprising:
receiving, at a source system, a first request from a target system for replicating a first tenant database of the source system, the first tenant database including one or more first servers;
sending to the target system characteristics of the one or more first servers included in the first tenant database to generate at the target system a second tenant database including one or more second servers, each second server corresponding to one first server and having the same characteristics as the corresponding first server;
establishing a communication channel between each first server and the corresponding second server;
replicating, in an asynchronous mode, information from each first server to the corresponding second server through the communication channel;
in response to receiving a second request for stopping replication of the first tenant database to the second tenant database, entering a synchronous mode of processing statements from client applications of the first tenant database.

### Claim 2 (depends on 1)

The method of claim 1, and further comprising:
receiving a statement from a client application of the first tenant database;
generating a transaction log based on the statement; and
sending the transaction log to the target system to replay the transaction log at the second tenant database of the target system, and
in response to processing the statement by first tenant database, sending information to the client application that indicates completion of processing the statement.

### Claim 3 (depends on 2)

The method of claim 2, wherein the entering a synchronous mode of processing statements from client applications of the first tenant database includes:
in response to receiving a first notification indicating successful replication of the transaction log at the target system, processing the statement by the first tenant database.

### Claim 4 (depends on 2)

The method of claim 2, and further comprising:
prior to entering a synchronous mode of processing statements from client applications of the first tenant database, processing the statement by first tenant database in the asynchronous mode.

### Claim 5 (depends on 4)

The method of claim 4, wherein in the asynchronous mode the statement is processed by the first tenant database without waiting for the first notification indicating successful replication of the transaction log at the second tenant database of the target system.

### Claim 6 (depends on 1)

The method of claim 1, and further comprising prior to entering a synchronous mode of processing statements from client applications of the first tenant database, receiving a second notification indicating successful replication of the information of the one or more first servers to the corresponding one or more second servers.

### Claim 7 (depends on 6)

The method of claim 6, wherein the second notification further indicates that the persistence of the replicated information from each first server to the corresponding second server has been initialized on the corresponding second servers.

### Claim 8 (depends on 7)

The method of claim 7, wherein a persistence flag is included in the second notification to indicate whether the persistence of the replicated information from each first server to the corresponding second server has been initialized on the corresponding second servers.

### Claim 9 (depends on 1)

The method of claim 1, and further comprising:
in response to receiving a second request for stopping replication of the first tenant database to the second tenant database, initiating the shutdown of the first tenant database upon completion of the synchronous mode of processing statements from client applications of the first tenant database.

### Claim 10 (depends on 1)

The method of claim 1, and further comprising
in response to receiving a second request for stopping replication of the first tenant database to the second tenant database:
sending a third request to the target system to restart the second tenant database; and
in response to receiving a third notification from the target system indicating a successful restart of the second tenant database, informing client applications of the first tenant database to redirect requests to the second tenant database of the target system.

### Claim 11 (depends on 6)

The method of claim 6, wherein the source system includes a first system database and the target system includes a second system database, and wherein the first request is received by the first system database from the second system database.

### Claim 12 (depends on 11)

The method of claim 11, wherein the source system includes a first name server that hosts the first system database and stores information associated with the first tenant database, and wherein the stored information associated with the first tenant database includes landscape information associated with the source system.

### Claim 13 (depends on 11)

The method of claim 11, wherein the target system includes a second name server that hosts the second system database and stores information associated with the second tenant database, and wherein the stored information associated with the second tenant database includes landscape information associated with the target system.

### Claim 14 (depends on 11)

The method of claim 11, wherein the first tenant database includes a first index server that stores topology information associated with the first tenant database, and the second tenant database includes a second index server that stores topology information associated with the second tenant database.

### Claim 15 (depends on 14)

The method of claim 14, wherein topology information associated with a tenant databases includes information corresponding to tables associated with the tenant database, and information corresponding to table partitions associated with the tenant database.

### Claim 16 (depends on 14)

The method of claim 14, wherein the second notification indicating successful replication of the information of the one or more first servers to the corresponding one or more second server is received by the first index server of the first tenant databases from the second index server of the second tenant database.

### Claim 17 (depends on 1)

The method of claim 1, wherein the establishing a communication channel between each first server and the corresponding second server includes sending to the first server and the corresponding second server information that indicates a port of the communication channel.

### Claim 18 (depends on 1)

The method of claim 1, wherein the source system and target system communicate via a secure mutual authentication, the secure mutual authentication including:
sending a temporary certificate and a key from the source system to the target system via a secure communication channel;
installing the temporary certificate on the target system; and
authenticating communications between the source system and the target system through the temporary certificate;
wherein the temporary certificate is generated on the source system based on user credentials that are associated with a user who is authorized to access the source system and the target system.

### Claim 19

A computer-implemented system for replicating a tenant database from a source system to a target system, the system comprising:
one or more data processors; and
a computer-readable storage medium encoded with instructions for commanding the one or more data processors to perform operations comprising:
receiving, at a source system, a first request from a target system for replicating a first tenant database of the source system, the first tenant database including one or more first servers;
sending to the target system characteristics of the one or more first servers included in the first tenant database to generate at the target system a second tenant database including one or more second servers, each second server corresponding to one first server and having the same characteristics as the corresponding first server;
establishing a communication channel between each first server and the corresponding second server;
replicating, in an asynchronous mode, information from each first server to the corresponding second server through the communication channel;
in response to receiving a second request for stopping replication of the first tenant database to the second tenant database, entering a synchronous mode of processing statements from client applications of the first tenant database.

### Claim 20

A computer program product for replicating a tenant database from a source system to a target system, the product comprising:
a non-transitory machine-readable medium storing instructions that, when executed by at least one data processor, cause the at least one data processor to perform operations comprising:
receiving, at a source system, a first request from a target system for replicating a first tenant database of the source system, the first tenant database including one or more first servers;
sending to the target system characteristics of the one or more first servers included in the first tenant database to generate at the target system a second tenant database including one or more second servers, each second server corresponding to one first server and having the same characteristics as the corresponding first server;
establishing a communication channel between each first server and the corresponding second server;
replicating, in an asynchronous mode, information from each first server to the corresponding second server through the communication channel;
in response to receiving a second request for stopping replication of the first tenant database to the second tenant database, entering a synchronous mode of processing statements from client applications of the first tenant database.
