Database management method and device, server and storage medium

A management method and database technology, applied in special data processing applications, database design/maintenance, database distribution/replication, etc., can solve problems such as difficult recovery of faulty databases, data disorder and data corruption in data protection systems

Active Publication Date: 2019-11-19
SHANGHAI DAMENG DATABASE
View PDF7 Cites 2 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

However, the LSN itself does not have a clear logical meaning. The same LSN does not mean that the corresponding modification content is also the same. It is impossible to judge whether the fault database is completely consistent with the data of the current main database based on the LSN, and it is impossible to accurately identify the attributes of the database. If the database Errors in the identification of attributes will lead to data inconsistency and data corruption between databases. If the split-brain database is further used to switch between active and standby, the data in the entire data protection system will be confused. The faulty database is difficult to recover, and the database cannot run normally and stably.

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
  • Database management method and device, server and storage medium
  • Database management method and device, server and storage medium
  • Database management method and device, server and storage medium

Examples

Experimental program
Comparison scheme
Effect test

Embodiment 1

[0043] figure 1 It is a flow chart of database management provided by Embodiment 1 of the present invention. This embodiment is applicable to the situation where the primary database, standby database, and split-brain database are managed in the data protection system. Specifically, the database management method can be executed by a database management device, and the database management device can be realized by means of software and / or hardware, and integrated into a server. Further, the server includes but not limited to: industrial integration server, system background server and cloud server.

[0044] refer to figure 1 , the method specifically includes the following steps:

[0045] S110. Obtain open records in the system tables corresponding to at least two databases.

[0046] Specifically, each database maintains a system table for storing open (Open) records of the main database. In this embodiment, a system table is specially maintained by the main library to rec...

Embodiment 2

[0061] figure 2 It is a flow chart of a database management method provided by Embodiment 2 of the present invention. This embodiment is optimized on the basis of the above embodiments, and further explains the determination of the attributes of each database according to the comparison results of Open records. It should be noted that for technical details not exhaustively described in this embodiment, reference may be made to any of the foregoing embodiments.

[0062] Specifically, refer to figure 2 , the method specifically includes the following steps:

[0063] S201. Obtain open records in system tables corresponding to at least two databases.

[0064] Further, the open records in the system tables of each database are regularly obtained, so as to regularly update database attributes and identify split-brain databases in time.

[0065] S202. Compare open records in each of the system tables according to preset fields.

[0066] S203. Whether the contents of the open re...

Embodiment 3

[0109] image 3 It is a flowchart of a database management method provided by Embodiment 3 of the present invention. This embodiment is optimized on the basis of the above embodiments, further improves the accuracy of database detection and management by recording more detailed preset fields in the open record, and further explains the database operations to be performed by the daemon process. It should be noted that for technical details not exhaustively described in this embodiment, reference may be made to any of the foregoing embodiments. Such as image 3 As shown, the method includes:

[0110] S310. Obtain open records in the system tables corresponding to at least two databases.

[0111] S320. Compare open records in each of the system tables according to preset fields.

[0112] Specifically, when the main database enters the open state but has not operated on the data, the main database is used as the target database, and an open record of the target database is gen...

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 discloses a database management method and device, a server and a storage medium. The method comprises the steps of obtaining opening records in system tables corresponding to at least two databases; compairing opening records in all the system tables according to preset fields, wherein the preset fields comprise a first identifier and a first sequence value, the first identifier isan identifier corresponding to the fact that the target database currently enters the opening state, and the first sequence value is a current log sequence value of the target database; and determining attributes of each database according to a comparison result of the opening records, wherein the attributes comprise at least one of a main database, a standby database and a split brain database. According to the technical scheme, the system table is used for recording the opening record of the main library; the standby database synchronizes the content of the main database system table by replaying the Redo log, and whether the data of each database is consistent or not is compared by comparing the opening records of the system table, so as to determine the attributes of the database, thereby accurately determining the main database, the standby database and the split brain database, and improving the stability of database operation.

Description

technical field [0001] The embodiments of the present invention relate to the technical field of databases, in particular to a database management method, device, server and storage medium. Background technique [0002] In the era of big data, a data protection system can be formed by using the active-standby architecture of the database. The data guard system consists of a main database and several standby databases. Among them, the main database provides data reading and modification services, and the standby database only provides read-only services. When the main database fails, the standby database will take over as the main database to continue to provide external services , so as to meet the user's demand for high availability of database services. The main database uses the redo (Redo) log to record the modification operations performed on the data. Each time the data is modified to generate a Redo log, a log sequence value LSN (Log Sequence Number) will be used 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 Applications(China)
IPC IPC(8): G06F16/21G06F16/27
CPCG06F16/21G06F16/275
Inventor 王海龙王蒙蒙郭振岗
Owner SHANGHAI 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