CN108932295B - Main database switching control method and device, computer equipment and storage medium - Google Patents

Main database switching control method and device, computer equipment and storage medium Download PDF

Info

Publication number
CN108932295B
CN108932295B CN201810551550.0A CN201810551550A CN108932295B CN 108932295 B CN108932295 B CN 108932295B CN 201810551550 A CN201810551550 A CN 201810551550A CN 108932295 B CN108932295 B CN 108932295B
Authority
CN
China
Prior art keywords
database
machine room
slave
master database
candidate
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
CN201810551550.0A
Other languages
Chinese (zh)
Other versions
CN108932295A (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 CN201810551550.0A priority Critical patent/CN108932295B/en
Publication of CN108932295A publication Critical patent/CN108932295A/en
Application granted granted Critical
Publication of CN108932295B publication Critical patent/CN108932295B/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/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/1415Saving, restoring, recovering or retrying at system level
    • G06F11/142Reconfiguring to eliminate the error
    • 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/1415Saving, restoring, recovering or retrying at system level
    • G06F11/1435Saving, restoring, recovering or retrying at system level using file system or storage system metadata
    • 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/16Error detection or correction of the data by redundancy in hardware
    • G06F11/20Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements
    • G06F11/2015Redundant power supplies

Abstract

The application relates to a master database switching control method, a master database switching control device, computer equipment and a storage medium. The method comprises the following steps: acquiring a configuration file; inquiring the machine room state parameters of the main computer room where the current main database is located according to the configuration file; when the machine room state parameters meet the machine room fault conditions, determining candidate machine room identifications after the machine room identifications of the main machine room are removed from a machine room identification set recorded in the configuration file; according to the configuration file, selecting a slave database from candidate slave databases corresponding to the candidate machine room identifications; and switching the current master database to the selected slave database to obtain a switched master database. By adopting the method, the main database can be effectively ensured to be successfully accessed.

Description

Main database switching control method and device, computer equipment and storage medium
Technical Field
The present application relates to the field of database technologies, and in particular, to a master database switching control method, device, computer device, and storage medium.
Background
With the development of database technology, a database cluster formed by a master database and a slave database gradually appears, the read-write separation function is realized, and the performance of the database is effectively improved. The master database supports the terminal to write data and synchronizes the written data to each slave database, so that the data consistency of the master database and the slave database is guaranteed. Therefore, when the master database fails or a server where the master database is located fails, switching of the master database is performed in time to ensure that data of the database cluster is written normally.
At present, a database cluster is usually deployed in the same machine room, and when a master database fails, master database switching can be performed in the machine room, so that a terminal can be guaranteed to successfully access the master database. However, when a fault occurs in the machine room level, the switching of the master database in the machine room cannot be realized, so that the master database cannot be successfully accessed.
Disclosure of Invention
In view of the foregoing, it is desirable to provide a master database switching control method, apparatus, computer device and storage medium capable of ensuring successful access of a master database in response to the above technical problems.
A master database switch control method, the method comprising:
acquiring a configuration file;
inquiring the machine room state parameters of the main computer room where the current main database is located according to the configuration file;
when the machine room state parameters meet machine room fault conditions, determining candidate machine room identifications after the machine room identifications of the main machine room are removed from a machine room identification set recorded in the configuration file;
according to the configuration file, selecting a slave database from candidate slave databases corresponding to the candidate machine room identifications;
and switching the current master database into the selected slave database to obtain a switched master database.
A master database switching control apparatus, the apparatus comprising:
the acquisition module is used for acquiring the configuration file;
the query module is used for querying the machine room state parameters of the main computer room where the current main database is located according to the configuration file;
the determining module is used for determining a candidate machine room identifier after the machine room identifier of the main machine room is removed from the machine room identifier set recorded in the configuration file when the machine room state parameters meet the machine room fault condition;
the selection module is used for selecting a slave database from candidate slave databases corresponding to the candidate machine room identifications according to the configuration file;
and the switching module is used for switching the current master database into the selected slave database to obtain a switched master database.
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;
inquiring the machine room state parameters of the main computer room where the current main database is located according to the configuration file;
when the machine room state parameters meet machine room fault conditions, determining candidate machine room identifications after the machine room identifications of the main machine room are removed from a machine room identification set recorded in the configuration file;
according to the configuration file, selecting a slave database from candidate slave databases corresponding to the candidate machine room identifications;
and switching the current master database into the selected slave database to obtain a switched 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;
inquiring the machine room state parameters of the main computer room where the current main database is located according to the configuration file;
when the machine room state parameters meet machine room fault conditions, determining candidate machine room identifications after the machine room identifications of the main machine room are removed from a machine room identification set recorded in the configuration file;
according to the configuration file, selecting a slave database from candidate slave databases corresponding to the candidate machine room identifications;
and switching the current master database into the selected slave database to obtain a switched master database.
According to the master database switching control method, the master database switching control device, the computer equipment and the storage medium, the state of the master room is judged according to the state parameters of the machine room of the current master database, when the state parameters of the machine room of the master room meet the fault conditions of the machine room, the fault of the master room is judged, and the master database is switched to be the slave database in the machine room outside the master room, so that the master database can be successfully accessed. And selecting machine room identifiers except the machine room identifier of the main machine room as candidate machine room identifiers according to the configuration file, further selecting a slave database serving as a switched master database from candidate slave databases corresponding to the candidate machine room identifiers, and switching the current master database into the selected slave database. Therefore, when the main computer room where the main database is located has a fault, the switching of the main database of the computer room can be realized, and the main database can be successfully accessed.
Drawings
FIG. 1 is a diagram illustrating an exemplary embodiment of a master database switching control method;
FIG. 2 is a flowchart illustrating a master database switching control method according to an embodiment;
FIG. 3 is a flowchart illustrating a master database switching control method according to another embodiment;
FIG. 4 is a block diagram of a master database switch controller in accordance with one embodiment;
FIG. 5 is a block diagram of a master database switching control apparatus according to another embodiment;
FIG. 6 is a diagram of the internal structure of a computer device in one 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 switching control method provided by the application can be applied to the application environment shown in fig. 1. The monitoring management server 102 communicates with the master database 104 through a network. The master database 104 communicates with each of the slave databases (1062, 1064, and 1066) through a network. The master database 104 and each slave database (1062, 1064, and 1066) belong to a database cluster, the master database 104 and the slave database 1062 are deployed in the master machine room 110, and the monitoring management server 102, the slave database 1064, and the slave database 1066 are deployed in the slave machine room 120. The communication between the master room 110 and the slave room 120 may be through a private network.
It should be understood that the application environment shown in fig. 1 is only a part of the computer device related to the present application, and does not constitute a limitation to the application environment to which the present application is applied. More or fewer computer devices than those shown in the figures may be included in a specific application environment, and communication between computer devices is not limited by the illustration, so long as the application environment applicable to the scheme of the present application falls within the protection scope of the present application. For example, the number of the slave databases may be more or less, the number of the slave rooms is not limited to one, and the monitoring management server may also be more than one.
In one embodiment, as shown in fig. 2, a master database switching control method is provided, which is described by taking the example that the method is applied to the monitoring management server in fig. 1, and includes the following steps:
s202, obtaining a configuration file.
The configuration file is file data which is configured in advance and contains metadata corresponding to each database in the database cluster. A database cluster is a cluster made up of multiple databases. The database cluster is composed of a master database and slave databases. Metadata is data used to describe information about a database, such as a network address, a port, a domain name, a master-slave role identifier, and a machine room identifier corresponding to the database. The metadata may be used to uniquely identify the database. The configuration file comprises database cluster identification and metadata corresponding to each database in the database cluster. For each slave database, the configuration file further includes a priority identifier, a candidate slave database identifier, a non-candidate slave database identifier, and the like of each slave database becoming the master database.
Specifically, the monitoring management server obtains the configuration file from the local according to a preset period. The monitoring management server can also obtain the configuration file when receiving a machine room state parameter obtaining instruction sent by the terminal, so as to correspondingly obtain the machine room state parameters according to the obtained configuration file.
In one embodiment, the configuration file may be generated in advance by the monitoring management server and stored locally, or may be generated by another computer device and sent to the monitoring management server, and then stored locally by the monitoring management server, or may be generated by another computer device and stored locally by the computer device.
In an embodiment, an MHA (Master High Availability, high Availability Master) component is deployed on a monitoring management server, and the Master database switching control method provided in each embodiment of the present application is implemented by the MHA component.
And S204, inquiring the machine room state parameters of the main machine room where the current main database is located according to the configuration file.
Wherein the master database is a database into which data can be written. The master database has read-write attributes, and the terminal can write data into the master database. The machine room status parameter is a parameter indicating that the machine room is in a normal state or a fault state. The machine room state parameter is used for representing the overall operation state of each database in the machine room. The overall operation state of each database in the computer room refers to that a plurality of databases in the computer room are taken as an integer, and the operation state of the database in the computer room is described from the overall view.
The computer room is in a normal state, which indicates that all the databases in the computer room run normally, or the number of the databases in the computer room running normally reaches a preset number threshold. The machine room is in a fault state, which indicates that the database in the machine room has a machine room level fault. The machine room level fault may be that each database in the machine room has an operation fault, or that each operation parameter of the multiple databases meets a fault determination condition. The failure state of the computer room may be that the database in the computer room cannot be normally accessed due to a power supply problem or a network connection problem, or the database cannot be normally accessed due to an abnormal operation of a server where the database is located.
Specifically, the configuration file includes a designated path parameter for obtaining a machine room state parameter of a main machine room where the current main database is located. And when the monitoring management server obtains the configuration file, obtaining the designated path parameters according to the configuration file, and further querying the machine room state parameters of the host computer room where the current host database is located according to the obtained designated path parameters.
And S206, when the machine room state parameters meet the machine room fault conditions, determining candidate machine room identifications after the machine room identifications of the main machine room are removed from the machine room identification set recorded in the configuration file.
The machine room fault condition is a preset condition for judging whether the machine room is in fault or not. The machine room fault condition may specifically be that one or more of the machine room state parameters match a preset machine room fault state parameter, or that one or more machine room state parameter values reach a preset state parameter threshold. The preset machine room fault state parameter is a preset parameter for indicating that the machine room is in a fault state. The machine room state parameter value is a numerical value corresponding to the inquired machine room state parameter. The preset state parameter threshold is a preset threshold value used for comparing with a machine room state parameter value so as to determine the machine room state.
The machine room identification is used for uniquely identifying the machine room. The machine room identifier may be a character string composed of at least one of characters such as numbers, letters, and symbols. The machine room identifier set is a set composed of a plurality of machine room identifiers. The candidate room identity is a selectable room identity. The candidate machine room identifier corresponds to a candidate slave database which can be selected as the switched master database. And the candidate machine room identification is used for identifying the slave database in the corresponding candidate machine room as a candidate slave database.
Specifically, the monitoring management server compares the inquired machine room state parameters with machine room fault conditions, and when the machine room state parameters meet the machine room fault conditions, the main machine room where the main database is located is indicated to be in fault. And the monitoring management server acquires the machine room identifier set recorded in the configuration file according to the configuration file, screens out machine room identifiers except the machine room identifier of the host machine room from the acquired machine room identifier set, and takes the screened machine room identifiers as the determined candidate machine room identifiers.
And S208, selecting a slave database from the candidate slave databases corresponding to the candidate machine room identifications according to the configuration file.
The candidate slave database is a slave database which can be selected as a master database of the database cluster after the master database is switched. The candidate slave databases are all slave databases in the candidate machine rooms corresponding to the candidate machine room identifications. Specifically, the monitoring management server determines candidate slave databases corresponding to the candidate machine room identifications according to the configuration file, further selects slave databases from the determined candidate slave databases according to the configuration file, and the selected slave databases are used as master databases of the switched database cluster.
In one embodiment, the monitoring management server screens candidate slave databases corresponding to candidate slave database identification from each candidate slave database according to the configuration file, and selects slave databases from the screened candidate slave databases. And the candidate slave database identification is used for identifying that the corresponding slave database can be selected as the master database after switching.
In one embodiment, the monitoring management server determines candidate slave databases after removing candidate slave databases corresponding to non-candidate slave database identifications from each candidate slave database according to the configuration file, and further selects slave databases from the determined candidate slave databases. Wherein the non-candidate slave database identifier is used for identifying that the corresponding slave database cannot be selected as the master database after switching.
In one embodiment, the monitoring management server selects the slave database with high priority according to the priority identification of each candidate slave database becoming the master database in the configuration file. Wherein the priority identifier is used for identifying the priority order of the corresponding slave database selected as the master database after switching in each slave database.
In one embodiment, the configuration file also includes incremental data amounts of each slave database relative to the current master database. And the monitoring management server selects the slave database from the candidate slave databases according to the incremental data volume corresponding to each candidate slave database.
In one embodiment, the monitoring management server may select the slave database from the candidate slave databases by combining the selection criteria in one or more embodiments described above. For example, the monitoring management server may screen out a candidate slave database corresponding to the candidate slave database identifier according to the configuration file, and then select a slave database from the screened candidate slave database according to the priority identifier.
And S210, switching the current master database into the selected slave database to obtain a switched master database.
The switched master database refers to a master database of a database cluster after the master database is switched. In this embodiment, the master database switching means that the switched master database replaces the current master database. In other words, before the master database is switched, the master database of the database cluster is the current master database, and after the master database is switched, the master database of the database cluster is the switched master database.
Specifically, the monitoring management server configures the selected slave database as a switched master database, and replaces the current master database with the switched master database as the master database of the database cluster. And after the configuration is finished, the switched master database replaces the current master database to receive the write operation of the terminal. In other words, before the monitoring management server performs the switching operation, the terminal writes the data into the current master database, and after the switching operation is completed, the terminal writes the data into the switched master database.
According to the master database switching control method, the state of the master computer room is judged according to the state parameters of the computer room of the current master database, and when the fault of the master computer room is judged according to the state parameters of the computer room, the master database is switched to the slave database in the computer room outside the master computer room, so that the master database can be successfully accessed. And selecting machine room identifiers except the machine room identifier of the main machine room as candidate machine room identifiers according to the configuration file, further selecting a slave database serving as the switched master database from candidate slave databases corresponding to the candidate machine room identifiers, and switching the current master database into the selected slave database. Therefore, when the main computer room where the main database is located has a fault, the switching of the main database of the computer room can be realized, and the main database can be successfully accessed.
In an embodiment, the master database switching control method further includes: determining a current master database according to the configuration file; writing specified field data into a current master database; and when the writing is judged to fail, determining the slave database selected from the candidate slave databases corresponding to the machine room identifier of the slave computer room according to the configuration file.
Wherein the specified field data is a pre-specified field value. The specified field data may specifically be a timestamp corresponding to the current time, such as 25 minutes and 10 seconds at 11 o' clock 21/5/2018.
Specifically, the monitoring management server acquires a configuration file from local, determines a current master database in the database cluster according to master-slave role identifiers in the configuration file, acquires a network address and a port of the current master database according to the configuration file, accesses the current master database according to the acquired network address and port, and further writes specified field data into the current master database. And the monitoring management server acquires the data of the specified field according to a preset period and writes the acquired data of the specified field into the current master database. And when the writing is judged to fail, the monitoring management server determines the machine room identifier of the main machine room as a candidate machine room identifier, selects a slave database from candidate slave databases corresponding to the candidate machine room identifier according to the configuration file, and uses the selected slave database as a switched master database.
In one embodiment, when the monitoring management server receives a specified field writing instruction, acquiring specified field data according to the received specified field writing designation, and writing the acquired specified field data into the current master database.
In one embodiment, when it is determined that the writing fails, the monitoring management server queries the monitoring server according to the configuration file, and sends a pre-generated writing control instruction to the queried monitoring server. And the monitoring server acquires the specified field data according to the write-in control instruction, writes the acquired specified field data into the current master database, and feeds back prompt information indicating write-in failure to the monitoring management server when the write-in failure is judged. And when the monitoring management server receives prompt information indicating write-in failure, selecting a slave database from candidate slave databases corresponding to the machine room identifier of the main machine room according to the configuration file.
In one embodiment, when the monitoring management server fails to write the specified field data to the current master database, indicating that the current master database is in operation failure, the monitoring management server determines the slave database corresponding to the machine room identifier of the master room as a candidate slave database, and selects the slave database serving as the switched master database from the determined candidate slave databases according to the configuration file.
In the above embodiment, the operation state of the current master database is determined by writing data of a designated field into the current master database, and when it is determined that the write fails, it is determined that the current master database has failed to operate, a slave database serving as a switched master database is selected in the master room, and master database switching is performed. The running state of the master database is monitored in the mode, so that the master database can be switched in time when running faults occur, and the master data in the database cluster can be successfully accessed.
In an embodiment, the master database switching control method further includes: when the writing is judged to fail, inquiring the network address of the out-of-band equipment corresponding to the current main database; sending a closing instruction to the out-of-band equipment according to the network address; and the closing instruction is used for instructing the out-of-band equipment to close the server where the current main database is located.
The out-of-band device is a hardware device configured on the server where the current master database is located. The out-of-band device controls the power of its server through a dedicated management channel that is independent of the data network. The out-of-band device controls the power supply of the server through the special management channel, and the effect of controlling the power supply of the server without an operating system can be achieved similarly to the effect that a user directly plugs and unplugs the power supply of the server. The closing instruction is used for triggering power supply closing operation, and the closing instruction is used for indicating the out-of-band equipment to close the power supply of the server where the current main database is located.
Specifically, the configuration file includes a network address of an out-of-band device corresponding to the current master database. When the operation fault of the main database is judged, the monitoring management server acquires the network address of the out-of-band equipment corresponding to the current main database according to the configuration file, and sends a closing instruction for closing the server where the current main database is located to the out-of-band equipment according to the acquired network address. And when the out-of-band equipment receives the closing instruction, the power supply of the server where the current main database is located is closed through the special management channel.
In the embodiment, when the current master database is in operation failure, the power supply of the server where the current master database is located is turned off through the out-of-band device, so that the problem that data is inconsistent due to the fact that data can still be written into the current master database by some terminals because a server system where the current master database is located is falsely dead in the master database switching process is effectively avoided. In other words, when the current main database fails to operate, the power supply of the server where the main database is located is turned off through the out-of-band device, and the consistency of data in the database cluster can be effectively guaranteed.
In one embodiment, the master database switching control method is executed by a monitoring process; after step S210, the method for controlling switching of the master database further includes: generating a master database switching report; pushing a switching report of a main database to a terminal; the monitoring process is closed.
The master database switching report is a report file which is generated correspondingly when the master database is switched, and is used for describing relevant information of master database switching. The master database switching report comprises a network address, a port, a domain name, a cluster identifier and a machine room identifier corresponding to the current master database, and a network address, a port, a domain name, a cluster identifier and a machine room identifier corresponding to the switched master database.
Specifically, the monitoring management server creates a monitoring process for monitoring the host computer room, and performs the related steps of the above-described host database switching control method through the created monitoring process. And after the switching of the master database is completed, generating a corresponding master database switching report through the monitoring process, pushing the generated master database switching report to the terminal, and ending the currently running monitoring process.
In one embodiment, the monitoring management server creates a monitoring process for monitoring the current master database, performs the above-described monitoring of the operation state of the current master database through the created monitoring process, and switches the relevant steps of the master database when the current master database has an operation failure.
In the above embodiment, when the switching of the master database is completed, the master database switching report is triggered, and the master database switching report is presented to the user through the terminal, so that the user can know the master database switching process.
In an embodiment, before step S210, the master database switching control method further includes: sending a domain name invalid instruction to a domain name management server; the domain name invalidation instruction is used for indicating the domain name management server to delete the mapping relation between the network address of the current main database and the corresponding domain name; after step S210, the method for controlling switching of the master database further includes: sending a domain name switching instruction to a domain name management server; and the domain name switching instruction is used for indicating the domain name management server to establish a mapping relation between the network address of the switched main database and the domain name of the current main database.
The domain name management server is a server for managing the mapping relationship between the network address and the domain name of each database. The domain name management server can analyze and acquire the corresponding network address according to the received domain name and the corresponding mapping relation. The domain name management server is used for receiving the domain name of the terminal or other computer equipment, obtaining a corresponding network address according to domain name resolution, and correspondingly feeding back the corresponding network address to the terminal or other computer equipment. The domain name invalidation command is a command for triggering deletion of the corresponding mapping relationship between the domain name and the network address. The domain name invalidation command is used for instructing the domain name management server to delete the mapping relationship between the network address and the domain name of the current master database so as to invalidate the domain name, namely, the terminal cannot successfully access the current master database through the domain name of the current master database.
The domain name switching instruction is an instruction for triggering switching of the domain name of the switched main database. The domain name switching instruction is specifically an instruction for triggering the domain name of the switched main database to be updated according to the domain name of the current main database. The domain name switching instruction is used for indicating the domain name management server to establish a mapping relation between the domain name of the current main database and the network address of the switched main database, so that the terminal can access the switched main database according to the domain name of the current main database. The mapping relation refers to the corresponding relation between the domain name and the network address, and the network address can be correspondingly determined according to the known domain name and the mapping relation.
Specifically, when it is determined that the main room is failed or the main database is failed in operation, the monitoring management server triggers switching of the main database. Before switching the main database, the monitoring management server generates a domain name invalid instruction and sends the generated domain name invalid instruction to the domain name management server. And the domain name management server queries the mapping relation between the network address and the domain name of the current main database according to the received domain name invalid instruction, and then deletes the queried mapping relation. And when the mapping relation is successfully deleted, the domain name management server feeds back invalid and successful prompt information to the monitoring management server.
In one embodiment, the domain name management server obtains the network address and the domain name of the current master database according to the received domain name invalidation instruction, and then queries a corresponding mapping relation according to the obtained network address and the obtained domain name. The domain name management server can obtain the network address and the domain name of the current main database by analyzing the received domain name invalid instruction, and can also obtain the network address and the domain name of the current main database from the monitoring management server according to the received domain name invalid instruction.
Further, when the switching of the master database is completed, the monitoring management server generates a domain name switching instruction and transmits the generated domain name switching instruction to the domain name management server. The domain name management server respectively acquires the domain name of the current main database and the network address of the switched main database according to the received domain name switching instruction, and establishes a mapping relation between the acquired domain name of the current main database and the network address of the switched main database.
In an embodiment, the monitoring management server may obtain the domain name of the current master database and the network address of the switched master database by analyzing the received domain name switching instruction, or obtain the domain name of the current master database and the network address of the switched master database from the monitoring management server according to the domain name switching instruction.
In one embodiment, before the domain name management server establishes the mapping relationship between the domain name of the current master database and the network address of the switched master database according to the domain name switching instruction, the mapping relationship between the network address of the switched master database and the corresponding domain name is deleted. When the domain name management server establishes a new mapping relation according to the domain name switching instruction, the mapping relation between the network address of the switched main database and the domain name can also be reserved. Therefore, after the switching of the main database is completed, the terminal can still read data from the switched main database according to the domain name of the switched main database before the switching of the main database.
In one embodiment, a Domain Name System (DNS) is deployed on the Domain Name management server, and when the Domain Name management server receives a Domain Name invalidation instruction or a Domain Name switching instruction, the DNS executes the above-mentioned related steps of deleting an existing mapping relationship and reestablishing a mapping relationship. And when the domain name management server receives the domain name sent by the terminal, the DNS analyzes the domain name according to the mapping relation to obtain a corresponding network address.
In the above embodiment, before switching the master database, the domain name of the current master database is set to be invalid by the domain name management server, so that the current master database cannot be successfully accessed, thereby ensuring data consistency. When the switching of the master database is completed, the domain name management server is further used for reestablishing the mapping relationship between the domain name of the current master database and the network address of the switched master database so as to update the domain name of the switched master database into the domain name of the current master database, thereby ensuring that the terminal can successfully access the switched master database according to the existing domain name.
In one embodiment, the candidate slave database is used to backup data of the current master database; step S210 includes: updating the selected slave database according to the incremental data of the current master database; when the data of the current master database is consistent with the data of the selected slave database, updating the read-only attribute parameters of the selected slave database into read-write attribute parameters to obtain a switched master database; respectively updating the data of each candidate slave database according to the incremental data of the switched master database; and when the data of the switched master database is consistent with that of each candidate slave database, respectively establishing the master-slave relationship of the switched master database and each candidate slave database.
Incremental data refers to the difference data of one database relative to another database. The incremental data specifically refers to data which is not backed up in the master database to the slave database. The read-write attribute parameter is a parameter for representing a readable-writable attribute. The read-write attribute parameter is used for indicating that the corresponding database supports data write operation and data read operation simultaneously. The read-only attribute parameter is used to indicate a parameter of the read-only attribute. The read-only attribute parameter is used to indicate that the corresponding database supports only data read operations and not data write operations. The read-write attribute parameter and the read-only attribute parameter may be a character string composed of at least one of characters such as numbers, letters, symbols, and the like, for example, 1 corresponds to the read-write attribute parameter, and 0 corresponds to the read-only attribute parameter. The master-slave relationship refers to the master-slave correspondence relationship between the master database and the slave database. After the master-slave relationship is established, the changed data in the master database can be backed up to the slave database, so that the data synchronization between the master database and the slave database is realized.
In particular, each slave database in a database cluster is used to backup data of a master database in the database cluster. And after selecting the slave database from the candidate slave databases according to the configuration file, the monitoring management server compares the data of the current master database with the data of the selected slave database, determines incremental data of the current master database relative to the selected slave database, and updates the data of the selected slave database according to the determined incremental data so as to backup the incremental quantity of the current master database to the selected slave database. When the updating is finished, the current master database is consistent with the selected slave database, and the monitoring management server updates the read-only attribute parameters of the selected slave database into the read-write attribute parameters to obtain the switched master database.
Further, the monitoring management server compares the data of the switched master database with the respective data of each candidate slave database of which the slave database is selected from the candidate slave databases in an elimination manner, and respectively determines the incremental data of the switched master database relative to each candidate slave database. And for each candidate slave database, the monitoring management server respectively updates the data of the corresponding candidate slave data according to the determined incremental data so as to respectively backup the determined incremental data to the corresponding candidate slave database. When the updating is completed, the data of the switched master database is consistent with the data of each candidate slave database, and master-slave relations between the switched master database and each candidate slave database are respectively established, so that the data of the switched master database are respectively backed up to each candidate slave database.
In the above embodiment, when the master data is switched, the selected slave database is updated according to the incremental data of the current master database to ensure data consistency, and when the two data are consistent, the read-write permission of the selected slave database is updated, so that the switched master database obtained by switching can be successfully written with data. And after the switched master database is obtained, updating the data of each candidate slave database to be consistent with the switched master database, and reestablishing the master-slave relationship so as to successfully synchronize the data of the switched master database to each slave database.
In an embodiment, the master database switching control method further includes: acquiring configuration information corresponding to each candidate slave database corresponding to the candidate machine room identifier; step S208 includes: screening a secondary database from a candidate secondary database corresponding to the candidate machine room identifier according to the acquired configuration information; and selecting a slave database from the screened slave databases according to the configuration file.
The configuration information is information for representing each configuration item of the candidate slave database. Configuration information such as whether a binary log file exists. The configuration information can be stored locally by a server where the candidate slave database is located, can be stored locally by the monitoring management server, and can also be stored in other computer equipment.
In one embodiment, the monitoring management server respectively obtains configuration information corresponding to each candidate slave database corresponding to the machine room identifier of the main machine room, screens the slave databases from the candidate slave databases corresponding to the machine room identifier of the main machine room according to the obtained configuration information, and then selects the slave databases from the screened slave databases according to the configuration information.
In the above embodiment, the candidate slave databases are preliminarily screened according to the configuration information corresponding to each candidate slave database, and then the slave databases are selected from the screened slave databases according to the configuration files, so that the screening efficiency of the slave databases can be improved.
As shown in fig. 3, in an embodiment, a master database switching control method is provided, and the method specifically includes the following steps:
s302, a configuration file is obtained.
S304, according to the configuration file, inquiring the machine room state parameters of the main machine room where the current main database is located.
And S306, when the machine room state parameters meet the machine room fault conditions, determining candidate machine room identifications after the machine room identifications of the main machine room are removed from the machine room identification set recorded in the configuration file.
S308, selecting a slave database from the candidate slave databases corresponding to the candidate machine room identifications according to the configuration file; the candidate slave database is used for backing up the data of the current master database.
And S310, determining the current master database according to the configuration file.
S312, writing the appointed field data into the current master database.
S314, when the writing is judged to fail, determining a slave database selected from candidate slave databases corresponding to the machine room identifier of the slave computer room according to the configuration file; the candidate slave database is used for backing up the data of the current master database.
S316, sending a domain name invalid instruction to a domain name management server; and the domain name invalid instruction is used for instructing the domain name management server to delete the mapping relation between the network address of the current main database and the corresponding domain name.
And S318, updating the selected slave database according to the incremental data of the current master database.
And S320, when the data of the current master database is consistent with the data of the selected slave database, updating the read-only attribute parameters of the selected slave database into read-write attribute parameters to obtain a switched master database.
And S322, respectively updating the data of each candidate slave database according to the incremental data of the switched master database.
And S324, when the switched master database and the candidate slave databases are consistent, respectively establishing the master-slave relationship of the switched master database and the candidate slave databases.
S326, sending a domain name switching instruction to the domain name management server; and the domain name switching instruction is used for indicating the domain name management server to establish a mapping relation between the network address of the switched main database and the domain name of the current main database.
In the above embodiment, the state of the main computer room is determined by obtaining the state parameter of the main computer room where the main database is located, the operating state of the main database is determined by writing data of specified fields into the main database, switching of the main database is performed when a failure of the main computer room or a failure of the main database is determined, and domain name switching of the main database is performed when the switching of the main database is completed, so that the main database can be guaranteed to be successfully accessed.
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 switching control apparatus 400 including: an obtaining module 401, an inquiring module 402, a determining module 403, a selecting module 404 and a switching module 405, wherein:
an obtaining module 401, configured to obtain a configuration file.
And the query module 402 is configured to query the machine room state parameters of the host computer room where the current host database is located according to the configuration file.
The determining module 403 is configured to determine, when the machine room state parameter meets a machine room fault condition, a candidate machine room identifier from which the machine room identifier of the host machine room is removed in the machine room identifier set recorded in the configuration file.
A selecting module 404, configured to select a slave database from candidate slave databases corresponding to the candidate machine room identifier according to the configuration file.
A switching module 405, configured to switch the current master database to the selected slave database, so as to obtain a switched master database.
As shown in fig. 5, in an embodiment, the master database switching control apparatus 400 further includes: a master database determination module 406, a write module 407, and a slave database determination module 408.
A master database determining module 406, configured to determine a current master database according to the configuration file.
And a writing module 407, configured to write specified field data to the current master database.
And the slave database determining module 408 is configured to determine, according to the configuration file, a slave database selected from candidate slave databases corresponding to the machine room identifier of the slave computer room when it is determined that the writing fails.
In an embodiment, the switching module 405 is further configured to query a network address of an out-of-band device corresponding to the current primary database when it is determined that the writing fails; sending a closing instruction to the out-of-band equipment according to the network address; and the closing instruction is used for instructing the out-of-band equipment to close the server where the current main database is located.
In one embodiment, the method is performed by a monitoring process; a switching module 405, further configured to generate a master database switching report; pushing a master database switching report to a terminal; the monitoring process is closed.
In one embodiment, the master database switching control apparatus 400 further includes: a domain name switching module 409.
A domain name switching module 409, configured to send a domain name invalidation instruction to the domain name management server; the domain name invalid instruction is used for indicating the domain name management server to delete the mapping relation between the network address of the current main database and the corresponding domain name; sending a domain name switching instruction to a domain name management server; and the domain name switching instruction is used for indicating the domain name management server to establish a mapping relation between the network address of the switched main database and the domain name of the current main database.
In one embodiment, the candidate slave database is used to backup data of the current master database; the switching module 405 is further configured to update the selected slave database according to the incremental data of the current master database; when the data of the current master database is consistent with the data of the selected slave database, updating the read-only attribute parameters of the selected slave database into read-write attribute parameters to obtain a switched master database; respectively updating the data of each candidate slave database according to the incremental data of the switched master database; and when the data of the switched master database is consistent with that of each candidate slave database, respectively establishing the master-slave relationship of the switched master database and each candidate slave database.
In an embodiment, the obtaining module 401 is further configured to obtain configuration information corresponding to each candidate slave database corresponding to the candidate machine room identifier; the selecting module 404 is further configured to filter a secondary database from the candidate secondary database corresponding to the candidate machine room identifier according to the acquired configuration information; and selecting the slave database from the screened slave databases according to the configuration file.
For specific limitations of the master database switching control apparatus, reference may be made to the above limitations on the master database switching control method, which is not described herein again. The modules in the master database switching control apparatus may be wholly or partially implemented by software, hardware, or 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 switching control method.
It will be appreciated by those skilled in the art that the configuration shown in fig. 6 is a block diagram of only a portion of the configuration associated with the present application, and is not intended to limit the computing device to which the present application may be applied, and that a particular computing device 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; inquiring the machine room state parameters of the main computer room where the current main database is located according to the configuration file; when the machine room state parameters meet the machine room fault conditions, determining candidate machine room identifications after the machine room identifications of the main machine room are removed from a machine room identification set recorded in the configuration file; selecting a slave database from candidate slave databases corresponding to the candidate machine room identifications according to the configuration file; and switching the current master database into the selected slave database to obtain a switched master database.
In one embodiment, the processor when executing the computer program further performs the steps of: determining a current master database according to the configuration file; writing specified field data into a current master database; and when the writing is judged to fail, determining the slave database selected from the candidate slave databases corresponding to the machine room identifier of the slave computer room according to the configuration file.
In one embodiment, the processor, when executing the computer program, further performs the steps of: when the writing is judged to fail, inquiring the network address of the out-of-band equipment corresponding to the current main database; sending a closing instruction to the out-of-band equipment according to the network address; and the closing instruction is used for instructing the out-of-band equipment to close the server where the current main database is located.
In one embodiment, the method is performed by a monitoring process; after the step of switching the current master database to the selected slave database and obtaining the switched master database is realized when the processor executes the computer program, the processor also realizes the following steps when executing the computer program: generating a master database switching report; pushing a switching report of a main database to a terminal; the monitoring process is closed.
In one embodiment, before the step of switching the current master database to the selected slave database and obtaining the switched master database, the processor executes the computer program and further performs the following steps: sending a domain name invalid instruction to a domain name management server; the domain name invalid instruction is used for indicating the domain name management server to delete the mapping relation between the network address of the current main database and the corresponding domain name; after the step of switching the current master database to the selected slave database to obtain the switched master database when the processor executes the computer program, the processor further realizes the following steps when executing the computer program: sending a domain name switching instruction to a domain name management server; and the domain name switching instruction is used for indicating the domain name management server to establish a mapping relation between the network address of the switched main database and the domain name of the current main database.
In one embodiment, the candidate slave database is used to backup data of the current master database; switching the current master database to the selected slave database, and obtaining the switched master database comprises: updating the selected slave database according to the incremental data of the current master database; when the data of the current master database is consistent with the data of the selected slave database, updating the read-only attribute parameters of the selected slave database into read-write attribute parameters to obtain a switched master database; respectively updating the data of each candidate slave database according to the incremental data of the switched master database; and when the data of the switched master database is consistent with that of each candidate slave database, respectively establishing the master-slave relationship of the switched master database and each candidate slave database.
In one embodiment, the processor when executing the computer program further performs the steps of: acquiring configuration information corresponding to each candidate slave database corresponding to the candidate machine room identifier; according to the configuration file, selecting a slave database from candidate slave databases corresponding to the candidate machine room identifications, wherein the slave database comprises: screening a secondary database from a candidate secondary database corresponding to the candidate machine room identifier according to the acquired configuration information; and selecting a slave database from the screened slave databases according to the configuration file.
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; inquiring the machine room state parameters of the main computer room where the current main database is located according to the configuration file; when the machine room state parameters meet the machine room fault conditions, determining candidate machine room identifications after the machine room identifications of the main machine room are removed from a machine room identification set recorded in a configuration file; selecting a slave database from the candidate slave databases corresponding to the candidate machine room identifications according to the configuration file; and switching the current master database into the selected slave database to obtain a switched master database.
In one embodiment, the computer program when executed by the processor further performs the steps of: determining a current master database according to the configuration file; writing specified field data into a current master database; and when the writing is judged to fail, determining the slave database selected from the candidate slave databases corresponding to the machine room identifier of the slave computer room according to the configuration file.
In one embodiment, the computer program when executed by the processor further performs the steps of: when the writing is judged to fail, inquiring the network address of the out-of-band equipment corresponding to the current main database; sending a closing instruction to the out-of-band equipment according to the network address; and the closing instruction is used for instructing the out-of-band equipment to close the server where the current main database is located.
In one embodiment, the method is performed by a monitoring process; after the step of switching the current master database to the selected slave database to obtain the switched master database, the computer program further performs the following steps when executed by the processor: generating a master database switching report; pushing a switching report of a main database to a terminal; the monitoring process is closed.
In one embodiment, the computer program when executed by the processor performs the steps of switching the current master database to the selected slave database to obtain a switched master database, and further performing the steps of: sending a domain name invalid instruction to a domain name management server; the domain name invalidation instruction is used for indicating the domain name management server to delete the mapping relation between the network address of the current main database and the corresponding domain name; after the step of switching the current master database to the selected slave database to obtain the switched master database, the computer program further performs the following steps when executed by the processor: sending a domain name switching instruction to a domain name management server; and the domain name switching instruction is used for indicating the domain name management server to establish a mapping relation between the network address of the switched main database and the domain name of the current main database.
In one embodiment, the candidate slave database is used to backup data of the current master database; switching the current master database to the selected slave database, and obtaining the switched master database comprises: updating the selected slave database according to the incremental data of the current master database; when the data of the current master database is consistent with the data of the selected slave database, updating the read-only attribute parameters of the selected slave database into read-write attribute parameters to obtain a switched master database; respectively updating the data of each candidate slave database according to the incremental data of the switched master database; and when the data of the switched master database is consistent with that of each candidate slave database, respectively establishing the master-slave relationship of the switched master database and each candidate slave database.
In one embodiment, the computer program when executed by the processor further performs the steps of: acquiring configuration information corresponding to each candidate slave database corresponding to the candidate machine room identifier; according to the configuration file, selecting a slave database from the candidate slave databases corresponding to the candidate machine room identifications, wherein the method comprises the following steps of: screening a secondary database from a candidate secondary database corresponding to the candidate machine room identifier according to the acquired configuration information; and selecting the slave database from the screened slave databases according to the configuration file.
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 may be implemented by hardware instructions of a computer program, which may be stored in a non-volatile computer-readable storage medium, and when executed, may 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 Rambus Dynamic RAM (DRDRAM), and Rambus Dynamic RAM (RDRAM), among others.
All possible combinations of the technical features in the above embodiments may not be described for the sake of brevity, but should be considered as being within the scope of the present disclosure 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 handoff control method, the method comprising:
acquiring a configuration file;
inquiring the machine room state parameters of the main computer room where the current main database is located according to the configuration file;
when the machine room state parameters meet machine room fault conditions, determining candidate machine room identifications after the machine room identifications of the main machine room are removed from a machine room identification set recorded in the configuration file;
according to the configuration file, selecting a slave database from candidate slave databases corresponding to the candidate machine room identifications;
and switching the current master database into the selected slave database to obtain a switched master database.
2. The method of claim 1, further comprising:
determining a current master database according to the configuration file;
writing specified field data into the current master database;
and when the writing is judged to fail, determining a slave database selected from candidate slave databases corresponding to the machine room identifier of the main computer room according to the configuration file.
3. The method of claim 2, further comprising:
when the writing is judged to fail, inquiring the network address of the out-of-band equipment corresponding to the current main database;
sending a closing instruction to the out-of-band equipment according to the network address; and the closing instruction is used for indicating the out-of-band equipment to close the server where the current main database is located.
4. The method of claim 1, wherein the method is performed by a monitoring process;
after the current master database is switched to the selected slave database to obtain the switched master database, the method further includes:
generating a master database switching report;
pushing the switching report of the main database to a terminal;
and closing the monitoring process.
5. The method according to any one of claims 1 to 4, wherein before the switching the current master database to the selected slave database to obtain the switched master database, the method further comprises:
sending a domain name invalid instruction to a domain name management server; the domain name invalidation instruction is used for instructing the domain name management server to delete the mapping relation between the network address of the current main database and the corresponding domain name;
after the switching the current master database to the selected slave database to obtain the switched master database, the method further includes:
sending a domain name switching instruction to the domain name management server; the domain name switching instruction is used for indicating the domain name management server to establish a mapping relation between the network address of the switched main database and the domain name of the current main database.
6. The method according to any one of claims 1 to 4, wherein the candidate slave database is used for backing up data of the current master database; the switching the current master database to the selected slave database to obtain a switched master database includes:
updating the selected slave database according to the incremental data of the current master database;
when the data of the current master database and the data of the selected slave database are consistent, updating the read-only attribute parameters of the selected slave database into read-write attribute parameters to obtain a switched master database;
respectively updating the data of each candidate slave database according to the incremental data of the switched master database;
and when the switched master database and the candidate slave databases are consistent, respectively establishing the master-slave relationship of the switched master database and the candidate slave databases.
7. The method of claim 6, further comprising:
acquiring configuration information corresponding to each candidate slave database corresponding to the candidate machine room identifier;
selecting a slave database from candidate slave databases corresponding to the candidate machine room identifications according to the configuration file, wherein the selecting comprises:
screening a secondary database from a candidate secondary database corresponding to the candidate machine room identifier according to the acquired configuration information;
and selecting a slave database from the screened slave databases according to the configuration file.
8. A master database switching control apparatus, the apparatus comprising:
the acquisition module is used for acquiring the configuration file;
the query module is used for querying the machine room state parameters of the main computer room where the current main database is located according to the configuration file;
the determining module is used for determining candidate machine room identifiers after the machine room identifiers of the main machine room are removed from the machine room identifier set recorded in the configuration file when the machine room state parameters meet machine room fault conditions;
the selection module is used for selecting a slave database from candidate slave databases corresponding to the candidate machine room identifications according to the configuration file;
and the switching module is used for switching the current master database into the selected slave database to obtain a switched master database.
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 of any one of claims 1 to 7.
CN201810551550.0A 2018-05-31 2018-05-31 Main database switching control method and device, computer equipment and storage medium Active CN108932295B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201810551550.0A CN108932295B (en) 2018-05-31 2018-05-31 Main database switching control method and device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201810551550.0A CN108932295B (en) 2018-05-31 2018-05-31 Main database switching control method and device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN108932295A CN108932295A (en) 2018-12-04
CN108932295B true CN108932295B (en) 2023-04-18

Family

ID=64449632

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201810551550.0A Active CN108932295B (en) 2018-05-31 2018-05-31 Main database switching control method and device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN108932295B (en)

Families Citing this family (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110119392B (en) * 2019-03-25 2022-02-11 福建天晴数码有限公司 Method and storage medium for switching database IP (Internet protocol) application
CN110413685B (en) * 2019-04-12 2024-03-12 财付通支付科技有限公司 Database service switching method, device, readable storage medium and computer equipment
CN110069365B (en) * 2019-04-26 2023-07-04 腾讯科技(深圳)有限公司 Method for managing database and corresponding device, computer readable storage medium
CN110442650A (en) * 2019-08-09 2019-11-12 中国工商银行股份有限公司 Database switching method, device, system, electronic equipment and storage medium
CN110471909B (en) * 2019-08-26 2022-03-08 上海达梦数据库有限公司 Database management method, device, server and storage medium
CN112749148A (en) * 2019-10-31 2021-05-04 北京国双科技有限公司 Database switching method and device
CN111367885A (en) * 2020-02-28 2020-07-03 京东方科技集团股份有限公司 Database management system, database management method, storage medium, and electronic device
CN111526038B (en) * 2020-03-26 2023-01-20 口碑(上海)信息技术有限公司 Service request distribution method and device, computer equipment and readable storage medium
CN111367934B (en) * 2020-03-31 2023-10-31 中国建设银行股份有限公司 Data consistency checking method, device, server and medium
CN113162815B (en) * 2020-10-22 2023-02-03 广州市汇聚支付电子科技有限公司 Flow switching method, system, equipment and medium
CN112560028A (en) * 2020-12-24 2021-03-26 深圳昂楷科技有限公司 Method and device for protecting key file and server
CN112749045B (en) * 2021-01-11 2023-05-26 深圳市伊欧乐科技有限公司 Database cluster switching method, device, storage medium and apparatus
CN115134213B (en) * 2021-03-25 2023-09-05 中国移动通信集团安徽有限公司 Disaster recovery method, device, equipment and storage medium

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104486155A (en) * 2014-12-15 2015-04-01 北京趣拿软件科技有限公司 Database cluster monitoring method and system
CN106874135A (en) * 2017-02-20 2017-06-20 北京百度网讯科技有限公司 Method, device and equipment for detecting computer room failure

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130124916A1 (en) * 2011-11-16 2013-05-16 Microsoft Corporation Layout of mirrored databases across different servers for failover

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104486155A (en) * 2014-12-15 2015-04-01 北京趣拿软件科技有限公司 Database cluster monitoring method and system
CN106874135A (en) * 2017-02-20 2017-06-20 北京百度网讯科技有限公司 Method, device and equipment for detecting computer room failure

Also Published As

Publication number Publication date
CN108932295A (en) 2018-12-04

Similar Documents

Publication Publication Date Title
CN108932295B (en) Main database switching control method and device, computer equipment and storage medium
CN108897658B (en) Method and device for monitoring master database, computer equipment and storage medium
CN108900572B (en) Main database domain name switching control method, computer equipment and storage medium
CN108093094B (en) Database instance access method, device, system, storage medium and equipment
CN108897638B (en) Data backup method and device, computer equipment and storage medium
CN108322533A (en) Configuration and synchronization method between distributed type assemblies node based on operation log
CN108965383B (en) File synchronization method and device, computer equipment and storage medium
CN110750267B (en) Service information updating method, device, computer equipment and storage medium
CN110471909B (en) Database management method, device, server and storage medium
CN113905005B (en) Method and device for updating client state of instant messaging
CN110781214A (en) Database reading and writing method and device, computer equipment and storage medium
CN112632029B (en) Data management method, device and equipment of distributed storage system
CN111752488B (en) Management method and device of storage cluster, management node and storage medium
CN110727698A (en) Database access method and device, computer equipment and storage medium
CN112865992B (en) Method and device for switching master nodes in distributed master-slave system and computer equipment
JP7215971B2 (en) METHOD AND APPARATUS FOR PROCESSING DATA LOCATION IN STORAGE DEVICE, COMPUTER DEVICE AND COMPUTER-READABLE STORAGE MEDIUM
CN108628705B (en) Database recovery method and device, computer equipment and storage medium
CN108924772B (en) Short message sending method and device, computer equipment and storage medium
CN111342986B (en) Distributed node management method and device, distributed system and storage medium
CN112070585A (en) Order state unified management method and device, computer equipment and storage medium
WO2017080362A1 (en) Data managing method and device
CN111917588A (en) Edge device management method, device, edge gateway device and storage medium
CN112698926B (en) Data processing method, device, equipment, storage medium and system
CN112115166B (en) Data caching method and device, computer equipment and storage medium
CN111752245B (en) Data access and processing method, device, equipment and readable storage medium

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