CN106294795A - A kind of data base's changing method and system - Google Patents

A kind of data base's changing method and system Download PDF

Info

Publication number
CN106294795A
CN106294795A CN201610670132.4A CN201610670132A CN106294795A CN 106294795 A CN106294795 A CN 106294795A CN 201610670132 A CN201610670132 A CN 201610670132A CN 106294795 A CN106294795 A CN 106294795A
Authority
CN
China
Prior art keywords
data base
application server
file
data
changing method
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.)
Pending
Application number
CN201610670132.4A
Other languages
Chinese (zh)
Inventor
王云陈
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hefei Midea Intelligent Technologies Co Ltd
Original Assignee
Hefei Hualing Co Ltd
Midea Group Co Ltd
Hefei Midea Refrigerator Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hefei Hualing Co Ltd, Midea Group Co Ltd, Hefei Midea Refrigerator Co Ltd filed Critical Hefei Hualing Co Ltd
Priority to CN201610670132.4A priority Critical patent/CN106294795A/en
Publication of CN106294795A publication Critical patent/CN106294795A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1458Management of the backup or restore process
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2201/00Indexing scheme relating to error detection, to error correction, and to monitoring
    • G06F2201/80Database-specific techniques

Abstract

The invention discloses a kind of data base's changing method and system, this changing method includes the steps, first, builds the Database Systems with Double Data storehouse;Secondly, analysis show that data base A works;Again, monitor data base A, if abnormal, then data base A is switched to data base B.This switched system includes data base A, data base B, application server and controls server, and data base A and data base B is identical data base, and under controlling server effect, application server is connected with data base A or data base B.The present invention can automatic data-detection storehouse abnormal, immediately intelligence can switch when data base occurs exception, considerably reduce application server downtime, when data base occurs abnormal, the present invention can automatically switch process, need not artificial treatment, save artificial workload;It addition, the present invention was notified and prompting operation personnel by the form of note or mail in the abnormal very first time occurred.

Description

A kind of data base's changing method and system
Technical field
The present invention relates to database technical field, specifically for, be a kind of data base's changing method and system.
Background technology
Data base's calamity is standby, full name data base's disaster recovery, refers to as preventing operational error or the system failure causes number According to loss, and total system or part data acquisition system are copied to from the hard disk of applied host machine or array the mistake of other storage mediums Journey, the solution of traditional data base's disaster mainly has following two kind.
(1) only one of which application data base, the most artificially solves problem when only occurring the problems such as data base's paralysis.This Although mode is simple, but, if it occur that catastrophic discontinuityfailure, whole system is difficult to timely respond to and repair, application service Device cannot normally will work in for a long time, and downtime is the longest.
(2) master-slave back-up, carries out data backup by other equipment to main frame.Such as, this mode is similar to pass through Emergent storehouse server generation is for storage facility located at processing plant server, when storage facility located at processing plant server fail, uses correlation means to be taken by storage facility located at processing plant The content of business device imports in the server of emergent storehouse, but, under this backup mode, main frame and cannot realize automatically cutting from machine Changing, it is still necessary to manual hand manipulation, application server cannot normally will work in for a long time, application server downtime The longest, and, the method has to rely on third party software, it is impossible to independent realization, it addition, the method main frame often occurs and from machine The problem that data are inconsistent.
Therefore, fundamentally on the basis of settlement server crash issue, existing skill cannot how be solved in prior art The downtime length of application server, repair process that art exists rely on the database problems such as manual operation excessively, become Technical problem that those skilled in the art are urgently to be resolved hurrily and the emphasis of research.
Summary of the invention
The downtime produced during for solving existing database fault is long, need the problems such as solution manually, this Bright provide a kind of data base's changing method and system, the angle mutually switched from Double Data storehouse identical, real-time synchronization Solve the problems referred to above, considerably reduce downtime, improve data base's switching efficiency, make application server quickly and automatically Resume work.
For reaching above-mentioned technical purpose, the invention discloses a kind of data base's changing method, the method includes walking as follows Suddenly,
Step 1, builds the Database Systems with Double Data storehouse;
Step 2, analyzes and show that data base A works;
Step 3, monitors data base A, it is judged that data base A is the most normal: if normal, then continue monitoring data base A;If it is different Often, then step 4 is performed;
Step 4, switches to data base B by data base A.
The present invention innovatively have employed the Database Systems with Double Data storehouse, if one of them occurs abnormal or event Barrier, then can automatically switch to another data base normally worked, and the method switch speed is fast, switching efficiency is high, reduce application The downtime of server.
Further, in described step 4, data base B is identical with data base A and the two real time data synchronization updates.
Two the data base's real time datas used due to the present invention are identical, therefore can a database failure wherein Time switch to another data base without barrier, solve the problems such as data are inconsistent that master-slave back-up exists.
Further, in step 2, analyzed by configuration file file-A and show that data base A works, configuration file File-A points to data base A, and now application server sets up the communication with data base A by configuration file file-A.
The present invention is connected with normal data base by configuration file direct application servers, and this mode has response speed Spend the advantages such as fast, easy realization, reduce the downtime of application server further.
Further, in step 4, during data base A switches to data base B, to operation personnel send alarm message and/ Or mail, application server is by the communication of configuration file file-B foundation with data base B, and configuration file file-B points to data Storehouse B, then restarts application server and data base A.
Guided by configuration file, when detecting that data base breaks down, although the present invention need not artificial treatment, but Note or mail notification can be sent in the very first time to operation personnel, make operation personnel obtain the work of current application server in time Make state.
Further, during data base A switches to data base B, send alarm message and/or postal to operation personnel Part, data base B obtains the virtual ip address of data base A, makes configuration file file-A point to data base B, and application server passes through Configuration file file-A sets up the communication with data base B.
Present invention also offers the mode of another kind of direct application servers and database communication: i.e. pass through virtual ip address Method, the method need not change configuration file, it is only necessary to make normal data base obtain current database virtual IP address ground Location, then can make application server be connected with data base by former configuration file.
Further, the method comprises the steps,
Step 5, it is judged that data base B is the most normal: if normal, then continue monitoring data base B;If it is abnormal, to operation personnel Send alarm message and/or mail, then restart data base A and data base B, then restart application server.
In extreme cases, if two data bases all there occurs exception, the most automatically by two data bases and should With Server Restart, passing through which so that the changing method of the present invention is more perfect, the problem of solution is more comprehensive.
Further, in step 3, data base normally need to meet following condition simultaneously: data base can normally be logged in, normally Connection, normal queries, normally revise.
The present invention judges that the normal condition of data base includes above-mentioned condition, but is not limited to above-mentioned condition, the present invention's Under technology enlightenment, those skilled in the art can the most reasonably select or change and judge that whether normal data base is Condition.
Further, in step 3, if data base A is normal, then continue monitoring data base A after two minutes;In described step 5, If data base B is normal, then continue monitoring data base B after two minutes.
The monitoring frequency of the present invention is two minutes, after for the first time monitoring finds that the data base that is currently operating is normal, Detect the most again once.The setting of this frequency has taken into account resource and the monitoring effect that monitoring work takies.
Further, by script operation, data base A is switched to data base B.
The present invention realizes switching by script operation mode, the enforcement simple, easy of this mode, fast response time, Further reduce downtime, reduce resource occupation.
Further, described Database Systems are the Database Disaster Backup/Recover of refrigerator.
Present invention can apply to refrigerator, ensured refrigerator background data base system stability, thoroughly solve data for refrigerator storehouse Fault or crash issue, make that refrigerator is more stable, work more reliably.
Another goal of the invention of the present invention is to provide a kind of data base's switched system, and this system includes data base A, number According to storehouse B, application server and control server, described data base A and data base B is identical data base, is controlling server Under effect, application server is connected with data base A or data base B.
Under the support of the data base A and data base B of identical, data synchronization updating, the data base that the present invention provides Switched system can be automatically obtained switch operating, greatly reduces the downtime of application server, and, this systematic function can Lean on, good stability, it is not necessary to can implement by third party software.
Further, application server is connected with data base A by configuration file file-A or by configuration file file- B is connected with data base B, and configuration file file-A and configuration file file-B is stored in application server.
The present invention connects the data that can normally work by means of the configuration file direct application servers in application server Storehouse, it is not necessary to can implement by third party software.
Further, controlling server is business system server.
The present invention can directly control above-mentioned detection, monitoring and switch operating by business system server, it is not necessary to by the Software of the third party can be implemented, simple.
The invention have the benefit that the present invention can automatic data-detection storehouse abnormal, can when data base occurs exception Instant intelligence switching, considerably reduces the downtime of application server, makes application server extensive in may be implemented in five minutes Multiple normal work;And, occur abnormal conditions time, the present invention can automatically switch process, need not artificial treatment, save people The workload of work;It addition, notified and prompting operation personnel by the form of note or mail in the abnormal very first time occurred.
Accompanying drawing explanation
Fig. 1 is data base's changing method schematic flow sheet of the present invention.
Detailed description of the invention
Below in conjunction with Figure of description, data base's changing method of the present invention and switched system are carried out detailed explanation and say Bright.
The open a kind of data base's changing method of the present invention, first the method builds a data base set with double master System, has the data base A and data base B of two real-time synchronizations, in application server two configurations placed below in this data base File f ile-A, file-B, file-A connects sensing A data base, and file-B connects sensing B data storehouse, and application server is given tacit consent to Connect and use file-A.Present invention is mainly used for solving the problem that data base causes downtime length extremely.
Embodiment one:
Specifically, data base's changing method of the present invention comprises the steps,
Step 1, builds the Database Systems with Double Data storehouse, and in the present embodiment, Double Data storehouse includes data base A and number According to storehouse B;Present invention is generally applicable on various intelligentized refrigerator, thus Database Systems can be data base's calamity of refrigerator Standby system.
Step 2, has the script startup of control function, in the present embodiment, analyzes and show that data base A works, pass through Configuration file file-A analyzes and show that data base A works, and configuration file file-A points to data base A, now application service Device sets up the communication with data base A by configuration file file-A.Certainly, the data base worked is also likely to be data base B, This step of the present invention is merely to have a data base to work in explanation Double Data storehouse, as it is shown in figure 1, if it is determined that current The configuration file that application server connects is file-A, then data base A works, if it is determined that current application server connects Configuration file be file-B, then data base B works.
Step 3, monitors data base A, it is judged that data base A is the most normal: if data base A is normal, then continue prison after two minutes Control data base A;If abnormal, then perform step 4.
Certainly, in this step, if data base B works, then judge that data base B is the most normal.
Step 4, switches to data base B by script operation by data base A, and the data base B of the present invention is complete with data base A Identical and the two real time data synchronization updates.During data base A switches to data base B, send alarm message to operation personnel And/or mail, application server sets up the communication with data base B, configuration file file-B sensing by configuration file file-B Data base B, then restarts application server, makes application server be connected on data base B, then restarts data base A, makes data base A recovers normal, standby for the calamity when data base's B exception.
Certainly, as shown in flow process on the right side of Fig. 1, if data base B is abnormal in step 3, then data base B is cut by script operation Shifting to data base A, application server sets up the communication with data base A by configuration file file-A, and configuration file file-A refers to To data base A, then restart data base B, make data base B recover normal.
Step 5, after switching to data base B by data base A, it is judged that data base B is the most normal: if data base B is normal, then and two Monitoring data base B is continued after minute;If abnormal, send alarm message and/or mail to operation personnel, then restart data base A and Data base B, then restarts application server.
It should be noted that the present invention can judge that data base A or B is the most normal in the following way.Data base normally needs Meet following condition simultaneously: data base can normally be logged in, normally connection, normal queries, normally revise.It addition, number of the present invention It is to perform once for two minutes according to storehouse monitoring frequency.
Embodiment two:
Data base's changing method of embodiment two is essentially identical with embodiment one, and its difference is: in step 4, in data In the case of storehouse A breaks down, the mode that application server sets up communication from data base B is different.In the present embodiment, data base A During switching to data base B, sending alarm message and/or mail to operation personnel, data base B obtains the void of data base A Intending IP address, make configuration file file-A point to data base B, application server is set up and data base by configuration file file-A The communication of B.
The invention also discloses a kind of data base's switched system, this system includes data base A, data base B, application server And control server, described data base A and data base B is identical data base, under controlling server effect, is taken by control Business device sends the orders such as monitoring, switching automatically, and application server is connected with data base A or data base B.
Specifically, application server is connected with data base A by configuration file file-A, or, application server leads to Crossing configuration file file-B to be connected with data base B, configuration file file-A and configuration file file-B is stored in application service In device.In the present invention, control server is business system server.
The foregoing is only presently preferred embodiments of the present invention, not in order to limit the present invention, all in essence of the present invention Any amendment, equivalent and the simple modifications etc. made in content, should be included within the scope of the present invention.

Claims (13)

1. data base's changing method, it is characterised in that the method comprises the steps,
Step 1, builds the Database Systems with Double Data storehouse;
Step 2, analyzes and show that data base A works;
Step 3, monitors data base A, it is judged that data base A is the most normal: if normal, then continue monitoring data base A;If it is abnormal, then Perform step 4;
Step 4, switches to data base B by data base A.
Data base's changing method the most according to claim 1, it is characterised in that in described step 4, data base B and data Storehouse A is identical and the two real time data synchronization updates.
Data base's changing method the most according to claim 1 and 2, it is characterised in that in described step 2, by configuring literary composition Part file-A analyzes and show that data base A works, and configuration file file-A points to data base A, and now application server passes through Configuration file file-A sets up the communication with data base A.
Data base's changing method the most according to claim 3, it is characterised in that in described step 4, data base A switches to During data base B, sending alarm message and/or mail to operation personnel, application server is built by configuration file file-B The vertical communication with data base B, configuration file file-B points to data base B, then restarts application server and data base A.
Data base's changing method the most according to claim 3, it is characterised in that data base A switches to data base's B process In, sending alarm message and/or mail to operation personnel, data base B obtains the virtual ip address of data base A, makes configuration file File-A points to data base B, and application server sets up the communication with data base B by configuration file file-A.
6. according to the data base's changing method described in claim 4 or 5, it is characterised in that the method comprises the steps,
Step 5, it is judged that data base B is the most normal: if normal, then continue monitoring data base B;If abnormal, send to operation personnel Alarm message and/or mail, then restart data base A and data base B, then restart application server.
Data base's changing method the most according to claim 6, it is characterised in that in described step 3, data base normally needs same Time meet following condition: data base can normally be logged in, normally connection, normal queries, normally revise.
Data base's changing method the most according to claim 7, it is characterised in that in described step 3, if data base A is normal, Then continue monitoring data base A after two minutes;In described step 5, if data base B is normal, then continue monitoring data base after two minutes B。
Data base's changing method the most according to claim 1, it is characterised in that data base A is switched by script operation To data base B.
Data base's changing method the most according to claim 1, it is characterised in that described Database Systems are the number of refrigerator According to storehouse disaster recovery and backup systems.
11. 1 kinds of data base's switched systems, it is characterised in that this system includes data base A, data base B, application server and control Control server, described data base A and data base B is identical data base, under controlling server effect, application server and number Connect according to storehouse A or data base B.
12. data base's switched systems according to claim 11, it is characterised in that application server passes through configuration file File-A is connected with data base A or is connected with data base B by configuration file file-B, configuration file file-A and configuration file File-B is stored in application server.
13. according to the data base's switched system described in claim 11 or 12, it is characterised in that described control server is business System server.
CN201610670132.4A 2016-08-15 2016-08-15 A kind of data base's changing method and system Pending CN106294795A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610670132.4A CN106294795A (en) 2016-08-15 2016-08-15 A kind of data base's changing method and system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610670132.4A CN106294795A (en) 2016-08-15 2016-08-15 A kind of data base's changing method and system

Publications (1)

Publication Number Publication Date
CN106294795A true CN106294795A (en) 2017-01-04

Family

ID=57671146

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610670132.4A Pending CN106294795A (en) 2016-08-15 2016-08-15 A kind of data base's changing method and system

Country Status (1)

Country Link
CN (1) CN106294795A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107066354A (en) * 2017-04-18 2017-08-18 中国银联股份有限公司 A kind of switching method of database, master server and from server
CN108924772A (en) * 2018-08-02 2018-11-30 平安科技(深圳)有限公司 Note transmission method, device, computer equipment and storage medium
CN109726046A (en) * 2018-11-23 2019-05-07 网联清算有限公司 Computer room switching method and switching device
CN109885344A (en) * 2019-02-27 2019-06-14 四川航空股份有限公司 Operating system switching method and device
CN110019515A (en) * 2017-11-10 2019-07-16 中兴通讯股份有限公司 Database switching method, device, system and computer readable storage medium

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1937523A (en) * 2006-08-09 2007-03-28 江苏移动通信有限责任公司 Client service emergency system and its realizing method
CN102231677A (en) * 2011-06-23 2011-11-02 中兴通讯股份有限公司 Double-center disaster recovery-based switching method and device in IPTV system
CN103019875A (en) * 2012-12-19 2013-04-03 北京世纪家天下科技发展有限公司 Method and device for realizing double main reconstruction of database
CN103488721A (en) * 2013-09-12 2014-01-01 京信通信系统(中国)有限公司 Database bisynchronous method and system for master and slave boards
CN104243554A (en) * 2014-08-20 2014-12-24 南京南瑞继保工程技术有限公司 Method for synchronizing time memories of host and standby of time series database in cluster system
CN106156044A (en) * 2015-03-26 2016-11-23 阿里巴巴集团控股有限公司 Data base's changing method and device

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1937523A (en) * 2006-08-09 2007-03-28 江苏移动通信有限责任公司 Client service emergency system and its realizing method
CN102231677A (en) * 2011-06-23 2011-11-02 中兴通讯股份有限公司 Double-center disaster recovery-based switching method and device in IPTV system
CN103019875A (en) * 2012-12-19 2013-04-03 北京世纪家天下科技发展有限公司 Method and device for realizing double main reconstruction of database
CN103488721A (en) * 2013-09-12 2014-01-01 京信通信系统(中国)有限公司 Database bisynchronous method and system for master and slave boards
CN104243554A (en) * 2014-08-20 2014-12-24 南京南瑞继保工程技术有限公司 Method for synchronizing time memories of host and standby of time series database in cluster system
CN106156044A (en) * 2015-03-26 2016-11-23 阿里巴巴集团控股有限公司 Data base's changing method and device

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107066354A (en) * 2017-04-18 2017-08-18 中国银联股份有限公司 A kind of switching method of database, master server and from server
TWI669620B (en) * 2017-04-18 2019-08-21 大陸商中國銀聯股份有限公司 Database switching method, server, storage medium, electronic device and product
CN107066354B (en) * 2017-04-18 2021-01-05 中国银联股份有限公司 Database switching method, master server and slave server
CN110019515A (en) * 2017-11-10 2019-07-16 中兴通讯股份有限公司 Database switching method, device, system and computer readable storage medium
CN108924772A (en) * 2018-08-02 2018-11-30 平安科技(深圳)有限公司 Note transmission method, device, computer equipment and storage medium
CN109726046A (en) * 2018-11-23 2019-05-07 网联清算有限公司 Computer room switching method and switching device
CN109885344A (en) * 2019-02-27 2019-06-14 四川航空股份有限公司 Operating system switching method and device

Similar Documents

Publication Publication Date Title
CN106294795A (en) A kind of data base's changing method and system
CN106254100B (en) A kind of data disaster tolerance methods, devices and systems
CN106202075B (en) Method and device for switching between main database and standby database
EP1800194B1 (en) Maintaining transparency of a redundant host for control data acquisition systems in process supervision
WO2016106965A1 (en) Server self-healing method and device
CN104461809B (en) A kind of fault information managing method and system
CN103152414A (en) High available system based on cloud calculation and implementation method thereof
CN100388218C (en) Method for realizing backup between servers
CN102937930A (en) Application program monitoring system and method
US7693986B2 (en) Test flight on-board processing system and method
CN105302661A (en) System and method for implementing virtualization management platform high availability
CN107766502A (en) A kind of Oracle RAC databases disaster tolerance switches drilling method
CN104252500A (en) Method and device for carrying out fault repairing on database management platform
CN105306272A (en) Method and system for collecting fault scene information of information system
CN108989134B (en) SDN-based virtualized network data plane configuration recovery system and method
CN103812675A (en) Method and system for realizing allopatric disaster recovery switching of service delivery platform
CN112506702B (en) Disaster recovery method, device, equipment and storage medium for data center
CN107480014A (en) A kind of High Availabitity equipment switching method and device
CN111865682A (en) Method and apparatus for handling faults
CN109905275A (en) A kind of detection of control plane failure and processing method based on SDN layer architecture
CN106021070A (en) Method and device for server cluster monitoring
CN104579717B (en) DCN Fault Locating Method and device
CN108445857B (en) Design method for 1+ N redundancy mechanism of SCADA system
JP2006185108A (en) Management computer for managing data of storage system, and data management method
CN106817238A (en) Virtual machine repair method, virtual machine, system and business function network element

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right
TA01 Transfer of patent application right

Effective date of registration: 20180314

Address after: 230601 Building No. 198, building No. 198, Mingzhu Avenue, Anhui high tech Zone, Anhui

Applicant after: Hefei Midea Intelligent Technology Co., Ltd.

Address before: 230601 Hefei economic and Technological Development Zone, Fairview Road, Anhui

Applicant before: Hefei Hualing Co., Ltd.

Applicant before: Hefei Midea Refrigerator Co., Ltd.

Applicant before: Midea Group Co., Ltd.

RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20170104