CN108897658B - Method and device for monitoring master database, computer equipment and storage medium - Google Patents

Method and device for monitoring master database, computer equipment and storage medium Download PDF

Info

Publication number
CN108897658B
CN108897658B CN201810549605.4A CN201810549605A CN108897658B CN 108897658 B CN108897658 B CN 108897658B CN 201810549605 A CN201810549605 A CN 201810549605A CN 108897658 B CN108897658 B CN 108897658B
Authority
CN
China
Prior art keywords
database
master database
write
monitoring server
specified field
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.)
Active
Application number
CN201810549605.4A
Other languages
Chinese (zh)
Other versions
CN108897658A (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.)
Kangjian Information Technology Shenzhen Co Ltd
Original Assignee
Kangjian Information Technology Shenzhen Co Ltd
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 Kangjian Information Technology Shenzhen Co Ltd filed Critical Kangjian Information Technology Shenzhen Co Ltd
Priority to CN201810549605.4A priority Critical patent/CN108897658B/en
Publication of CN108897658A publication Critical patent/CN108897658A/en
Application granted granted Critical
Publication of CN108897658B publication Critical patent/CN108897658B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/30Monitoring
    • G06F11/3003Monitoring arrangements specially adapted to the computing system or computing system component being monitored
    • G06F11/302Monitoring arrangements specially adapted to the computing system or computing system component being monitored where the computing system component is a software system
    • 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

Abstract

The application relates to a master database monitoring method, a master database monitoring device, computer equipment and a storage medium. The method comprises the following steps: acquiring a configuration file corresponding to a database cluster; determining a master database in the database cluster according to the configuration file; writing specified field data into the master database; when the writing is judged to fail, sending a first writing control instruction to the first monitoring server; the first write control instruction is used for instructing the first monitoring server to write the specified field data into the master database; receiving prompt information corresponding to the first write-in control instruction fed back by the first monitoring server; and when the prompt information indicates that the data written in the specified field fails, triggering to switch the master database. By adopting the method, resource waste caused by switching of the main database due to the network connection problem can be avoided.

Description

Method and device for monitoring master database, computer equipment and storage medium
Technical Field
The present application relates to the field of database technologies, and in particular, to a method and an apparatus for monitoring a master database, a computer device, and a storage medium.
Background
With the development of database technology, database cluster technology has emerged, and as the name suggests, a database cluster is a cluster composed of at least two or more databases. The database cluster can realize read-write separation, namely the database cluster comprises a master database and slave databases, the master database can be read and written, the slave databases are read only, and the slave databases synchronize the data of the master database in real time so as to ensure the data consistency of the master database and the slave database, thereby improving the system performance of the databases. Therefore, it is important to effectively monitor the operation condition of the master database and ensure the readable and writable functions of the database cluster.
Currently, a commonly used method for monitoring a main database is implemented based on MHA (Master High Availability, high Availability software), an MHA monitoring management server detects an operation state of the main database by connecting with the main database, and determines that the main database has an operation failure when the connection fails.
However, in the current monitoring method of the master database, there is a problem that the master database is frequently switched due to a network connection problem between the MHA monitoring management server and the master database, thereby causing a waste of resources.
Disclosure of Invention
In view of the foregoing, it is necessary to provide a method, an apparatus, a computer device and a storage medium for monitoring a master database, which can avoid resource waste.
A master database monitoring method, the method comprising:
acquiring a configuration file corresponding to a database cluster;
determining a master database in the database cluster according to the configuration file;
writing specified field data into the master database;
when the writing is judged to fail, sending a first writing control instruction to the first monitoring server; the first write control instruction is used for instructing the first monitoring server to write the specified field data into the master database;
receiving prompt information corresponding to the first write-in control instruction fed back by the first monitoring server;
and when the prompt information indicates that the data written in the specified field fails, triggering to switch the master database.
A master database monitoring apparatus, the apparatus comprising:
the acquisition module is used for acquiring a configuration file corresponding to the database cluster;
a determining module for determining a master database in the database cluster according to the configuration file;
the writing module is used for writing specified field data into the master database;
the sending module is used for sending a first write-in control instruction to the first monitoring server when the write-in failure is judged; the first write control instruction is used for instructing the first monitoring server to write the specified field data into the master database;
the receiving module is used for receiving prompt information which is fed back by the first monitoring server and corresponds to the first write-in control instruction;
and the switching module is used for triggering the switching of the main database when the prompt information indicates that the data written in the specified field fails.
A computer device comprising a memory and a processor, the memory storing a computer program, the processor implementing the following steps when executing the computer program:
acquiring a configuration file corresponding to a database cluster;
determining a master database in the database cluster according to the configuration file;
writing specified field data into the master database;
when the writing is judged to fail, sending a first writing control instruction to the first monitoring server; the first write control instruction is used for instructing the first monitoring server to write the specified field data into the master database;
receiving prompt information corresponding to the first write-in control instruction fed back by the first monitoring server;
and when the prompt information indicates that the data written in the specified field fails, triggering to switch the master database.
A computer-readable storage medium, on which a computer program is stored which, when executed by a processor, carries out the steps of:
acquiring a configuration file corresponding to a database cluster;
determining a master database in the database cluster according to the configuration file;
writing specified field data into the master database;
when the writing is judged to fail, sending a first writing control instruction to the first monitoring server; the first write control instruction is used for instructing the first monitoring server to write the specified field data into the master database;
receiving prompt information corresponding to the first write-in control instruction fed back by the first monitoring server;
and when the prompt information indicates that the data written in the specified field fails, triggering to switch the master database.
According to the method and the device for monitoring the master database, the computer equipment and the storage medium, the master database in the database cluster is determined according to the acquired configuration file, and the running state of the master database is correspondingly determined by writing the data of the specified field into the master database. When the write failure is judged to indicate that the master database may fail to operate, a first write control command is transmitted to the first monitoring server to write the specified field data to the master database through the first monitoring server, thereby further determining an operating state of the master database. When the received prompt information indicates that the data written in the specified field fails, namely the first monitoring server fails to write the data in the specified field into the master database, the master database is judged to have an operation fault, and the master database is triggered to be switched to ensure the normal operation of the database cluster. By the method, the problem that the normally-operated main database is frequently switched due to the network connection problem can be effectively avoided, so that the waste of resources is avoided.
Drawings
FIG. 1 is a diagram illustrating an exemplary embodiment of a master database monitoring method;
FIG. 2 is a flow diagram illustrating a method for monitoring a master database in one embodiment;
FIG. 3 is a flowchart illustrating a method for monitoring a master database in accordance with another embodiment;
FIG. 4 is a block diagram of a master database monitoring apparatus in one embodiment;
FIG. 5 is a block diagram showing the structure of a master database monitoring apparatus according to another embodiment;
FIG. 6 is a diagram illustrating an internal structure of a computer device according to an embodiment.
Detailed Description
In order to make the objects, technical solutions and advantages of the present application more apparent, the present application is described in further detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of the present application and are not intended to limit the present application.
The master database monitoring method provided by the application can be applied to the application environment shown in fig. 1. The database cluster 102, the first monitoring server 104, and the monitoring management server 106 communicate with each other via a network. The database cluster 102 may communicate with the first monitoring server 104 and the monitoring management server 106, respectively, via a private network. The first monitoring server 104 may communicate with the monitoring management server 106 through a Virtual Private Network (VPN). The master database 1020 in the database cluster 102 may communicate with the slave databases (1022, 1024, and 1026) through a private network, respectively, wherein the number of the slave databases may be customized according to actual situations.
Each database in the database cluster 102 may be deployed in the same computer room or in different computer rooms, such as a master-slave dual computer room. The monitoring management server 106 may exist independently of the database cluster 102, or at least one database in the database cluster 102 may be deployed on the monitoring management server 106. The monitoring management server 106 may be deployed in a different room from the master database 1020.
In one embodiment, as shown in fig. 2, a master database monitoring method is provided, which is described by taking the method as an example applied to the monitoring management server in fig. 1, and includes the following steps:
s202, acquiring a configuration file corresponding to the database cluster.
The database cluster is a cluster formed by a plurality of databases. The database cluster includes a master database and a slave database. The master database has readable and writable attributes, such as that the terminal can write data into the master database or read data from the master database, and the specific read-only attributes of the slave database, such as that the terminal cannot write data into the slave database successfully but can read data from the slave database. The slave database can synchronize the data in the master database to the local so as to realize the consistency of the data in each database in the database cluster. In this embodiment, a database cluster includes a master database and at least one slave database.
The configuration file is preset file data about each database in the database cluster. The configuration file includes a database cluster identifier, and an IP (Internet Protocol, network address), a port, a domain name, a machine room name, a master-slave role identifier, and the like corresponding to the master database and each slave database in the database cluster. For each slave database in the database cluster, the configuration file further includes a priority identification, a candidate slave database identification or a non-candidate slave database identification, and the like for each slave database to switch to the master database.
Specifically, the monitoring management server obtains a configuration file corresponding to the database cluster from a local. The monitoring management server may also send a configuration file acquisition request to a server storing the configuration file to receive the configuration file correspondingly queried and fed back by the server. The monitoring management server can obtain the configuration file corresponding to the database cluster according to a preset period. The monitoring management server may also obtain a configuration file corresponding to the designated database cluster according to the received master database monitoring instruction when receiving the master database monitoring instruction sent by the terminal.
And S204, determining a master database in the database cluster according to the configuration file.
Specifically, the monitoring management server respectively acquires master-slave role identifiers corresponding to databases in the database cluster according to the configuration file, and further correspondingly determines a master database in the database cluster according to the acquired master-slave role identifiers.
In one embodiment, the monitoring management server respectively acquires network addresses corresponding to databases in the database cluster according to the configuration file, respectively sends a master-slave synchronization state acquisition instruction to the databases according to the acquired network addresses, and correspondingly determines a master database in the database cluster according to master-slave synchronization states correspondingly fed back by the databases. Specifically, each slave database queries and feeds back a corresponding master-slave synchronization state according to the received master-slave synchronization state acquisition instruction, and the master database does not have a corresponding feedback result. And the monitoring management server determines a master database according to whether each database correspondingly feeds back the master-slave synchronization state.
S206, writing the appointed field data into the main database.
Wherein the specified field data is a field value corresponding to a pre-specified field. The specified field data may specifically be a timestamp, such as a timestamp corresponding to the current time. The designated field data may also be a designated string, such as string M0 consisting of the master database id and the number, which may be constant or may vary with increasing number of writes, such as M0 for the first time, M1 for the second time, and so on.
Specifically, after the monitoring management server correspondingly determines a master database in the database cluster according to the configuration file, designated field data is repeatedly written into the master database according to a preset period. In other words, the monitoring management server updates the designated field data in the master database according to a preset period. The monitoring management server may write the specified field data in a specified table of the master database. The designated field data written by the monitoring management server each time is recorded in the designated table, and the designated field data can be recorded in an overlaying manner or sequentially according to the writing sequence.
In one embodiment, when the monitoring management server receives a master database monitoring instruction sent by a terminal, the monitoring management server acquires specified field data according to the received master database monitoring instruction and writes the acquired specified field data into the master database.
For example, the monitoring management server may write a timestamp corresponding to the current time into the master database every 3 seconds, or may obtain the current time when receiving the monitoring instruction of the master database, and update the timestamp corresponding to the current time into the master database, so as to record the timestamp in the master database.
S208, when the writing is judged to fail, a first writing control instruction is sent to the first monitoring server; the first write control instruction is used for instructing the first monitoring server to write specified field data into the master database.
Wherein, the write failure means that the specified field data is not successfully written into the master database. The write failure indicates that the monitoring management server has not successfully updated the specified field data of the master database. The first monitoring server is a server for monitoring an operation state of the master database. The first write control command is a control command that triggers a write operation of specified field data. The first write control instruction is used for instructing the first monitoring server to write specified field data into the master database.
Specifically, when the monitoring management server fails to write the specified field data into the master database, indicating that the master database may be in operation failure currently, the monitoring management server triggers generation of a first write control instruction, and sends the generated first write control instruction to the first monitoring server. And when the first monitoring server receives the first write control instruction, acquiring the specified field data according to the received first write control instruction, and writing the acquired specified field data into the master database so as to further determine the operating state of the master database.
In one embodiment, the first write control command includes specified field data, and the first monitoring server, upon receiving the first write control command, parses the first write control command to obtain the specified field data, and writes the obtained specified field data to the master database. In one embodiment, the first write control command includes a network address of the master database, and the first monitoring server parses the received first write control command to obtain the network address of the master database, accesses the master database according to the network address, and further writes the specified field database into the master database.
In one embodiment, the first monitoring server obtains the specified field data from the local when receiving the first write control instruction, or obtains the specified field data from the monitoring management server according to the first write control instruction. For example, when receiving the first write control instruction, the first monitoring server obtains a timestamp corresponding to the current time, and the obtained timestamp is used as the specified field data.
In one embodiment, when it is determined that the writing is successful, indicating that the master database is in a normal operation state, the monitoring management server continues to write the designated field data to the master database according to a preset period. For example, a preset period, for example, 3 seconds, when it is determined that the writing is successful, the monitoring management server waits for 3 seconds and then writes the specified field data into the master database again, so as to monitor the operating state of the master database after 3 seconds.
In one embodiment, the monitoring management server writes the specified field data again to the master database when the monitoring management server fails to write the specified field data to the master database, and repeats the above-described steps of writing the specified field data to the master database when it is determined that the rewriting fails. And the monitoring management server calculates the number of write-in failures, and sends a first write-in control instruction to the first monitoring server when the number of write-in failures reaches a preset number.
And S210, receiving prompt information corresponding to the first write-in control instruction fed back by the first monitoring server.
The hint information is information for prompting whether the specified field data is successfully written or not. The hint may specifically be composed of at least one of characters such as numbers, letters, and symbols, for example, 0 or 1, where a hint of 0 indicates a write failure, and a hint of 1 indicates a write success.
Specifically, the first monitoring server writes specified field data into the master database according to the received first write control instruction, judges the success or failure result of writing the specified field data into the master database, generates corresponding prompt information according to the judgment result, and feeds the generated prompt information back to the monitoring management server. When the specified field data is judged to be written successfully, the first monitoring server feeds back prompt information indicating that the specified field data is written successfully to the monitoring management server, and when the specified field data is judged to be written unsuccessfully, the first monitoring server correspondingly feeds back prompt information indicating that the specified field data is written unsuccessfully.
S212, when the prompt information shows that the data written in the specified field fails, the master database is triggered to be switched.
The switching of the master database refers to switching a current master database in the database cluster to a slave database selected from the database cluster to obtain a new master database. In other words, switching the master database means configuring a slave database selected from the database cluster as a new master database, replacing the current master database with the new master database as the master database of the database cluster, and receiving a write operation of the terminal by the new master database. The switching of the master database may specifically be switching the readable and writable attributes of the master database from the current master database of the database cluster to the new master database. Before the master database is switched, the terminal or the monitoring management server writes data into the current master database of the database cluster, and after the master database is switched, the terminal or the monitoring management server writes data into the new master database.
For example, a database cluster consists of a master database and slave databases. The current master database of the database cluster is A, the slave databases comprise B, C and D, the switching of the master database refers to selecting any one of the slave databases B, C and D (assuming that the selected slave database is B) to be used as a new master database, and switching the current master database A into the selected slave database B, and after the switching of the master database is completed, the master database of the database cluster is the selected slave database B.
Specifically, when the prompt information fed back by the first monitoring server indicates that the writing of the specified field data fails, the first monitoring server indicates that the writing of the specified field data to the master database by the first monitoring server fails, and further indicates that the master database fails to operate. And the monitoring management server selects a slave database from each slave database in the database cluster, and switches the master database in the database cluster into the selected slave database, so that the switching of the master database is realized.
The monitoring management server triggers switching of the master database when monitoring that the master database fails through the method, and realizes the transfer of the master database failure through switching of the master database, thereby ensuring the readable and writable attributes of the master database in the database cluster, and ensuring that the terminal can successfully write data into the master database in the database cluster.
In one embodiment, when the monitoring management server completes switching the master database, the switching of the domain name of the master database is triggered. Specifically, when the monitoring management server switches the master database in the database cluster from the current master database to the new master database, the domain name of the current master database is switched to the new master database. In other words, when the monitoring management server completes the switching of the master database, the domain name of the new master database is updated to the domain name of the current master database. After the domain name switching of the main database is completed, the terminal can successfully access the new main database according to the domain name of the current main database.
According to the master database monitoring method, the master database in the database cluster is determined according to the acquired configuration file, and the running state of the master database is correspondingly determined by writing the data of the designated field into the master database. When it is determined that the write fails, indicating that the master database may malfunction, a first write control command is transmitted to the first monitoring server to write the designated field data to the master database through the first monitoring server, thereby further determining an operation state of the master database. When the received prompt information indicates that the data written in the specified field fails, namely the first monitoring server fails to write the data in the specified field into the master database, the master database is judged to have an operation fault, and the master database is triggered to be switched to ensure the normal operation of the database cluster. By the method, the problem that the normally-operated main database is frequently switched due to the network connection problem can be effectively avoided, so that the waste of resources is avoided.
In one embodiment, the master database monitoring method further includes: accumulating and calculating the write-in waiting time for successfully writing in the specified field data from the time of writing in the specified field data into the main database; and when the writing waiting time reaches the preset waiting time, judging that the writing fails.
Wherein the writing wait period is an accumulated time period for waiting for successful writing of the specified field data. The write waiting time is a time period from when the specified field data is written into the master database to when the specified field data is successfully written. The preset waiting time length is a preset time length threshold value for waiting for the successful writing of the specified field data. The preset waiting time is a basis for judging that the data written into the specified field fails. Specifically, the preset waiting time is used for comparing with the writing waiting time obtained through actual calculation, and further determining a writing result.
Specifically, the monitoring management server accumulatively calculates a write-in waiting time for successfully writing in the specified field data from the time of writing the specified field data in the master database, and compares the calculated write-in waiting time with a preset waiting time. When the write-in waiting time reaches the preset waiting time, the monitoring management server indicates that the specified field data is not successfully written when the preset waiting time is reached after the monitoring management server starts to write the specified field data into the master database, and the monitoring management server judges that the write-in fails.
In the above embodiment, by setting the preset waiting time, when the writing waiting time reaches the preset waiting time, it is determined that the writing fails, and a subsequent failure determination process is triggered. The method can effectively avoid triggering a further main database operation fault confirmation process due to the temporary fault of the network connection between the monitoring management server and the main database, and reduces the confirmation process, thereby saving system resources occupied by the confirmation process.
In one embodiment, when it is determined that the writing fails, sending the first write control instruction to the first monitoring server includes: when the writing is judged to fail, inquiring the network address and the port of the first monitoring server; remotely logging in a first monitoring server according to the network address and the port; and sending a first write control instruction to the first monitoring server which is remotely logged in.
Wherein the network address is a logical address for determining a location of the first monitoring server in the network. A port is a logical interface for interconnecting communications between network devices. In this embodiment, the monitoring management server may correspondingly determine the network location of the first monitoring server according to the network address, and may further successfully access the first monitoring server according to the port.
Specifically, when the monitoring management server fails to write the specified field data into the master database, the monitoring management server queries the network address and the port of the first monitoring server according to the configuration file. And when the network address and the port of the first monitoring server are inquired, sending a remote login request to the first monitoring server according to the network address and the port. When a login instruction fed back by the first monitoring server corresponding to the remote login request is received, the first monitoring server is remotely logged in, and a first write control instruction is sent to the first monitoring server which is remotely logged in, so that the first monitoring server writes specified field data into the main database according to the first write control instruction.
In one embodiment, the monitoring management server acquires a network address and a port of the first monitoring server, a corresponding login account and a corresponding password according to the configuration file, and establishes connection with the first monitoring service network according to the acquired network address and port. And after the monitoring management server is successfully connected with the first monitoring server, remotely logging in the first monitoring server according to the acquired login account and the password.
In one embodiment, the monitoring management server communicates with the first monitoring server through an extranet VPN. Specifically, the monitoring management server remotely logs in the first monitoring server through the external network VPN, and sends a first write-in control instruction to the first monitoring server through the external network VPN. By the method, the reason why the monitoring management server fails to write the specified field into the main database can be preliminarily judged, namely the network connection fault between the monitoring management server and the main database or the operation fault of the main database.
In one embodiment, when the monitoring management server fails to remotely log in the first monitoring server, the monitoring management server writes the specified field data to the master database according to a preset period, that is, the monitoring management server continues to perform the steps related to monitoring the master database.
In the embodiment, when the operation fault of the main database is initially determined, the first monitoring server is remotely logged in, and a first write control instruction is sent to the first monitoring server, so that whether the main database has the operation fault or not is further determined through the first monitoring server, and resource waste caused by error switching is effectively avoided.
In one embodiment, step S210 includes: and when the number of times of the failure of writing the data of the specified field into the main database by the first monitoring server reaches a preset number, receiving a prompt message which is fed back by the first monitoring server, corresponds to the first write control instruction and represents the failure of writing the data of the specified field.
Wherein the preset number of times is a preset number threshold. The preset times is a basis for the first monitoring server to determine the write-in failure, and is used for comparing the write-in failure times with the write-in failure times obtained through calculation to determine a write-in result. The preset times can be customized according to the actual situation, such as 3 times.
Specifically, when the first monitoring server receives a first write control instruction sent by the monitoring server, the first monitoring server acquires specified field data according to the first write control instruction, and writes the acquired specified field data into the master database. When it is determined that the writing fails, the first monitoring server writes the specified field database to the master database again. When it is determined that the rewriting fails, the first monitoring server repeatedly performs the above-described steps related to writing the specified field data to the master database. The first monitoring server accumulatively calculates the number of times of write-in failure, and compares the calculated number of times of write-in failure with a preset number of times. When the number of times of write-in failure reaches a preset number, the first monitoring server judges that the write-in operation corresponding to the first write-in control instruction is write-in failure, triggers generation of prompt information indicating that the write-in of the data of the specified field fails, and sends the generated prompt information to the monitoring management server.
In one embodiment, the field data is designated as a timestamp corresponding to the current time. And updating the written specified field data in real time when the first monitoring server repeatedly executes the step of writing the specified field data into the main database. Specifically, before writing the specified field data into the master database, the first monitoring server acquires a timestamp corresponding to the current time, and writes the acquired timestamp serving as the specified field data into the master database.
In one embodiment, the first monitoring server accumulatively calculates a write waiting time for successfully writing the specified field data from when the specified field data is written to the master database. And when the write-in waiting time obtained by calculation reaches the preset waiting time, the first monitoring server judges that the data written in the specified field fails at the time, and triggers the next write-in operation.
In the above embodiment, when the first monitoring server fails to write data of the specified field into the master database, the first monitoring server repeatedly performs the write operation for multiple times, determines that the master database has an operation failure when the number of accumulated write failures reaches a preset number, and correspondingly feeds back the prompt information of the write failures. By the method, the switching of the main database caused by the misjudgment of the operation fault of the main database is reduced, so that the waste of resources is avoided.
In one embodiment, step S212 includes: when the prompt information indicates that the data written in the specified field fails, querying a second monitoring server; sending a second write-in control instruction to a second monitoring server; the second write control instruction is used for instructing the second monitoring server to write specified field data into the main database; and when the second monitoring server feeds back a prompt message indicating that the data written in the specified field fails, triggering to switch the master database.
Wherein the second monitoring server is a server for monitoring the operation of the main database. The second write command is a control command for triggering a write operation. It will be understood that the terms "first" and "second" used in this embodiment may be used to describe various elements, but these elements are not limited by these terms, which are only used to distinguish one element from another. For example, the first monitoring server may be referred to as a second monitoring server, and similarly, the second monitoring server may be referred to as a first monitoring server, both the first and second monitoring servers being monitoring servers, but not the same monitoring server, without departing from the scope of the present embodiment. Similarly, the first write control command and the second write control command are both write control commands, but are not the same write control command.
Specifically, when the prompt information correspondingly fed back by the first monitoring server indicates that the writing of the data in the specified field fails, the monitoring management server queries the second monitoring server according to the configuration file to generate a second writing control instruction. And when the second monitoring server is inquired, the monitoring management server sends the generated second write control instruction to the second monitoring server. And the second monitoring server acquires the specified field data according to the received second write-in control instruction and writes the acquired specified field data into the master database. When the write failure is judged, the second monitoring server generates prompt information indicating that the write of the data of the specified field fails, and feeds the generated prompt information back to the monitoring management server. And the monitoring management server correspondingly triggers and switches the main database according to the received prompt information.
In one embodiment, the monitoring management server obtains a network address and a port of the second monitoring server according to the configuration file, remotely logs in the second monitoring server according to the obtained network address and port, and further sends a second write-in control instruction to the remotely logged-in second monitoring server.
In one embodiment, when the monitoring management server fails to write the specified field data into the master database, the monitoring management server queries a preset monitoring server according to the configuration file to generate a corresponding write control instruction, and the generated write control instruction is respectively sent to the queried monitoring servers. And each monitoring server writes the designated field data correspondingly acquired according to the received write-in control instruction into the main database, and feeds back prompt information of success or failure of the written-in designated field data to the monitoring management server. And the monitoring management server counts the prompt information correspondingly fed back by each monitoring server, and further calculates the ratio of the prompt information which represents the failure of writing the data of the specified field in the received prompt information in the received total prompt information. And when the calculated ratio reaches a preset ratio threshold value, the monitoring management server judges that the main database has an operation fault and triggers the switching of the main database.
In the above embodiment, when it is determined that the master database is in an operation failure in the first step, the first monitoring server and the second monitoring server write the designated field time into the master database in sequence to further detect the operation state of the master database, and when the further detection results are all in failure in writing the designated field data, it is determined that the master database is in an operation failure, and switching of the master database is triggered. By the method, the accuracy of judging the operation fault of the main database is improved, and the switching of the main database caused by misjudgment of the operation fault is avoided, so that the waste of resources is avoided.
In one embodiment, the step of switching the master database comprises: closing the master database; selecting a slave database from the database cluster according to the configuration file; configuring the selected slave database as a master database of a database cluster; and respectively establishing a master-slave relationship between the configured master database and each slave database in the database cluster.
The step of closing the main database refers to closing a server where the main database is located so as to achieve the effect of closing the main database. Closing the master database may specifically be to close the server where the master database is located by triggering a master database closing command. After the master database is closed, data can not be written in, namely, the terminal can not write data into the master database successfully, so that the data consistency is ensured. Establishing a master-slave relationship refers to establishing a corresponding relationship between a master database and slave databases in a database cluster, and after the master-slave relationship is established, the slave databases can synchronize the changed data in the master database to the local.
Specifically, when the operation fault of the main database is judged through the method, the monitoring management server triggers and generates a main database closing command, and the server where the main database is located is remotely closed based on the generated main database closing command. Further, the monitoring management server selects a slave database from each slave database in the database cluster according to the configuration file, and sets the read-only attribute parameter of the selected slave database as the read-write attribute parameter to configure the selected slave database as a master database of the database cluster. And after the configuration of the master database is completed, the monitoring management server configures each slave database except the selected slave database in the database cluster into a slave database of the master database. The monitoring management server respectively establishes the master-slave relationship between the master database and each slave database in the mode.
In one embodiment, the configuration file includes configuration information corresponding to each slave database in the database cluster, such as a priority identifier for switching each slave database to the master database, a candidate slave database identifier or a non-candidate slave database identifier. And the monitoring management server selects the slave databases from the slave databases according to the configuration information recorded by the configuration file and respectively corresponding to the slave databases in the database cluster.
For example, the monitoring management server removes the secondary databases corresponding to the non-candidate secondary database identifiers from the database cluster according to the configuration file, and randomly selects the secondary databases from the screened secondary databases. The monitoring management server may also select a slave database from the database cluster according to the priority identifier for switching each slave database to the master database, that is, may select a slave database with a higher priority. The monitoring management server can also select a slave database from the slave databases corresponding to the candidate slave database identification. The monitoring management server can also select the slave databases according to the incremental data between each slave database and the master database with the operation failure, such as selecting the slave database with the minimum incremental data.
In one embodiment, when the monitoring management server configures the selected slave database as a master database of the database cluster, the domain name of the configured master database is updated to the domain name of the closed master database. In other words, the terminal can access the switched master database according to the closed domain name of the master database, so that the terminal can successfully access the master database without changing the domain name after the master database is switched.
In the above embodiment, the master database with the operation failure is closed first when the master database is switched, so as to ensure that the master database with the operation failure does not write incremental data in the switching process, thereby ensuring data consistency. Furthermore, when the master database fails in operation, the slave database is directly selected to be used as the switched master database according to the configuration file, so that the data volume required to be synchronized in the switching process can be effectively reduced, the switching efficiency is improved, and the master database can be successfully accessed. In addition, the slave database can synchronize the data of the master database to the local by reestablishing the master-slave relationship, thereby ensuring the data consistency.
In one embodiment, the master database monitoring method further includes: when the prompt information indicates that the data written in the specified field fails, triggering to generate corresponding alarm information; and pushing the alarm information to an appointed terminal.
Wherein, the alarm information is the information triggering the alarm. The warning information may specifically be a character string composed of at least one of characters such as numbers, letters, and symbols. Specifically, when the received prompt information indicates that the data written in the specified field fails, the operation fault of the main database is indicated, and the monitoring management server triggers generation of corresponding alarm information and pushes the generated alarm information to the specified terminal through a short message or an email. When the monitoring management server judges that the main database has operation faults, the network telephone can be triggered, and the alarm is given through the network telephone.
In one embodiment, when the received prompt information fed back by the first monitoring server indicates that the writing of the data in the specified field fails, the monitoring management server triggers the generation of the alarm information. In one embodiment, when the received prompt information fed back by the second monitoring server indicates that the writing of the data in the specified field fails, the monitoring management server triggers the generation of the alarm information.
In one embodiment, when the master database is failed in operation, the monitoring management server generates a corresponding operation failure log and records the operation failure log locally.
In one embodiment, the monitoring management server counts the number of operation faults of a master database in the database cluster, when the number of operation faults of the master database reaches a preset threshold value, the number indicates that the operation faults of a plurality of databases in the database cluster possibly occur, so that the operation faults at the database cluster level are caused, early warning information is triggered to be generated and sent to a designated terminal, so that a user corresponding to the designated terminal can take corresponding measures in time, and the problem that the database cluster sends the operation faults at the database cluster level is solved.
In the embodiment, when the main database has an operation fault, the alarm information is triggered and fed back to the designated terminal, so that the prompt information of the operation fault of the main database is displayed to the user through the designated terminal.
As shown in fig. 3, in an embodiment, a master database monitoring method is provided, which specifically includes the following steps:
s302, a configuration file corresponding to the database cluster is obtained.
And S304, determining a master database in the database cluster according to the configuration file.
S306, writing the appointed field data into the main database.
S308, when the specified field data is written into the master database, the writing waiting time for successfully writing the specified field data is calculated in an accumulated mode.
S310, when the writing waiting time reaches the preset waiting time, the writing failure is judged.
S312, when the writing is judged to fail, the network address and the port of the first monitoring server are inquired.
And S314, remotely logging in the first monitoring server according to the network address and the port.
S316, sending a first write-in control instruction to a first monitoring server of remote login; the first write control instruction is used for instructing the first monitoring server to write specified field data into the master database.
And S318, when the number of times of the failure of the first monitoring server to write the data of the specified field into the master database reaches the preset number, receiving a prompt message which is fed back by the first monitoring server, corresponds to the first write control instruction and represents the failure of writing the data of the specified field.
S320, when the prompt information shows that the data written in the specified field fails, querying a second monitoring server.
S322, sending a second write-in control instruction to a second monitoring server; the second write control instruction is used for instructing the second monitoring server to write the specified field data into the master database.
And S324, when the second monitoring server feeds back a prompt message indicating that the data written in the specified field fails, triggering to switch the master database.
In the above embodiment, the operation condition of the master database is monitored by writing data of a specified field into the master database, when it is determined that the write fails, it indicates that the master database may have an operation failure, and a further operation failure confirmation process is triggered, and when it is determined that the master database has an operation failure, it triggers switching of the master database. By the method, the problem of resource waste caused by frequent triggering of switching of the main database due to the problem of network connection is avoided.
It should be understood that although the steps in the flowcharts of fig. 2 and 3 are shown in order as indicated by the arrows, the steps are not necessarily performed in order as indicated by the arrows. The steps are not performed in the exact order shown and described, and may be performed in other orders, unless explicitly stated otherwise. Moreover, at least some of the steps in fig. 2 and 3 may include multiple sub-steps or multiple stages that are not necessarily performed at the same time, but may be performed at different times, and the order of performing the sub-steps or stages is not necessarily sequential, but may be performed alternately or alternately with other steps or at least some of the sub-steps or stages of other steps.
In one embodiment, as shown in FIG. 4, there is provided a master database monitoring apparatus 400 comprising: an obtaining module 401, a determining module 402, a writing module 403, a sending module 404, a receiving module 405, and a switching module 406, where:
an obtaining module 401, configured to obtain a configuration file corresponding to the database cluster.
A determining module 402 configured to determine a master database in the database cluster according to the configuration file.
A writing module 403, configured to write specified field data into the master database.
A sending module 404, configured to send a first write control instruction to the first monitoring server when it is determined that the write fails; the first write control instruction is used for instructing the first monitoring server to write specified field data into the master database.
The receiving module 405 is configured to receive a prompt message corresponding to the first write-in control instruction, where the prompt message is fed back by the first monitoring server.
And a switching module 406, configured to trigger switching of the master database when the hint information indicates that writing of the specified field data fails.
In an embodiment, the writing module 403 is further configured to cumulatively calculate a writing waiting duration for successfully writing the specified field data from the time of writing the specified field data into the master database; and when the writing waiting time reaches the preset waiting time, judging that the writing fails.
In one embodiment, the sending module 404 is further configured to query a network address and a port of the first monitoring server when it is determined that the writing fails; remotely logging in a first monitoring server according to the network address and the port; and sending a first write control instruction to the first monitoring server which is remotely logged in.
In an embodiment, the receiving module 405 is further configured to receive, when the number of times that the first monitoring server fails to write the specified field data into the master database reaches a preset number, a hint message indicating that the writing of the specified field data fails, corresponding to the first write control instruction, fed back by the first monitoring server.
In one embodiment, the switching module 406 is further configured to query the second monitoring server when the hint information indicates that the writing of the specified field data fails; sending a second write-in control instruction to a second monitoring server; the second write control instruction is used for indicating the second monitoring server to write specified field data into the main database; and when the second monitoring server feeds back a prompt message indicating that the data written in the specified field fails, triggering to switch the master database.
In one embodiment, the switching module 406 is further configured to close the master database; selecting a slave database from the database cluster according to the configuration file; configuring the selected slave database as a master database of a database cluster; and respectively establishing a master-slave relationship between the configured master database and each slave database in the database cluster.
As shown in FIG. 5, in one embodiment, the master database monitoring apparatus 400 further comprises an alarm module 407. The warning module 407 is configured to trigger generation of corresponding warning information when the prompt information indicates that writing of data in the specified field fails; and pushing the alarm information to an appointed terminal.
For specific limitations of the master database monitoring apparatus, reference may be made to the above limitations of the master database monitoring method, which is not described herein again. The modules in the above-mentioned master database monitoring apparatus may be implemented in whole or in part by software, hardware, and a combination thereof. The modules can be embedded in a hardware form or independent from a processor in the computer device, and can also be stored in a memory in the computer device in a software form, so that the processor can call and execute operations corresponding to the modules.
In one embodiment, a computer device is provided, which may be a server, and its internal structure diagram may be as shown in fig. 6. The computer device includes a processor, a memory, a network interface, and a database connected by a system bus. Wherein the processor of the computer device is configured to provide computing and control capabilities. The memory of the computer device comprises a nonvolatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program, and a database. The internal memory provides an environment for the operation of an operating system and computer programs in the non-volatile storage medium. The database of the computer device is used to store configuration files. The network interface of the computer device is used for communicating with an external terminal through a network connection. The computer program is executed by a processor to implement a master database monitoring method.
Those skilled in the art will appreciate that the architecture shown in fig. 6 is merely a block diagram of some of the structures associated with the disclosed aspects and is not intended to limit the computing devices to which the disclosed aspects apply, as particular computing devices may include more or less components than those shown, or may combine certain components, or have a different arrangement of components.
In one embodiment, there is provided a computer device comprising a memory storing a computer program and a processor implementing the following steps when the processor executes the computer program: acquiring a configuration file corresponding to a database cluster; determining a master database in the database cluster according to the configuration file; writing specified field data into a master database; when the writing is judged to fail, sending a first writing control instruction to the first monitoring server; the first write control instruction is used for instructing the first monitoring server to write specified field data into the master database; receiving prompt information corresponding to the first write-in control instruction fed back by the first monitoring server; and when the prompt information indicates that the data written in the specified field fails, triggering to switch the master database.
In one embodiment, the processor, when executing the computer program, further performs the steps of: accumulating and calculating the write-in waiting time for successfully writing in the specified field data from the time of writing in the specified field data into the main database; and when the writing waiting time reaches the preset waiting time, judging that the writing fails.
In one embodiment, when it is determined that the writing fails, sending the first write control instruction to the first monitoring server includes: when the writing is judged to fail, inquiring the network address and the port of the first monitoring server; remotely logging in a first monitoring server according to the network address and the port; and sending a first write control instruction to the first monitoring server which is remotely logged in.
In one embodiment, the receiving the prompt information corresponding to the first write control command and fed back by the first monitoring server includes: and when the number of times of the failure of writing the data of the specified field into the main database by the first monitoring server reaches a preset number, receiving a prompt message which is fed back by the first monitoring server, corresponds to the first write control instruction and represents the failure of writing the data of the specified field.
In one embodiment, when the hint information indicates a failure to write the specified field of data, triggering the switch master database includes: when the prompt information indicates that the data written in the specified field fails, querying a second monitoring server; sending a second write-in control instruction to a second monitoring server; the second write control instruction is used for indicating the second monitoring server to write specified field data into the main database; and when the second monitoring server feeds back a prompt message indicating that the data written in the specified field fails, triggering to switch the master database.
In one embodiment, the step of switching the master database comprises: closing the master database; selecting a slave database from the database cluster according to the configuration file; configuring the selected slave database as a master database of a database cluster; and respectively establishing a master-slave relationship between the configured master database and each slave database in the database cluster.
In one embodiment, the processor, when executing the computer program, further performs the steps of: when the prompt information indicates that the data written in the specified field fails, triggering to generate corresponding alarm information; and pushing the alarm information to an appointed terminal.
In one embodiment, a computer-readable storage medium is provided, having a computer program stored thereon, which when executed by a processor, performs the steps of: acquiring a configuration file corresponding to a database cluster; determining a master database in the database cluster according to the configuration file; writing specified field data into a master database; when the writing is judged to fail, sending a first writing control instruction to the first monitoring server; the first write control instruction is used for instructing the first monitoring server to write specified field data into the master database; receiving prompt information corresponding to the first write-in control instruction fed back by the first monitoring server; and when the prompt information indicates that the data written in the specified field fails, triggering to switch the master database.
In one embodiment, the computer program when executed by the processor further performs the steps of: accumulating and calculating the write-in waiting time for successfully writing in the specified field data from the time of writing in the specified field data into the main database; and when the writing waiting time reaches the preset waiting time, judging that the writing fails.
In one embodiment, when it is determined that the writing fails, sending the first write control instruction to the first monitoring server includes: when the writing is judged to fail, inquiring the network address and the port of the first monitoring server; remotely logging in a first monitoring server according to the network address and the port; and sending a first write control instruction to the first monitoring server which is remotely logged in.
In one embodiment, the receiving the prompt information corresponding to the first write control command and fed back by the first monitoring server includes: and when the number of times of the failure of writing the data of the specified field into the main database by the first monitoring server reaches a preset number, receiving a prompt message which is fed back by the first monitoring server, corresponds to the first write control instruction and represents the failure of writing the data of the specified field.
In one embodiment, when the hint information indicates a failure to write the specified field of data, triggering the switch master database includes: when the prompt information indicates that the data written in the specified field fails, querying a second monitoring server; sending a second write-in control instruction to a second monitoring server; the second write control instruction is used for indicating the second monitoring server to write specified field data into the main database; and when the second monitoring server feeds back a prompt message indicating that the data written in the specified field fails, triggering to switch the master database.
In one embodiment, the step of switching the master database comprises: closing the master database; selecting a slave database from the database cluster according to the configuration file; configuring the selected slave database as a master database of the database cluster; and respectively establishing a master-slave relationship between the configured master database and each slave database in the database cluster.
In one embodiment, the computer program when executed by the processor further performs the steps of: when the prompt information indicates that the data written in the specified field fails, triggering to generate corresponding alarm information; and pushing the alarm information to an appointed terminal.
It will be understood by those skilled in the art that all or part of the processes of the methods of the embodiments described above can be implemented by hardware instructions of a computer program, which can be stored in a non-volatile computer-readable storage medium, and when executed, can include the processes of the embodiments of the methods described above. Any reference to memory, storage, database, or other medium used in the embodiments provided herein may include non-volatile and/or volatile memory, among others. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically Programmable ROM (EPROM), electrically Erasable Programmable ROM (EEPROM), or flash memory. Volatile memory can include Random Access Memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in a variety of forms such as Static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double Data Rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous Link DRAM (SLDRAM), rambus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
The technical features of the above embodiments can be arbitrarily combined, and for the sake of brevity, all possible combinations of the technical features in the above embodiments are not described, but should be considered as the scope of the present specification as long as there is no contradiction between the combinations of the technical features.
The above-mentioned embodiments only express several embodiments of the present application, and the description thereof is more specific and detailed, but not construed as limiting the scope of the invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the concept of the present application, which falls within the scope of protection of the present application. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (10)

1. A master database monitoring method, the method comprising:
acquiring a configuration file corresponding to a database cluster;
determining a master database in the database cluster according to the configuration file;
writing specified field data into the master database;
when the writing is judged to fail, sending a first writing control instruction to the first monitoring server; the first write control instruction is used for instructing the first monitoring server to write the specified field data into the master database;
receiving prompt information corresponding to the first write-in control instruction fed back by the first monitoring server;
and when the prompt information indicates that the data written in the specified field fails, triggering to switch the master database.
2. The method of claim 1, further comprising:
accumulating and calculating the write-in waiting time for successfully writing in the specified field data from the time of writing in the specified field data in the main database;
and when the writing waiting time reaches the preset waiting time, judging that the writing fails.
3. The method according to claim 1, wherein the sending the first write control command to the first monitoring server when it is determined that the writing fails comprises:
when the writing is judged to fail, inquiring the network address and the port of the first monitoring server;
remotely logging in the first monitoring server according to the network address and the port;
and sending a first write control instruction to the first monitoring server which is remotely logged in.
4. The method according to claim 3, wherein the receiving the prompt information corresponding to the first write control command and fed back by the first monitoring server comprises:
and when the number of times of the failure of writing the data of the specified field into the main database by the first monitoring server reaches a preset number, receiving a prompt message which is fed back by the first monitoring server, corresponds to the first write control instruction and represents the failure of writing the data of the specified field.
5. The method according to any one of claims 1 to 4, wherein the triggering switching of the master database when the hint information indicates a failure to write the specified field data comprises:
when the prompt information indicates that the data written in the specified field fails, querying a second monitoring server;
sending a second write control instruction to the second monitoring server; the second write control instruction is used for instructing the second monitoring server to write the specified field data into the master database;
and when the second monitoring server feeds back a prompt message indicating that the data written in the specified field fails, triggering to switch the master database.
6. The method of claim 5, wherein the step of switching master databases comprises:
closing the master database;
selecting a slave database from the database cluster according to the configuration file;
configuring the selected slave database as a master database of the database cluster;
and respectively establishing the master-slave relationship between the configured master database and each slave database in the database cluster.
7. The method of claim 6, further comprising:
when the prompt information indicates that the data written in the specified field fails, triggering to generate corresponding alarm information;
and pushing the alarm information to an appointed terminal.
8. A master database monitoring apparatus, the apparatus comprising:
the acquisition module is used for acquiring a configuration file corresponding to the database cluster;
a determining module, configured to determine a master database in the database cluster according to the configuration file;
the writing module is used for writing specified field data into the master database;
the sending module is used for sending a first write-in control instruction to the first monitoring server when the write-in failure is judged; the first write control instruction is used for instructing the first monitoring server to write the specified field data into the master database;
the receiving module is used for receiving prompt information which is fed back by the first monitoring server and corresponds to the first write-in control instruction;
and the switching module is used for triggering the switching of the main database when the prompt information indicates that the data written in the specified field fails.
9. A computer device comprising a memory and a processor, the memory storing a computer program, wherein the processor when executing the computer program performs the steps of the method according to any of claims 1 to 7.
10. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 7.
CN201810549605.4A 2018-05-31 2018-05-31 Method and device for monitoring master database, computer equipment and storage medium Active CN108897658B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810549605.4A CN108897658B (en) 2018-05-31 2018-05-31 Method and device for monitoring master database, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810549605.4A CN108897658B (en) 2018-05-31 2018-05-31 Method and device for monitoring master database, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN108897658A CN108897658A (en) 2018-11-27
CN108897658B true CN108897658B (en) 2023-03-21

Family

ID=64343465

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810549605.4A Active CN108897658B (en) 2018-05-31 2018-05-31 Method and device for monitoring master database, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN108897658B (en)

Families Citing this family (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111241144B (en) * 2018-11-28 2024-01-26 阿里巴巴集团控股有限公司 Data processing method and system
CN110196883A (en) * 2019-05-29 2019-09-03 贝壳技术有限公司 A kind of method of data synchronization and device on business on line without influence
CN110377664B (en) * 2019-07-22 2022-10-21 腾讯科技(深圳)有限公司 Data synchronization method, device, server and storage medium
CN110633280A (en) * 2019-09-11 2019-12-31 北京亚信数据有限公司 Batch data acquisition method and device, readable storage medium and computing equipment
CN111190766A (en) * 2019-12-12 2020-05-22 北京淇瑀信息科技有限公司 HBase database-based cross-machine-room cluster disaster recovery method, device and system
CN111522870B (en) * 2020-04-09 2023-12-08 咪咕文化科技有限公司 Database access method, middleware and readable storage medium
CN113364129B (en) * 2021-06-25 2022-11-25 广西电网有限责任公司 High-availability method for data processing service of power grid monitoring system

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101667181A (en) * 2008-09-05 2010-03-10 华为技术有限公司 Method, device and system for data disaster tolerance
CN106202075A (en) * 2015-04-29 2016-12-07 中兴通讯股份有限公司 A kind of method and device of data base's active-standby switch
CN106909568A (en) * 2015-12-23 2017-06-30 北京奇虎科技有限公司 A kind of changing method and device of data-base cluster MDL

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101667181A (en) * 2008-09-05 2010-03-10 华为技术有限公司 Method, device and system for data disaster tolerance
CN106202075A (en) * 2015-04-29 2016-12-07 中兴通讯股份有限公司 A kind of method and device of data base's active-standby switch
CN106909568A (en) * 2015-12-23 2017-06-30 北京奇虎科技有限公司 A kind of changing method and device of data-base cluster MDL

Also Published As

Publication number Publication date
CN108897658A (en) 2018-11-27

Similar Documents

Publication Publication Date Title
CN108897658B (en) Method and device for monitoring master database, computer equipment and storage medium
CN108932295B (en) Main database switching control method and device, computer equipment and storage medium
CN108710673B (en) Method, system, computer device and storage medium for realizing high availability of database
CN111294845B (en) Node switching method, device, computer equipment and storage medium
CN108900572B (en) Main database domain name switching control method, computer equipment and storage medium
CN108965383B (en) File synchronization method and device, computer equipment and storage medium
CN106452836B (en) main node setting method and device
CN112866408B (en) Service switching method, device, equipment and storage medium in cluster
CN111752488B (en) Management method and device of storage cluster, management node and storage medium
CN108848054B (en) Network equipment registration method and device, computer equipment and storage medium
CN112291904A (en) Intelligent street lamp equipment integrated control method, server, system and medium
CN112199240B (en) Method for switching nodes during node failure and related equipment
CN111198921A (en) Database switching method and device, computer equipment and storage medium
CN111342986B (en) Distributed node management method and device, distributed system and storage medium
CN108924772B (en) Short message sending method and device, computer equipment and storage medium
CN113489149B (en) Power grid monitoring system service master node selection method based on real-time state sensing
CN111211925B (en) Alarm information synchronization method and device, computer equipment and storage medium
CN112070585A (en) Order state unified management method and device, computer equipment and storage medium
CN115632706B (en) FC link management method, device, equipment and readable storage medium
CN113282334A (en) Method and device for recovering software defects, computer equipment and storage medium
CN115686951A (en) Fault processing method and device for database server
CN111552612A (en) MSSQL monitoring management method, management device, system and computer equipment
CN115333944B (en) Virtual machine cluster IP resource configuration method, system, equipment and storage medium
CN113485865B (en) Data processing system based on forward proxy server access third party application
CN115328814B (en) Fault injection method, device, equipment and storage medium based on mirror pair

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