JP6107159B2 - Database system and database system control method - Google Patents

Database system and database system control method Download PDF

Info

Publication number
JP6107159B2
JP6107159B2 JP2013007662A JP2013007662A JP6107159B2 JP 6107159 B2 JP6107159 B2 JP 6107159B2 JP 2013007662 A JP2013007662 A JP 2013007662A JP 2013007662 A JP2013007662 A JP 2013007662A JP 6107159 B2 JP6107159 B2 JP 6107159B2
Authority
JP
Japan
Prior art keywords
session
database
server
data processing
processing unit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
JP2013007662A
Other languages
Japanese (ja)
Other versions
JP2014137798A (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.)
Oki Electric Industry Co Ltd
Original Assignee
Oki Electric Industry 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 Oki Electric Industry Co Ltd filed Critical Oki Electric Industry Co Ltd
Priority to JP2013007662A priority Critical patent/JP6107159B2/en
Publication of JP2014137798A publication Critical patent/JP2014137798A/en
Application granted granted Critical
Publication of JP6107159B2 publication Critical patent/JP6107159B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

この発明は、データベースシステム及びデータベースシステムの制御方法に関し、例えば、冗長構成のデータベースクライアントを備えるデータベースシステムに適用し得る。   The present invention relates to a database system and a database system control method, and can be applied to, for example, a database system including a redundantly configured database client.

データベースシステムには、データベースサーバと、データベースサーバのデータ利用を行うデータベースクライアントとが配置されている。そして、従来のデータベースクライアントがデータベースサーバ上のデータ更新を行う場合は、通常、データベースサーバに対してデータ更新を要求し、更新データをコミットする手続きを1つのトランザクションとして実行することにより、データ更新を行う。なお、本明細書では、データベースサーバ上のデータ更新は、新たなデータの登録、データベースに記録された任意のデータの更新、データベースに記録された任意のデータの削除等を含む用語であるものとする。   In the database system, a database server and a database client that uses data of the database server are arranged. When a conventional database client updates data on the database server, the data update is usually performed by requesting the database server to update the data and executing a procedure for committing the updated data as one transaction. Do. In this specification, data update on the database server is a term including registration of new data, update of arbitrary data recorded in the database, deletion of arbitrary data recorded in the database, and the like. To do.

そして、従来のデータベースシステムでは、データベースサーバ又はデータベースクライアントで異常が発生した場合には、データベースサーバは、必要に応じて更新後コミットされていないデータについて、ロールバックする処理を行うことにより、データの整合性を保つものがある。   In the conventional database system, when an abnormality occurs in the database server or the database client, the database server performs the process of rolling back the data that has not been committed after the update, if necessary. Some maintain consistency.

ロールバック機能に対応した従来のデータベースシステムとしては、特許文献1の記載技術がある。特許文献1に記載のシステムでは、システムの再起動等が必要となった場合に、効率的にデータの整合性を回復するロールバック処理を実行するために、回復ログ(動作履歴のログ)について複数種類のデータ記録媒体(低速不揮発性記憶域及び高速揮発性記憶域)を利用して記録しておくことについて記載されている。   As a conventional database system corresponding to the rollback function, there is a technique described in Patent Document 1. In the system described in Patent Document 1, when a system restart or the like is required, a recovery log (operation history log) is used in order to execute rollback processing that efficiently recovers data consistency. It describes that recording is performed using a plurality of types of data recording media (low-speed nonvolatile storage area and high-speed volatile storage area).

特開平07−084815号公報Japanese Patent Laid-Open No. 07-084815

ところで、従来のデータベースシステムでは、データベースサーバを利用するデータベースクライアント側でも、データ処理を行うデータ処理部(サーバ等のコンピュータ)を冗長化したものがある。そして、そのような冗長化されたデータベースクライアントで、データ処理部についてクラスタリングの冗長構成が組まれている場合、現用系(以下、「ACT系」とも呼ぶ)の第1のデータ処理部で障害(異常)が発生すると、系切替により待機系(以下、「スタンバイ系」又は「SBY系」とも呼ぶ)の第2のデータ処理部がACT系として動作する。   Incidentally, in some conventional database systems, a data processing unit (computer such as a server) that performs data processing is made redundant on the database client side that uses the database server. In such a redundant database client, when a redundant configuration of clustering is built in the data processing unit, a failure (in the first data processing unit of the active system (hereinafter also referred to as “ACT system”) ( When an abnormality occurs, the second data processing unit of the standby system (hereinafter also referred to as “standby system” or “SBY system”) operates as the ACT system by system switching.

しかし、旧ACT系のコンピュータで異常が発生したときに保持していたセッションで、データベース上の更新中のデータ(更新後コミットされていないデータ)が保持された状態(他のセッションにデータ更新が解放されていない状態)だった場合、当該データが保持された状態を継続することになる。その結果、新たにACT系として動作する第2のデータ処理部では、第1のデータ処理部に保持された状態のデータの更新をすぐに行うことができず、系切替直後の動作に支障を生じることになる。   However, in the session that was held when an abnormality occurred in the old ACT computer, the data being updated on the database (data that was not committed after the update) was held (data update in other sessions) If the data is not released, the state where the data is held is continued. As a result, the second data processing unit newly operating as the ACT system cannot immediately update the data held in the first data processing unit, which hinders the operation immediately after system switching. Will occur.

そこで、上述のような問題点に鑑み、データベースサーバのデータにアクセスするデータ処理部が冗長化されたデータベースクライアントで、異常に伴う系切替が発生した場合の影響を低減することができるデータベースシステム及びデータベースシステムの制御方法が望まれている。   Therefore, in view of the problems as described above, a database system in which a data processing unit that accesses data of a database server is made redundant, and a database system that can reduce the influence when system switching occurs due to an abnormality, and A method for controlling a database system is desired.

第1の本発明は、データベースサーバと、複数のデータ処理部で冗長構成が形成されているデータベースクライアントとを備えるデータベースシステムにおいて、(1)第1のデータ処理部が現用系として動作しているときに、上記第1のデータ処理部で異常が発生したことを検知する異常検知手段と、(2)上記異常検知手段が上記第1のデータ処理部の異常を検知した場合に、待機系として動作している第2のデータ処理部を現用系に切替える処理を行う系切替手段と、(3)上記第1のデータ処理部が異常発生時に、上記データベースサーバと接続状態であった接続状態セッションに係るセッション情報を収集するセッション情報収集手段と、(4)上記セッション情報収集手段が収集したセッション情報に基づいて、上記データベースサーバ上の上記第1のデータ処理部に係る接続状態セッションを特定し、上記データベースサーバに、上記第1のデータ処理部に係る接続状態セッションの切断を実行させるセッション切断手段と、(5)上記セッション切断手段が接続状態セッションを切断する際に、上記データベースサーバ上で、当該接続状態セッションで更新されたデータについて、当該接続状態セッションによる更新前の状態にロールバックさせるロールバック手段とを有し、(6)上記セッション切断手段及び上記ロールバック手段の処理は、上記系切替手段による系切替処理の前に実行されることを特徴とする。 The first aspect of the present invention is a database system including a database server and a database client in which a redundant configuration is formed by a plurality of data processing units. (1) The first data processing unit operates as an active system. When the abnormality detection unit detects that an abnormality has occurred in the first data processing unit, and (2) when the abnormality detection unit detects an abnormality in the first data processing unit, System switching means for performing processing for switching the operating second data processing unit to the active system; and (3) a connection state session that was in connection with the database server when an abnormality occurred in the first data processing unit. Session information collecting means for collecting the session information according to (4) the database based on the session information collected by the session information collecting means. Session disconnection means for identifying a connection state session related to the first data processing unit on the server and causing the database server to disconnect the connection state session related to the first data processing unit; (5) the above When the session disconnection means disconnects the connection state session, the database server has rollback means for rolling back the data updated in the connection state session to the state before the update by the connection state session. (6) The processes of the session disconnecting unit and the rollback unit are performed before the system switching process by the system switching unit .

第2の本発明は、データベースサーバと、複数のデータ処理部で冗長構成が形成されているデータベースクライアントとを備えるデータベースシステムの制御方法において、(1)異常検知手段、系切替手段、セッション情報収集手段、セッション切断手段及びロールバック手段を備え、(2)上記異常検知手段は、第1のデータ処理部が現用系として動作しているときに、上記第1のデータ処理部で異常が発生したことを検知し、(3)上記系切替手段は、上記異常検知手段が上記第1のデータ処理部の異常を検知した場合に、待機系として動作している第2のデータ処理部を現用系に切替える処理を行い、(4)上記セッション情報収集手段は、上記第1のデータ処理部が異常発生時に、上記データベースサーバと接続状態であった接続状態セッションに係るセッション情報を収集し、(5)上記セッション切断手段は、上記セッション情報収集手段が収集したセッション情報に基づいて、上記データベースサーバ上の上記第1のデータ処理部に係る接続状態セッションを特定し、上記データベースサーバに、上記第1のデータ処理部に係る接続状態セッションの切断を実行させ、(6)上記ロールバック手段は、上記セッション切断手段が接続状態セッションを切断する際に、上記データベースサーバ上で、当該接続状態セッションで更新されたデータについて、当該接続状態セッションによる更新前の状態にロールバックさせ、(7)上記セッション切断手段及び上記ロールバック手段の処理は、上記系切替手段による系切替処理の前に実行されることを特徴とする。 According to a second aspect of the present invention, there is provided a database system control method comprising a database server and a database client having a redundant configuration formed by a plurality of data processing units. (1) Abnormality detection means, system switching means, session information collection Means, a session disconnecting means, and a rollback means. (2) The abnormality detecting means has an abnormality in the first data processing unit when the first data processing unit is operating as an active system. (3) The system switching means sets the second data processing section operating as a standby system to the active system when the abnormality detection means detects an abnormality of the first data processing section. (4) The session information collection means is connected to the database server when the first data processing unit is abnormal. (5) The session disconnecting means is connected to the first data processing unit on the database server based on the session information collected by the session information collecting means. And the database server executes disconnection of the connection state session related to the first data processing unit. (6) When the session disconnection unit disconnects the connection state session, On the database server, the data updated in the connection state session is rolled back to the state before the update by the connection state session . (7) The processing of the session disconnection means and the rollback means is the system switching It is executed before the system switching process by means, characterized in Rukoto.

本発明によれば、データベースサーバのデータにアクセスするデータ処理部が冗長化されたデータベースクライアントで、系切替が発生した場合の影響を低減することができるデータベースシステムを提供することができる。   ADVANTAGE OF THE INVENTION According to this invention, the database system which can reduce the influence at the time of system switching can be provided by the database client with which the data processing part which accesses the data of a database server was made redundant.

実施形態に係るデータベースシステムの全体構成について示したブロック図である。It is the block diagram shown about the whole structure of the database system which concerns on embodiment. 実施形態に係るデータベースシステムにおけるレコード更新の基本動作について示したシーケンス図である。It is the sequence diagram shown about the basic operation | movement of the record update in the database system which concerns on embodiment. 実施形態に係るデータベースシステムにおいて、ACT系のアプリケーションプロセスに異常が発生した場合の状態の遷移について示した説明図である。In the database system according to the embodiment, it is an explanatory diagram showing a state transition when an abnormality occurs in an ACT-based application process. 実施形態に係るデータベースクライアントで系切替が発生した場合の動作について示したフローチャートである。It is the flowchart shown about the operation | movement when system switching generate | occur | produces in the database client which concerns on embodiment. 実施形態に係るデータベースクライアントで系切替に伴うセッション切断(強制ロールバック処理を含む)が発生した場合の動作について示したフローチャートである。It is the flowchart shown about the operation | movement when the session cutting | disconnection (including forced rollback process) accompanying system switching generate | occur | produces in the database client which concerns on embodiment. 実施形態に係るデータベースシステムにおいて、系切替が発生した場合の状態の遷移について示した説明図(その1)である。In the database system which concerns on embodiment, it is explanatory drawing (the 1) shown about the transition of a state when system switching generate | occur | produces. 実施形態に係るデータベースシステムにおいて、系切替が発生した場合の状態の遷移について示した説明図(その2)である。In the database system which concerns on embodiment, it is explanatory drawing (the 2) shown about the transition of a state when system switching generate | occur | produces.

(A)主たる実施形態
以下、本発明によるデータベースシステム及びデータベースシステムの制御方法の一実施形態を、図面を参照しながら詳述する。
(A) Main Embodiment Hereinafter, an embodiment of a database system and a database system control method according to the present invention will be described in detail with reference to the drawings.

(A−1)実施形態の構成
図1は、この実施形態のデータベースシステム1の全体構成を示すブロック図である。
(A-1) Configuration of Embodiment FIG. 1 is a block diagram showing the overall configuration of the database system 1 of this embodiment.

データベースシステム1には、データベースサーバ10、及びデータベースクライアント20が配置されているものとする。なお、データベースサーバ10とデータベースクライアント20との間は、ネットワーク接続N1(接続手段は限定されない)が設定されているまた、データベースクライアント20の数は限定されないものである。   It is assumed that the database server 10 and the database client 20 are arranged in the database system 1. Note that a network connection N1 (the connection means is not limited) is set between the database server 10 and the database client 20, and the number of database clients 20 is not limited.

データベースサーバ10は、サーバ11及びファイルシステム12を有している。   The database server 10 includes a server 11 and a file system 12.

ファイルシステム12は、データファイルを格納するためのストレージである。図1では、ファイルシステム12は独立した装置として図示しているが、サーバ11と一体の装置として構築(内臓ストレージ上に構成)してもよい。   The file system 12 is a storage for storing data files. In FIG. 1, the file system 12 is illustrated as an independent device, but may be constructed (configured on a built-in storage) as a device integrated with the server 11.

サーバ11は、ファイルシステム12に格納されたデータを処理して、データベースクライアント20に対してデータベースサービスを提供する装置(コンピュータ)である。サーバ11上では、データベースサービスのアプリケーションとしてサーバプロセス111が動作している。すなわち、サーバ11には、データベースサービスのプログラムがインストールされており、サーバ11上でそのプログラムを実行することにより、サーバプロセス111が起動する。   The server 11 is a device (computer) that processes data stored in the file system 12 and provides a database service to the database client 20. On the server 11, a server process 111 operates as a database service application. That is, a database service program is installed in the server 11, and the server process 111 is started by executing the program on the server 11.

ファイルシステム12には、管理対象となるデータ自体を格納するためのデータ記憶領域121と、データ更新のロールバック等を実現するためのログ記憶領域122とが確保されているものとする。サーバプロセス111は、データ記憶領域121の各データを処理単位(以下では、この処理単位を「レコード」と呼ぶ)ごとに、状態管理する、また、サーバプロセス111は、データ記憶領域121の各レコードについて、更新を行った場合には、その更新に係る履歴情報を、ロールバック可能な形式で、ログ記憶領域122に記憶する処理も行うものとする。   It is assumed that the file system 12 has a data storage area 121 for storing data to be managed itself and a log storage area 122 for realizing data update rollback and the like. The server process 111 manages the status of each piece of data in the data storage area 121 for each processing unit (hereinafter, this processing unit is referred to as “record”). The server process 111 also records each record in the data storage area 121. When the update is performed, the history information related to the update is also stored in the log storage area 122 in a rollable format.

データベースクライアント20は、データベースサーバ10からデータベースサービスの提供を受ける装置(コンピュータ)である。なお、データベースクライアント20は、単純にデータベースを利用するクライアント端末ではなく、データベースを利用したアプリケーションサービス(例えば、ウェブサーバやコールセンタサーバの機能等)を他の端末等に提供するものとしても良いことは当然である。また、データベースクライアント20では、複数のサーバ30(コンピュータ)による冗長構成が組まれているものとする。   The database client 20 is a device (computer) that receives a database service from the database server 10. It should be noted that the database client 20 is not a client terminal that simply uses a database, but may provide an application service (for example, a function of a web server or a call center server) using another database to other terminals. Of course. Further, it is assumed that the database client 20 has a redundant configuration with a plurality of servers 30 (computers).

この実施形態では、データベースクライアント20は、2台のサーバ30(30−1、30−2)による冗長構成となっているものとする。なお、データベースクライアント20内の冗長系(サーバ30)の数は限定されないものである。   In this embodiment, the database client 20 is assumed to have a redundant configuration with two servers 30 (30-1 and 30-2). The number of redundant systems (servers 30) in the database client 20 is not limited.

そして、データベースクライアント20では、複数のサーバ30のうち、いずれかがACT系として動作し、他のサーバ30がSBY系として動作する冗長構成(クラスタリング構成)となっているものとする。   The database client 20 has a redundant configuration (clustering configuration) in which one of the plurality of servers 30 operates as an ACT system and the other servers 30 operate as an SBY system.

すなわち、データベースクライアント20では、複数のハードウェア(サーバ30−1、30−2)を論理的に1つのサーバとして動作するようなクラスタリング構成となっている。そして、サーバ30間では、クラスタリング構成を実現するために相互通信可能なネットワーク接続N2(通信路)が設定されている。各サーバ30間のネットワーク接続N2の通信方式は限定されないものであり、例えば、各種イーサネット(登録商標)やファイバーチャネル等の種々の通信方式(インタフェース)を適用することができる。また、この実施形態では、ネットワーク接続N1、N2は別個の通信路として説明しているが、同じ通信路(通信媒体)を共用するようにしてもよい。   That is, the database client 20 has a clustering configuration in which a plurality of hardware (servers 30-1 and 30-2) operate logically as one server. A network connection N2 (communication path) capable of mutual communication is set between the servers 30 in order to realize a clustering configuration. The communication method of the network connection N2 between the servers 30 is not limited. For example, various communication methods (interfaces) such as various Ethernet (registered trademark) and fiber channel can be applied. In this embodiment, the network connections N1 and N2 are described as separate communication paths. However, the same communication path (communication medium) may be shared.

次に、各サーバ30の内部構成について説明する。この実施形態では、各サーバ30は全て同じ構成であるものとして説明する。   Next, the internal configuration of each server 30 will be described. In this embodiment, each server 30 is described as having the same configuration.

各サーバ30は、ハードウェア31(コンピュータ)上に、OS及び各種ソフトウェアがインストールされた構成となっており、起動した状態の機能的構成としては図1のように示すことができる。図1では、各サーバ30には、OSの機能により起動するカーネル32上で、冗長構成系等の管理を行うためのミドルウェアとして障害管理33、及び系構成管理34が動作している。そして、各サーバ30において、上述のミドルウェア上では、データベースクライアントとしてアプリケーションプロセス35が動作している。   Each server 30 has a configuration in which an OS and various types of software are installed on hardware 31 (computer), and the functional configuration in the activated state can be illustrated as shown in FIG. In FIG. 1, a failure management 33 and a system configuration management 34 operate as middleware for managing a redundant configuration system and the like on each server 30 on a kernel 32 activated by an OS function. In each server 30, an application process 35 operates as a database client on the above-described middleware.

上述の通り、データベースクライアント20は、1台以上在っても良く、提供するサービス毎にサーバを分けたり、負荷分散で同一サービスの提供をすることが可能である。   As described above, there may be one or more database clients 20, and it is possible to divide a server for each service to be provided or to provide the same service by load balancing.

データベースクライアント20では、通常、サービスを提供するアプリケーションプロセス35はACT系側のプロセスであり、SBY系のアプリケーションプロセス35は、空転(または、未起動)状態となる。データベースクライアント20において、このような、クラスタリング構成の制御(例えば、系切り替えやアプリケーションプロセス35の起動/停止制御等)については、サーバ30のミドルウェア(障害管理33及び系構成管理34)の相互通信により行われる。   In the database client 20, the application process 35 that provides a service is normally an ACT system process, and the SBY application process 35 is in an idle (or unstarted) state. In the database client 20, such clustering configuration control (for example, system switching, start / stop control of the application process 35, etc.) is performed by mutual communication between the middleware (failure management 33 and system configuration management 34) of the server 30. Done.

なお、図1では、データベースクライアント20とデータベースサーバ10との間のネットワーク接続N1として、1本の線により論理的構成を図示している。しかし、実際には、ネットワーク接続N1は、各サーバ30が他のサーバ30の動作に拘わらずデータベースサーバ10と通信可能な接続構成となっている必要がある。例えば、それぞれのサーバ30がネットワークインタフェースを備え、それぞれネットワーク接続する構成(例えば、VRRP(Virtual Router Redundancy Protocol)の構成)としても良いし、データベースクライアント20内で図示しない通信制御装置(例えば、レイヤ2スイッチ等のスイッチ装置)を備えて、各サーバ30をネットワーク接続する構成としてもよい。さらに、図1では、データベースサーバ10側は冗長構成として図示していないが、冗長構成としてもよいことは当然である。   In FIG. 1, the logical configuration is illustrated by one line as the network connection N <b> 1 between the database client 20 and the database server 10. However, actually, the network connection N1 needs to have a connection configuration in which each server 30 can communicate with the database server 10 regardless of the operation of the other servers 30. For example, each server 30 may be configured to have a network interface and be connected to the network (for example, VRRP (Virtual Router Redundancy Protocol)), or a communication control device (for example, layer 2) not shown in the database client 20. A switch device such as a switch) may be provided so that each server 30 is connected to the network. Further, in FIG. 1, the database server 10 side is not shown as a redundant configuration, but it is a matter of course that a redundant configuration may be used.

次に、データベースクライアント20(アプリケーションプロセス35)とデータベースサーバ10(サーバプロセス111)とが協働して行うデータ処理について説明する。   Next, data processing performed in cooperation between the database client 20 (application process 35) and the database server 10 (server process 111) will be described.

アプリケーションプロセス35とサーバプロセス111との間のデータ処理は、トランザクション単位で実行されるものとする。そして、アプリケーションプロセス35とサーバプロセス111との間では、1つのセッション開始から終了までに行われる処理を1つのトランザクションとして管理されるものとして説明する。例えば、アプリケーションプロセス35とサーバプロセス111との間で、1つのセッション(トランザクション)について、ユニークなIDが付与される。   It is assumed that data processing between the application process 35 and the server process 111 is executed in units of transactions. Then, between the application process 35 and the server process 111, the processing performed from the start to the end of one session will be described as being managed as one transaction. For example, a unique ID is assigned to one session (transaction) between the application process 35 and the server process 111.

また、サーバプロセス111は、各データの整合性等を保つために、各レコードの状態を管理(アクセス管理)しながらトランザクション処理を実行する。この実施形態では、例として、サーバプロセス111は、各レコードについて、現在処理中のセッション(トランザクション)以外からのアクセスを禁止する「競合ロック状態」、又は、いずれのセッション(トランザクション)からもアクセス可能な「解放状態」のいずれかの状態で管理されるものとする。サーバプロセス111は、データベースクライアント20からの要求に応じて、データ記憶領域121のレコードのレコードを更新すると、当該レコードについて「競合ロック状態」として管理する。そして、その後、サーバプロセス111は、データベースクライアント20(更新したアプリケーションプロセス35)からの要求に応じて、当該レコードのコミットを行った後、当該レコードを解放状態として管理する。サーバプロセス111は、競合ロック状態のレコードについては、他のトランザクションからのデータ更新を待ち合わせ状態として管理し、解放状態となった後に更新を行う。   The server process 111 executes transaction processing while managing the state of each record (access management) in order to maintain the consistency of each data. In this embodiment, as an example, the server process 111 can access each record from a “contention lock state” that prohibits access from other than the session (transaction) currently being processed, or from any session (transaction). It shall be managed in any of the “released state”. When the server process 111 updates the record of the record in the data storage area 121 in response to a request from the database client 20, the server process 111 manages the record as a “contention lock state”. After that, the server process 111 commits the record in response to a request from the database client 20 (updated application process 35), and manages the record as a released state. The server process 111 manages the data update from other transactions as a waiting state for the record in the contention lock state, and updates the record after entering the release state.

(A−2)実施形態の動作
次に、以上のような構成を有するこの実施形態のデータベースシステム1の動作(実施形態のデータベースシステムの制御方法)を説明する。
(A-2) Operation of Embodiment Next, the operation of the database system 1 of this embodiment having the above configuration (the database system control method of the embodiment) will be described.

(A−2−1)データ更新の基本シーケンス
図2は、データベースサーバ10(ファイルシステム12のデータ記憶領域121)上で任意のデータ(以下、「レコードA」と呼ぶ)を更新する場合のトランザクション処理の例について示したシーケンス図である。
(A-2-1) Basic Sequence of Data Update FIG. 2 shows a transaction when updating arbitrary data (hereinafter referred to as “record A”) on the database server 10 (data storage area 121 of the file system 12). It is the sequence diagram shown about the example of the process.

ここでは、データベースクライアント20は、初期において、サーバ30−1がACT系、サーバ30−2がSBY系として動作しているものとして説明する。   Here, it is assumed that the database client 20 is initially operating as the server 30-1 as an ACT system and the server 30-2 as an SBY system.

まず、データベースクライアント20におけるACT系(サーバ30−1)のアプリケーションプロセス35が、データベースサーバ10(サーバ11のサーバプロセス111)にセッション接続要求(データベース処理に係るセッション接続要求)を送信し(S101)、データベースサーバ10(サーバプロセス111)が、その送信要求について応答(接続OK)したものとする(S102)。   First, the application process 35 of the ACT system (server 30-1) in the database client 20 transmits a session connection request (session connection request related to database processing) to the database server 10 (server process 111 of the server 11) (S101). Assume that the database server 10 (server process 111) responds (connects OK) to the transmission request (S102).

なお、ACT系のアプリケーションプロセス35は、データベースサーバ10ヘのアクセスが必要となる都度セッション生成するようにしてもよいし、予め用意された接続セッションを排他的に確保して利用しても良い。   The ACT application process 35 may generate a session each time access to the database server 10 is required, or may exclusively use a connection session prepared in advance.

そして、ACT系のアプリケーションプロセス35は、データベースサーバ10(サーバプロセス111)とのセッションを保持(生成又は確保)した後、任意のレコードAについて内容を変更する更新要求を送信したものとする(S103)。   Then, the ACT application process 35 holds a session with the database server 10 (server process 111) and then transmits an update request for changing the content of an arbitrary record A (S103). ).

そして、レコードAの更新要求を受けたデータベースサーバ10(サーバプロセス111)は、ファイルシステム12(データ記憶領域121)のレコードAについて更新処理を行ったものとする(S104)。ここでは、レコードAの初期状態は解放状態で、データベースサーバ10(サーバプロセス111)によるレコードAの更新は成功したものとする。そして、データベースサーバ10(サーバプロセス111)は、レコードAを、競合ロック状態として管理する。以後、データベースサーバ10(サーバプロセス111)は、レコードAについて、コミットによる更新確定までの間は、他接続セッション(トランザクション)からの更新要求は、待ち合わせ状態として管理する。また、データベースサーバ10(サーバプロセス111)は、データ記憶領域121のレコードAについて、更新前の状態へロールバック可能とするためのログ情報をログ記憶領域122に記憶する。   Then, it is assumed that the database server 10 (server process 111) that has received the update request for record A has performed update processing on record A in the file system 12 (data storage area 121) (S104). Here, it is assumed that the initial state of the record A is a released state, and the update of the record A by the database server 10 (server process 111) is successful. Then, the database server 10 (server process 111) manages the record A as a contention lock state. Thereafter, the database server 10 (server process 111) manages an update request from another connection session (transaction) as a waiting state for the record A until the update is confirmed by the commit. Further, the database server 10 (server process 111) stores, in the log storage area 122, log information for enabling the rollback of the record A in the data storage area 121 to the state before the update.

そして、データベースサーバ10(サーバプロセス111)は、レコードAの更新結果(更新成功)を、ACT系のアプリケーションプロセス35に応答する(S105)。   Then, the database server 10 (server process 111) responds to the update result (update success) of the record A to the ACT system application process 35 (S105).

そして、更新成功の更新結果を受けたACT系のアプリケーションプロセス35は、データベースサーバ10(サーバプロセス111)に、レコードAのコミット要求を送信する(S106)。   The ACT application process 35 that has received the update result indicating the successful update transmits a commit request for the record A to the database server 10 (server process 111) (S106).

そして、レコードAのコミット要求を受けたデータベースサーバ10(サーバプロセス111)は、レコードAのコミット処理(競合ロック状態を解除して解放状態とする処理)を実行し(S107)、コミット処理の結果(コミット成功)をACT系のアプリケーションプロセス35に応答する(S108)。   The database server 10 (server process 111) that has received the commit request for record A executes the commit process for record A (the process for releasing the contention lock state and releasing it) (S107), and the result of the commit process (Commit success) is returned to the ACT application process 35 (S108).

上述のように、データベースサーバ10(サーバプロセス111)は、コミットによる更新レコードの確定について、トランザクション単位に実行する。また、データベースサーバ10(サーバプロセス111)では、このコミット処理が実施されたことを契機として、レコードAの競合ロック状態が解除され、他トランザクションからレコードAへのデータ更新(待ち合わせ状態のトランザクション等)が可能となる。これにより、データベースサーバ10(サーバプロセス111)では、関連性のあるレコードの更新において、内容の矛盾が発生しない(整合性を保つ)ことを保障する。   As described above, the database server 10 (server process 111) executes update record confirmation by commit in units of transactions. Further, in the database server 10 (server process 111), when the commit process is performed, the contention lock state of the record A is released, and data is updated from another transaction to the record A (such as a transaction in a waiting state). Is possible. As a result, the database server 10 (server process 111) ensures that no content conflict occurs (maintains consistency) in updating related records.

そして、ACT系のアプリケーションプロセス35は、データベースサーバ10(サーバプロセス111)に対してセッションの切断を要求し(S109)、一連のトランザクション(セッション)の処理が終了する。   Then, the ACT application process 35 requests the database server 10 (server process 111) to disconnect the session (S109), and a series of transaction (session) processing ends.

なお、ACT系のアプリケーションプロセス35では、図1に示す一連の処理(接続セッション生成から、切断まで)の詳細を、メモリ上で管理する必要がある(この手続き単位を、以下では、「コンテキスト」、又は「ハンドラ」と呼ぶ)。   In the ACT application process 35, it is necessary to manage details of a series of processes (from connection session generation to disconnection) shown in FIG. 1 on a memory (this procedure unit is referred to as “context” below). Or “handler”).

(A−2−2)レコード更新後、コミット処理前に異常が発生した場合
次に、上述の図2のシーケンスにおいて、データベースシステム1(サーバプロセス111)がレコードAの更新を実行した後、コミット処理前(ステップS103の処理後から、ステップS107の処理前までの間)に、ACT系のアプリケーションプロセス35が異常状態(例えば、コアダンプを出力した状態)となった場合の動作について説明する。
図3では、上述の図2のシーケンスにおいて、ステップS103の処理後から、ステップS107の処理前までの間に、ACT系のアプリケーションプロセス35が異常となった状態について示している。すなわち、この時点では、レコードAに対するコミット処理が未実施であるため、レコードAは競合ロック状態となっている。
(A-2-2) When an error occurs after record update and before commit processing Next, in the sequence of FIG. 2 described above, the database system 1 (server process 111) executes update of record A and then commits. An operation when the ACT application process 35 enters an abnormal state (for example, a state in which a core dump is output) before processing (after the processing in step S103 to before the processing in step S107) will be described.
FIG. 3 shows a state in which the ACT-related application process 35 becomes abnormal between the process of step S103 and before the process of step S107 in the sequence of FIG. That is, at this time, since the commit process for the record A has not been performed, the record A is in the contention lock state.

そして、図3では、この時点で、ACT系のアプリケーションプロセス35(サーバ30−1のアプリケーションプロセス35)が異常状態となり、障害管理33でその異常状態が検知され、系構成管理34により系切替が開始されたものとする。そして、このとき、データベースクライアント20で系切替が実行される場合の動作について図4、図5のフローチャートを用いて説明する。   In FIG. 3, at this time, the ACT system application process 35 (the application process 35 of the server 30-1) becomes an abnormal state, the failure management 33 detects the abnormal state, and the system configuration management 34 switches the system. It shall be started. At this time, the operation when system switching is executed by the database client 20 will be described with reference to the flowcharts of FIGS.

図4、図5では、ACT系として動作していたサーバ30−1がSBY系に切り替わり、SBY系として動作していたサーバ30−2がACT系に切り替わる動作について示している。そして、図4、図5では、ACT系として動作していたサーバ30−1を「旧ACT系」又は「新SBY系」と図示している。また、図4、図5では、SBY系として動作していたサーバ30−2を、「新ACT系」又は「旧SBY系」と図示している。   4 and 5 show an operation in which the server 30-1 operating as the ACT system is switched to the SBY system and the server 30-2 operating as the SBY system is switched to the ACT system. 4 and 5, the server 30-1 operating as the ACT system is illustrated as “old ACT system” or “new SBY system”. 4 and 5, the server 30-2 operating as the SBY system is illustrated as “new ACT system” or “old SBY system”.

まず、旧ACT系(サーバ30−1)の系構成管理34で、系切替が決定され、通信により、旧SBY系(サーバ30−2)の系構成管理34に、系切替の要求が通知されたものとする。そして、旧SBY系(サーバ30−2)では、系構成管理34からアプリケーションプロセス35に、新ACT系として起動することの要求(再開起動要求)があったものとする。そして、旧SBY系(サーバ30−2)のアプリケーションプロセス35が、その再開起動要求を受付けたものとする(S201)。   First, system switching is determined by the system configuration management 34 of the old ACT system (server 30-1), and a system switching request is notified to the system configuration management 34 of the old SBY system (server 30-2) through communication. Shall be. In the old SBY system (server 30-2), it is assumed that the system configuration management 34 has requested the application process 35 to start as a new ACT system (restart activation request). Then, it is assumed that the application process 35 of the old SBY system (server 30-2) has accepted the restart activation request (S201).

そして、サーバ30−2のアプリケーションプロセス35は、再開起動要求を受付けると、旧SBY系から新ACT系に遷移する処理を開始する。具体的には、サーバ30−2のアプリケーションプロセス35は、旧SBY系から新ACT系に遷移する際、データベースサーバ10と協働して、旧ACT系のアプリケーションプロセス35で未完結となっているセッション(接続状態となっているセッション)について、強制的に切断するセッション切断処理を行う。そして、このセッション切断処理に伴って、データベースサーバ10では、旧ACT系のアプリケーションプロセス35で未完結となっているセッションに係る競合ロック状態のレコードを、強制的にロールバックする処理(以下、「強制ロールバック処理」と呼ぶ)が行われる(S202)。   And the application process 35 of the server 30-2 will start the process which changes to the new ACT type | system | group from the old SBY type | system | group, if a restart starting request | requirement is received. Specifically, the application process 35 of the server 30-2 is incomplete in the old ACT system application process 35 in cooperation with the database server 10 when transitioning from the old SBY system to the new ACT system. Session disconnection processing that forcibly disconnects the session (session session) is performed. Along with this session disconnection process, the database server 10 forcibly rolls back a record in a contention lock state related to a session that has not been completed in the old ACT application process 35 (hereinafter, “ (Referred to as “forced rollback process”) (S202).

旧ACT系のアプリケーションプロセス35で未完結となっているトランザクションに係るセッションは、データベースサーバ10側では継続しており、レコードAの状態も競合ロック状態のままである。そこで、サーバ30−2のアプリケーションプロセス35は、旧SBY系から新ACT系に遷移する際に、セッション切断処理(強制ロールバック処理を含む)を実行することにより、データベースサーバ10側の状態を、旧ACT系のアプリケーションプロセス35がセッション(トランザクション)を開始する前の状態に復帰させる。すなわち、セッション切断処理(強制ロールバック処理を含む)により、レコードAは更新前の状態にロールバックされ、さらに競合ロック状態から解放されて解放状態に復帰し、他セッション(トランザクション)によるデータ更新も可能となる。   The session related to the transaction that has not been completed in the old ACT system application process 35 continues on the database server 10 side, and the state of the record A remains in the contention lock state. Therefore, when the application process 35 of the server 30-2 transitions from the old SBY system to the new ACT system, by executing session disconnection processing (including forced rollback processing), the state on the database server 10 side is changed. The old ACT system application process 35 is restored to the state before starting the session (transaction). That is, by session disconnection processing (including forced rollback processing), record A is rolled back to the state before update, released from the contention lock state, returned to the release state, and data update by another session (transaction) is also performed. It becomes possible.

セッション切断処理が終了すると、サーバ30−2のアプリケーションプロセス35は、旧SBY系から新ACT系に遷移する初期設定処理を実行し(S203)、サービスを再開し(S204)、データベースサーバ10に対して新たな更新要求を送信可能な状態となる。   When the session disconnection process ends, the application process 35 of the server 30-2 executes an initial setting process for transitioning from the old SBY system to the new ACT system (S203), restarts the service (S204), and Thus, a new update request can be sent.

次に、サーバ30−2のアプリケーションプロセス35によるセッション切断処理(強制ロールバック処理を含む)の詳細について図5のフローチャートを用いて説明する。   Next, details of session disconnection processing (including forced rollback processing) by the application process 35 of the server 30-2 will be described with reference to the flowchart of FIG.

サーバ30−2のアプリケーションプロセス35は、セッション切断処理を開始すると、データベースサーバ10(サーバプロセス111)とのセッションを接続し(S301)、旧ACT系アプリケーションプロセス35に係る継続中のセッション情報(トランザクション情報)の収集を試みる(S302)。   When the application process 35 of the server 30-2 starts session disconnection processing, it connects a session with the database server 10 (server process 111) (S301), and continues session information (transaction) related to the old ACT system application process 35. (Information) is collected (S302).

ここで、サーバ30−2のアプリケーションプロセス35が収集するセッション情報の形式は限定されないものであるが、例えば、現在サーバプロセス111で接続中のセッションのIDの一覧としてもよい。   Here, the format of the session information collected by the application process 35 of the server 30-2 is not limited. For example, a list of IDs of sessions currently connected by the server process 111 may be used.

そして、サーバ30−2のアプリケーションプロセス35は、収集したセッション情報から、旧ACT系アプリケーションプロセス35に係る継続中のセッションの有無を確認する(S303)。そして、サーバ30−2のアプリケーションプロセス35は、該当するセッションを検出した場合には、後述するステップS304の処理から動作し、該当するセッションが検出できない場合にはセッション切断処理を終了する。   Then, the application process 35 of the server 30-2 confirms whether or not there is an ongoing session related to the old ACT application process 35 from the collected session information (S303). Then, the application process 35 of the server 30-2 operates from the process of step S304 described later when the corresponding session is detected, and ends the session disconnection process when the corresponding session cannot be detected.

サーバ30−2のアプリケーションプロセス35が、収集したセッション情報から、旧ACT系アプリケーションプロセス35に係る継続中のセッションの有無を確認する方法については限定されないものである。サーバ30−2のアプリケーションプロセス35は、例えば、旧ACT系のサーバ30−1から、アプリケーションプロセス35が出力したコアダンプを、系構成管理34経由で取得して、そのコアダンプから、旧ACT系アプリケーションプロセス35のセッション(セッションID)を特定し、収集したセッション情報と照合するようにしてもよい。   The method in which the application process 35 of the server 30-2 confirms whether there is an ongoing session related to the old ACT application process 35 from the collected session information is not limited. The application process 35 of the server 30-2 acquires, for example, the core dump output from the application process 35 from the old ACT server 30-1 via the system configuration management 34, and the old ACT application process is obtained from the core dump. 35 sessions (session IDs) may be identified and collated with collected session information.

そして、該当するセッションを検出した場合、サーバ30−2のアプリケーションプロセス35は、そのセッションを指定して、データベースサーバ10(サーバプロセス111)に切断を要求する。そして、データベースサーバ10(サーバプロセス111)側で要求されたセッションの処理が実行される。そして、データベースサーバ10(サーバプロセス111)から、サーバ30−2のアプリケーションプロセス35に、セッション切断の結果(切断の成功又は失敗)が通知されることになる(S304)。   When a corresponding session is detected, the application process 35 of the server 30-2 designates the session and requests the database server 10 (server process 111) to disconnect. Then, the session processing requested on the database server 10 (server process 111) side is executed. Then, the database server 10 (server process 111) notifies the application process 35 of the server 30-2 of the session disconnection result (success or failure of disconnection) (S304).

この場合、サーバ30−2のアプリケーションプロセス35には、データベースサーバ10上で、他のアプリケーションプロセス35からのセッションであっても切断が可能な権限が付与されている必要がある。また、このとき、サーバ30−2のアプリケーションプロセス35は、複数のセッション切断を要求することもありえる。例えば、アプリケーションプロセス35がマルチスレッド構成で、各スレッドが接続セッションを生成している場合は、旧ACT系から複数の接続セッションが存在することとなるためである。   In this case, it is necessary for the application process 35 of the server 30-2 to be given an authority capable of disconnecting even a session from another application process 35 on the database server 10. At this time, the application process 35 of the server 30-2 may request disconnection of a plurality of sessions. For example, when the application process 35 has a multi-thread configuration and each thread generates a connection session, there are a plurality of connection sessions from the old ACT system.

図6は、系切り替え時の新ACT系のアプリケーションプロセス35が再開起動処理時に旧ACT系からの接続セッションを強制切断する際のデータベースシステム1の状態について示した説明図である。   FIG. 6 is an explanatory diagram showing the state of the database system 1 when the new ACT application process 35 at the time of system switching forcibly disconnects the connection session from the old ACT system at the time of restart activation processing.

図6に示すように、データベースサーバ10(サーバプロセス111)は、要求に基づくセッション切断に伴い、切断されたセッションに係るトランザクションについては、もはや完結することは無いと判断し、当該トランザクションが保持しているレコード(競合ロック状態を維持し、コミット待ちの状態のレコード)のロールバック処理を実施する。言い換えると、データベースサーバ10は、コミットされていない更新中のレコードに対しては、データベースクライアント20との疎通が破棄された場合は、コミットではなく、ロールバックを選択し、データを更新前の状態に書き戻す。尚、セッション切断処理開始の条件となる、旧ACT系での異常状態検出時(アプリケーションプロセス35の異常検出時)において、当該アプリケーションプロセス35は、実行中トランザクションを完結することはできないため、上述の接続セッション切断及びロールバックの処理は、期待される動作といえる。   As shown in FIG. 6, the database server 10 (server process 111) determines that the transaction related to the disconnected session is no longer completed due to the session disconnection based on the request, and the transaction is retained. Rollback processing is performed on the record being held (the record that maintains the contention lock state and is waiting for commit). In other words, the database server 10 selects the rollback instead of the commit when the communication with the database client 20 is abandoned with respect to the record being updated that has not been committed. Write back to Note that when an abnormal state is detected in the old ACT system (when an abnormality is detected in the application process 35), which is a condition for starting the session disconnection process, the application process 35 cannot complete the transaction being executed. The connection session disconnection and rollback processing is an expected operation.

そして、サーバ30−2のアプリケーションプロセス35は、切断要求した全てのセッション切断(強制ロールバック処理を含む)が成功したか否かを確認する(S305)。サーバ30−2のアプリケーションプロセス35は、切断要求した全てのセッション切断が成功した場合には、強制ロールバック処理を終了し、そうでない場合(未完了)の場合には、上述のステップS302に戻り、再度セッション切断の処理を実行する。   Then, the application process 35 of the server 30-2 confirms whether or not all sessions requested to be disconnected (including forced rollback processing) have succeeded (S305). The application process 35 of the server 30-2 ends the forced rollback process when all the sessions requested to be disconnected are successful, and returns to the above-described step S302 if not (incomplete). Execute the session disconnection process again.

図7は、系切り替え時の新ACT系のアプリケーションプロセス35が再開起動処理した後(系切替後)のデータベースシステム1の状態について示した説明図である。   FIG. 7 is an explanatory diagram showing the state of the database system 1 after the restart process of the new ACT application process 35 at the time of system switching (after system switching).

図7の状態では、新ACT系のアプリケーションプロセス35により、旧ACT系の接続セッション切断処理(強制ロールバック処理を含む)が完了している。したがって、図7の状態では、データベースサーバ10では、レコードAに係るデータ更新要求の阻害要因は無く、データ更新を実施することが可能となっている。   In the state of FIG. 7, the old ACT connection session disconnection process (including the forced rollback process) is completed by the new ACT application process 35. Therefore, in the state of FIG. 7, the database server 10 has no obstruction factor for the data update request related to the record A and can perform data update.

(A−3)実施形態の効果
この実施形態によれば、以下のような効果を奏することができる。
(A-3) Effects of Embodiment According to this embodiment, the following effects can be achieved.

データベースクライアント20では、ACT系のアプリケーションプロセス35が異常状態となった場合には、系切替時に新ACT系のアプリケーションプロセス35が、データベースサーバ10に、旧ACT系に係るセッション切断及び強制ロールバック処理を要求する。これにより、新ACT系のアプリケーションプロセス35では、系切替直後であっても、ACT系のアプリケーションプロセス35が異常状態となったことに伴う系切替時の影響(例えば、旧ACT系の障害の影響を受け、レコードの競合待ち合わせとなること等)を低減することができる。   In the database client 20, when the ACT application process 35 is in an abnormal state, the new ACT application process 35 performs session disconnection and forced rollback processing related to the old ACT system at the time of system switching. Request. As a result, in the new ACT system application process 35, even immediately after the system switching, the effect at the time of system switching due to the abnormal state of the ACT system application process 35 (for example, the influence of the failure of the old ACT system) And waiting for record competition, etc.) can be reduced.

(B)他の実施形態
本発明は、上記の実施形態に限定されるものではなく、以下に例示するような変形実施形態も挙げることができる。
(B) Other Embodiments The present invention is not limited to the above-described embodiments, and may include modified embodiments as exemplified below.

(B−1)上記の実施形態では、図5に示すセッション切断処理について、新ACT系のサーバ30−1が行う場合について説明したが、旧ACT系のサーバ30−1側で、アプリケーションプロセス35の障害(コアダンプ出力)を、障害管理33で検出した段階で実行するようにしても良い。また、旧ACT系及び新ACT系の両方で実行し、より確実にセッション切断処理(強制ロールバック処理を含む)を実行するようにしてもよい。 (B-1) In the above embodiment, the session disconnection process illustrated in FIG. 5 is described as being performed by the new ACT server 30-1, but the application process 35 is performed on the old ACT server 30-1. This failure (core dump output) may be executed when the failure management 33 detects it. Further, it may be executed in both the old ACT system and the new ACT system, and the session disconnection process (including the forced rollback process) may be executed more reliably.

また、上述の図5に示す処理では、データベースサーバ10(サーバプロセス111)側で、セッション切断に伴って対応するレコードをロールバックするが、データベースクライアント20側(サーバ30−2のアプリケーションプロセス35側)から、セッション又はレコードを指定してロールバックを要求するようにしてもよい。   In the process shown in FIG. 5, the database server 10 (server process 111) side rolls back the corresponding record when the session is disconnected, but the database client 20 side (server 30-2 application process 35 side). ) To request a rollback by designating a session or record.

(B−2)新ACT系のサーバ30−1で、上述の図5のフローチャートの処理が行われている間、旧ACT系アプリケーションプロセス35では、異常状態(コアダンプ出力の状態)を継続するようにしてもよいし、系構成管理34により、強制的に終了するようにしてもよい。新ACT系からの接続セッション切断要求よりも先に、コアダンプ終了によりアプリケーションプロセス35が消滅した場合も、最終的には期待通り、ロールバックが実施されるはずだからである。 (B-2) While the process of the flowchart of FIG. 5 described above is performed on the new ACT server 30-1, the old ACT application process 35 continues the abnormal state (core dump output state). Alternatively, the system configuration management 34 may forcibly terminate the process. This is because even if the application process 35 disappears due to the end of the core dump prior to the connection session disconnection request from the new ACT system, the rollback should be performed as expected.

1…データベースシステム、10…データベースサーバ、11…サーバ装置、111…サーバプロセス、12…ファイルシステム、121…データ記憶領域、122…ログ記憶領域、20…データベースクライアント、30、30−1、30−2…サーバ、31…ハードウェア、32…カーネル、33…障害管理、34…系構成管理、35…アプリケーションプロセス。   DESCRIPTION OF SYMBOLS 1 ... Database system, 10 ... Database server, 11 ... Server apparatus, 111 ... Server process, 12 ... File system, 121 ... Data storage area, 122 ... Log storage area, 20 ... Database client, 30, 30-1, 30- 2 ... server, 31 ... hardware, 32 ... kernel, 33 ... failure management, 34 ... system configuration management, 35 ... application process.

Claims (2)

データベースサーバと、複数のデータ処理部で冗長構成が形成されているデータベースクライアントとを備えるデータベースシステムにおいて、
第1のデータ処理部が現用系として動作しているときに、上記第1のデータ処理部で異常が発生したことを検知する異常検知手段と、
上記異常検知手段が上記第1のデータ処理部の異常を検知した場合に、待機系として動作している第2のデータ処理部を現用系に切替える処理を行う系切替手段と、
上記第1のデータ処理部が異常発生時に、上記データベースサーバと接続状態であった接続状態セッションに係るセッション情報を収集するセッション情報収集手段と、
上記セッション情報収集手段が収集したセッション情報に基づいて、上記データベースサーバ上の上記第1のデータ処理部に係る接続状態セッションを特定し、上記データベースサーバに、上記第1のデータ処理部に係る接続状態セッションの切断を実行させるセッション切断手段と、
上記セッション切断手段が接続状態セッションを切断する際に、上記データベースサーバ上で、当該接続状態セッションで更新されたデータについて、当該接続状態セッションによる更新前の状態にロールバックさせるロールバック手段とを有し、
上記セッション切断手段及び上記ロールバック手段の処理は、上記系切替手段による系切替処理の前に実行される
ことを特徴とするデータベースシステム。
In a database system comprising a database server and a database client in which a redundant configuration is formed by a plurality of data processing units,
An abnormality detection means for detecting that an abnormality has occurred in the first data processing unit when the first data processing unit is operating as an active system;
A system switching unit for performing processing for switching the second data processing unit operating as a standby system to the active system when the abnormality detection unit detects an abnormality in the first data processing unit;
Session information collection means for collecting session information relating to a connection state session that is in a connection state with the database server when the first data processing unit is abnormal;
Based on the session information collected by the session information collection means, the connection state session related to the first data processing unit on the database server is specified, and the connection related to the first data processing unit is connected to the database server Session disconnection means for executing state session disconnection;
Yes When the session disconnection means disconnects the connected state session, on the database server, the data updated in the connected state sessions, and rollback means for rollback to the state before update by the connection state session And
The database system characterized in that the process of the session disconnecting means and the rollback means is executed before the system switching process by the system switching means .
データベースサーバと、複数のデータ処理部で冗長構成が形成されているデータベースクライアントとを備えるデータベースシステムの制御方法において、
異常検知手段、系切替手段、セッション情報収集手段、セッション切断手段及びロールバック手段を備え、
上記異常検知手段は、第1のデータ処理部が現用系として動作しているときに、上記第1のデータ処理部で異常が発生したことを検知し、
上記系切替手段は、上記異常検知手段が上記第1のデータ処理部の異常を検知した場合に、待機系として動作している第2のデータ処理部を現用系に切替える処理を行い、
上記セッション情報収集手段は、上記第1のデータ処理部が異常発生時に、上記データベースサーバと接続状態であった接続状態セッションに係るセッション情報を収集し、
上記セッション切断手段は、上記セッション情報収集手段が収集したセッション情報に基づいて、上記データベースサーバ上の上記第1のデータ処理部に係る接続状態セッションを特定し、上記データベースサーバに、上記第1のデータ処理部に係る接続状態セッションの切断を実行させ、
上記ロールバック手段は、上記セッション切断手段が接続状態セッションを切断する際に、上記データベースサーバ上で、当該接続状態セッションで更新されたデータについて、当該接続状態セッションによる更新前の状態にロールバックさせ
上記セッション切断手段及び上記ロールバック手段の処理は、上記系切替手段による系切替処理の前に実行される
ことを特徴とするデータベースシステムの制御方法。
In a database system control method comprising a database server and a database client in which a redundant configuration is formed by a plurality of data processing units,
Anomaly detection means, system switching means, session information collection means, session disconnection means and rollback means,
The abnormality detection means detects that an abnormality has occurred in the first data processing unit when the first data processing unit is operating as an active system,
The system switching unit performs a process of switching the second data processing unit operating as a standby system to the active system when the abnormality detection unit detects an abnormality of the first data processing unit,
The session information collection means collects session information related to a connection state session that is in a connection state with the database server when the first data processing unit is abnormal,
The session disconnecting unit specifies a connection state session related to the first data processing unit on the database server based on the session information collected by the session information collecting unit, and sends the first session to the database server. Disconnect the connection status session related to the data processing unit,
When the session disconnection unit disconnects the connection state session, the rollback unit rolls back the data updated in the connection state session on the database server to a state before the update by the connection state session. ,
The database system control method, wherein the session disconnecting means and the rollback means are executed before the system switching process by the system switching means .
JP2013007662A 2013-01-18 2013-01-18 Database system and database system control method Active JP6107159B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013007662A JP6107159B2 (en) 2013-01-18 2013-01-18 Database system and database system control method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013007662A JP6107159B2 (en) 2013-01-18 2013-01-18 Database system and database system control method

Publications (2)

Publication Number Publication Date
JP2014137798A JP2014137798A (en) 2014-07-28
JP6107159B2 true JP6107159B2 (en) 2017-04-05

Family

ID=51415239

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013007662A Active JP6107159B2 (en) 2013-01-18 2013-01-18 Database system and database system control method

Country Status (1)

Country Link
JP (1) JP6107159B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6751269B2 (en) * 2017-06-30 2020-09-02 京セラドキュメントソリューションズ株式会社 Remote communication control system, session management system and session management program
CN111552637B (en) * 2020-04-20 2023-05-19 北京顺达同行科技有限公司 Database state detection method and device, electronic equipment and storage medium thereof

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5691248B2 (en) * 2010-05-28 2015-04-01 富士通株式会社 Task takeover program, processing device, and computer system

Also Published As

Publication number Publication date
JP2014137798A (en) 2014-07-28

Similar Documents

Publication Publication Date Title
EP3694148B1 (en) Configuration modification method for storage cluster, storage cluster and computer system
WO2016070375A1 (en) Distributed storage replication system and method
CN103226502B (en) A kind of data calamity is for control system and data reconstruction method
JP5352115B2 (en) Storage system and method for changing monitoring condition thereof
JP4572250B2 (en) Computer switching method, computer switching program, and computer system
EP2902922B1 (en) Distributed file system and data backup method for distributed file system
WO2021136422A1 (en) State management method, master and backup application server switching method, and electronic device
US8533525B2 (en) Data management apparatus, monitoring apparatus, replica apparatus, cluster system, control method and computer-readable medium
JP2007226400A (en) Computer management method, computer management program, stand-by server for managing configuration of execution server, and computer system
CN102394914A (en) Cluster brain-split processing method and device
JPH08110895A (en) Node device and storage device used in distributed system and restoring method for server for resources management in distributed system
WO2021103499A1 (en) Multi-active data center-based traffic switching method and device
CN109639773A (en) A kind of the distributed data cluster control system and its method of dynamic construction
JP2011164800A (en) Storage system and storage control method
JP6107159B2 (en) Database system and database system control method
JP5285045B2 (en) Failure recovery method, server and program in virtual environment
JP5154843B2 (en) Cluster system, computer, and failure recovery method
CN113297134B (en) Data processing system, data processing method and device, and electronic device
JP2004272318A (en) System changeover system, processing method therefor, and processing program therefor
US9110850B2 (en) Method for accelerating start up of a computerized system
JP6856574B2 (en) Service continuation system and service continuation method
JP2009098715A (en) Redundant system device, job execution method in redundant system device, and execution program
WO2014155654A1 (en) Information processing device, and information processing device replacement assistance system and replacement assistance method
CN115617917B (en) Method, device, system and equipment for controlling multiple activities of database cluster
JP2008310517A (en) Data identification method, data identification program, and active system device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20151117

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20160830

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20160913

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20161110

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20170207

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20170220

R150 Certificate of patent or registration of utility model

Ref document number: 6107159

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150