Breakpoint-resume transfer method, media and products for full database migration

By querying the breakpoint information record table during the database full migration process and writing data in the target database, the accuracy and efficiency of the database full migration interrupt problem is solved, and high-accurate breakpoint recording and rapid breakpoint retransmission are achieved, improving migration efficiency.

CN119782284APending Publication Date: 2025-04-08CETC JINCANG (BEIJING) TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411943603.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-12-26
Publication Date
2025-04-08

AI Technical Summary

Technical Problem

During the full migration of databases, in the face of the migration interruption of super large tables, it is difficult for the existing technology to achieve accurate breakpoint recording and rapid breakpoint relay, resulting in data loss or repeated migration, which consumes a lot of time.

Method used

By querying the pre-saved breakpoint information record table, we judge whether the batch breakpoint start information to be written to the batch data exists, and query the judgment data in the target database. If there is no determination data in the target database, the batch data to be written is written in the target database, and the batch breakpoint end information is written in the breakpoint information recording table.

Benefits of technology

Without using middleware or file system, ensure complete consistency between recorded breakpoint information and data writing, improve the accuracy of recorded breakpoint information, meet various levels of migration interruption, and effectively improve the speed of breakpoint migration, thereby improving the efficiency of full migration.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119782284A_ABST
    Figure CN119782284A_ABST
Patent Text Reader

Abstract

The present invention provides a method, medium and product for breakpoint-resume transmission of full database migration. The method for breakpoint-resume transmission of full database migration includes: querying a pre-saved breakpoint information record table, and when the batch breakpoint start information of the batch data to be written exists, selecting one of the batch data to be written as the judgment data, querying the judgment data in the target database, and if the judgment data does not exist in the target database, writing the batch data to be written in the target database, and then writing the batch breakpoint end information of the batch data to be written in the breakpoint information record table. Without using middleware or file system, the complete consistency of the recorded breakpoint information and data writing can be ensured, the accuracy of the recorded breakpoint information can be improved, and various degrees of migration interruption can be met; the migration speed of breakpoint migration can be effectively improved, thereby improving the efficiency of full migration.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of database technology, and in particular to a breakpoint-resume transfer method, medium and product for full database migration. Background Art

[0002] In the process of full database migration that processes massive amounts of data, it is inevitable to face the challenge of extremely large tables. In actual operations, various software and hardware failures are difficult to avoid. For example, during the migration, database anomalies, network anomalies, insufficient server resources, etc. may cause interruptions, resulting in data loss or the need for re-migration, which is very time-consuming. Therefore, in order to minimize the impact of failures on migration, a detailed failure migration plan must be formulated to ensure that problems can be quickly recovered and reduce business interruption time.

[0003] When starting a migration task again, you usually want to resume the migration from the point where the last failure occurred, which puts forward certain requirements for the way to record and handle breakpoints. There are currently two solutions to the problem of saving breakpoint records in the database: Method 1, record breakpoint information at the table level, but do not record breakpoint information at the table data level. Method 2, record breakpoints in middleware or files, and record the location information of data status, such as snapshot information, data batches, etc.

[0004] The disadvantage of method 1 is that when the migration task is interrupted, the table data cannot be resumed from the breakpoint and needs to be migrated again. For table data with very large data volumes, the time cost of re-migration and the cost of business downtime are too high. The disadvantage of method 2 is that during the migration task, due to a failure in the middleware or file system, the target database data is successfully written, but the breakpoint record fails to be written. This results in inaccurate breakpoint record information, which causes data inconsistency after breakpoint resumption. Summary of the invention

[0005] An object of the present invention is to provide a method, medium and product for breakpoint-resume transfer of full database migration that can solve any of the above problems.

[0006] A further object of the present invention is to improve the accuracy of recorded breakpoint information to meet various degrees of migration interruption situations.

[0007] Another further object of the present invention is to increase the migration speed of breakpoint migration and improve the efficiency of full migration.

[0008] In particular, the present invention provides a breakpoint-resume method for full database migration, comprising: querying a pre-saved breakpoint information record table; determining whether batch breakpoint start information of batch data to be written exists; if so, selecting any one of the batch data to be written as judgment data, and querying the judgment data in a target database; determining whether the judgment data exists in the target database; if not, writing the batch data to be written in the target database; and writing the batch breakpoint end information of the batch data to be written in the breakpoint information record table.

[0009] Optionally, when there is determination data in the target database, the batch data to be written is discarded and batch breakpoint end information of the batch data to be written is written into the breakpoint information recording table.

[0010] Optionally, when the batch breakpoint start information of the batch data to be written does not exist, the batch breakpoint start information of the batch data to be written is written in the breakpoint information recording table; the batch data to be written is written in the target database; and the batch breakpoint end information of the batch data to be written is written in the breakpoint information recording table.

[0011] Optionally, before the step of querying the pre-saved breakpoint information record table, it also includes: obtaining the breakpoint information record table; querying the table data of the source database; judging whether the table data has been migrated according to the breakpoint information record table; if not, obtaining the batch breakpoint end information of the batch data that has been successfully migrated; judging whether there is breakpoint end information for the batch data to be read; if not, sending the batch data to be read to the target database as the batch data to be written, and executing the step of querying the pre-saved breakpoint information record table.

[0012] Optionally, when the batch data to be read has breakpoint end information, no further reading operation is performed on the batch data to be read, and only the read position is jumped to the next read position.

[0013] Optionally, the step of saving the breakpoint information record table includes: when performing a full query from the source database, querying the batch data to be read of the specified field that currently needs to be migrated through the query instruction; sending the batch data to be read to the target database as the batch data to be written; writing the batch data to be written into the target database according to the preset breakpoint writing method; updating and saving the breakpoint information record table, wherein the breakpoint information record table contains the object name, object type, batch number of the data to be written, and the batch number of the data that has been written.

[0014] Optionally, the preset breakpoint writing method is: write batch breakpoint start information of the batch data to be written in the breakpoint information recording table; write the batch data to be written in the target database; write batch breakpoint end information of the batch data to be written in the breakpoint information recording table.

[0015] Optionally, before the step of obtaining the breakpoint information record table, the method further includes: receiving an instruction to start a breakpoint resume task.

[0016] According to another aspect of the present invention, there is further provided a computer-readable storage medium having a computer program stored thereon, which implements any of the above-mentioned breakpoint-resume methods for full database migration when the computer program is executed by a processor.

[0017] According to another aspect of the present invention, there is provided a computer program product, including a computer program, characterized in that when the computer program is executed by a processor, the breakpoint-resume transfer method for full database migration described in any one of the above items is implemented.

[0018] The breakpoint-resume method for full database migration of the present invention queries a pre-saved breakpoint information record table, and when batch breakpoint start information of the batch data to be written exists, selects one item from the batch data to be written as judgment data, queries the judgment data in the target database, and if the judgment data does not exist in the target database, writes the batch data to be written in the target database, and then writes the batch breakpoint end information of the batch data to be written in the breakpoint information record table. This method can ensure the complete consistency of the recorded breakpoint information and data writing without using a middleware or a file system, improve the accuracy of the recorded breakpoint information, and meet various degrees of migration interruption situations.

[0019] Furthermore, the breakpoint-resume method for full database migration of the present invention, when there is judgment data in the target database, discards the batch data to be written and writes the batch breakpoint end information of the batch data to be written in the breakpoint information recording table; when there is breakpoint end information in the batch data to be read, no reading operation is performed on the batch data to be read, and only jumps to the next reading position, which can effectively improve the migration speed of breakpoint migration, thereby improving the efficiency of full migration.

[0020] Based on the following detailed description of specific embodiments of the present invention in conjunction with the accompanying drawings, those skilled in the art will become more aware of the above and other objects, advantages and features of the present invention. BRIEF DESCRIPTION OF THE DRAWINGS

[0021] Hereinafter, some specific embodiments of the present invention will be described in detail in an exemplary and non-limiting manner with reference to the accompanying drawings. The same reference numerals in the accompanying drawings indicate the same or similar components or parts. It should be understood by those skilled in the art that these drawings are not necessarily drawn to scale. In the accompanying drawings:

[0022] Figure 1 is a schematic flow chart of a method for resuming breakpoint transfer of a full database migration according to an embodiment of the present invention;

[0023] Figure 2It is a schematic flow chart before querying a pre-stored breakpoint information record table in a breakpoint resume method for full database migration according to an embodiment of the present invention;

[0024] Figure 3 It is a schematic flow chart of saving a breakpoint information record table in a breakpoint resume method for full database migration according to an embodiment of the present invention;

[0025] Figure 4 is a schematic diagram of a computer-readable storage medium according to an embodiment of the present invention;

[0026] Figure 5 is a schematic diagram of a computer program product according to an embodiment of the present invention; and

[0027] Figure 6 is a schematic diagram of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION

[0028] It should be understood by those skilled in the art that the embodiments described below are only some embodiments of the present invention, rather than all embodiments of the present invention, and these embodiments are intended to explain the technical principles of the present invention, rather than to limit the protection scope of the present invention. Based on the embodiments provided by the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should still fall within the protection scope of the present invention.

[0029] It should be noted that the logic and / or steps represented in the flowchart or described in other ways herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be specifically implemented in any computer-readable medium for use by an instruction execution system, device or equipment (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or equipment and execute instructions), or used in combination with these instruction execution systems, devices or equipment.

[0030] The purpose of the breakpoint-resume method for full database migration in this embodiment is to ensure complete consistency between recorded breakpoint information and data writing without using middleware or file system, improve the accuracy of recorded breakpoint information, and meet various degrees of migration interruption situations. Figure 1 FIG. 1 is a schematic flow chart of a method for resuming a breakpoint transfer of a full database migration according to an embodiment of the present invention. Figure 1 As shown, in one embodiment, the breakpoint-resume method for full database migration may generally include the following steps:

[0031] Step S102, query the pre-saved breakpoint information record table. Specifically, after determining the full migration, a breakpoint information record table can be created separately in the target database to save the breakpoint information. Specifically, the breakpoint information may include: the batch breakpoint start information PRE_NUM of the batch data, and the batch breakpoint end information END_NUM.

[0032] In addition, the breakpoint information record table may include the object name, object type, batch number of data to be written, and batch number of data written. The object name may be a table name, a primary key name, an index name, etc., depending on the name of the migrated object. The object type may be a table, a primary key, data, etc., corresponding to the object name.

[0033] Step S104, determine whether the batch breakpoint start information of the batch data to be written exists, if yes, execute step S112, if no, execute step S106. Specifically, if the determination result of step S104 is yes, that is, if the batch breakpoint start information of the batch data to be written exists, execute step S112. If the determination result of step S104 is no, that is, if the batch breakpoint start information of the batch data to be written does not exist, execute step S106.

[0034] Step S106, writing the batch breakpoint start information of the batch data to be written into the breakpoint information record table.

[0035] Step S108, writing the batch data to be written into the target database.

[0036] Step S110, writing batch breakpoint end information of the batch data to be written into the breakpoint information record table.

[0037] Specifically, when the batch breakpoint start information of the batch data to be written does not exist, it can be considered that the batch data to be written has not been written at all. Therefore, step S106 can be executed first to write the batch breakpoint start information of the batch data to be written in the breakpoint information recording table, and then step S108 can be executed to write the batch data to be written in the target database, and finally step S110 can be executed to write the batch breakpoint end information of the batch data to be written in the breakpoint information recording table.

[0038] Step S112, any one of the batch data to be written is selected as the determination data, and the determination data is queried in the target database. Specifically, if the batch breakpoint start information of the batch data to be written exists, it means that the batch data to be written may be written into the target database, or may not be written into the target database, which is an uncertain state. Therefore, any one of the batch data to be written can be selected as the determination data, and the determination data can be queried in the target database.

[0039] Step S114, determine whether there is determination data in the target database, if yes, execute step S116, if no, execute step S108. Specifically, if the determination result of step S114 is yes, that is, if there is determination data in the target database, execute step S116. If the determination result of step S114 is no, that is, if there is no determination data in the target database, execute step S108.

[0040] Step S116, discard the batch data to be written, and execute step S110. Specifically, if the determination data exists in the target database, it can be considered that the batch data to be written is written to the target database, so there is no need to write it again, and the batch data to be written can be discarded, and then only step S110 needs to be executed to write the batch breakpoint end information of the batch data to be written in the breakpoint information record table.

[0041] When there is no determination data in the target database, it can be considered that the batch data to be written has not been written into the target database. Therefore, step S108 can be executed to first write the batch data to be written into the target database, and then step S110 can be executed to write the batch breakpoint end information of the batch data to be written into the breakpoint information record table.

[0042] In the scheme of this embodiment, by querying the pre-saved breakpoint information recording table, if the batch breakpoint start information of the batch data to be written exists, one item from the batch data to be written is selected as the judgment data, and the judgment data is queried in the target database. If the judgment data does not exist in the target database, the batch data to be written is written in the target database, and then the batch breakpoint end information of the batch data to be written is written in the breakpoint information recording table. This can ensure the complete consistency of the recorded breakpoint information and data writing without using middleware or file system, improve the accuracy of the recorded breakpoint information, and meet various degrees of migration interruption situations.

[0043] Figure 2 FIG. 1 is a schematic flow chart of a method for resuming a database full migration according to an embodiment of the present invention before querying a pre-stored breakpoint information record table. Figure 2 As shown, before querying the pre-saved breakpoint information record table, the following steps may generally be included:

[0044] Step S202, obtaining a breakpoint information record table. Specifically, before obtaining the breakpoint information record table, the process may further include: receiving an instruction to start a breakpoint resume task. That is, when the breakpoint resume task is started, obtaining the breakpoint information record table.

[0045] Step S204, querying the table data of the source database, wherein the table data has a very large amount of data.

[0046] Step S206, determine whether the table data has been migrated, if yes, execute step S208, if no, execute step S210. Specifically, if the judgment result of step S206 is yes, that is, if the table data has been migrated, execute step S208. If the judgment result of step S206 is no, that is, if the table data has not been migrated, execute step S210.

[0047] Among them, it can be determined whether the table data has been migrated according to the breakpoint information record table. Specifically, it can be determined whether the table data has been migrated according to the total number of successful records.

[0048] Step S208: No more reading is performed, and the table data reading thread exits. Specifically, when the table data has been migrated, no more reading is performed, and the table data reading thread exits.

[0049] Step S210, obtaining batch breakpoint end information of the batch data that has been successfully migrated. Specifically, if the table data has not been migrated, obtaining batch breakpoint end information of the batch data that has been successfully migrated. The batch data to be read can be determined based on the batch breakpoint end information of the batch data that has been successfully migrated.

[0050] Step S212, determine whether the batch data to be read has breakpoint end information, if yes, execute step S216, if no, execute step S214. Specifically, if the determination result of step S2012 is yes, that is, if the batch data to be read has breakpoint end information, execute step S216. If the determination result of step S212 is no, that is, if the batch data to be read does not have breakpoint end information, execute step S214.

[0051] Among them, the JDBC ResultSet can be obtained to determine whether the batch data to be read has breakpoint end information, thereby determining whether the batch data to be read has been successfully migrated. JDBC is an application programming interface (Application Programming Interface, referred to as API) of the Java programming language, which is used to connect to and operate the database. ResultSet refers to the data table of the database result set.

[0052] Step S214, the batch data to be read is sent to the target database as the batch data to be written. Specifically, if the batch data to be read does not have breakpoint end information, it means that the batch data to be read has not been completely written to the target database, and the batch data to be read can be sent to the target database as the batch data to be written. And then, the following can be executed Figure 1 The specific process of resuming transmission from an interruption point.

[0053] Step S216: No more reading operation is performed on the batch data to be read, and only the next reading position is jumped. Specifically, if the batch data to be read has breakpoint end information, it means that the batch data to be read has been completely written into the target database, and no more reading operation is performed on the batch data to be read, and only the next reading position is jumped. A new round of determination of whether the batch data to be read at the next reading position is successfully migrated is performed.

[0054] In the scheme of the above embodiment, when there is judgment data in the target database, the batch data to be written is discarded and the batch breakpoint end information of the batch data to be written is written in the breakpoint information recording table; when there is breakpoint end information in the batch data to be read, the batch data to be read is no longer read, and only the next reading position is jumped to, which can effectively improve the migration speed of breakpoint migration, thereby improving the efficiency of full migration.

[0055] Figure 3 FIG. 1 is a schematic flow chart of storing a breakpoint information record table in a breakpoint resume method for full database migration according to an embodiment of the present invention. Figure 3 As shown, saving the breakpoint information record table may generally include the following steps:

[0056] Step S302, when performing a full query from the source database, the batch data to be read of the specified field that needs to be migrated is queried through the query instruction. Specifically, when performing a full query, the data in the source database table can be retrieved in order according to the primary key by SELECT 'field', 'field', ... FROM table name ORDER BY primary key.

[0057] Step S304: sending the batch data to be read to the target database as the batch data to be written.

[0058] Step S306, write the batch data to be written into the target database according to the preset breakpoint writing method. Specifically, the preset breakpoint writing method can be: write the batch breakpoint start information of the batch data to be written in the breakpoint information recording table; write the batch data to be written in the target database; write the batch breakpoint end information of the batch data to be written in the breakpoint information recording table. This breakpoint writing method can be called Kingbase Copy, which refers to the import and export operations of data through the COPY command when using the Kingbase database. The reason why this breakpoint writing method is implemented in this way is that the Kingbase Copy method itself is an atomic operation of table data writing, and it cannot be executed in the same transaction with other table data information.

[0059] The following is an introduction to a Kingbase Copy method of a specific embodiment:

[0060] After receiving the batch data sent by the reader, the target end writes or updates the breakpoint information record table, and uses the CANCAT function to append the range of the batch, such as [1,1000], to the batch breakpoint start information PRE_NUM of the breakpoint information. Then, the batch data is written to the target database through JDBC using the Kingbase Copy method. Finally, the data range record of the batch is appended to the batch breakpoint end information END_NUM of the breakpoint information of the table using the CONCAT function.

[0061] The reading end refers to the end where the migration tool obtains source data, and the database where the data is executed is called the source database. The target end refers to the end that receives incremental data and stores it for execution during database migration, and the database where the data is executed is called the target database.

[0062] In some other embodiments, other breakpoint writing methods can also be used, such as the INSERT method: first open the database transaction operation through JDBC, set the transaction commit mode to manual commit, INSERT writes the breakpoint information to save the statement, the breakpoint information records the table name and data batch range, and then INSERT writes the data statement of the batch, and finally executes the JDBC commit operation after execution is completed.

[0063] Step S308, update and save the breakpoint information record table. Specifically, the data batch number rows in the breakpoint information record table can be aggregated according to the size of the data rows, and the breakpoint information record can be updated and saved here.

[0064] The flow chart that the above-described embodiment provides is not intended to indicate that the operation of the method will be performed in any particular order, or that all operations of the method are included in all every case. In addition, the method may include additional operations. Within the scope of the technical ideas that the above-described embodiment method provides, additional changes may be made to the above-described method.

[0065] This embodiment also provides a computer-readable storage medium, a computer program product, and a computer device. Figure 4 is a schematic diagram of a computer-readable storage medium 300 according to one embodiment of the present invention. Figure 5 is a schematic diagram of a computer program product 500 according to one embodiment of the present invention. Figure 6 is a schematic diagram of a computer device 400 according to one embodiment of the present invention.

[0066] The computer program product 500 includes a computer program 310, which implements any of the above-mentioned methods for resuming the transfer of a database in full when the computer program 310 is executed by a processor 410. The computer-readable storage medium 300 stores the above-mentioned computer program 310, which implements any of the above-mentioned methods for resuming the transfer of a database in full when the computer program 310 is executed by the processor 410. The computer device 400 may include a memory 420, a processor 410, and a computer program 310 stored in the memory 420 and running on the processor 410.

[0067] The computer program 310 used to perform the operations of the present invention can be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-related instructions, microcode, firmware instructions, state setting data, configuration data of an integrated circuit, or source code or object code written in any combination of one or more programming languages ​​and procedural programming languages.

[0068] The computer program 310 may be executed entirely on the user's computer, partially on the user's computer, as a stand-alone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In the latter case, the remote computer may be connected to the user's computer via any type of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computer (e.g., via the Internet using an Internet Service Provider).

[0069] In some embodiments, in order to perform various aspects of the present invention, electronic circuits including, for example, programmable logic circuits, field programmable gate arrays (FPGAs) or programmable logic arrays (PLAs) can execute computer-readable program instructions by utilizing state information of the computer-readable program instructions to personalize the electronic circuits.

[0070] For the description of this embodiment, the computer program product 500 is a related product including the computer program 310. For the description of this embodiment, the computer-readable storage medium 300 is a tangible device capable of retaining and storing the computer program 310, which can be any device that can contain, store, communicate, propagate or transmit the program 310 for use in an instruction execution system, device or apparatus or in conjunction with these instruction execution systems, devices or apparatuses.

[0071] More specific examples (a non-exhaustive list) of computer-readable storage media 300 include the following: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, and any suitable combination of the foregoing.

[0072] The computer device 400 may include a memory 420, a processor 410, and a computer program 310 stored in the memory 420 and running on the processor 410, and when the processor 410 executes the computer program 310, the breakpoint-resume method for full database migration of any of the above embodiments is implemented.

[0073] It should be noted that the logic and / or steps represented in the flowchart or described in other ways herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be specifically implemented in any machine-readable storage medium for use by an instruction execution system, device or equipment (such as a computer-based system, a system including a processor, or other system that can fetch instructions from an instruction execution system, device or equipment and execute instructions), or used in combination with these instruction execution systems, devices or equipment.

[0074] It should be understood that each part of the present invention can be implemented by hardware, software, firmware or a combination thereof. In the above embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system.

[0075] Computer device 400 can be, for example, a server, a desktop computer, a notebook computer, a tablet computer, or a smart phone. In some examples, computer device 400 can be a cloud computing node. Computer device 400 can be described in the general context of computer system executable instructions (such as program modules) executed by a computer system. Typically, a program module can include routines, programs, target programs, components, logic, data structures, etc. that perform specific tasks or implement specific abstract data types. Computer device 400 can be implemented in a distributed cloud computing environment where remote processing devices linked through a communication network perform tasks. In a distributed cloud computing environment, program modules can be located on a local or remote computing system storage medium including a storage device.

[0076] The computer device 400 may include a processor 410 adapted to execute stored instructions, and a memory 420 providing temporary storage space for the operation of instructions during operation. The processor 410 may be a single-core processor, a multi-core processor, a computing cluster, or any number of other configurations. The memory 420 may include a random access memory (RAM), a read-only memory, a flash memory, or any other suitable storage system.

[0077] The processor 410 may be connected to an I / O interface (input / output interface) suitable for connecting the computer device 400 to one or more I / O devices (input / output devices) through a system interconnect (e.g., PCI, PCI-Express, etc.). The I / O devices may include, for example, a keyboard and a pointing device, wherein the pointing device may include a touch pad or a touch screen, etc. The I / O devices may be built-in components of the computer device 400, or may be devices externally connected to the computing device.

[0078] Processor 410 may also be linked to a display interface suitable for connecting computer device 400 to a display device through a system interconnect. Display device may include a display screen as a built-in component of computer device 400. Display device may also include a computer monitor, a television or a projector, etc., externally connected to computer device 400. In addition, a network interface controller (NIC) may be suitable for connecting computer device 400 to a network through a system interconnect. In some embodiments, NIC may use any suitable interface or protocol (such as an Internet small computer system interface, etc.) to transmit data. The network may be a cellular network, a radio network, a wide area network (WAN), a local area network (LAN) or the Internet, etc. A remote device may be connected to a computing device through a network.

[0079] At this point, those skilled in the art should recognize that, although multiple exemplary embodiments of the present invention have been shown and described in detail herein, many other variations or modifications that conform to the principles of the present invention can still be directly determined or derived based on the content disclosed in the present invention without departing from the spirit and scope of the present invention. Therefore, the scope of the present invention should be understood and recognized as covering all these other variations or modifications.

Claims

1. A method for resuming a full database migration, comprising: Query the pre-saved breakpoint information record table; Determine whether the batch breakpoint start information of the batch data to be written exists; If yes, select one of the batch data to be written as the determination data, and query the determination data in the target database; Determine whether the determination data exists in the target database; If not, writing the batch data to be written into the target database; The batch breakpoint end information of the batch data to be written is written into the breakpoint information record table.

2. The method according to claim 1, wherein: In the case that the determination data exists in the target database, the batch data to be written is discarded and batch breakpoint end information of the batch data to be written is written into the breakpoint information recording table.

3. The method according to claim 1, wherein: When the batch breakpoint start information of the batch data to be written does not exist, the batch breakpoint start information of the batch data to be written is written in the breakpoint information recording table; the batch data to be written is written in the target database; and the batch breakpoint end information of the batch data to be written is written in the breakpoint information recording table.

4. The method according to claim 1, wherein before the step of querying the pre-saved breakpoint information record table, it also includes: Obtaining the breakpoint information record table; Query the table data of the source database; Determining whether the table data has been migrated according to the breakpoint information record table; If not, obtain the batch breakpoint end information of the batch data that has been successfully migrated; Determine whether the batch data to be read contains the breakpoint end information; If not, the batch data to be read is sent to the target database as the batch data to be written, and a step of querying a pre-saved breakpoint information record table is performed.

5. The method according to claim 4, wherein: In the case that the batch data to be read has the breakpoint end information, no further reading operation is performed on the batch data to be read, and only the next reading position is jumped.

6. The method according to claim 4, wherein the step of saving the breakpoint information record table comprises: When performing a full query from the source database, the batch data to be read of the specified field that currently needs to be migrated is queried through a query instruction; Sending the batch data to be read to the target database as the batch data to be written; Writing the batch data to be written into the target database according to a preset breakpoint writing method; The breakpoint information record table is updated and saved, wherein the breakpoint information record table includes an object name, an object type, a batch number of data to be written, and a batch number of data already written.

7. The method according to claim 6, wherein: The preset breakpoint writing method is: writing the batch breakpoint start information of the batch data to be written in the breakpoint information recording table; writing the batch data to be written in the target database; writing the batch breakpoint end information of the batch data to be written in the breakpoint information recording table.

8. The method according to claim 4, wherein before the step of obtaining the breakpoint information record table, it also includes: Receive the start instruction of the breakpoint resume task.

9. A computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the method for resuming the breakpoint transfer of the full database migration according to any one of claims 1 to 8 is implemented.

10. A computer program product, comprising a computer program, characterized in that When the computer program is executed by a processor, the breakpoint-resume method for full database migration described in any one of claims 1 to 8 is implemented.