DB2 database data synchronous updating method and equipment

A synchronous update and data synchronization technology, applied in the computer field, can solve the problems of application program impact, affecting the data consistency of the target library, and taking a long time

Active Publication Date: 2021-04-13
WUHAN DAMENG DATABASE
View PDF6 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

If you do not keep the S lock on the table, then when a table is initialized, the query operation will read the data submitted by other transactions during the extraction of the query result set. When synchronization is enabled after the initialization, the transactions generated during the extraction of the result set will be read. is synchronized again, which affects the consistency of the target database data
If you keep the S lock on the table, when the amount of data in the source data table is very large, the query result set will take a long time, and keeping the S lock on the synchronization table for a long time will have a great impact on the application program on the database

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • DB2 database data synchronous updating method and equipment
  • DB2 database data synchronous updating method and equipment
  • DB2 database data synchronous updating method and equipment

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0024] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments It is a part of embodiments of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without creative efforts fall within the protection scope of the present invention. In addition, the technical features in each embodiment or a single embodiment provided by the present invention can be arbitrarily combined with each other to form a feasible technical solution, but it must be based on the realization of those skilled in the art. When there is a contradiction or cannot be realized, it should be considered that the c...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

Embodiments of the present invention provide a DB2 database data synchronization update method and device. The method includes: creating a data detailed address storage column according to the table to be updated to be synchronized, an S lock on the table to be updated to be synchronized, acquiring the current log sequence number LSN of the source DB2 database as the starting LSN of the table to be updated to be synchronized, and releasing the S lock; Obtain the result set of the table to be synchronized and updated, send the result set to the target database for storage, and obtain the current LSN of the source DB2 database as the end LSN of the table to be synchronized and updated; receive the initialization data sent by the source synchronization update service, on the target The database inserts ROWID into the data detailed address storage column, initializes the data of the table to be updated synchronously; starts the real-time data synchronization update service, and sends the changes of the source DB2 database to the target database for data synchronization update. Various embodiments of the present invention can avoid the adverse effects caused by the S lock on the table to be synchronously updated for a long time under the premise of ensuring the data consistency of the target database.

Description

technical field [0001] The embodiment of the present invention relates to the field of computer technology, in particular to a method and device for synchronously updating DB2 database data. Background technique [0002] In the software-based database data replication technology, the real-time data synchronization technology based on database log analysis supports heterogeneous system replication, and the heterogeneous standby machine can read and write, and the impact on the source database is relatively small, so real-time replication in the database fields are widely used. At present, the main technical principle of using the data synchronization service to initialize the database data is to first lock the S lock on the synchronization table in the source database to prevent other transactions from modifying the synchronization table, and query the LSN value of the current database as the table increment Synchronize the starting LSN, and then use the SELECT statement to ...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Patents(China)
IPC IPC(8): G06F16/27G06F16/23G06F16/242
Inventor 付铨孙峰赵家威
Owner WUHAN DAMENG DATABASE
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products