IP Library Granted Patent US 11,657,027
Granted Patent B2
US 11,657,027 · App. 17/446,592 · Granted May 23, 2023

Systems and methods for logically copying data from a source database to one or more target databases

Inventors: Kamalakkannan Guru Devan (Singapore, SG); Mukesh Burgupalli (Mountain View, CA); JithendraNadh Kottapalli (Pleasanton, CA)
G06F16/214G06F16/1734G06F16/2282G06F16/24573G06F16/278
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 11,657,027
App. No.
17/446,592
Granted
May 23, 2023
Kind
B2
Abstract

A system and method are provided for logically copying data from a source database to a first target database and a second target database. Based on table partition information, the source database is queried to collect partition metadata information for a first set of partitions and a second set of partitions. A first set of the partition metadata information for the first set of partitions and a second set of the partition metadata information for the second set of partitions can be used to create at least one extent chunk for each partition of a table. The source database can be queried, based on a first set of extent chunks and a second set of extent chunks, for a first set of data to be written to the first target database and a second set of data from the source database to be written to the second target database.

Claims (60)

1. A method, comprising:

querying a source database to collect partition metadata information comprising: a first set of the partition metadata information for a first set of partitions from the source database that are to be copied to a first target database, and a second set of the partition metadata information for a second set of partitions from the source database that are to be copied to a second target database;

creating, based on the partition metadata information, at least one extent chunk for each partition of a table;

querying the source database for a first set of data based on a first set of extent chunks, and a second set of data based on a second set of extent chunks; and

writing the first set of data to the first target database, and the second set of data to the second target database.

2. The method according to claim 1 , wherein creating comprises:

for each of the first set of partitions: creating the first set of extent chunks based on the first set of the partition metadata information; and

for each of the second set of partitions: creating the second set of extent chunks based on the second set of the partition metadata information,

wherein each extent chunk comprises a group of extents specified by a range of row identifiers (IDs) that is specified by a first value of a starting row identifier and a second value of an ending row identifier for that extent chunk.

3. The method according to claim 1 , wherein the source database comprises the table having a plurality of partitions, and wherein the partition metadata information comprises:

a first set of partition numbers that will be assigned to the first target database; and

a second set of partition numbers that will be assigned to the second target database.

4. The method according to claim 1 , wherein each instance of the partition metadata information comprises: a table name, a partition name, an object ID, a file number, a block number, and a row number.

5. The method according to claim 1 , wherein each extent chunk comprises a group of extents specified by a range of row identifiers (IDs) that is specified by a first value of a starting row identifier and a second value of an ending row identifier for that extent chunk, and wherein each row identifier has a format comprising: an object ID, a file number, a block number, and a row number.

6. The method according to claim 2 , wherein creating, based on the partition metadata information, the at least one extent chunk for each partition of the table, comprises:

computing the first value of the starting row identifier for that extent chunk; and

computing the second value of the ending row identifier for that extent chunk.

7. The method according to claim 1 , wherein each table of a first set of tables has a subset of related extent chunks from the first set of extent chunks, and wherein querying the source database for the first set of data from the source database based on the first set of extent chunks; and writing the first set of data to the first target database, comprises:

for each table of the first set of tables: processing, via a thread of a multi-thread processor, each related extent chunk of the subset of related extent chunks associated with that table by:

querying the source database for particular data in a range of row identifiers specified by that related extent chunk; and

writing the particular data to the first target database.

8. The method according to claim 7 , wherein the processing collectively comprises:

multi-thread processing all of the first set of extent chunks in parallel to copy the first set of data from the source database to the first target database,

wherein the first set of data from the source database comprises all of the particular data in the range of row identifiers specified by each related extent chunk of the subset of related extent chunks.

9. A system comprising at least one hardware-based processor and memory, wherein the memory comprises processor-executable instructions encoded on a non-transient processor-readable media, wherein the processor-executable instructions, when executed by the at least one hardware-based processor, are configurable to cause:

querying a source database to collect partition metadata information comprising: a first set of the partition metadata information for a first set of partitions from the source database that are to be copied to a first target database, and a second set of the partition metadata information for a second set of partitions from the source database that are to be copied to a second target database;

creating, based on the partition metadata information, at least one extent chunk for each partition of a table;

querying the source database for a first set of data based on a first set of extent chunks, and a second set of data based on a second set of extent chunks; and

writing the first set of data to the first target database, and the second set of data to the second target database.

10. The system according to claim 9 , wherein creating comprises:

for each of the first set of partitions: creating the first set of extent chunks based on the first set of the partition metadata information; and

for each of the second set of partitions: creating the second set of extent chunks based on the second set of the partition metadata information,

wherein each extent chunk comprises a group of extents specified by a range of row identifiers (IDs) that is specified by a first value of a starting row identifier and a second value of an ending row identifier for that extent chunk.

11. The system according to claim 9 , wherein the source database comprises the table having a plurality of partitions, and wherein the partition metadata information comprises:

a first set of partition numbers that will be assigned to the first target database; and

a second set of partition numbers that will be assigned to the second target database.

12. The system according to claim 9 , wherein each instance of the partition metadata information comprises: a table name, a partition name, an object ID, a file number, a block number, and a row number.

13. The system according to claim 9 , wherein each extent chunk comprises a group of extents specified by a range of row identifiers (IDs) that is specified by a first value of a starting row identifier and a second value of an ending row identifier for that extent chunk, and wherein each row identifier has a format comprising: an object ID, a file number, a block number, and a row number.

14. The system according to claim 10 , wherein creating, based on the partition metadata information, the at least one extent chunk for each partition of the table, comprises:

computing the first value of the starting row identifier for that extent chunk; and

computing the second value of the ending row identifier for that extent chunk.

15. The system according to claim 9 , wherein each table of a first set of tables has a subset of related extent chunks from the first set of extent chunks, and wherein querying the source database for the first set of data from the source database based on the first set of extent chunks; and writing the first set of data to the first target database, comprises:

for each table of the first set of tables:

processing, via a thread of a multi-thread processor, each related extent chunk of the subset of related extent chunks associated with that table by:

querying the source database for particular data in a range of row identifiers specified by that related extent chunk; and

writing the particular data to the first target database.

16. The system according to claim 15 , wherein the processing collectively comprises:

multi-thread processing all of the first set of extent chunks in parallel to copy the first set of data from the source database to the first target database,

wherein the first set of data from the source database comprises all of the particular data in the range of row identifiers specified by each related extent chunk of the subset of related extent chunks.

17. A database migration system comprising at least one hardware-based processor that is configurable to cause:

querying a source database to collect partition metadata information comprising: a first set of the partition metadata information for a first set of partitions from the source database that are to be copied to a first target database, and a second set of the partition metadata information for a second set of partitions from the source database that are to be copied to a second target database;

creating, based on the partition metadata information, at least one extent chunk for each partition of a table;

querying the source database for a first set of data based on a first set of extent chunks, and a second set of data based on a second set of extent chunks; and

writing the first set of data to the first target database, and the second set of data to the second target database.

18. The database migration system according to claim 17 , wherein the source database comprises a table having a plurality of partitions, and wherein the partition metadata information comprises:

a first set of partition numbers that will be assigned to the first target database; and

a second set of partition numbers that will be assigned to the second target database.

19. The database migration system according to claim 17 , wherein each instance of the partition metadata information comprises: a table name, a partition name, an object ID, a file number, a block number, and a row number.

20. The database migration system according to claim 17 , wherein each extent chunk comprises a group of extents specified by a range of row identifiers (IDs) that is specified by a first value of a starting row identifier and a second value of an ending row identifier for that extent chunk, and

wherein each row identifier has a format comprising: an object ID, a file number, a block number, and a row number.

Assignments (2)
CHANGE OF NAME Recorded Dec 18, 2024
From: SALESFORCE.COM, INC.
To: SALESFORCE, INC.
Reel/Frame 069717/0571 →
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Aug 31, 2021
From: DEVAN, KAMALAKKANNAN GURU; BURGUPALLI, MUKESH; KOTTAPALLI, JITHENDRANADH
To: SALESFORCE.COM, INC.
Reel/Frame 057346/0921 →