Data copying method and system based on different database
A data replication and database technology, applied in the field of database system applications, can solve the problems affecting the concurrent operation of the application server and the large local disk occupancy of the application server, achieve high-concurrency and large-batch data replication, and solve the problem of excessive disk load. Effect
- Summary
- Abstract
- Description
- Claims
- Application Information
AI Technical Summary
Problems solved by technology
Method used
Image
Examples
Embodiment 1
[0041] Embodiment 1 of the present invention discloses a data replication method based on different databases, refer to figure 1 , the method may include the following steps:
[0042] S101: Obtain target sub-data of a first preset size currently to be processed from target data; wherein, the target data is: data to be copied provided by a source database based on preset filter conditions.
[0043]S102: Write the target sub-data into a pipeline; the pipeline is a shared memory area of a second preset size created in advance in the memory of the application server, and the value of the second preset size is not smaller than the first preset size Set the value of the size.
[0044] S103: Read the target sub-data from the pipeline, and write the read target sub-data into the target database; when the target data is not all written into the target database, go to execution The step S101: Acquiring target sub-data of a first preset size currently to be processed from the target ...
Embodiment 2
[0059] In the second embodiment of the present invention, refer to figure 2 , the method may also include the following steps:
[0060] S104: Count the number of first records of data obtained from the source database, count the number of second records of data written into the target database, and compare the number of records between the second number of records and the number of An error is reported when the number of first records is not equal.
[0061] Specifically, in this embodiment, the application server counts the number of records obtained from the source database and the number of records actually loaded into the target database. When the two are not equal, an error is reported, and this situation is fed back to the user, which is convenient for the user. Learn about the execution status of the current replication task.
Embodiment 3
[0063] In the third embodiment of the present invention, refer to image 3 , the method may also include the following steps:
[0064] S105: When the execution of the data unloading program or the data loading program fails, use a corresponding response mechanism to deal with it.
[0065] In this embodiment, the response mechanism when the execution of the data uninstall program fails includes:
[0066] When the pipeline is unwritable and unreadable, delete the pipeline;
[0067] When the pipeline is unwritable and readable, calling a system write command to write preset data to the pipeline, and deleting the pipeline after using the data loading program to read the preset data.
[0068] The response mechanism when the execution of the data loading program fails includes:
[0069] When the pipeline is unwritable and unreadable, delete the pipeline;
[0070] When the pipe is writable but not readable, a system read command is invoked to read the data in the pipe and delete ...
PUM

Abstract
Description
Claims
Application Information

- R&D Engineer
- R&D Manager
- IP Professional
- Industry Leading Data Capabilities
- Powerful AI technology
- Patent DNA Extraction
Browse by: Latest US Patents, China's latest patents, Technical Efficacy Thesaurus, Application Domain, Technology Topic, Popular Technical Reports.
© 2024 PatSnap. All rights reserved.Legal|Privacy policy|Modern Slavery Act Transparency Statement|Sitemap|About US| Contact US: help@patsnap.com