CN108900572A - Primary database domain name method for handover control, computer equipment and storage medium - Google Patents
Primary database domain name method for handover control, computer equipment and storage medium Download PDFInfo
- Publication number
- CN108900572A CN108900572A CN201810551524.8A CN201810551524A CN108900572A CN 108900572 A CN108900572 A CN 108900572A CN 201810551524 A CN201810551524 A CN 201810551524A CN 108900572 A CN108900572 A CN 108900572A
- Authority
- CN
- China
- Prior art keywords
- domain name
- primary database
- database
- data
- configuration file
- 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.)
- Granted
Links
Classifications
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L61/00—Network arrangements, protocols or services for addressing or naming
- H04L61/45—Network directories; Name-to-address mapping
- H04L61/4505—Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols
- H04L61/4511—Network directories; Name-to-address mapping using standardised directories; using standardised directory access protocols using domain name system [DNS]
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04L—TRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
- H04L67/00—Network arrangements or protocols for supporting network services or applications
- H04L67/2866—Architectures; Arrangements
- H04L67/30—Profiles
Landscapes
- Engineering & Computer Science (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- Mobile Radio Communication Systems (AREA)
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
This application involves a kind of primary database domain name method for handover control, computer equipment and storage mediums.The method includes:Receive the primary database switching command that terminal is sent;The corresponding configuration file of data-base cluster is obtained according to primary database switching command;Configuration file includes the network address and domain name of the current primary database in data-base cluster;Domain name illegal command is sent to domain name supervising server according to configuration file;Domain name illegal command is used to indicate domain name supervising server, deletes the mapping relations between the network address and domain name of current primary database;When the first prompt information of the mapping relations between the network address and domain name for indicating successfully to delete current primary database for receiving domain name supervising server feedback, primary database handover operation is carried out according to configuration file, obtains new primary database;When primary database handover operation is completed, the first domain name switching command is sent to domain name supervising server;First domain name switching command is used to indicate the mapping relations that domain name supervising server is established between the network address of new primary database and the domain name of current primary database.
Description
Technical field
This application involves database technical fields, more particularly to a kind of primary database domain name method for handover control, calculate
Machine equipment and storage medium.
Background technique
With the development of database technology, there is the data-base cluster technology of one master and multiple slaves mode.In other words, data
Library cluster includes a read-write primary database and multiple read-only from database.Currently, would generally be distributed for primary database
One VIP (Virtual Internet Protocol, virtual network address), terminal access primary database by the VIP, into
And it writes data into primary database.When carrying out primary database switching, VIP is switched into another main number by current primary database
According to library, i.e., the VIP is reassigned into another primary database, so that terminal accesses another primary database according to the VIP.
However, the access mode of this kind of primary database needs largely to use VIP, and may cause when system is without response
Thus VIP handover failure causes the primary database in data-base cluster cannot be by success so as to cause primary database handover failure
Access.
Summary of the invention
Based on this, it is necessary to which in view of the above technical problems, providing one kind can ensure that primary database can be by successful access
Primary database domain name method for handover control, device, computer equipment and storage medium.
A kind of primary database domain name method for handover control, the method includes:
Receive the primary database switching command that terminal is sent;
The corresponding configuration file of data-base cluster is obtained according to the primary database switching command;The configuration file includes
The network address and domain name of current primary database in the data-base cluster;
Domain name illegal command is sent to domain name supervising server according to the configuration file;Domain name illegal command is used for
It indicates domain name management server, deletes the mapping relations between the network address and domain name of the current primary database;
When the network for indicating successfully to delete the current primary database for receiving domain name management server feedback
When the first prompt information of the mapping relations between location and domain name, primary database handover operation is carried out according to the configuration file,
Obtain new primary database;
When primary database handover operation is completed, the first domain name switching command is sent to domain name management server;Institute
State the first domain name switching command be used to indicate domain name management server establish the new primary database network address and
Mapping relations between the domain name of the current primary database.
A kind of primary database domain name switching control, described device include:
Receiving module, for receiving the primary database switching command of terminal transmission;
Module is obtained, for obtaining the corresponding configuration file of data-base cluster according to the primary database switching command;Institute
State the network address and domain name that configuration file includes the current primary database in the data-base cluster;
First sending module, for sending domain name illegal command to domain name supervising server according to the configuration file;Institute
It states domain name illegal command and is used to indicate domain name management server, delete the network address and domain name of the current primary database
Between mapping relations;
Switching module, for successfully deleting the current main number when the expression for receiving domain name management server feedback
According to the mapping relations between the network address and domain name in library the first prompt information when, according to the configuration file carry out master data
Library handover operation obtains new primary database;
Second sending module, for sending the to domain name management server when primary database handover operation is completed
One domain name switching command;The first domain name switching command is used to indicate domain name management server and establishes the new main number
According to the mapping relations between the network address in library and the domain name of the current primary database.
A kind of computer equipment, including memory and processor, the memory are stored with computer program, the processing
Device realizes following steps when executing the computer program:
Receive the primary database switching command that terminal is sent;
The corresponding configuration file of data-base cluster is obtained according to the primary database switching command;The configuration file includes
The network address and domain name of current primary database in the data-base cluster;
Domain name illegal command is sent to domain name supervising server according to the configuration file;Domain name illegal command is used for
It indicates domain name management server, deletes the mapping relations between the network address and domain name of the current primary database;
When the network for indicating successfully to delete the current primary database for receiving domain name management server feedback
When the first prompt information of the mapping relations between location and domain name, primary database handover operation is carried out according to the configuration file,
Obtain new primary database;
When primary database handover operation is completed, the first domain name switching command is sent to domain name management server;Institute
State the first domain name switching command be used to indicate domain name management server establish the new primary database network address and
Mapping relations between the domain name of the current primary database.
A kind of computer readable storage medium, is stored thereon with computer program, and the computer program is held by processor
Following steps are realized when row:
Receive the primary database switching command that terminal is sent;
The corresponding configuration file of data-base cluster is obtained according to the primary database switching command;The configuration file includes
The network address and domain name of current primary database in the data-base cluster;
Domain name illegal command is sent to domain name supervising server according to the configuration file;Domain name illegal command is used for
It indicates domain name management server, deletes the mapping relations between the network address and domain name of the current primary database;
When the network for indicating successfully to delete the current primary database for receiving domain name management server feedback
When the first prompt information of the mapping relations between location and domain name, primary database handover operation is carried out according to the configuration file,
Obtain new primary database;
When primary database handover operation is completed, the first domain name switching command is sent to domain name management server;Institute
State the first domain name switching command be used to indicate domain name management server establish the new primary database network address and
Mapping relations between the domain name of the current primary database.
Above-mentioned primary database domain name method for handover control, device, computer equipment and storage medium receive terminal transmission
Primary database switching command when obtain the corresponding configuration file of data-base cluster, and then primary database is carried out according to configuration file
Switching, and the corresponding switching primary database domain name when primary database handover operation is completed.Pass through domain name pipe before primary database switching
The domain name of current primary database is set in vain by reason server, to guarantee data consistency in primary database handoff procedure.Work as master
When database handover operation is completed, the network address and currently main number of new primary database are established by means of domain name supervising server
According to the mapping relations between the domain name in library, so that the primary database that terminal is new according to existing domain name successful access, to protect
The primary database demonstrate,proved in data-base cluster can be by successful access.
Detailed description of the invention
Fig. 1 is the application scenario diagram of primary database domain name method for handover control in one embodiment;
Fig. 2 is the flow diagram of primary database domain name method for handover control in one embodiment;
Fig. 3 is the flow diagram of primary database domain name method for handover control in another embodiment;
Fig. 4 is the structural block diagram of primary database domain name switching control in one embodiment;
Fig. 5 is the structural block diagram of primary database domain name switching control in another embodiment;
Fig. 6 is the internal structure chart of computer equipment in one embodiment.
Specific embodiment
It is with reference to the accompanying drawings and embodiments, right in order to which the objects, technical solutions and advantages of the application are more clearly understood
The application is further elaborated.It should be appreciated that specific embodiment described herein is only used to explain the application, not
For limiting the application.
Primary database domain name method for handover control provided by the present application, can be applied in application environment as shown in Figure 1.
Wherein, terminal 110 and domain name supervising server 120 are communicated with monitoring management server 130 respectively by network.Monitoring pipe
Reason server 130 is communicated by network and database cluster 100.Data-base cluster 100 include primary database 102 and respectively from
Database (104,106 and 108), primary database 102 is communicated from database (104,106 and 108) respectively with respectively, respectively from number
It is used to back up the data of primary database according to library.Wherein, three in diagram are not limited to from quantity database in data-base cluster 100
It is a, it can dispose according to the actual situation more or less from database.Each database in data-base cluster 100 can be deployed in
Identical computer room can also be deployed in different computer rooms.
Monitoring management server 130 obtains data-base cluster according to the primary database switching command that terminal 110 is sent and corresponds to
Configuration file, and then according to configuration file to domain name supervising server 120 send domain name illegal command.Receive domain name supervising
When the prompt information of the corresponding feedback of server 120, the triggering switching primary database of monitoring management server 130 obtains new main number
According to library.When primary database handover operation is completed, monitoring management server 130 sends domain name switching to domain name supervising server 120
Instruction, to complete the relevant operation of switching primary database domain name by domain name supervising server 120.Wherein, terminal 110 can with but
It is not limited to various personal computers, laptop, smart phone, tablet computer and portable wearable device, domain name pipe
The server of the either multiple server compositions of independent server can be used by managing server 120 and monitoring management server 130
Cluster is realized.
In one embodiment, as shown in Fig. 2, providing a kind of primary database domain name method for handover control, in this way
Applied to being illustrated for the monitoring management server in Fig. 1, include the following steps:
S202 receives the primary database switching command that terminal is sent.
Wherein, primary database switching command is the instruction for triggering primary database handover operation.Primary database switching command is used
Primary database switching is carried out in instruction monitoring management server.Primary database switching, which refers to, is switched to target for current primary database
From database, new primary database is obtained.In other words, primary database switching, which refers to, substitutes current master from database using target
New primary database of the database as data-base cluster.
The cluster that data-base cluster is made of more than one database.It include a primary database in data-base cluster
With the slave database of at least one.Primary database has read-write properties, i.e. primary database supports data write-in and reading data, from
Database is used to back up the data of primary database, has read only attribute from database, i.e., only support reading data from database and
Data are not supported to be written.
Specifically, the primary database switching command that monitoring management server receiving terminal is sent by private line network.Monitoring
Management server also can receive terminal by outer net VPN (Virtual Private Network, Virtual Private Network) or
The primary database switching command that public network is sent.Terminal detects that corresponding generation primary database switching refers to when specified trigger action
It enables, and primary database switching command generated is sent to monitoring management server by wired or wireless way.Specified touching
Hair operation is preassigned trigger action, such as the triggering to preset control in terminal, or specifies the length at interface in terminal
It presses or slide.
S204 obtains the corresponding configuration file of data-base cluster according to primary database switching command;Configuration file includes number
According to the network address and domain name of the current primary database in the cluster of library.
Wherein, configuration file is the file data pre-generated according to each configuration item.Configuration file specifically can be basis
The pre-generated file data of each corresponding configuration item of database in data-base cluster.Configuration item refers to every configuration ginseng
Number, such as the corresponding network address of database, port, domain name, data base set group identification, principal and subordinate's role identification and computer room mark
Deng.Every configuration of the configuration item for descriptive data base, can correspond to determining database according to configuration item.
Specifically, when monitoring management server receives primary database switching command, primary database based on the received
Switching command obtains the corresponding configuration file of data-base cluster from local, and then determines database according to acquired configuration file
The network address and domain name of current primary database in cluster.Monitoring management server can be cut according to the primary database received
It changes instruction and obtains configuration file from other computer equipments, for example send the terminal of primary database switching command, or generate simultaneously
The server of storage configuration file.
In one embodiment, monitoring management server obtains corresponding number according to the primary database switching command received
According to library cluster identity, inquiry includes the configuration file of acquired data base set group identification, true according to the configuration file inquired
The network address and domain name of current primary database in data-base cluster corresponding to the fixed data base set group identification.
In one embodiment, monitoring management server is obtained corresponding by the primary database switching command that parsing receives
Data base set group identification.When monitoring management server receives the primary database switching command of terminal transmission, according to being received
The primary database switching command arrived obtains corresponding data base set group identification from the terminal.
S206 sends domain name illegal command to domain name supervising server according to configuration file;Domain name illegal command is for referring to
Show domain name supervising server, deletes the mapping relations between the network address and domain name of current primary database.
Wherein, domain name supervising server is the server for managing each database domain name.Domain name supervising services implement body
It is the server for managing the mapping relations between the domain name and network address of each database.Domain name supervising server for establish or
Delete the mapping relations between the domain name and network address of each database.Domain name supervising server is also used to according to the domain received
Name and the corresponding mapping relations parsing of the domain name obtain corresponding network address, so that terminal can be obtained according to domain name
Corresponding network address, and then according to the corresponding database of network address successful access obtained.
Domain name illegal command is to trigger the instruction that domain name is set to invalid state.Domain name illegal command specifically can be triggering
Delete the instruction of the mapping relations between network address and domain name.In the present embodiment, domain name illegal command is used to indicate domain name
Management server deletes the mapping relations in data-base cluster between the network address and domain name of current primary database, will be current
The domain name of primary database is set to invalid state.When the domain name of current primary database is set to invalid state, terminal passes through the domain name not
The energy successful access current primary database.
Mapping relations refer to the corresponding relationship between established network address and domain name.Domain name is as in mapping relations
Independent variable, network address can determine as the dependent variable in mapping relations according to known domain name and corresponding mapping relations
Corresponding network address.
Specifically, when monitoring management server is according to the primary database switching command triggering switching primary database received
When, monitoring management server is triggered according to configuration file generates domain name illegal command, and domain name illegal command generated is sent out
It send to domain name supervising server.Domain name supervising server obtains the net of current primary database according to the domain name illegal command received
Network address and domain name delete institute from local according to acquired network address and domain name in the corresponding mapping relations of local search
The mapping relations inquired.When successfully deleting inquired mapping relations, domain name supervising server generates prompt information, and
The prompt information is fed back into monitoring management server.
In one embodiment, monitoring management server determines the net of current primary database according to acquired configuration file
Network address and domain name generate domain name illegal command according to identified network address and domain name.The parsing of domain name supervising server should
Domain name illegal command can be obtained the network address and domain name of the current primary database.
In one embodiment, domain name supervising server based on the received domain name illegal command from monitoring management service
Device obtains the network address and domain name of current primary database.In one embodiment, domain name supervising server is according to receiving
Domain name illegal command obtains corresponding configuration file, and then the network of current primary database is determined according to acquired configuration file
Address and domain name.
In one embodiment, DNS (Domain Name System, domain name system are deployed on domain name supervising server
System), the mapping between the network address and domain name of current primary database is deleted according to the domain name illegal command received by DNS and is closed
System.Similarly, the mapping between given network address and designated domain name is established according to the domain name switching command received by DNS to close
System.From the respective network address of database, designated domain name is such as current for the such as current primary database of given network address and target
Primary database and target are from the respective domain name of database.In addition, by DNS according to the domain name and corresponding mapping relations solution received
Analysis obtains network address corresponding with received domain name.
S208, when receive domain name supervising server feedback the network address for indicating successfully to delete current primary database and
When the first prompt information of the mapping relations between domain name, primary database handover operation is carried out according to configuration file, is obtained new
Primary database.
Wherein, the first prompt information is for prompting successfully to delete between the network address and domain name of current primary database
The information of mapping relations.First prompt information can be specifically made of at least one of number, letter and symbol etc., such as 1
It indicates successfully to delete mapping relations.New primary database refers to the primary database of data-base cluster after the completion of primary database switching.
Primary database switching, which refers to, substitutes current primary database by new primary database, as data base set after the completion of primary database switching
The primary database of group.
Specifically, monitoring management server receives the prompt letter that domain name supervising server corresponds to domain name illegal command feedback
Breath.When the prompt information received indicates the mapping relations between the network address and domain name of successfully deleting current primary database
When, monitoring management server carries out primary database handover operation according to configuration file, and primary database handover operation obtains when completing
New primary database.
In one embodiment, monitoring management server carries out the specific steps packet of primary database switching according to configuration file
It includes:Monitoring management server is chosen for use as the slave database of new primary database according to configuration file from data-base cluster, and
Current primary database is switched to target from database.In other words, monitoring management server by utilizing is selected from data-base cluster
The slave database selected substitutes primary database of the current primary database as data-base cluster, to obtain the new of data-base cluster
Primary database.
In one embodiment, when the prompt information received indicates the network address and domain name of the current primary database of deletion
Between mapping relations failure when, monitoring management server sends domain name illegal command to domain name supervising server again.Again
The domain name illegal command of transmission is for again indicating that domain name supervising server deletes the network address and domain name of current primary database
Between mapping relations.
S210 sends the first domain name switching command to domain name supervising server when primary database handover operation is completed;The
One domain name switching command is used to indicate the network address and current primary database that domain name supervising server establishes new primary database
Domain name between mapping relations.
Wherein, domain name switching command is the instruction for triggering domain name handover operation.Domain name switching command specifically can be triggering
The instruction of domain name switching is carried out to new primary database.First domain name switching command is used to be different from other domain name switching commands,
Such as the second domain name switching command.First domain name switching command is used to indicate domain name supervising server according to current primary database
Domain name updates the domain name of acquired new primary database.
Specifically, when primary database handover operation is completed to obtain new primary database, monitoring management server generates the
First domain name switching command generated is sent to domain name supervising server by one domain name switching command.Domain name supervising server
With obtaining the domain name of current primary database and the network of new primary database respectively according to the first domain name switching command received
Location, and the mapping relations between the acquired domain name of current primary database and the network address of new primary database are established, with
Complete the switching of primary database domain name.
In one embodiment, domain name supervising server obtains new main number according to the first domain name switching command received
According to the network address and domain name in library, and the domain name of current primary database.Domain name supervising server is according to accessed new
Mapping relations between the network address of primary database and the inquiry of the domain name network address and domain name, and inquired from local deletion
The mapping relations arrived.When the mapping relations between the network address and domain name of successfully deleting new primary database, domain name supervising
Server establishes the mapping relations between the network address of new primary database and the domain name of current primary database.
In one embodiment, when domain name supervising server receives the first domain name switching command, by parse this first
Domain name switching command obtains the domain name of current primary database and the network address of new primary database.Domain name supervising server can also
With according to the first domain name switching command for receiving from monitoring management server obtain current primary database domain name and new master
The network address of database.
Above-mentioned primary database domain name method for handover control obtains number when receiving the primary database switching command of terminal transmission
Primary database handover operation is carried out according to the corresponding configuration file of library cluster, and then according to configuration file, is grasped when primary database switches
Corresponding switching primary database domain name when completing.Pass through domain name supervising server before primary database switching for current primary database
Domain name is set in vain, to guarantee data consistency in primary database handoff procedure.When primary database handover operation is completed, by
The mapping relations of the network address of new primary database and the domain name of current primary database are established in domain name supervising server, so that
The terminal primary database new according to existing domain name successful access is obtained, to ensure that the primary database in data-base cluster can
By successful access.
In one embodiment, above-mentioned primary database domain name method for handover control further includes:It is taken when receiving domain name supervising
The expression of business device feedback is successfully established the pass of the mapping between the network address of new primary database and the domain name of current primary database
When the second prompt information of system, the second domain name switching command is sent to domain name supervising server;Second domain name switching command is used for
Instruction domain name management server establishes the pass of the mapping between the network address of current primary database and the domain name of new primary database
System.
Wherein, the second prompt information is for prompting the network address for being successfully established new primary database and current master data
The information of mapping relations between the domain name in library.Second domain name switching command is the finger for the domain name that triggering switches current primary database
It enables.It is right before primary database switching according to new primary database that second domain name switching command is used to indicate domain name supervising server
The domain name answered updates the domain name of current primary database.
Specifically, when domain name supervising server is successfully established current master data according to the first domain name switching command received
When mapping relations between the domain name in library and the network address of new primary database, the generation of domain name supervising server indicates successfully to build
Second prompt information of vertical mapping relations, feeds back to monitoring management server for the second prompt information generated.Monitoring management
Server receives the mapping for indicating to be successfully established between the network address of new primary database and the domain name of current primary database
When the second prompt information of relationship, the second domain name switching command is generated, the second domain name switching command generated is sent to domain
Name management server.
Further, domain name supervising server obtains current primary database according to the second domain name switching command received
Network address and new the primary database corresponding domain name between primary database switching, establish acquired network address and
Mapping relations between domain name.
In one embodiment, when monitoring management server receives the second prompt information, worked as according to configuration file acquisition
The network address of preceding primary database and new the primary database corresponding domain name between primary database switching, according to acquired
Network address and domain name generate the second domain name switching command, and the second domain name switching command generated is sent to domain name pipe
Manage server.The second received domain name switching command of domain name supervising server parsing, obtains the network of current primary database
Address and new the primary database corresponding domain name between primary database switching.
In one embodiment, domain name supervising server is corresponding between primary database switching according to new primary database
Mapping relations between the inquiry of the domain name domain name and the network address of new primary database, the mapping relations that Delete query arrives.At
When function deletes inquired mapping relations, domain name supervising server establish the domain name and current primary database network address it
Between mapping relations.
In above-described embodiment, after the completion of the domain name switching of new primary database, worked as by the switching of domain name supervising server
The domain name of preceding primary database, to achieve the effect that current primary database and new primary database domain name are mutually exchanged.In this way, terminal
According to new primary database, corresponding domain name can the current primary database of successful access between primary database switching.
In one embodiment, primary database handover operation is carried out according to configuration file, obtaining new primary database includes:
According to configuration file from data-base cluster, selection target is from database;The current primary database is switched to target from number
According to library, new primary database is obtained.
Wherein, master-slave relationship refers in data-base cluster primary database and respectively from the corresponding relationship between database.Main number
There are read-write properties, i.e. support data write operation and data read operation according to library.There is read only attribute from database, i.e., only prop up
It holds data read operation and supports data write operation.Each number for being used to back up primary database from database in data-base cluster
According to the data updated in primary database can be synchronized to respectively from database, and the data backup that will be updated is to respectively from database.Main number
According to library and after the master-slave relationship foundation between database, can be synchronously written in primary database from primary database from database
Data.
It further include respectively being switched to from database for each configuration item from database, configuration file in data-base cluster
The priority tag of primary database, candidate respectively correspond to from Database Identification, non-candidate from Database Identification and respectively from database
Incremental data amount etc..The priority tag for being switched to primary database is accordingly cut from database in progress primary database for identifying
The priority of new primary database is selected as when changing.Priority tag will be current when carrying out primary database switching for expression
Primary database be switched to the priority tag it is corresponding from database a possibility that.Refer to from the corresponding incremental data amount of database
Current primary database is relative to the incremental data amount from database.Incremental data amount is the quantity of incremental data.Incremental data
Refer to current primary database and from the variance data between database.
Candidate can be selected as new primary database when carrying out primary database switching for identifying from Database Identification
Slave database.Candidate from Database Identification it is corresponding can be selected as when carrying out primary database switching from database it is new
Primary database.Non-candidate cannot be selected as new master data when carrying out primary database switching for identifying from Database Identification
The slave database in library.Non-candidate, which identifies, corresponding cannot be selected as new main number when carrying out primary database switching from database
According to library.
Specifically, current master data is successfully deleted in the expression that monitoring management server receives domain name supervising server feedback
When the prompt information of the mapping relations between the network address and domain name in library, according to configuration file obtain data-base cluster in respectively from
The corresponding configuration item of database, according to each from database selection target of the acquired configuration item in data-base cluster
From database.Current primary database in data-base cluster is switched to target from database by monitoring management server, is obtained new
Primary database.
In one embodiment, when monitoring management server obtains new primary database, new primary database is established respectively
With target is removed in data-base cluster from each master-slave relationship between database after database.
In one embodiment, monitoring management server carries out being configured to count from database by target when primary database switching
According to the master data of library cluster, new primary database is obtained, and configures current primary database to the slave database of data-base cluster,
Obtain new slave database.Monitoring management server establishes the master-slave relationship between new primary database and new slave database.
In one embodiment, monitoring management server is according to being respectively switched to primary database from database in configuration file
Priority tag from respectively from database selection target from database.For example, monitoring management server is according in configuration file
Priority tag is from the slave database for respectively selecting highest priority from database, as target from database.
In one embodiment, monitoring management server is according to the candidate in configuration file from Database Identification from respectively from number
Screen according to library from database, then from the slave database filtered out selection target from database.For example, from the slave data filtered out
The slave database that highest priority is selected in library, as target from database.
In one embodiment, monitoring management server is each from database in data-base cluster, determines that rejecting is non-
Candidate is corresponding from database from Database Identification, then from the identified selection target from database from database.For example, from
It is identified to select incremental data amount the smallest from database from database, as target from database.
In above-described embodiment, the target of new primary database is chosen for use as from data-base cluster according to configuration file from number
According to library, current primary database is switched to target from database, is received with substituting current primary database using new primary database
The write operation of terminal.
In one embodiment, configuration file includes current primary database and respectively from the corresponding computer room mark of database
Know;According to configuration file from data-base cluster, selection target from database, including:According to the corresponding machine of current primary database
Room mark, and respectively screened from data-base cluster from database from the corresponding computer room mark of database;According to configuration file
Selection target is from database from the slave database filtered out.
Wherein, computer room mark is used for unique identification computer room.Computer room mark can by number, letter and symbol etc. at least
A kind of composition.Each database disposed in computer room is corresponding with the computer room of computer room mark.
Specifically, monitoring management server obtained respectively according to configuration file primary database in data-base cluster and respectively from
The corresponding computer room mark of database, identifies according to acquired primary database and respectively from the corresponding computer room of database,
The slave number that computer room mark corresponding with primary database matches is identified from each computer room that screens from database in data-base cluster
According to library.Monitoring management server according in configuration file, filter out it is each from the corresponding configuration item of database, from being screened
Each slave database selected from database out.
In one embodiment, the corresponding computer room mark of primary database is determined as candidate computer room mark by monitoring management server
Know, be determined as candidate from database from database for candidate computer room mark is corresponding, according to configuration file from candidate from data
Selection target is from database in library.Wherein, according to configuration file from candidate method of the selection target from database from database
It can refer to method provided in above-mentioned more than one embodiment.
In one embodiment, in the cluster of monitoring management server based on data library primary database and respectively from database respectively
Corresponding computer room mark is respectively determining that rejecting computer room identifies what computer room mark corresponding with primary database matched from database
From the slave database after database, according to the configuration item in configuration file from the identified selection target from database from data
Library.
In one embodiment, monitoring management server determines each from data in data-base cluster according to configuration file
Library obtains respectively from the corresponding configuration information of database respectively, is respectively being screened from database from data according to configuration information
Library, then from the slave database filtered out selection target from database.Wherein, configuration information is pre-configured in from database
Information, for example whether there is binary log file.In one embodiment, monitoring management server is according to configuration information to root
Screened again according to the slave database that filters out of computer room mark, so from the slave database filtered out again selection target from
Database.
In above-described embodiment, according to the corresponding computer room mark of database each in data-base cluster from data-base cluster
It is each from database screening from database, then from the slave database filtered out, selection target improves in this way from database
From the efficiency of selection of database, to improve the switching efficiency of primary database.
In one embodiment, current primary database is switched to target from database, obtaining new primary database includes:
The read-write properties parameter of current primary database is updated to read only attribute parameter;According to the data of current primary database more fresh target
From the data in database;When target is consistent with current primary database data from database, by target from the read-only of database
Property parameters are updated to read-write properties parameter, obtain new primary database.
Wherein, read-write properties refer to readable writeable characteristic attribute.Read-write properties specifically refer to writable data and readable
The characteristic attribute for evidence of fetching.Read-write properties are for indicating that primary database supports data write-in and support reading data.Read only attribute
Refer to only readable not writeable characteristic attribute.Read only attribute specifically refers to that data can be read but the feature of data cannot be written
Attribute.Read only attribute is for indicating to support reading data from database but not supporting data to be written.
Specifically, monitoring management server according to configuration file selection target is from database in data-base cluster when, will
The read-write properties parameter of current primary database is updated to read only attribute parameter, configures the read-write properties of current primary database to
Read only attribute.Further, monitoring management server determines incremental data of the current primary database relative to target from database,
According to identified incremental data more fresh target from the data of database, i.e., identified incremental data is backed up into target from number
According to library.When target is updated from the data of database to be completed, the target is consistent with current primary database data from database, monitoring
Target is updated to read-write properties parameter from the read only attribute parameter of database by management server, by target from database only
Reading attribute configuration is read-write properties, to obtain new primary database.
In one embodiment, when monitoring management server obtains new primary database, the new master data is determined respectively
Library respectively corresponds update respectively from the number of database according to identified incremental data relative to respectively from the incremental data of database
According to.When new primary database with it is respectively consistent from the data of database when, establish respectively new primary database with respectively from database it
Between master-slave relationship.
In above-described embodiment, when current primary database is switched to selected target from database, by current master data
The attribute-readable in library is configured to read only attribute, so that current primary database cannot be successfully written to data, to guarantee data
Consistency.Further, read-write properties are configured from the read only attribute of database by target, so that new primary database can
It is successfully written to data.
In one embodiment, above-mentioned primary database domain name method for handover control further includes:Obtain configuration file;According to
Configuration file determines current primary database;Designated field data is written to current primary database;When determining write-in failure, execute
The step of sending domain name illegal command to domain name supervising server.
Wherein, designated field data is preassigned field value, such as the corresponding timestamp of current time.Write-in failure
Refer to and designated field data is written in primary database not successfully.
Specifically, monitoring management server obtains configuration file from local according to predetermined period, according to acquired configuration
Principal and subordinate's role identification in file determines the current primary database in data-base cluster, and determined by being obtained according to configuration file
The network address of current primary database.Monitoring management server obtains designated field data, by acquired designated field data
Current primary database is written according to acquired network address.When determining to fail to primary database write-in designated field data,
Monitoring management server determines current primary database operation troubles, sends domain name illegal command to domain name supervising server, in turn
Triggering switches current primary database.
In one embodiment, when reaching preset duration to current primary database write-in designated field data, monitoring pipe
Still the designated field data is written to current primary database not successfully in reason server, then determines write-in failure.In one embodiment
In, when determining write-in failure, monitoring management server generates write-in control instruction, and write-in control instruction generated is sent out
It send to monitoring server, determines current master to indicate monitoring server by the way that designated field data is written to current primary database
The operating condition of database.
In one embodiment, in current primary database operation troubles, monitoring management server is obtained according to configuration file
The corresponding network address with external equipment of server where taking current primary database is sent according to the network address to band external equipment
Indicate the out code of the closing power supply with server corresponding to external equipment.With external equipment according to the out code received
Dedicated management channel by being different from data network controls the power supply of respective server, to reach the effect for closing the server
Fruit.Wherein, it is arranged in the hardware device on server with external equipment, passes through the power supply of dedicated management channel control server.
In above-described embodiment, by the way that the operation that designated field data monitors current primary database is written to current primary database
Situation shows current primary database operation troubles when determining write-in failure, then will current main number by domain name supervising server
It is set in vain according to the domain name in library, so that current primary database cannot be successfully written to data, to guarantee data consistency.Into
One step, triggering switches current primary database, so that new primary database can be successfully written to data, to guarantee data
The normal operation of library cluster.
In one embodiment, above-mentioned primary database domain name method for handover control further includes:When determining write-in failure,
Triggering generates the warning information for indicating primary database failure;Warning information is pushed into terminal.
Wherein, warning information is the information for triggering alarm.Specifically, when monitoring management server is to current master data
When designated field data failure is written in library, show current primary database operation troubles, monitoring management server triggers, which generate, to be indicated
The warning information of primary database failure, and warning information generated is sent to terminal, to pass through terminal for announcement generated
Alert information shows user.
In one embodiment, when primary database handover operation is completed, monitoring management server passes through short message or electronics
Mail pushes the switching result that the secondary primary database switches to terminal.In one embodiment, monitoring management server creation prison
Managing process is controlled, the primary database domain name switching control side in the various embodiments described above is realized by the monitoring management process created
Method.When, the expression corresponding with the first domain name switching control instruction that receive domain name supervising server feedback are successfully established mapping
When the prompt information of relationship, the monitoring management process that monitoring management server closing is created, and re-create monitoring management
Process is continued to execute the primary database domain name method for handover control in each embodiment by the monitoring management process re-created.
In above-described embodiment, in current primary database operation troubles, warning information is triggered, is enabled a user in time
Recognize the operating condition of the current primary database in the data-base cluster.
As shown in figure 3, in one embodiment, providing a kind of primary database domain name method for handover control, this method tool
Body includes the following steps:
S302 receives the primary database switching command that terminal is sent.
S304 obtains the corresponding configuration file of data-base cluster according to primary database switching command;Configuration file includes number
According to the network address and domain name of the current primary database in the cluster of library.
S306 sends domain name illegal command to domain name supervising server according to configuration file;Domain name illegal command is for referring to
Show domain name supervising server, deletes the mapping relations between the network address and domain name of current primary database.
S308, when receive domain name supervising server feedback the network address for indicating successfully to delete current primary database and
When the first prompt information of the mapping relations between domain name, identified according to the corresponding computer room of current primary database, and respectively from data
The corresponding computer room mark in library is screened from data-base cluster from database.
S310, according to configuration file from the slave database filtered out selection target from database.
The read-write properties parameter of current primary database is updated to read only attribute parameter by S312.
S314, according to the data of current primary database more fresh target from the data in database.
S316, when target is consistent with current primary database data from database, by target from the read only attribute of database
Parameter is updated to read-write properties parameter, obtains new primary database.
S318 sends the first domain name switching command to domain name supervising server when primary database handover operation is completed;The
One domain name switching command is used to indicate the network address and current primary database that domain name supervising server establishes new primary database
Domain name between mapping relations.
S320, when receiving second prompt information of the domain name supervising server corresponding to the first domain name switching command feedback,
The second domain name switching command is sent to domain name supervising server;Second domain name switching command is used to indicate domain name supervising server and builds
Found the mapping relations between the network address of current primary database and the domain name of new primary database.
S322 obtains configuration file.
S324 determines current primary database according to configuration file.
Designated field data is written to current primary database in S326;When determining write-in failure, step S306 is executed.
In above-described embodiment, primary database switching command is received or by the way that specific field is written to current primary database
When database determines current primary database operation troubles, triggering switches current primary database, to realize main number in data-base cluster
According to the transfer of library failure, to guarantee that primary database can be by successful access.Specifically, it will currently be led before primary database switching
The domain name of database is set in vain, and to guarantee data consistency, primary database handover operation is after the completion according to current primary database
Domain name update the domain name of new primary database, to guarantee what terminal can be new according to the domain name successful access of current primary database
Primary database.
It should be understood that although each step in the flow chart of Fig. 2 and Fig. 3 is successively shown according to the instruction of arrow,
But these steps are not that the inevitable sequence according to arrow instruction successively executes.Unless expressly state otherwise herein, these
There is no stringent sequences to limit for the execution of step, these steps can execute in other order.Moreover, in Fig. 2 and Fig. 3
At least part step may include that perhaps these sub-steps of multiple stages or stage are not necessarily same to multiple sub-steps
One moment executed completion, but can execute at different times, and the execution in these sub-steps or stage sequence is also not necessarily
Be successively carry out, but can at least part of the sub-step or stage of other steps or other steps in turn or
Alternately execute.
In one embodiment, as shown in figure 4, providing a kind of primary database domain name switching control 400, including:
Receiving module 401 obtains module 402, the first sending module 403, switching module 404 and the second sending module 405, wherein:
Receiving module 401, for receiving the primary database switching command of terminal transmission.
Module 402 is obtained, for obtaining the corresponding configuration file of data-base cluster according to primary database switching command;Configuration
File includes the network address and domain name of the current primary database in data-base cluster.
First sending module 403, for sending domain name illegal command to domain name supervising server according to configuration file;Domain name
Illegal command is used to indicate domain name supervising server, and the mapping deleted between the network address and domain name of current primary database is closed
System.
Switching module 404, for successfully deleting current primary database when the expression for receiving domain name supervising server feedback
Network address and domain name between mapping relations the first prompt information when, according to configuration file carry out primary database switching behaviour
Make, obtains new primary database.
Second sending module 405, for sending first to domain name supervising server when primary database handover operation is completed
Domain name switching command;First domain name switching command is used to indicate the network address that domain name supervising server establishes new primary database
Mapping relations between the domain name of current primary database.
As shown in figure 5, in one embodiment, primary database domain name switching control 400 further includes:Third sends mould
Block 406.Third sending module 406, for being successfully established new master data when the expression for receiving domain name supervising server feedback
When the second prompt information of the mapping relations between the network address in library and the domain name of current primary database, to domain name supervising service
Device sends the second domain name switching command;Second domain name switching command is used to indicate domain name supervising server and establishes current primary database
Network address and new primary database domain name between mapping relations.
In one embodiment, switching module 404 are also used to according to configuration file from data-base cluster, selection target
From database;Current primary database is switched to target from database, obtains new primary database.
In one embodiment, configuration file includes current primary database and respectively from the corresponding computer room mark of database
Know;Switching module 404 is also used to according to the corresponding computer room mark of current primary database, and respectively from the corresponding machine of database
Room mark is screened from data-base cluster from database;According to configuration file from the slave database filtered out selection target from number
According to library.
In one embodiment, switching module 404 are also used to for the read-write properties parameter of current primary database being updated to only
Read property parameters;According to the data of current primary database more fresh target from the data in database;When target from database with work as
When preceding primary database data are consistent, target is updated to read-write properties parameter from the read only attribute parameter of database, is obtained new
Primary database.
In one embodiment, primary database domain name switching control 400 further includes:Primary database monitoring module 407.
Primary database monitoring module 407, for obtaining configuration file;Current primary database is determined according to configuration file;To current main number
Designated field data is written according to library;When determining write-in failure, so that the first sending module 403 is executed to domain name supervising server
The step of sending domain name illegal command.
In one embodiment, primary database monitoring module 407 is also used to when determining write-in failure, and triggering generates table
Show the warning information of primary database failure;Warning information is pushed into terminal.
Specific restriction about primary database domain name switching control may refer to above for primary database domain name
The restriction of method for handover control, details are not described herein.Modules in above-mentioned primary database domain name switching control can be complete
Portion or part are realized by software, hardware and combinations thereof.Above-mentioned each module can be embedded in the form of hardware or independently of calculating
In processor in machine equipment, it can also be stored in a software form in the memory in computer equipment, in order to processor
It calls and executes the corresponding operation of the above modules.
In one embodiment, a kind of computer equipment is provided, which can be server, internal junction
Composition can be as shown in Figure 6.The computer equipment include by system bus connect processor, memory, network interface and
Database.Wherein, the processor of the computer equipment is for providing calculating and control ability.The memory packet of the computer equipment
Include non-volatile memory medium, built-in storage.The non-volatile memory medium is stored with operating system, computer program and data
Library.The built-in storage provides environment for the operation of operating system and computer program in non-volatile memory medium.The calculating
The database of machine equipment is used for storage configuration file.The network interface of the computer equipment is used to pass through network with external terminal
Connection communication.To realize a kind of primary database domain name method for handover control when the computer program is executed by processor.
It will be understood by those skilled in the art that structure shown in Fig. 6, only part relevant to application scheme is tied
The block diagram of structure does not constitute the restriction for the computer equipment being applied thereon to application scheme, specific computer equipment
It may include perhaps combining certain components or with different component layouts than more or fewer components as shown in the figure.
In one embodiment, a kind of computer equipment, including memory and processor are provided, which is stored with
Computer program, the processor realize following steps when executing computer program:The primary database switching that terminal is sent is received to refer to
It enables;The corresponding configuration file of data-base cluster is obtained according to primary database switching command;Configuration file includes in data-base cluster
Current primary database network address and domain name;Domain name illegal command is sent to domain name supervising server according to configuration file;
Domain name illegal command is used to indicate domain name supervising server, deletes the mapping between the network address and domain name of current primary database
Relationship;When receiving the first prompt information corresponding with domain name illegal command of domain name supervising server feedback, according to configuration text
Part carries out primary database handover operation, obtains new primary database;When primary database handover operation is completed, taken to domain name supervising
Business device sends the first domain name switching command;First domain name switching command is used to indicate domain name supervising server and establishes new master data
Mapping relations between the network address in library and the domain name of current primary database.
In one embodiment, following steps are also realized when processor executes computer program:When receiving domain name supervising
The expression of server feedback is successfully established the mapping between the network address of new primary database and the domain name of current primary database
When the second prompt information of relationship, the second domain name switching command is sent to domain name supervising server;Second domain name switching command is used
The mapping between the network address of current primary database and the domain name of new primary database is established in instruction domain name management server
Relationship.
In one embodiment, primary database handover operation is carried out according to configuration file, obtaining new primary database includes:
According to configuration file from data-base cluster, selection target is from database;Current primary database is switched to target from database,
Obtain new primary database.
In one embodiment, configuration file includes current primary database and respectively from the corresponding computer room mark of database
Know;According to configuration file from data-base cluster, selection target from database, including:According to the corresponding machine of current primary database
Room mark, and respectively screened from data-base cluster from database from the corresponding computer room mark of database;According to configuration file
Selection target is from database from the slave database filtered out.
In one embodiment, current primary database is switched to target from database, obtaining new primary database includes:
The read-write properties parameter of current primary database is updated to read only attribute parameter;According to the data of current primary database more fresh target
From the data in database;When target is consistent with current primary database data from database, by target from the read-only of database
Property parameters are updated to read-write properties parameter, obtain new primary database.
In one embodiment, following steps are also realized when processor executes computer program:Obtain configuration file;According to
Configuration file determines current primary database;Designated field data is written to current primary database;When determining write-in failure, execute
The step of sending domain name illegal command to domain name supervising server.
In one embodiment, following steps are also realized when processor executes computer program:When determining write-in failure,
Triggering generates the warning information for indicating primary database failure;Warning information is pushed into terminal.
In one embodiment, a kind of computer readable storage medium is provided, computer program is stored thereon with, is calculated
Machine program realizes following steps when being executed by processor:Receive the primary database switching command that terminal is sent;According to primary database
Switching command obtains the corresponding configuration file of data-base cluster;Configuration file includes the current primary database in data-base cluster
Network address and domain name;Domain name illegal command is sent to domain name supervising server according to the configuration file;Domain name illegal command
It is used to indicate domain name supervising server, deletes the mapping relations between the network address and domain name of current primary database;Work as reception
To domain name supervising server feedback indicate successfully delete the mapping relations between the network address and domain name of current primary database
The first prompt information when, according to configuration file carry out primary database handover operation, obtain new primary database;Work as primary database
When handover operation is completed, the first domain name switching command is sent to domain name supervising server;First domain name switching command is used to indicate
Domain name supervising server establishes the mapping relations between the network address of new primary database and the domain name of current primary database.
In one embodiment, following steps are also realized when computer program is executed by processor:When receiving domain name pipe
The expression of reason server feedback is successfully established reflecting between the network address of new primary database and the domain name of current primary database
When penetrating the second prompt information of relationship, the second domain name switching command is sent to domain name supervising server;Second domain name switching command
It is used to indicate domain name supervising server and establishes reflecting between the network address of current primary database and the domain name of new primary database
Penetrate relationship.
In one embodiment, primary database handover operation is carried out according to configuration file, obtaining new primary database includes:
According to configuration file from data-base cluster, selection target is from database;Current primary database is switched to target from database,
Obtain new primary database.
In one embodiment, configuration file includes current primary database and respectively from the corresponding computer room mark of database
Know;According to configuration file from data-base cluster, selection target from database, including:According to the corresponding machine of current primary database
Room mark, and respectively screened from data-base cluster from database from the corresponding computer room mark of database;According to configuration file
Selection target is from database from the slave database filtered out.
In one embodiment, current primary database is switched to target from database, obtaining new primary database includes:
The read-write properties parameter of current primary database is updated to read only attribute parameter;According to the data of current primary database more fresh target
From the data in database;When target is consistent with current primary database data from database, by target from the read-only of database
Property parameters are updated to read-write properties parameter, obtain new primary database.
In one embodiment, following steps are also realized when computer program is executed by processor:Obtain configuration file;Root
Current primary database is determined according to configuration file;Designated field data is written to current primary database;When determining write-in failure, hold
The step of row sends domain name illegal command to domain name supervising server.
In one embodiment, following steps are also realized when computer program is executed by processor:Fail when determining to be written
When, triggering generates the warning information for indicating primary database failure;Warning information is pushed into terminal.
Those of ordinary skill in the art will appreciate that realizing all or part of the process in above-described embodiment method, being can be with
Relevant hardware is instructed to complete by computer program, the computer program can be stored in a non-volatile computer
In read/write memory medium, the computer program is when being executed, it may include such as the process of the embodiment of above-mentioned each method.Wherein,
To any reference of memory, storage, database or other media used in each embodiment provided herein,
Including non-volatile and/or volatile memory.Nonvolatile memory may include read-only memory (ROM), programming ROM
(PROM), electrically programmable ROM (EPROM), electrically erasable ROM (EEPROM) or flash memory.Volatile memory may include
Random access memory (RAM) or external cache.By way of illustration and not limitation, RAM is available in many forms,
Such as static state RAM (SRAM), dynamic ram (DRAM), synchronous dram (SDRAM), double data rate sdram (DDRSDRAM), enhancing
Type SDRAM (ESDRAM), synchronization link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM
(RDRAM), direct memory bus dynamic ram (DRDRAM) and memory bus dynamic ram (RDRAM) etc..
Each technical characteristic of above embodiments can be combined arbitrarily, for simplicity of description, not to above-described embodiment
In each technical characteristic it is all possible combination be all described, as long as however, the combination of these technical characteristics be not present lance
Shield all should be considered as described in this specification.
The several embodiments of the application above described embodiment only expresses, the description thereof is more specific and detailed, but simultaneously
It cannot therefore be construed as limiting the scope of the patent.It should be pointed out that coming for those of ordinary skill in the art
It says, without departing from the concept of this application, various modifications and improvements can be made, these belong to the protection of the application
Range.Therefore, the scope of protection shall be subject to the appended claims for the application patent.
Claims (10)
1. a kind of primary database domain name method for handover control, the method includes:
Receive the primary database switching command that terminal is sent;
The corresponding configuration file of data-base cluster is obtained according to the primary database switching command;The configuration file includes described
The network address and domain name of current primary database in data-base cluster;
Domain name illegal command is sent to domain name supervising server according to the configuration file;Domain name illegal command is used to indicate
Domain name management server deletes the mapping relations between the network address and domain name of the current primary database;
When receive domain name management server feedback indicates successfully to delete the network address of the current primary database with
When the first prompt information of the mapping relations between domain name, primary database handover operation is carried out according to the configuration file, is obtained
New primary database;
When primary database handover operation is completed, the first domain name switching command is sent to domain name management server;Described
One domain name switching command is used to indicate domain name management server and establishes the network address of the new primary database and described
Mapping relations between the domain name of current primary database.
2. the method according to claim 1, wherein the method also includes:
When expressions for receiving domain name management server feedback be successfully established the network address of the new primary database with
When the second prompt information of the mapping relations between the domain name of the current primary database, sent to domain name management server
Second domain name switching command;
The second domain name switching command is used to indicate the network that domain name management server establishes the current primary database
Mapping relations between address and the domain name of the new primary database.
3. the method according to claim 1, wherein described carry out primary database switching according to the configuration file
Operation, obtains new primary database, including:
According to the configuration file from the data-base cluster, selection target is from database;
The current primary database is switched to the target from database, obtains new primary database.
4. according to the method described in claim 3, it is characterized in that, the configuration file includes the current primary database and institute
It states respectively from the corresponding computer room mark of database;It is described according to the configuration file from the data-base cluster, select mesh
It marks from database, including:
According to the corresponding computer room mark of the current primary database and described respectively from the corresponding computer room mark of database from institute
It states in data-base cluster and screens from database;
According to configuration file from the slave database filtered out selection target from database.
5. according to the method described in claim 3, it is characterized in that, described be switched to the target for the current primary database
From database, new primary database is obtained, including:
The read-write properties parameter of the current primary database is updated to read only attribute parameter;
The target is updated from the data in database according to the data of the current primary database;
When the target is consistent with the current primary database data from database, by the target from the read-only category of database
Property parameter is updated to read-write properties parameter, obtains new primary database.
6. method according to any one of claims 1 to 5, which is characterized in that the method also includes:
Obtain configuration file;
Current primary database is determined according to the configuration file;
Designated field data is written to the current primary database;
When determining write-in failure, described the step of sending domain name illegal command to domain name supervising server is executed.
7. according to the method described in claim 6, it is characterized in that, the method also includes:
When determining write-in failure, triggering generates the warning information for indicating primary database failure;
The warning information is pushed into the terminal.
8. a kind of primary database domain name switching control, which is characterized in that described device includes:
Receiving module, for receiving the primary database switching command of terminal transmission;
Module is obtained, for obtaining the corresponding configuration file of data-base cluster according to the primary database switching command;It is described to match
Set the network address and domain name that file includes the current primary database in the data-base cluster;
First sending module, for sending domain name illegal command to domain name supervising server according to the configuration file;The domain
Name illegal command is used to indicate domain name management server, between the network address and domain name for deleting the current primary database
Mapping relations;
Switching module, for successfully deleting the current primary database when the expression for receiving domain name management server feedback
Network address and domain name between mapping relations the first prompt information when, according to the configuration file carry out primary database cut
Operation is changed, new primary database is obtained;
Second sending module, for sending the first domain to domain name management server when primary database handover operation is completed
Name switching command;The first domain name switching command is used to indicate domain name management server and establishes the new primary database
Network address and the current primary database domain name between mapping relations.
9. a kind of computer equipment, including memory and processor, the memory are stored with computer program, feature exists
In the step of processor realizes any one of claims 1 to 7 the method when executing the computer program.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the computer program
The step of method described in any one of claims 1 to 7 is realized when being executed by processor.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810551524.8A CN108900572B (en) | 2018-05-31 | 2018-05-31 | Main database domain name switching control method, computer equipment and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810551524.8A CN108900572B (en) | 2018-05-31 | 2018-05-31 | Main database domain name switching control method, computer equipment and storage medium |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108900572A true CN108900572A (en) | 2018-11-27 |
CN108900572B CN108900572B (en) | 2022-08-09 |
Family
ID=64343654
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810551524.8A Active CN108900572B (en) | 2018-05-31 | 2018-05-31 | Main database domain name switching control method, computer equipment and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108900572B (en) |
Cited By (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110968568A (en) * | 2019-12-04 | 2020-04-07 | 常熟理工学院 | Database management system |
CN111865632A (en) * | 2019-04-28 | 2020-10-30 | 阿里巴巴集团控股有限公司 | Switching method of distributed data storage cluster and switching instruction sending method and device |
CN111897677A (en) * | 2020-07-15 | 2020-11-06 | 中国工商银行股份有限公司 | Database switching method and device, and communication method and device |
CN112199356A (en) * | 2020-12-09 | 2021-01-08 | 北京顺达同行科技有限公司 | Fault processing method, device, server and storage medium |
CN112437166A (en) * | 2020-10-30 | 2021-03-02 | 四川新网银行股份有限公司 | Automatic switching method for MySQL database domain names |
Citations (16)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7197660B1 (en) * | 2002-06-26 | 2007-03-27 | Juniper Networks, Inc. | High availability network security systems |
CN101227333A (en) * | 2008-02-02 | 2008-07-23 | 中兴通讯股份有限公司 | Disaster tolerance network managing system and login method of network managing subscriber end |
CN101571813A (en) * | 2009-01-04 | 2009-11-04 | 四川川大智胜软件股份有限公司 | Master/slave scheduling method in multimachine assembly |
CN102629260A (en) * | 2012-02-29 | 2012-08-08 | 浪潮(北京)电子信息产业有限公司 | Processing method, device and system for database collapse |
CN102739453A (en) * | 2012-07-03 | 2012-10-17 | 华为软件技术有限公司 | Master-standby switching method, device and system |
CN103248725A (en) * | 2013-05-23 | 2013-08-14 | 中国科学院计算机网络信息中心 | Safe and reliable domain name resolution repairing method and system |
US20140245423A1 (en) * | 2013-02-26 | 2014-08-28 | Zentera Systems, Inc. | Peripheral Firewall System for Application Protection in Cloud Computing Environments |
CN104516966A (en) * | 2014-12-24 | 2015-04-15 | 北京奇虎科技有限公司 | High-availability solving method and device of database cluster |
CN104539462A (en) * | 2015-01-09 | 2015-04-22 | 北京京东尚科信息技术有限公司 | Method and device for switching disaster recovery application example |
CN105262835A (en) * | 2015-10-30 | 2016-01-20 | 北京奇虎科技有限公司 | Data storage method and device of multiple machine rooms |
CN106909568A (en) * | 2015-12-23 | 2017-06-30 | 北京奇虎科技有限公司 | A kind of changing method and device of data-base cluster MDL |
WO2017128992A1 (en) * | 2016-01-26 | 2017-08-03 | 阿里巴巴集团控股有限公司 | Method, device and system for migrating physical machine data to cloud |
CN107015885A (en) * | 2016-07-12 | 2017-08-04 | 阿里巴巴集团控股有限公司 | Service providing method, system and configuration center when primary standby data storehouse switches |
CN107451147A (en) * | 2016-05-31 | 2017-12-08 | 北京京东尚科信息技术有限公司 | A kind of method and apparatus of kafka clusters switching at runtime |
CN107465556A (en) * | 2017-09-07 | 2017-12-12 | 郑州云海信息技术有限公司 | A kind of switching method of active/standby server, apparatus and system |
US20170359853A1 (en) * | 2014-12-24 | 2017-12-14 | Beijing Qihoo Technology Company Limited | Data complementing method and apparatus |
-
2018
- 2018-05-31 CN CN201810551524.8A patent/CN108900572B/en active Active
Patent Citations (16)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US7197660B1 (en) * | 2002-06-26 | 2007-03-27 | Juniper Networks, Inc. | High availability network security systems |
CN101227333A (en) * | 2008-02-02 | 2008-07-23 | 中兴通讯股份有限公司 | Disaster tolerance network managing system and login method of network managing subscriber end |
CN101571813A (en) * | 2009-01-04 | 2009-11-04 | 四川川大智胜软件股份有限公司 | Master/slave scheduling method in multimachine assembly |
CN102629260A (en) * | 2012-02-29 | 2012-08-08 | 浪潮(北京)电子信息产业有限公司 | Processing method, device and system for database collapse |
CN102739453A (en) * | 2012-07-03 | 2012-10-17 | 华为软件技术有限公司 | Master-standby switching method, device and system |
US20140245423A1 (en) * | 2013-02-26 | 2014-08-28 | Zentera Systems, Inc. | Peripheral Firewall System for Application Protection in Cloud Computing Environments |
CN103248725A (en) * | 2013-05-23 | 2013-08-14 | 中国科学院计算机网络信息中心 | Safe and reliable domain name resolution repairing method and system |
US20170359853A1 (en) * | 2014-12-24 | 2017-12-14 | Beijing Qihoo Technology Company Limited | Data complementing method and apparatus |
CN104516966A (en) * | 2014-12-24 | 2015-04-15 | 北京奇虎科技有限公司 | High-availability solving method and device of database cluster |
CN104539462A (en) * | 2015-01-09 | 2015-04-22 | 北京京东尚科信息技术有限公司 | Method and device for switching disaster recovery application example |
CN105262835A (en) * | 2015-10-30 | 2016-01-20 | 北京奇虎科技有限公司 | Data storage method and device of multiple machine rooms |
CN106909568A (en) * | 2015-12-23 | 2017-06-30 | 北京奇虎科技有限公司 | A kind of changing method and device of data-base cluster MDL |
WO2017128992A1 (en) * | 2016-01-26 | 2017-08-03 | 阿里巴巴集团控股有限公司 | Method, device and system for migrating physical machine data to cloud |
CN107451147A (en) * | 2016-05-31 | 2017-12-08 | 北京京东尚科信息技术有限公司 | A kind of method and apparatus of kafka clusters switching at runtime |
CN107015885A (en) * | 2016-07-12 | 2017-08-04 | 阿里巴巴集团控股有限公司 | Service providing method, system and configuration center when primary standby data storehouse switches |
CN107465556A (en) * | 2017-09-07 | 2017-12-12 | 郑州云海信息技术有限公司 | A kind of switching method of active/standby server, apparatus and system |
Non-Patent Citations (2)
Title |
---|
ANDRÉ ORIANI: "《From Backup to Hot Standby: High Availability for HDFS》", 《 2012 IEEE 31ST SYMPOSIUM ON RELIABLE DISTRIBUTED SYSTEMS》 * |
朱祥磊: "《跨数据中心高可用DNS技术在BOSS中的研究和应用》", 《2013年度全国无线及移动通信学术大会》 * |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN111865632A (en) * | 2019-04-28 | 2020-10-30 | 阿里巴巴集团控股有限公司 | Switching method of distributed data storage cluster and switching instruction sending method and device |
CN110968568A (en) * | 2019-12-04 | 2020-04-07 | 常熟理工学院 | Database management system |
CN110968568B (en) * | 2019-12-04 | 2023-08-18 | 常熟理工学院 | Database management system |
CN111897677A (en) * | 2020-07-15 | 2020-11-06 | 中国工商银行股份有限公司 | Database switching method and device, and communication method and device |
CN112437166A (en) * | 2020-10-30 | 2021-03-02 | 四川新网银行股份有限公司 | Automatic switching method for MySQL database domain names |
CN112199356A (en) * | 2020-12-09 | 2021-01-08 | 北京顺达同行科技有限公司 | Fault processing method, device, server and storage medium |
CN112199356B (en) * | 2020-12-09 | 2021-07-30 | 北京顺达同行科技有限公司 | Fault processing method, device, server and storage medium |
Also Published As
Publication number | Publication date |
---|---|
CN108900572B (en) | 2022-08-09 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108900572A (en) | Primary database domain name method for handover control, computer equipment and storage medium | |
CN108932295B (en) | Main database switching control method and device, computer equipment and storage medium | |
CN110069572A (en) | HIVE method for scheduling task, device, equipment and storage medium based on big data platform | |
CN108897658B (en) | Method and device for monitoring master database, computer equipment and storage medium | |
CN108897638B (en) | Data backup method and device, computer equipment and storage medium | |
CN110166278A (en) | Kubernetes cluster building method, apparatus, computer equipment and storage medium | |
CN107220142A (en) | Perform the method and device of data recovery operation | |
CN109542635A (en) | Configuration information update method, apparatus, computer equipment and storage medium | |
CN108599971A (en) | Configuring information processing method, system, computer equipment and storage medium | |
CN101867650A (en) | Method and device for protecting user behavior at operating terminal | |
CN103369660A (en) | Network-element data synchronization method and network-element device | |
CN108694218A (en) | A kind of method and apparatus data write-in and read | |
CN103379476A (en) | Terminal and contact information updating method | |
CN107770207A (en) | The method of data syn-chronization between multi-terminal equipment | |
CN109491772A (en) | Business serial number gencration method, apparatus, computer equipment and storage medium | |
CN109241182A (en) | Big data real-time synchronization method, device, computer equipment and storage medium | |
CN112632375A (en) | Session information processing method, server and storage medium | |
CN113835369A (en) | Edge terminal scene management method, device and system | |
CN106911769B (en) | Cloud platform routing data processing method and physical server of cloud platform | |
CN108512948A (en) | Address book updating method, device, computer equipment and storage medium | |
CN111130991A (en) | Instant messaging information processing method and device, computer equipment and storage medium | |
CN108880884A (en) | O&M alarm reporting method, device, computer equipment and storage medium | |
CN111107120B (en) | Redis cluster construction method and system | |
CN112988879A (en) | Method, system, device, storage medium and processor for accessing database | |
CN115835370A (en) | Network distribution method, device, equipment and medium for intelligent equipment |
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 |