CN104573117A - Method and system for realizing high availability of database server based on shared storage - Google Patents

Method and system for realizing high availability of database server based on shared storage Download PDF

Info

Publication number
CN104573117A
CN104573117A CN201510061218.2A CN201510061218A CN104573117A CN 104573117 A CN104573117 A CN 104573117A CN 201510061218 A CN201510061218 A CN 201510061218A CN 104573117 A CN104573117 A CN 104573117A
Authority
CN
China
Prior art keywords
database server
node
data base
local data
base example
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
Application number
CN201510061218.2A
Other languages
Chinese (zh)
Other versions
CN104573117B (en
Inventor
逯利军
钱培专
张军
姜健
李克民
宋聚平
张树民
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
CERTUSNET CORP
Original Assignee
CERTUSNET CORP
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 CERTUSNET CORP filed Critical CERTUSNET CORP
Priority to CN201510061218.2A priority Critical patent/CN104573117B/en
Priority claimed from CN201510061218.2A external-priority patent/CN104573117B/en
Publication of CN104573117A publication Critical patent/CN104573117A/en
Application granted granted Critical
Publication of CN104573117B publication Critical patent/CN104573117B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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/21Design, administration or maintenance of databases
    • G06F16/217Database tuning
    • 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

Landscapes

  • Engineering & Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention relates to a method for realizing the high availability of a database server based on shared storage. The method comprises the following steps: the database server detects the network service quality and the local database instance state of the database server; the database server judges whether the local database instances of nodes of the database server are started up or not according to the network quality and the local database instance state of the database server and the local database instance states of other database servers. In addition, the invention also relates to a system for realizing high availability of the database server based on shared storage. Each database server of the system comprises a service detection module and an instance management module. According to the method and the system for realizing the high availability of the database server based on shared storage, provided by the invention, high availability is realized by a mode that the instance nodes detect themselves, the nodes supervise other node instance states and the process is self-managed, no difference among master nodes and standby nodes exists, and the third-party nodes are not needed. The method and the system have the advantages of simple structure, easiness in realization, and relatively broad application range.

Description

Based on the method and system of shared storage fulfillment database server High Availabitity
Technical field
The present invention relates to field of database management, particularly relate to the field of database management shared and store, specifically refer to a kind of method and system based on shared storage fulfillment database server High Availabitity.
Background technology
Along with large data and the arrival in cloud computing epoch, the application of database constantly extends to medium-sized and small enterprises from large enterprise.Not only technical sophistication is expensive for traditional high-availability cluster software for large enterprise, and later maintenance expense is also very high.The economy of medium-sized and small enterprises and technical strength are relatively weak, are badly in need of wanting a kind of solution of cheapness to solve database availability issue in project.Here high availability (High ailability) refers to the stop time by as far as possible shortening because routine maintaining operations (plan) and the system crash (unplanned) that happens suddenly cause, to improve the availability of system and application.It is different with the fault-tolerant technique being considered to hitless operation.Highly available system is that current enterprise prevents kernal computer system because of the most effective means of disorderly closedown.Such as, when wherein a certain station server breaks down, request of access can be transferred on other server that can normally work, this guarantees the core business system safety of company and enterprise, run efficiently.
At present, High Availability Software in industry mainly contains the hacmp (high availability cluster multi task process application program) of IBM (International Business Machine Corporation (IBM)) company, the service guard (cluster service software) of HP (Hewlett-Packard) company, the vcs (high availability clusters software) etc. of Veritas company, technically, the aspect of their monitoring is all main frame, and the state detecting for database service is little.For hacmp, judge whether its oracle can use, be only whether the process looking over oracle exists, but, such judgment mode is inaccurate, and when ramming (hang) state when oracle database is in, hacmp cannot detect.
Summary of the invention
The object of the invention is the shortcoming overcoming above-mentioned prior art, provide a kind of by database server node Sampling network availability and database instance state voluntarily, compare with the database instance state in Correspondent Node again, finally judge whether the database instance of opening or closing on this node, active and standby dividing is not had, the method and system based on shared storage fulfillment database server High Availabitity with safeguarding easy to implement between several database server.
To achieve these goals, the method and system based on shared storage fulfillment database server High Availabitity of the present invention have following formation:
Should based on the method for shared storage fulfillment database server High Availabitity, its principal feature is, described method comprises the following steps:
(1) database server detects network service quality and the local data base example state of himself node;
(2) database server described in judges whether according to the local data base example state of the network quality of own node, the local data base example state of own node and other database server node the local data base example opening own node.
Further, described database server judges whether according to the local data base example state of the network quality of own node, the local data base example state of own node and other database server node the local data base example opening own node, comprises the following steps:
(2.1) database server described in judges that whether the network quality of own node is good, if so, then continues step (2.2), otherwise continues step (2.5);
(2.2) database server described in judges whether the local data base example state of other database node is non-opening, if so, then continues step (2.3), otherwise continues step (2.5);
(2.3) according to the local data base example state of own node, the database server described in judges whether the local data base example of own node is opened, if, then return above-mentioned steps (1), otherwise continue step (2.4);
(2.4) the local data base example of own node opened by the database server described in, and returns above-mentioned steps (1);
(2.5) database server described in cuts out the local data base example of own node.
Further, described database server detects network service quality and the local data base example state of himself node, is specially:
The described communication quality of heartbeat network of database server detection between himself node and gateway, the example starting state of the communication quality of heartbeat network, the process status of own node and the own node between himself node and other database server node.
In addition, the present invention also provides a kind of system based on shared storage fulfillment database server High Availabitity, and described system comprises several database server, and its principal feature is, each database server comprises:
Service detection module, in order to detect network service quality and the local data base example state of described database server;
Instance management module, judges whether in order to the local data base example state of the network quality according to described database server, described database server and the local data base example state of other database server node the local data base example opening this database server.
Further, described service detection module comprises network quality detecting unit and local data base example state detecting unit, and described instance management module comprises example state judging unit and local data base example start and stop unit.
Have employed the method and system based on shared storage fulfillment database server High Availabitity of the present invention, by database server node Sampling network availability and database instance state voluntarily, compare with the database instance state in Correspondent Node again, finally judge whether the database instance of opening or closing on this node, thus the problem that solution database software platform and service disruption cause the professional chief time to be paused, comprehensively High Availabitity service is in real time provided, fail-over time is short, the application program of front end need not synchronously be modified, technique scheme can be realized by means of only script, there is provided fast a kind of, reliably, easy to implement and safeguard, the database service height of the fast quick-recovery of fault can property comprehensive solution, it mainly has following positive benefit:
1) the present invention tests oneself with instant node state, the mode of other node instance states of node supervises and self-management process realizes high availability, is obviously different from the centralized management mode of other High Availabitity;
2) database server in the present invention does not have dividing of main-standby nodes, also not by third party's node, the fault that this mode reduces centralized management node itself greatly cannot realize active-standby switch or entanglement switching, causes database service to shake the possibility of even interrupting.
Accompanying drawing explanation
Fig. 1 is the process flow diagram of the method based on shared storage fulfillment database server High Availabitity of the present invention.
Fig. 2 is the structured flowchart of the system based on shared storage fulfillment database server High Availabitity of the present invention.
Fig. 3 is the decision rule process flow diagram of the method based on shared storage fulfillment database server High Availabitity of the present invention.
Fig. 4 is the physical structure figure of a specific embodiment of the present invention.
Embodiment
In order to more clearly describe technology contents of the present invention, conduct further description below in conjunction with specific embodiment.
In one embodiment, method and system based on shared storage fulfillment database server High Availabitity of the present invention control for realizing startup and the closedown that multiple stage database server completes database instance, as illustrated in fig. 1 and 2, this system comprises service detection module (comprising network quality detecting unit and local data base example state detecting unit) and instance management module (comprising example state judging unit and local data base example start and stop unit), and described in this, method comprises the steps:
Service detection module in S1, database server starts, and detects the network service quality (comprising the communication quality of the heartbeat network between this database server and gateway, between this database server and other database server) of this database server and detects local data base example state (comprising self process status and example starting state etc.);
S2, this database server start database instance administration module, according to the local data base example of network quality, example state comprehensive descision between other database server node and this database service node whether this database server of start and stop.
Wherein, the judgment rule of start and stop local data base example as shown in Figure 3, when network quality is good and other all node database service is not all opened, starts local data base service, otherwise closes local data base service.
In actual applications, judge whether a database server can provide the standard of service to be:
1, whether the network service of the main frame of database instance is unobstructed;
2, whether database instance service is normal.
In one embodiment, the function of service detection module (hereinafter referred to as S1) and instance management module (hereinafter referred to as S2) can be realized by shell script, as script name S1.sh, S2.sh.Run S1, S2 script on each node.According to above-mentioned standard implementation testing process as shown in Figure 3, first the network communication status of this database node in collection network node, if network state is normal, detect the local data base example service state of this database node again, and the local data base example service state of this database node and other database instance service states are compared, if neither one node serve opens in other node, then notify that S2 starts local example service on this node, otherwise do not do any operation; If network state is abnormal, then notify that the local data base example start and stop unit in S2 closes local example service.
More specifically, for oracle database, dispose oracle database according to the physical structure in Fig. 4, comprise the following steps:
1. one being shared the storage unit in storing is articulated in two corresponding catalogues of database server;
2. oracle software is arranged on/oracle catalogue in, database file is arranged on/oradata catalogue in;
3. start S1.sh, S2.sh
From such scheme, the data library device of the present embodiment has the features such as structure is simple, flexible configuration relative to the group system of prior art, can the high availability of fulfillment database server easily by the ingenious combination between modules.
Have employed the method and system based on shared storage fulfillment database server High Availabitity of the present invention, by database server node Sampling network availability and database instance state voluntarily, compare with the database instance state in Correspondent Node again, finally judge whether the database instance of opening or closing on this node, thus the problem that solution database software platform and service disruption cause the professional chief time to be paused, comprehensively High Availabitity service is in real time provided, fail-over time is short, the application program of front end need not synchronously be modified, technique scheme can be realized by means of only script, there is provided fast a kind of, reliably, easy to implement and safeguard, the database service height of the fast quick-recovery of fault can property comprehensive solution, it mainly has following positive benefit:
1) the present invention tests oneself with instant node state, the mode of other node instance states of node supervises and self-management process realizes high availability, is obviously different from the centralized management mode of other High Availabitity;
2) database server in the present invention does not have dividing of main-standby nodes, also not by third party's node, the fault that this mode reduces centralized management node itself greatly cannot realize active-standby switch or entanglement switching, causes database service to shake the possibility of even interrupting.
In this description, the present invention is described with reference to its specific embodiment.But, still can make various amendment and conversion obviously and not deviate from the spirit and scope of the present invention.Therefore, instructions and accompanying drawing are regarded in an illustrative, rather than a restrictive.

Claims (6)

1., based on a method for shared storage fulfillment database server High Availabitity, it is characterized in that, described method comprises the following steps:
(1) database server detects network service quality and the local data base example state of himself node;
(2) database server described in judges whether according to the local data base example state of the network quality of own node, the local data base example state of own node and other database server node the local data base example opening own node.
2. the method based on shared storage fulfillment database server High Availabitity according to claim 1, it is characterized in that, described database server judges whether according to the local data base example state of the network quality of own node, the local data base example state of own node and other database server node the local data base example opening own node, comprises the following steps:
(2.1) database server described in judges that whether the network quality of own node is good, if so, then continues step (2.2), otherwise continues step (2.5);
(2.2) database server described in judges whether the local data base example state of other database node is non-opening, if so, then continues step (2.3), otherwise continues step (2.5);
(2.3) according to the local data base example state of own node, the database server described in judges whether the local data base example of own node is opened, if, then return above-mentioned steps (1), otherwise continue step (2.4);
(2.4) the local data base example of own node opened by the database server described in, and returns above-mentioned steps (1);
(2.5) database server described in cuts out the local data base example of own node.
3. the method based on shared storage fulfillment database server High Availabitity according to claim 1 and 2, is characterized in that, described database server detects network service quality and the local data base example state of himself node, is specially:
The described communication quality of heartbeat network of database server detection between himself node and gateway, the example starting state of the communication quality of heartbeat network, the process status of own node and the own node between himself node and other database server node.
4. one kind utilizes the realization of the method based on shared storage fulfillment database server High Availabitity described in claim 1 based on the system of the database server High Availabitity of shared storage, described system comprises several database server, it is characterized in that, each database server comprises:
Service detection module, in order to detect network service quality and the local data base example state of described database server;
Instance management module, judges whether in order to the local data base example state of the network quality according to described database server, described database server and the local data base example state of other database server node the local data base example opening this database server.
5. realization according to claim 4 is based on the system of the database server High Availabitity of shared storage, it is characterized in that, described service detection module comprises network quality detecting unit and local data base example state detecting unit.
6. the realization according to claim 4 or 5, based on the system of the database server High Availabitity of shared storage, is characterized in that, described instance management module comprises example state judging unit and local data base example start and stop unit.
CN201510061218.2A 2015-02-05 The method and system of database server High Availabitity are realized based on shared storage Active CN104573117B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510061218.2A CN104573117B (en) 2015-02-05 The method and system of database server High Availabitity are realized based on shared storage

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510061218.2A CN104573117B (en) 2015-02-05 The method and system of database server High Availabitity are realized based on shared storage

Publications (2)

Publication Number Publication Date
CN104573117A true CN104573117A (en) 2015-04-29
CN104573117B CN104573117B (en) 2019-07-16

Family

ID=

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107634868A (en) * 2017-10-29 2018-01-26 网宿科技股份有限公司 A kind of method and system for managing network service

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102722579A (en) * 2012-06-07 2012-10-10 浪潮电子信息产业股份有限公司 Bisynchronous method for internal database of cluster memory system
CN102868736A (en) * 2012-08-30 2013-01-09 浪潮(北京)电子信息产业有限公司 Design and implementation method of cloud computing monitoring framework, and cloud computing processing equipment
CN102882909A (en) * 2011-07-15 2013-01-16 易云捷讯科技(北京)有限公司 Cloud computing service monitoring system and method thereof
CN103647668A (en) * 2013-12-16 2014-03-19 上海证券交易所 Host group decision system in high availability cluster and switching method for host group decision system

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102882909A (en) * 2011-07-15 2013-01-16 易云捷讯科技(北京)有限公司 Cloud computing service monitoring system and method thereof
CN102722579A (en) * 2012-06-07 2012-10-10 浪潮电子信息产业股份有限公司 Bisynchronous method for internal database of cluster memory system
CN102868736A (en) * 2012-08-30 2013-01-09 浪潮(北京)电子信息产业有限公司 Design and implementation method of cloud computing monitoring framework, and cloud computing processing equipment
CN103647668A (en) * 2013-12-16 2014-03-19 上海证券交易所 Host group decision system in high availability cluster and switching method for host group decision system

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107634868A (en) * 2017-10-29 2018-01-26 网宿科技股份有限公司 A kind of method and system for managing network service
WO2019080386A1 (en) * 2017-10-29 2019-05-02 网宿科技股份有限公司 Network service management method and system
CN107634868B (en) * 2017-10-29 2020-06-23 网宿科技股份有限公司 Method and system for managing network service
US10992770B2 (en) 2017-10-29 2021-04-27 Wangsu Science & Technology Co., Ltd. Method and system for managing network service

Similar Documents

Publication Publication Date Title
US9141491B2 (en) Highly available server system based on cloud computing
CN104408071A (en) Distributive database high-availability method and system based on cluster manager
EP3142011B9 (en) Anomaly recovery method for virtual machine in distributed environment
CN103152414B (en) A kind of high-availability system based on cloud computing
CN108173959B (en) Cluster storage system
CN106856489A (en) A kind of service node switching method and apparatus of distributed memory system
CN102664747B (en) Cloud calculating platform system
CN103812699A (en) Monitoring management system based on cloud computing
CN103729280A (en) High availability mechanism for virtual machine
CN112181660A (en) High-availability method based on server cluster
CN105554074A (en) NAS resource monitoring system and monitoring method based on RPC communication
EP2723017A1 (en) Method, apparatus and system for implementing distributed auto-incrementing counting
CN103795553A (en) Switching of main and standby servers on the basis of monitoring
CN109600264A (en) CloudStack cloud platform
CN108469996A (en) A kind of system high availability method based on auto snapshot
CN105490847B (en) A kind of private cloud storage system interior joint failure real-time detection and processing method
CN110674192A (en) Redis high-availability VIP (very important person) drifting method, terminal and storage medium
CN105100185A (en) System and method for adaptively integrating a database state notification service with a distributed transactional middleware machine
CN117370316A (en) High availability management method and device for database, electronic equipment and storage medium
CN108600156A (en) A kind of server and safety certifying method
CN114301763B (en) Distributed cluster fault processing method and system, electronic equipment and storage medium
CN108154343B (en) Emergency processing method and system for enterprise-level information system
CN111698301A (en) Service management method, device and storage medium for ensuring service continuation
CN113254245A (en) Fault detection method and system for storage cluster
CN104573117A (en) Method and system for realizing high availability of database server based on shared storage

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant