CN112463888A - Method and system for synchronizing data of double-site database - Google Patents

Method and system for synchronizing data of double-site database Download PDF

Info

Publication number
CN112463888A
CN112463888A CN202011416176.7A CN202011416176A CN112463888A CN 112463888 A CN112463888 A CN 112463888A CN 202011416176 A CN202011416176 A CN 202011416176A CN 112463888 A CN112463888 A CN 112463888A
Authority
CN
China
Prior art keywords
site
database
standby
disk
long
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202011416176.7A
Other languages
Chinese (zh)
Other versions
CN112463888B (en
Inventor
罗海波
周湉
朱冠洲
陈婷
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Industrial and Commercial Bank of China Ltd ICBC
Original Assignee
Industrial and Commercial Bank of China Ltd ICBC
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Industrial and Commercial Bank of China Ltd ICBC filed Critical Industrial and Commercial Bank of China Ltd ICBC
Priority to CN202011416176.7A priority Critical patent/CN112463888B/en
Publication of CN112463888A publication Critical patent/CN112463888A/en
Application granted granted Critical
Publication of CN112463888B publication Critical patent/CN112463888B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1458Management of the backup or restore process
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/23Updating
    • G06F16/2365Ensuring data consistency and integrity

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Computing Systems (AREA)
  • Computer Security & Cryptography (AREA)
  • Quality & Reliability (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Hardware Redundancy (AREA)

Abstract

The invention provides a method and a system for synchronizing data of a double-site database, which can be used in the financial field or other fields. The method comprises the following steps: the master station writes database logs generated during transaction operation into a long-leg target disk in real time; the standby site analyzes the long-leg target disk of the main site by using a data copying technology, writes the analyzed log into a database of the standby site to obtain a database log of the standby site, and writes the database log into the long-leg target disk of the standby site in real time; when the main site is shut down and the basic service is switched to the standby site, the standby site writes a database log generated during transaction operation into a long-leg target disk of the standby site in real time; after the main site is started, the long-leg target disk of the standby site is analyzed by using a data copying technology, and the analyzed log is written into a database of the main site. The invention realizes the data synchronization between the two sites of the database, effectively utilizes the resources of the same-site standby site, reduces the business influence on clients during the halt period of the main site and improves the business continuity level.

Description

Method and system for synchronizing data of double-site database
Technical Field
The invention relates to the technical field of databases, in particular to a method and a system for synchronizing data of a double-site database.
Background
In the big data era, the most valuable assets are "data". Data replication is beneficial to backup and protection of data assets, is particularly suitable for the requirement of high reliability of the financial industry, and has great advantages in the aspects of service continuity and high availability (RTO, RPO). The host Q-REP plays an important role in a same city double-activity system as a tool for synchronously copying data, and the normal operation of the Q-REP is one of necessary conditions for ensuring the consistency and the integrity of the data.
With the change of payment modes of people and the rapid development of internet finance, the requirement of customers on the continuous operation of banking businesses is higher and higher, particularly, the time-efficiency-required transactions such as loss report of some telephone banks and the like are very high, and the continuous service of 7-by-24 hours is urgently needed to be provided. How to reduce the business impact on the client during the commissioning of the application and system versions becomes an urgent problem.
Disclosure of Invention
The embodiment of the invention mainly aims to provide a method and a system for synchronizing data of a double-site database, which can fully utilize the current switching mechanism of a double-active system and reduce the influence on the service continuity of a host to the greatest extent.
In order to achieve the above object, an embodiment of the present invention provides a method for synchronizing data of a dual-site database, where the method includes:
the master station writes database logs generated during transaction running into a long-leg target disk of the master station in real time; the standby site analyzes the long-leg target disk of the main site by using a data replication technology, writes the analyzed log into a database of the standby site to obtain a database log of the standby site, and writes the database log of the standby site into the long-leg target disk of the standby site in real time;
when the main site is shut down and the basic service is switched to the standby site, the standby site writes a database log generated during transaction operation into a long-leg target disk of the standby site in real time; after the main site is started, the main site analyzes the long-leg target disk of the standby site by using a data copying technology, and writes the analyzed log into a database of the main site.
Optionally, in an embodiment of the present invention, writing, by the master site, a database log generated during transaction running into a long-leg target disk of the master site in real time includes: and the master station writes database logs generated during transaction operation into a primary disk, a secondary disk and a long-leg target disk of the master station in real time in parallel.
Optionally, in an embodiment of the present invention, writing the analyzed log into the database of the primary site further includes: and writing the analyzed log into a database of the master site at the master site, and after the basic service is switched back to the master site, the master site performs stock data synchronization by using a primary disk and a secondary disk of the master site according to a disk mirror image replication technology.
Optionally, in an embodiment of the present invention, the writing the database log of the standby station into the long-leg target disk of the standby station in real time includes: and the standby station writes the database logs of the standby station into a primary disk, a secondary disk and a long-leg target disk of the standby station in real time and in parallel.
The embodiment of the invention also provides a data synchronization system of a double-site database, which comprises a main site and a standby site, wherein:
the master station writes database logs generated during transaction running into a long-leg target disk of the master station in real time; the standby site analyzes the long-leg target disk of the main site by using a data replication technology, writes the analyzed log into a database of the standby site to obtain a database log of the standby site, and writes the database log of the standby site into the long-leg target disk of the standby site in real time;
when the main site is shut down and the basic service is switched to the standby site, the standby site writes a database log generated during transaction operation into a long-leg target disk of the standby site in real time; after the main site is started, the main site analyzes the long-leg target disk of the standby site by using a data copying technology, and writes the analyzed log into a database of the main site.
Optionally, in an embodiment of the present invention, the main site is further configured to write database logs generated during transaction runtime into a primary disk, a secondary disk, and a long-leg target disk of the main site in real time and in parallel.
Optionally, in an embodiment of the present invention, the primary site is further configured to write the analyzed log into a database of the primary site, and after the basic service is switched back to the primary site, perform storage data synchronization by using a primary disk and a secondary disk of the primary site according to a disk mirroring replication technology.
Optionally, in an embodiment of the present invention, the backup site is further configured to write the database log of the backup site into a primary disk, a secondary disk, and a long-leg target disk of the backup site in real time and in parallel.
Optionally, in an embodiment of the present invention, the system further includes a dual active control component, configured to switch the basic service to the standby site, and switch the basic service back to the primary site.
The invention realizes the data synchronization between the two sites of the database by using the data replication technology, ensures that the data is not lost when the main site is in a halt condition, effectively utilizes the resources of the same-site standby site, furthest reduces the influence on the service continuity of the main site, realizes the effective reduction of the service influence on a client during the halt of the main site, and obviously improves the service continuity level.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained based on these drawings without creative efforts.
Fig. 1 is a flowchart of a method for synchronizing data of a dual-site database according to an embodiment of the present invention;
FIG. 2 is a diagram illustrating data synchronization of a dual site database according to an embodiment of the present invention;
FIG. 3 is a diagram illustrating data synchronization of a dual site database according to another embodiment of the present invention;
fig. 4 is a schematic structural diagram of a dual-site database data synchronization system according to an embodiment of the present invention.
Detailed Description
The embodiment of the invention provides a method and a system for synchronizing data of a double-site database, which can be used in the financial field or other fields.
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Fig. 1 is a flowchart of a method for synchronizing data of a dual-site database according to an embodiment of the present invention, where the method includes:
step S1, the master station writes database logs generated during transaction operation into a long-leg target disk of the master station in real time; and the standby site analyzes the long-leg target disk of the main site by using a data copying technology, writes the analyzed log into the database of the standby site to obtain the database log of the standby site, and writes the database log of the standby site into the long-leg target disk of the standby site in real time.
The transaction is normally carried out at the main site, the parallel writing of the database logs in the long-leg target disk and other disks of the main site is realized through the parallel writing magnetic disk technology, and the transaction is finished after the logs are written in all the magnetic disks. The backup site analyzes the log of the long-leg target disk of the main site through a QREP (data real-time replication) technology, writes the log of the solved transaction into a database of the backup site, realizes real-time synchronization of data on two sides, and only runs part of query type transactions with the backup site at ordinary times. Separable query type transactions are operated at ordinary times with the same city standby site, the pressure of the main site is shared, and the resources of the main site are effectively saved.
Similarly, the database at the backup site can write the generated database logs to the long-leg target disk and other disks in parallel. The QREP technology is also adopted by the primary site, in order to distinguish the QREP from the primary site to the standby site, the QREP deployed from the standby site to the primary site is called reverse QREP, and the QREP from the primary site to the standby site is called forward QREP. The reverse QREP is not started in a normal state, and the QREP has special parameters, so that logs generated by copying data can be ignored, and data disorder caused by repeated log analysis is avoided.
Step S2, when the main station is shut down and the basic service is switched to the standby station, the standby station writes the database log generated during the transaction operation into the long-leg target disk of the standby station in real time; after the main site is started, the main site analyzes the long-leg target disk of the standby site by using a data copying technology, and writes the analyzed log into a database of the main site.
During the shutdown version, the transaction is routed to the same city standby site through the automatic switching script, and the basic service transaction is provided at the standby site. And simultaneously stopping the forward QREP, starting the reverse QREP, analyzing the log in the long-leg target disk of the standby site by the main site, and writing the analyzed log into a database of the main site. And realizing data synchronization of two sides. Therefore, during the commissioning of the application and system versions, the basic service system is operated at the parallel site in the same city, data analysis is carried out by combining QREP copy software and an application program, the basic service data of the parallel system in the version period is complemented back to the main site, and the final data consistency of the main site and the standby site is realized.
As an embodiment of the present invention, writing, by the master site, a database log generated during transaction running into a long-leg target disk of the master site in real time includes: and the master station writes database logs generated during transaction operation into a primary disk, a secondary disk and a long-leg target disk of the master station in real time in parallel.
The transaction is operated at the main site, the database logs are simultaneously written in a primary disk, a secondary disk and a long-leg target disk in parallel by the parallel writing magnetic disk technology, and the transaction is finished after the logs are written in all the magnetic disks.
In this embodiment, writing the parsed log into the database of the primary site further includes: and writing the analyzed log into a database of the master site at the master site, and after the basic service is switched back to the master site, the master site performs stock data synchronization by using a primary disk and a secondary disk of the master site according to a disk mirror replication technology.
After the version of the main site is upgraded, the stock data synchronization of the main site and the standby site is realized through PPRC (disk mirror image replication technology), and then the forward QREP is started to realize the incremental data synchronization.
Specifically, after the primary site synchronizes data with the secondary site through reverse QREP, the basic service is switched back to the primary site. And the main site performs stock data synchronization from the primary disk and the secondary disk of the main site by using the PPRC, and synchronizes the data subjected to stock data synchronization to the standby site again by using the forward QREP so as to ensure that the data of the main site and the standby site are consistent.
In this embodiment, writing the database log of the standby site into the long-leg target disk of the standby site in real time includes: and the standby station writes the database logs of the standby station into a primary disk, a secondary disk and a long-leg target disk of the standby station in real time and in parallel.
Wherein, similar to the primary site, the database of the backup site writes the generated database logs in parallel to the primary disk, the secondary disk, and the long-leg target disk.
In an embodiment of the present invention, as shown in fig. 2 and fig. 3, fig. 2 shows forward QREP data synchronization, a transaction is normally operated at a primary site, and the primary and secondary sites are symmetrically disposed. The reverse QREP data synchronization is shown in fig. 3. Wherein, the dotted line indicates that the link is not operated normally and operated after the transaction route is switched, and S indicates the distance between the master station and the standby station, for example, 55 km.
In this embodiment, the transaction is run at the master site in a normal state, and the parallel writing of the database logs on the primary disk, the secondary disk and the long-leg target disk (i.e., the long-leg disk in the figure) is realized through the parallel writing disk technology, so that the transaction is ended after the logs are written on all the disks. And deploying an agent system B at the backup site, analyzing the log of the long-leg target disk of the main site through a QREP technology, writing the log of the solved transaction into a database B of the backup site, realizing real-time synchronization of data at two sides, and only operating partial query type transactions at ordinary times when the same as the city backup site.
Similarly, the database B at the standby site can write the generated database logs to the primary disk, the secondary disk and the long-leg target disk (i.e. the long-leg disk in the figure) in parallel, and the proxy system a is deployed at the main site similarly. During the shutdown version, the transaction is routed to the same metro site through an automated switching script, providing a basic service transaction at the spare site. And simultaneously stopping the forward QREP, starting the reverse QREP, analyzing the log in the long-leg target disk of the standby site by the main site, and writing the analyzed log into a database A of the main site to realize data synchronization of two sides.
The main site and the standby site realize data synchronization between the two sites of the database through the Q-REP data replication tool of the host. And aiming at the condition that the main site is shut down, the transaction route is switched to the backup site through basic service switching before the shutdown version is produced. During the primary site down version, the transaction runs on the primary service system at the backup site. After the version of the main site is upgraded, the data consistency of the sites on both sides is realized through data back-supplementing, and finally, the transaction route is switched back to the main site through basic service back-switching. Therefore, the same-city backup site resources are effectively utilized, and the influence on the service continuity of the main site is reduced to the greatest extent.
The basic service supplementary accounting refers to synchronizing basic service transaction data generated by the same city backup site during shutdown to the primary site. And (3) using reverse QREP technology for the non-table structure change table, performing data analysis on the change table in combination with an application program, and supplementing the basic service data of the parallel system in the version period back to the master site.
The invention realizes the data synchronization between the two sites of the database by using the data replication technology, ensures that the data is not lost when the main site is in a halt condition, effectively utilizes the resources of the same-site standby site, furthest reduces the influence on the service continuity of the main site, realizes the effective reduction of the service influence on a client during the halt of the main site, and obviously improves the service continuity level.
Fig. 4 is a schematic structural diagram of a dual-site database data synchronization system according to an embodiment of the present invention, where basic service switching and back-switching are performed by sending access transactions of various channels (such as mobile banking, counter, and the like) to a gateway, and connecting the access transactions to hosts of a primary site and a standby site through load balancers, where the load balancers all point to the primary site in a normal state, and the dotted line connection refers to a switched transaction link. The main active and standby active control components are used for monitoring the state of the key components of the host system and finishing the control of gateway access, thereby realizing the distribution and switching of online services between sites. The basic service switching and back-switching are realized by sending commands to the load balancer through the control component to control the gateway transaction routing direction, thereby achieving the online transaction switching. The system shown in the figure comprises a primary site and a backup site, wherein:
the master station writes database logs generated during transaction running into a long-leg target disk of the master station in real time; and the standby site analyzes the long-leg target disk of the main site by using a data copying technology, writes the analyzed log into the database of the standby site to obtain the database log of the standby site, and writes the database log of the standby site into the long-leg target disk of the standby site in real time.
The transaction is normally carried out at the main site, the parallel writing of the database logs in the long-leg target disk and other disks of the main site is realized through the parallel writing magnetic disk technology, and the transaction is finished after the logs are written in all the magnetic disks. The backup site analyzes the log of the long-leg target disk of the main site through a QREP (data real-time replication) technology, writes the log of the solved transaction into a database of the backup site, realizes real-time synchronization of data on two sides, and only runs part of query type transactions with the backup site at ordinary times. Separable query type transactions are operated at ordinary times with the same city standby site, the pressure of the main site is shared, and the resources of the main site are effectively saved.
Similarly, the database at the backup site can write the generated database logs to the long-leg target disk and other disks in parallel. The QREP technology is also adopted by the primary site, in order to distinguish the QREP from the primary site to the standby site, the QREP deployed from the standby site to the primary site is called reverse QREP, and the QREP from the primary site to the standby site is called forward QREP. The reverse QREP is not started in a normal state, and the QREP has special parameters, so that logs generated by copying data can be ignored, and data disorder caused by repeated log analysis is avoided.
When the main site is shut down and the basic service is switched to the standby site, the standby site writes a database log generated during transaction operation into a long-leg target disk of the standby site in real time; after the main site is started, the main site analyzes the long-leg target disk of the standby site by using a data copying technology, and writes the analyzed log into a database of the main site.
During the shutdown version, the transaction is routed to the same city standby site through the automatic switching script, and the basic service transaction is provided at the standby site. And simultaneously stopping the forward QREP, starting the reverse QREP, analyzing the log in the long-leg target disk of the standby site by the main site, and writing the analyzed log into a database of the main site. And realizing data synchronization of two sides. Therefore, during the commissioning of the application and system versions, the basic service system is operated at the parallel site in the same city, data analysis is carried out by combining QREP copy software and an application program, the basic service data of the parallel system in the version period is complemented back to the main site, and the final data consistency of the main site and the standby site is realized.
As an embodiment of the invention, the main site is also used for writing the database logs generated during the operation of the transaction into a primary disk, a secondary disk and a long-leg target disk of the main site in real time and in parallel.
In this embodiment, the primary site is further configured to write the analyzed log into a database of the primary site, and perform inventory data synchronization by using a primary disk and a secondary disk of the primary site according to a disk mirroring replication technique after the primary service is switched back to the primary site.
In this embodiment, the backup site is further configured to write the database logs of the backup site into a primary disk, a secondary disk, and a long-leg target disk of the backup site in real time and in parallel.
As an embodiment of the present invention, the system further includes a dual active control component, configured to switch the basic service to the standby site and switch the basic service back to the primary site.
The basic service switching refers to switching the transaction route to a parallel site before the shutdown version is put into production. And the basic service switching back means that the transaction is routed to the core site after the production of the version of the main site is finished. The basic service switching and the back switching are that the transaction is sent to the gateway and is connected to the host through the load balancer, the load balancer points to the main site in a normal state, and the dotted line connection refers to a switched transaction link. The basic service switching and back-switching are realized by sending commands to the load balancer through the control component to control the gateway transaction routing direction, thereby achieving the online transaction switching.
The invention realizes the data synchronization between the two sites of the database by using the data replication technology, ensures that the data is not lost when the main site is in a halt condition, effectively utilizes the resources of the same-site standby site, furthest reduces the influence on the service continuity of the main site, realizes the effective reduction of the service influence on a client during the halt of the main site, and obviously improves the service continuity level.
Based on the same application concept as the double-site database data synchronization method, the invention also provides the double-site database data synchronization system. Because the principle of solving the problems of the double-site database data synchronization system is similar to that of a double-site database data synchronization method, the implementation of the double-site database data synchronization system can refer to the implementation of the double-site database data synchronization method, and repeated parts are not described again.
The invention realizes the data synchronization between the two sites of the database by using the data replication technology, ensures that the data is not lost when the main site is in a halt condition, effectively utilizes the resources of the same-site standby site, furthest reduces the influence on the service continuity of the main site, realizes the effective reduction of the service influence on a client during the halt of the main site, and obviously improves the service continuity level.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flow diagrams and/or block diagrams, and combinations of flows and/or blocks in the flow diagrams and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
The principle and the implementation mode of the invention are explained by applying specific embodiments in the invention, and the description of the embodiments is only used for helping to understand the method and the core idea of the invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, there may be variations in the specific embodiments and the application scope, and in summary, the content of the present specification should not be construed as a limitation to the present invention.

Claims (9)

1. A method for synchronizing data of a double-site database, the method comprising:
the master station writes database logs generated during transaction running into a long-leg target disk of the master station in real time; the standby site analyzes the long-leg target disk of the main site by using a data replication technology, writes the analyzed log into a database of the standby site to obtain a database log of the standby site, and writes the database log of the standby site into the long-leg target disk of the standby site in real time;
when the main site is shut down and the basic service is switched to the standby site, the standby site writes a database log generated during transaction operation into a long-leg target disk of the standby site in real time; after the main site is started, the main site analyzes the long-leg target disk of the standby site by using a data copying technology, and writes the analyzed log into a database of the main site.
2. The method of claim 1, wherein the master site writing database logs generated during transaction runtime into a long-legged target disk of the master site in real time comprises:
and the master station writes database logs generated during transaction operation into a primary disk, a secondary disk and a long-leg target disk of the master station in real time in parallel.
3. The method of claim 2, wherein writing the parsed log to the database at the primary site further comprises:
and writing the analyzed log into a database of the master site at the master site, and after the basic service is switched back to the master site, the master site performs stock data synchronization by using a primary disk and a secondary disk of the master site according to a disk mirror image replication technology.
4. The method of claim 3, wherein writing the database log of the backup site to the long-leg target disk of the backup site in real time comprises:
and the standby station writes the database logs of the standby station into a primary disk, a secondary disk and a long-leg target disk of the standby station in real time and in parallel.
5. A double-site database data synchronization system is characterized in that the system comprises a primary site and a standby site, wherein:
the master station writes database logs generated during transaction running into a long-leg target disk of the master station in real time; the standby site analyzes the long-leg target disk of the main site by using a data replication technology, writes the analyzed log into a database of the standby site to obtain a database log of the standby site, and writes the database log of the standby site into the long-leg target disk of the standby site in real time;
when the main site is shut down and the basic service is switched to the standby site, the standby site writes a database log generated during transaction operation into a long-leg target disk of the standby site in real time; after the main site is started, the main site analyzes the long-leg target disk of the standby site by using a data copying technology, and writes the analyzed log into a database of the main site.
6. The system of claim 5, wherein the primary site is further configured to write database logs generated during transaction runtime in real-time and in parallel to the primary disk, the secondary disk, and the long-leg target disk of the primary site.
7. The system of claim 6, wherein the primary site is further configured to perform inventory data synchronization using a primary disk and a secondary disk of the primary site according to a disk mirroring replication technique after the primary site writes the parsed log into a database of the primary site and the basic service switches back to the primary site.
8. The system of claim 7, wherein the backup site is further configured to write the database log of the backup site into a primary disk, a secondary disk, and a long-leg target disk of the backup site in real-time and in parallel.
9. The system of claim 5, further comprising a dual active control component for switching the primary service to the standby site and switching the primary service back to the primary site.
CN202011416176.7A 2020-12-07 2020-12-07 Double-site database data synchronization method and system Active CN112463888B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011416176.7A CN112463888B (en) 2020-12-07 2020-12-07 Double-site database data synchronization method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011416176.7A CN112463888B (en) 2020-12-07 2020-12-07 Double-site database data synchronization method and system

Publications (2)

Publication Number Publication Date
CN112463888A true CN112463888A (en) 2021-03-09
CN112463888B CN112463888B (en) 2024-05-28

Family

ID=74800697

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011416176.7A Active CN112463888B (en) 2020-12-07 2020-12-07 Double-site database data synchronization method and system

Country Status (1)

Country Link
CN (1) CN112463888B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040098425A1 (en) * 2002-11-15 2004-05-20 Sybase, Inc. Database System Providing Improved Methods For Data Replication
US20050283504A1 (en) * 2004-06-17 2005-12-22 Yoshio Suzuki Disaster recovery system suitable for database system
CN104850628A (en) * 2015-05-21 2015-08-19 中国工商银行股份有限公司 Data synchronization method and apparatus in database
CN109766219A (en) * 2015-07-23 2019-05-17 深圳市沃信科技有限公司 A kind of database disaster tolerance system
CN109901949A (en) * 2019-02-25 2019-06-18 中国工商银行股份有限公司 The application disaster recovery and backup systems and method of dual-active data center

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20040098425A1 (en) * 2002-11-15 2004-05-20 Sybase, Inc. Database System Providing Improved Methods For Data Replication
US20050283504A1 (en) * 2004-06-17 2005-12-22 Yoshio Suzuki Disaster recovery system suitable for database system
CN104850628A (en) * 2015-05-21 2015-08-19 中国工商银行股份有限公司 Data synchronization method and apparatus in database
CN109766219A (en) * 2015-07-23 2019-05-17 深圳市沃信科技有限公司 A kind of database disaster tolerance system
CN109901949A (en) * 2019-02-25 2019-06-18 中国工商银行股份有限公司 The application disaster recovery and backup systems and method of dual-active data center

Also Published As

Publication number Publication date
CN112463888B (en) 2024-05-28

Similar Documents

Publication Publication Date Title
CN109901949B (en) Application disaster recovery system and method for double-activity data center
US20100250491A1 (en) Data replication method and system for database management system
CN106506283B (en) Business test method and device of bank and enterprise docking system
CN110784331B (en) Consensus process recovery method and related nodes
WO2014197963A1 (en) Failover system and method
CN111506649A (en) Transaction data disaster tolerance switching method and device, computing device and storage medium
CN105959169A (en) Transaction data processing system and method
CN114077518A (en) Data snapshot method, device, equipment and storage medium
CN113535665B (en) Method and device for synchronizing log files between main database and standby database
CN106815094A (en) It is a kind of for realizing affairs are submitted under active and standby synchronous mode method and apparatus
CN112463888B (en) Double-site database data synchronization method and system
CN112231395A (en) Transaction data synchronization method and server
CN115934742A (en) Fault processing method, device, equipment and storage medium
CN115017131A (en) Data migration method and system
CN114840366A (en) Tax handling system based on data fault tolerance and downtime support
CN113010348A (en) Device, system and method for recovering data in disaster tolerance
CN111813607B (en) Database cluster recovery log processing system based on memory fusion
CN114816682A (en) Distributed transaction processing method, system and device
CN112433887A (en) Database data synchronization method, system, device and storage medium
Manikandan et al. An efficient non blocking two phase commit protocol for distributed transactions
JPH1153239A (en) Rollback processing method for database and recording medium recorded with procedure thereof
CN117591420A (en) Method and device for testing effectiveness of site data
CN117573439A (en) Data disaster recovery processing method, system and storage medium
CN117389803A (en) Disaster backup switching system and method for Gauss database
CN117931531A (en) Data backup system, method, apparatus, device, storage medium and program product

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant