Unlock instant, AI-driven research and patent intelligence for your innovation.

Method and device for synchronizing log files between main database and standby database

A log file and primary database technology, applied in the database field, can solve problems such as standby database failures

Active Publication Date: 2021-10-22
北京元年科技股份有限公司
View PDF8 Cites 3 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

[0004] The present invention provides a method and a device for synchronizing log files between a primary database and a standby database, so as to solve the problem of synchronizing the logs that cause the failure of the primary database to the standby database in the prior art, thereby causing corresponding failures in the standby database question

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
  • Method and device for synchronizing log files between main database and standby database
  • Method and device for synchronizing log files between main database and standby database
  • Method and device for synchronizing log files between main database and standby database

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0024] The present invention provides a method of synchronizing a log file between a primary database and a database, such as figure 1 As shown, the method can include:

[0025] Step S11, the primary database generates a log file that the data modification is generated in the case where data modification is detected.

[0026] Specifically, in this scenario, the main database can be a Mater database, and the database can be a SLAVE database. The above two databases can be a multi-dimensional database. In daily work, the main data can be responsible for processing network requests, and accordingly Transaction processing, such as data processing requests (such as INSERT or DELETE) that handles data changes sent by the client, and the database can be responsible for processing the data processing request (such as SELECT, etc.) of the client data. When the client finds the request to modify the data of the primary database, the primary database will generate a log file according to the...

Embodiment 2

[0052] like Figure 4 As shown, the present application also provides a device for synchronizing a log file between the primary database backup and the database, which can be used to perform the method of the above embodiment, including: first generating unit 40 for detection In the case of data modification, the log file modified; the transaction unit 42 is used to modify the data to transaction; the synchronization unit 44 is used to synchronize the log file to the preparation database when transaction is successful; The first retransmission unit 46 is used to play according to the log file.

[0053] Specifically, the scheme is provided by the prior art by the above apparatus, and the reproduction library is transmitted immediately after the primary database generates the log file, but the log file is synchronized without successfully transaction. The secondary database is not synchronized to the preparation database in the case of transaction failure. The transaction is successf...

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

The invention provides a method and device for synchronizing a log file between a main database and a standby database, and the method comprises the steps: a main database generates a log file of data modification when the main database detects data modification; the main database carries out transaction processing on the data modification; under the condition that the transaction processing is successful, the main database synchronizes the log file to the standby database; and the standby database replays according to the log file. The technical problem that in the prior art, logs which cause faults of the main database are easily synchronized to the standby database, and accordingly the standby database also has corresponding faults is solved.

Description

Technical field [0001] The present invention relates to the field of database technologies, in particular, to a method and apparatus for synchronizing a log file between a primary database backup and a database. Background technique [0002] In terms of disaster recovery, load balancing, and data centralized distribution, the prior art often uses the main database and the database, and data synchronization is achieved through the primary database and the preparation database, thereby realizing the function of double-hot standby. [0003] It should be noted that when the existing primary database is synchronized with the log file, the log file is often sent to the preparation database for data playback, so that the data is synchronized. However, the prior art Easy to appear will result in a log file that causes the main database failure to synchronize the database, resulting in a corresponding fault in the database. Inventive content [0004] The present invention provides a meth...

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 Applications(China)
IPC IPC(8): G06F16/178G06F16/18G06F16/27
CPCG06F16/178G06F16/1815G06F16/27
Inventor 刘成豪
Owner 北京元年科技股份有限公司