JPH11306063A - High reliability database management system - Google Patents

High reliability database management system

Info

Publication number
JPH11306063A
JPH11306063A JP10110603A JP11060398A JPH11306063A JP H11306063 A JPH11306063 A JP H11306063A JP 10110603 A JP10110603 A JP 10110603A JP 11060398 A JP11060398 A JP 11060398A JP H11306063 A JPH11306063 A JP H11306063A
Authority
JP
Japan
Prior art keywords
servers
data processing
processing
client
database
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
JP10110603A
Other languages
Japanese (ja)
Inventor
Atsuo Ogawa
斡朗 小川
Yusuke Tamura
雄介 田村
Hiroshi Okude
浩史 奥出
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.)
KOKUSAI ZUNOU SANGYO KK
Original Assignee
KOKUSAI ZUNOU SANGYO KK
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 KOKUSAI ZUNOU SANGYO KK filed Critical KOKUSAI ZUNOU SANGYO KK
Priority to JP10110603A priority Critical patent/JPH11306063A/en
Publication of JPH11306063A publication Critical patent/JPH11306063A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To provide a database management system high in reliability. SOLUTION: This system is provided with plural servers 110, 120 and 130 provided with storage units 112, 122 and 132 where the same databases are mutually stored and clients 210, 220 and 230 which demand execution of a structured query language(SQL) of the plural servers 110, 120 and 130. Each of the servers 110 to 130 returns the execution result of the SQL to the client and the clients 210 to 230 demand execution of the next SQL of the server when responses from all the servers are the same. When responses from more than one server are different from others, the clients 210 to 230 demands the execution of the SQL once again. Thus, reliability of a database system is improved and it is possible to maintain the database of all the servers 110, 120 and 130 in the same way.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明はデータベース管理シ
ステムに関するものであり、特に信頼性を向上させるこ
とのできるデータベース管理システムに関する。
The present invention relates to a database management system, and more particularly to a database management system capable of improving reliability.

【0002】[0002]

【従来の技術】従来より、サーバに格納されたデータベ
ースに、複数のクライアントから参照や更新を行うこと
ができるクライアント/サーバ型のデータベース管理シ
ステムが用いられている。このようなデータベース管理
システムに用いられるサーバとしては、高速な処理速度
や高い信頼性が必要であるため、一般に高価な大型コン
ピュータが用いられていた。
2. Description of the Related Art Hitherto, a client / server type database management system capable of referring to and updating a database stored in a server from a plurality of clients has been used. As a server used in such a database management system, a high-speed processing speed and a high reliability are required, and therefore, an expensive large-sized computer is generally used.

【0003】近年、安価なパーソナルコンピュータ用の
プロセッサの性能が飛躍的に向上し、処理速度に関して
は従来の大型コンピュータと同等、あるいはそれ以上の
ものが開発されている。そのため、安価なパーソナルコ
ンピュータをデータベース管理システムのサーバとして
用いることができるようになってきている。
In recent years, the performance of inexpensive processors for personal computers has been dramatically improved, and processing speeds equivalent to or larger than those of conventional large computers have been developed. Therefore, an inexpensive personal computer can be used as a server of a database management system.

【0004】[0004]

【発明が解決しようとする課題】しかしながら、上記の
ような安価なパーソナルコンピュータをデータベース管
理システムのサーバとして用いる場合、同じ操作を行え
ば、毎回同じ不具合が出るような再現性のあるトラブル
についてはハードウェア的あるいはソフトウェア的に対
処して完全に解決することが可能であるが、静電気によ
る記憶媒体内のデータの異常や、メモリのチェックミス
など、環境に依存する再現性のない不具合は、容易に低
減することはできず、完全に防ぐことは不可能である。
このような不具合によりデータベースが不正な内容とな
った場合、気付かずに放置され、大きな障害になること
があるという問題があった。ある程度以上に不具合を低
減し、信頼性を向上させるためには、非常にコストがか
かっていた。
However, when such an inexpensive personal computer is used as a server of a database management system, if the same operation is performed, reproducible troubles that cause the same trouble every time will be hardened. Although it is possible to completely solve the problem by using hardware or software, problems such as abnormalities in the data in the storage medium due to static electricity or errors in checking the memory, such as errors in the environment, can be easily achieved. It cannot be reduced and cannot be completely prevented.
When the database becomes illegal contents due to such a problem, there is a problem that the database may be left unnoticed and become a serious obstacle. In order to reduce defects and improve reliability more than a certain level, it was very costly.

【0005】データベース管理システムの信頼性を向上
させるために、複数のサーバにデータベースを格納した
ものが知られている。従来は、データベースを複数のサ
ーバに分散させ、障害発生時のリスクを低減することが
行われているが、上記のような不具合の発生を防止する
ことはできなかった。複数のサーバに同一のデータベー
スを格納することも考えられるが、複数のサーバが複数
のクライアントから同時に更新を受け付ける場合、クラ
イアントからの指令の受け付け順が異なることにより複
数のサーバの間でデータベースの同一性が保たれなくな
ることがあるという問題があった。各サーバのデータベ
ースの内容を同一に保つためにサーバ同士でコミュニケ
ートしたり、データの交換を行うと、ーつのサーバに異
常が発生して停止した場合に、他のサーバが影響を受け
て停止する恐れがあるため、信頼性向上の効果は小さい
という問題があった。
[0005] In order to improve the reliability of a database management system, a system in which a database is stored in a plurality of servers is known. Conventionally, the database is distributed to a plurality of servers to reduce the risk in the event of a failure, but it has not been possible to prevent the occurrence of the above-mentioned problems. It is conceivable to store the same database on multiple servers, but when multiple servers receive updates from multiple clients at the same time, the order of receiving commands from clients is different, and the same database is stored between multiple servers. There is a problem that the property may not be maintained. When communicating or exchanging data between servers to keep the contents of the database of each server the same, if one server stops due to an error, the other servers are affected and stopped There is a problem that the effect of improving the reliability is small because of the fear.

【0006】本発明の目的は、上記の問題を解決し、信
頼性を大きく向上させることのできる高信頼度データベ
ース管理システムを提供することにある。
An object of the present invention is to provide a high-reliability database management system capable of solving the above-mentioned problems and greatly improving reliability.

【0007】[0007]

【課題を解決するための手段】本発明の請求項1に記載
の高信頼度データベース管理システム、請求項4に記載
の高信頼度データベースの処理実行方法または請求項7
に記載の高信頼度データベースプログラムによれば、サ
ーバがデータ処理指令の処理結果をクライアントに返送
し、クライアントが複数のサーバから返送された処理結
果の全てが同一であるか否かを判定し、複数のサーバか
ら返送された処理結果の少なくとも一つが他のサーバか
ら返送された処理結果と異なるとき、データ処理指令の
処理を打ち切り、実行前の状態に戻した後に、クライア
ントがデータ処理指令を再実行する依頼を複数のサーバ
の全てに対して行う。このため、全てのサーバで同一の
不具合が発生しない限りは、データ処理指令を正しく実
行することができる。したがって、1つのサーバのシス
テム障害発生率をSとするとき、n個のサーバを用いる
ことにより、サーバシステム全体の全体システム障害発
生率は、ほぼSn となり0に近づけることができる。
A high reliability database management system according to claim 1 of the present invention, a method for executing processing of a high reliability database according to claim 4 or claim 7 of the present invention.
According to the high reliability database program described in the server returns the processing result of the data processing command to the client, the client determines whether all of the processing results returned from the plurality of servers are the same, When at least one of the processing results returned from the plurality of servers is different from the processing result returned from another server, the client terminates the processing of the data processing instruction, returns to the state before execution, and then re-executes the data processing instruction. Requests to be executed are made to all of the multiple servers. Therefore, as long as the same trouble does not occur in all servers, the data processing command can be correctly executed. Therefore, when a system failure rate of one server is S, by using the n number of servers, the entire system failure of the entire server system can be substantially close to S n becomes 0.

【0008】本発明の請求項2に記載の高信頼度データ
ベース管理システム、請求項5に記載の高信頼度データ
ベースの処理実行方法または請求項8に記載の高信頼度
データベースプログラムによれば、クライアントが依頼
したデータ処理指令の処理結果が所定時間内に返送され
ないサーバがあるとき、データ処理指令による処理を打
ち切り、実行前の状態に戻した後、データ処理指令の実
行の依頼を複数のサーバの全てに対して再実行するた
め、クライアントがサーバからの返答を待って長時間停
止するのを防止することができる。
According to a second aspect of the present invention, there is provided a high-reliability database management system, a high-reliability database processing method according to the fifth aspect, and a high-reliability database program according to the eighth aspect. If there is a server where the processing result of the data processing command requested by the server is not returned within a predetermined time, the processing by the data processing command is terminated, and after returning to the state before the execution, the request for the execution of the data processing command is transmitted to a plurality of servers. Since the process is re-executed for all, the client can be prevented from stopping for a long time waiting for a response from the server.

【0009】本発明の請求項3に記載の高信頼度データ
ベース管理システム、請求項6に記載の高信頼度データ
ベースの処理実行方法または請求項9に記載の高信頼度
データベースプログラムによれば、データ処理指令の再
実行が所定回数に達したとき、そのデータ処理指令を含
むトランザクションによる処理を打ち切り、実行前の状
態に戻すため、クライアントがデータ処理指令を再実行
する依頼を無限に繰り返すことを防止できる。
According to a third aspect of the present invention, there is provided a high reliability database management system, a high reliability database processing method according to the sixth aspect, and a high reliability database program according to the ninth aspect. When the re-execution of the processing command has reached the specified number of times, the processing by the transaction including the data processing command is terminated and the state before execution is returned, so that the client does not repeat the request to re-execute the data processing command indefinitely it can.

【0010】[0010]

【発明の実施の形態】以下、本発明の実施例を図面に基
づいて詳細に説明する。図1は本発明の高信頼度データ
ベース管理システムを示す模式図である。本実施例のデ
ータベース管理システム(DBMS:DataBase Managem
ent System)は、クライアント/サーバシステムにより
構成される。
Embodiments of the present invention will be described below in detail with reference to the drawings. FIG. 1 is a schematic diagram showing a high reliability database management system of the present invention. The database management system (DBMS: DataBase Managem) of this embodiment
ent System) is composed of a client / server system.

【0011】複数のサーバ110、120、130は、
それぞれ独立でかつ同一のデータベースを格納した記憶
装置112、122、132と、データベースに対して
参照や更新の処理を行う処理手段111、121、13
1とを備える。各サーバ同士は物理的に接続されておら
ず、サーバ同士ではデータの送受信は行われない。複数
のクライアント210、220、230は、それぞれ各
サーバ110、120、130とデータの送受信が可能
に通信回線により接続されている。
The plurality of servers 110, 120, 130
Storage devices 112, 122, and 132 that store independent and identical databases, and processing units 111, 121, and 13 that perform reference and update processing on the databases.
1 is provided. The servers are not physically connected to each other, and the servers do not transmit and receive data. The plurality of clients 210, 220, and 230 are connected to each of the servers 110, 120, and 130 by a communication line so that data can be transmitted and received.

【0012】サーバ110、120、130およびクラ
イアント210、220、230は、中央処理装置(C
PU)、主記憶装置(RAM)、補助記憶装置(ハード
ディスク)、入力装置(キーボード、マウス等)、出力
装置(モニタ、プリンタ等)を備えたコンピュータと、
コンピュータプログラムとにより構成される。このコン
ピュータプログラムは、フロッピーディスク(FD)、
CD−ROM、光磁気ディスク(MO)などのコンピュ
ータ読み取り可能な記憶媒体に記録して提供され、コン
ピュータのハードディスクなどにインストールされ、R
AM上に読み込まれて実行される。また、インターネッ
トのようなネットワーク上で提供することも可能であ
り、プログラムが、実行されるコンピュータ本体と離れ
た場所に記録されている場合もある。
The servers 110, 120 and 130 and the clients 210, 220 and 230 are provided with a central processing unit (C).
PU), a main storage device (RAM), an auxiliary storage device (hard disk), an input device (keyboard, mouse, etc.), and an output device (monitor, printer, etc.)
And a computer program. This computer program is a floppy disk (FD),
It is provided by being recorded on a computer-readable storage medium such as a CD-ROM, a magneto-optical disk (MO), and is installed on a hard disk of the computer.
It is read and executed on the AM. Further, the program may be provided on a network such as the Internet, and the program may be recorded in a place remote from the computer to be executed.

【0013】データベースの使用者はクライアント21
0、220、230となるコンピュータの入力装置を操
作して、サーバ110、120、130のデータベース
について参照や更新を行う。図2は、データベース10
の構造を示す模式図である。データベース10内には、
複数のテーブル11が含まれている。本実施例では、テ
ーブル11は固定長のデータ構造であるページ12に区
切られている。ページ12内にはデータベース10のレ
コードとなる複数の行13が含まれている。行13の中
には、データベース10のフィールドの内容となる図示
しない複数の列が含まれる。これらのテーブル11、ペ
ージ12、行13、列などをデータベース10の処理対
象リソースと呼ぶ。
The user of the database is the client 21
The input devices 0, 220, and 230 are operated to refer to and update the databases of the servers 110, 120, and 130. FIG. 2 shows the database 10
It is a schematic diagram which shows the structure of. In the database 10,
A plurality of tables 11 are included. In this embodiment, the table 11 is divided into pages 12 each having a fixed-length data structure. The page 12 includes a plurality of rows 13 serving as records of the database 10. The row 13 includes a plurality of columns (not shown) serving as the contents of the fields of the database 10. These tables 11, pages 12, rows 13, columns, and the like are referred to as resources to be processed by the database 10.

【0014】クライアント210、220、230がサ
ーバ110、120、130のデータベースにログイン
してからログアウトするまでを1つの処理セッションと
いう。1つの処理セッションは、1つまたは複数のトラ
ンザクションからなり、一時点で最大1個のトランザク
ションを実行できる。トランザクションはコミット(co
mmit)またはロールバック(Rollback)可能な最小の論
理的実行単位である。また、1つのトランザクションは
1つあるいは複数のSQL(Structured QueryLanguage
)等のデータ処理指令から構成される。
The period from when the client 210, 220, 230 logs in to the database of the server 110, 120, 130 until it logs out is called one processing session. One processing session is composed of one or more transactions, and a maximum of one transaction can be executed at a time. The transaction commits (co
It is the smallest logical execution unit that can be mmit or rollback. One transaction is composed of one or a plurality of SQL (Structured Query Language).
) And the like.

【0015】銀行の現金自動支払機を例にとると、端末
が朝に起動してから夕方に終了するまでが1つの処理セ
ッションであり、使用者の入金、振り込みなどの操作が
1つのトランザクションに対応する。例えば、ある口座
から別の口座への振り込みの場合、一方の口座の金額を
減少させる処理と、他方の口座の金額を増加させる処理
を行う必要があるが、この両方の処理が実行されるか
(コミット)、またはどちらも実行されないか(アボー
ト状態)でなくてはならない。
Taking a cash dispenser of a bank as an example, one processing session is from the start-up of a terminal in the morning to the end in the evening, and operations such as user's deposit and transfer are performed in one transaction. Corresponding. For example, in the case of transfer from one account to another account, it is necessary to perform a process to decrease the amount of one account and a process to increase the amount of the other account. (Commit), or neither (abort).

【0016】クライアントには、ユーザーインターフェ
イス(UI)の機能が備えられ、利用者が分かりやすい
形式でデータ操作を受け付け、これをSQLに変換する
ことができる。使用者の操作により、トランザクション
の実行が開始されると、クライアント210、220、
230から各サーバ110、120、130へトランザ
クションを構成するSQLの実行が依頼される。
The client has a function of a user interface (UI), and accepts a data operation in a format that is easy for the user to understand, and can convert the data operation into SQL. When execution of a transaction is started by a user operation, the clients 210, 220,
230 requests each of the servers 110, 120, and 130 to execute SQL constituting a transaction.

【0017】図1に示すように、複数のクライアントか
ら指令されたSQLの命令は、各サーバに設けられた先
入れ先出しの記憶領域である入力キュー113、12
3、133に格納される。処理手段111、121、1
31は、SQLを受け取り、これを最適化、同時実行制
御、障害復旧、安全性といった制御を行いながら、物理
的な記憶装置112、122、132に対する入出力演
算に変換して実行するSQLモジュール(SQLM)の
機能を備え、入力キュー113、123、133から順
次SQL命令を読み出し、SQL単位で処理を実行す
る。1つのデータベースに対して複数の処理セッション
がトランザクションを併行して実行可能である。
As shown in FIG. 1, SQL commands issued from a plurality of clients are input queues 113 and 12 which are first-in first-out storage areas provided in each server.
3 and 133. Processing means 111, 121, 1
The SQL module 31 receives the SQL, converts it into an input / output operation for the physical storage devices 112, 122, and 132 while performing control such as optimization, concurrent execution control, failure recovery, and safety. SQLM), and sequentially reads out SQL commands from the input queues 113, 123, and 133, and executes processing in SQL units. A plurality of processing sessions can execute a transaction in parallel for one database.

【0018】サーバ110、120、130の処理手段
111、121、131では、依頼されたSQLの処理
対象リソースを、記憶装置112、122、132内の
データベースからセッション単位に設けられる作業領域
に複製し、作業領域に対してSQLによる処理を行う。
サーバはクライアントからの依頼により、作業領域に対
してSQLが行った処理を打ち切り、全て実行前の状態
に戻す(ロールバック)、すなわちそのSQLによる処
理を無効とすることができる。
The processing means 111, 121, and 131 of the servers 110, 120, and 130 copy the requested SQL processing target resources from the databases in the storage devices 112, 122, and 132 to a work area provided for each session. , The SQL processing is performed on the work area.
At the request of the client, the server can abort the processing performed by the SQL on the work area and return it to the state before execution (rollback), that is, invalidate the processing by the SQL.

【0019】作業領域に対して、処理手段111、12
1、131が実行したSQLの処理結果は、出力キュー
114、124、134に格納され、順次実行を依頼し
たクライアントに返送される。クライアントでは、SQ
Lの実行を依頼した全てのサーバ110、120、13
0からの返答を比較する。
Processing means 111, 12
The processing results of the SQL executed by the programs 1 and 131 are stored in the output queues 114, 124 and 134, and are sequentially returned to the clients that have requested the execution. On the client, SQ
All servers 110, 120, and 13 that have requested the execution of L
Compare the responses from 0.

【0020】SQLが参照に関するものである場合は、
各サーバは参照したリソースの内容を処理結果として返
送する。クライアントは返送されたデータそのものを比
較し、全てが一致しているか否かを判定する。SQLが
列の更新に関するものである場合は、クライアントは各
サーバから送信されたデータを比較して全てが一致して
いるかどうかを判定する。
If the SQL is for reference,
Each server returns the contents of the referenced resource as a processing result. The client compares the returned data itself and determines whether or not all the data match. If the SQL is for a column update, the client compares the data sent from each server to determine if all match.

【0021】SQLが削除に関するものである場合は、
クライアントは各サーバから送信されたデータを比較し
て全てが一致しているかどうかを判定する。SQLが挿
入に関するものである場合は、それぞれの挿入要求が正
常に終了したことがわかればよい。クライアントで、全
てのサーバ110、120、130からの返送された処
理結果が同一であると判定されると、クライアントはサ
ーバに次のSQLの実行を依頼することができる。
If the SQL is for deletion,
The client compares the data transmitted from each server and determines whether or not all match. If the SQL is related to insertion, it is only necessary to know that each insertion request has been completed normally. If the client determines that the processing results returned from all the servers 110, 120, and 130 are the same, the client can request the server to execute the next SQL.

【0022】1つのSQLに対してサーバ110、12
0、130から返送された処理結果が1つでも異なる場
合、クライアントはそのSQLにより行った処理をロー
ルバックする依頼を全てのサーバ110、120、13
0に対して行い、そのSQLの再実行を依頼する。サー
バはそのSQLにより行った処理をロールバックしてか
ら、そのSQLを再実行する。したがって、サーバ11
0、120、130のいずれかにおいて、不具合が発生
し、不正な処理が行われた場合でも、他のサーバで正し
い処理が行われていれば、クライアントは全てのサーバ
110、120、130に対してSQLの実行を再依頼
し、同じ結果が得られるまで繰り返される。全てのサー
バで同一の不具合が発生しない限りは、正しい処理を行
うことができるため、サーバが1台のときのシステム障
害発生率をSとするとき、サーバがn台になればサーバ
ベースシステム全体の全体システム障害発生率はほぼS
nとなり0に近づき、信頼性を大きく向上させることが
できる。また、サーバのいずれか、例えばサーバ110
に障害が発生して停止した場合でも、サーバ110をク
ライアント210、220、230から切り離し、クラ
イアント210、220、230からSQLを実行する
依頼をサーバ120、130に対して行うように設定す
ることにより、データベースの参照や更新の処理を継続
することができる。
The server 110, 12 for one SQL
If any one of the processing results returned from 0, 130 is different, the client sends a request to roll back the processing performed by the SQL to all servers 110, 120, 13
0, and re-execute the SQL. The server rolls back the processing performed by the SQL, and then executes the SQL again. Therefore, the server 11
Even if a failure occurs in any of 0, 120, and 130, and the illegal processing is performed, if the correct processing is performed on another server, the client sends a message to all the servers 110, 120, and 130. SQL execution is requested again, and the process is repeated until the same result is obtained. As long as the same failure does not occur in all servers, correct processing can be performed. Therefore, when the system failure occurrence rate when one server is S and the number of servers is n, the entire server base system System failure rate is almost S
n becomes closer to 0, and the reliability can be greatly improved. One of the servers, for example, the server 110
Even if a failure occurs in the server 110, the server 110 is disconnected from the clients 210, 220, and 230, and a request to execute the SQL from the clients 210, 220, and 230 is made to the servers 120 and 130 so as to perform the setting. Thus, the processing of referring to and updating the database can be continued.

【0023】また、サーバによって、入力キュー11
3、123、133へのSQLの受け付け順が異なるこ
とがある。例えば、サーバ110およびサーバ120で
は、クライアント210による処理セッションAのSQ
L、クライアント220による処理セッションBのSQ
Lの順に入力キュー113、123に格納され、サーバ
130では処理セッションBのSQL、処理セッション
AのSQLの順に入力キュー133に格納されることが
ある。この場合、処理セッションAの処理対象リソース
が処理セッションBの処理対象リソースと重複している
と、サーバ110、120からクライアント210へ
は、処理セッションBのSQLを実行する前の処理セッ
ションAのSQLの処理結果が返送され、サーバ130
からクライアント210へは、処理セッションBのSQ
Lを実行した後の処理セッションAのSQLの処理結果
が返送されることになり、処理結果が異なる場合があ
る。本実施例では、上記のような場合、全てのサーバ1
10、120、130に対して処理セッションAのSQ
Lによる処理がロールバックされた後に、SQLの実行
が再び依頼され、全てのサーバで処理セッションBのS
QL、処理セッションAのSQLの順に実行されるよう
になる。そのため、全てのサーバ110、120、13
0のデータベースの内容は同一となり、同一の処理結果
がクライアント210に返送される。
The input queue 11 is also provided by the server.
3, 123, and 133, the order of receiving SQL may be different. For example, in the server 110 and the server 120, the SQ of the processing session A by the client 210
L, SQ of processing session B by client 220
L are stored in the input queues 113 and 123 in order, and the server 130 may store the SQL in the processing session B and the SQL in the processing session A in the input queue 133 in this order. In this case, if the processing target resource of the processing session A overlaps with the processing target resource of the processing session B, the server 110 or 120 sends to the client 210 the SQL of the processing session A before executing the SQL of the processing session B. Is returned and the server 130
From client 210 to SQ of processing session B
The processing result of the SQL of the processing session A after the execution of L is returned, and the processing result may be different. In the present embodiment, in the above case, all servers 1
SQ of processing session A for 10, 120, 130
After the processing by L is rolled back, execution of SQL is requested again, and S
QL and SQL of processing session A are executed in this order. Therefore, all the servers 110, 120, 13
0, the contents of the database are the same, and the same processing result is returned to the client 210.

【0024】1つの処理セッションが処理対象リソース
について処理を実行中には、他の処理セッションからア
クセスできないように、ロックすることが行われる。ロ
ックされた処理対象リソースについてSQLによる処理
を実行しようとすると、その処理対象リソースに対する
ロックが解除されるまでウェイト処理が行われ、ロック
解除後にSQLが実行される。SQLの受け付け順がサ
ーバによって異なると、処理対象リソースがロックされ
る順序が変わるため、SQLの処理対象リソースが1つ
のサーバではロックされておらず、他のサーバではロッ
クされている場合に、サーバからクライアントへの処理
結果の返送が遅れる場合がある。クライアントが依頼し
たSQLについて、例えば最初に1つのサーバからの返
答を受け取ってから所定の待ち時間以内に返答がないサ
ーバがあった場合は、クライアントはそのSQLにより
行った処理をロールバックする依頼を全てのサーバ11
0、120、130に対して行い、そのSQLの再実行
を依頼する。上記の待ち時間は使用者が設定することが
可能である。
While one processing session is executing processing on a processing target resource, locking is performed so that another processing session cannot access it. When an attempt is made to execute an SQL process for a locked processing target resource, a wait process is performed until the lock on the processing target resource is released, and the SQL is executed after the lock is released. If the order in which SQLs are accepted differs from server to server, the order in which the resources to be processed are locked changes. Therefore, if the resources to be processed in SQL are not locked by one server but locked by another server, Returning the processing result from the client to the client may be delayed. For example, if there is a server that has not responded within a predetermined waiting time after receiving a response from one server for the SQL requested by the client, the client issues a request to roll back the processing performed by the SQL. All servers 11
0, 120, and 130, and request re-execution of the SQL. The above waiting time can be set by the user.

【0025】前記所定の待ち時間以内に返答がないサー
バがあることによるSQLの再実行の繰り返しがNS
以上繰り返されると、そのSQLを含むトランザクショ
ンをロールバックする。上記のSQLを再実行する回数
S は、使用者が設定することが可能である。トランザ
クションがコミットしたとき、作業領域の内容はデータ
ベースに記録され、トランザクションがアボートしたと
きには、データベースの内容は変更されない。
If the re-execution of SQL is repeated N S times or more due to a server having no response within the predetermined waiting time, the transaction including the SQL is rolled back. The number N S of re-executing the above SQL can be set by the user. When the transaction commits, the contents of the work area are recorded in the database, and when the transaction aborts, the contents of the database remain unchanged.

【0026】図3は、本実施例のデータベース管理シス
テムにより、データベースの操作を行う手順を示すフロ
ーチャートである。ステップS101では、使用者が例
えばクライアント210を操作することにより、トラン
ザクションの実行が指示される。ステップS102で
は、クライアント210がトランザクションを構成する
SQLのうち1つを実行するように複数のサーバ11
0、120、130のそれぞれに依頼する。ステップS
103では、サーバ110、120、130が作業領域
に複製された処理対象リソースに対してクライアントか
ら依頼されたSQLを実行する。ステップS104で
は、サーバ110、120、130からクライアント2
10へSQLの処理結果を返送する。
FIG. 3 is a flowchart showing a procedure for operating a database by the database management system of this embodiment. In step S101, execution of a transaction is instructed by the user operating the client 210, for example. In step S102, the plurality of servers 11 are executed so that the client 210 executes one of the SQLs constituting the transaction.
Request each of 0, 120 and 130. Step S
In 103, the servers 110, 120, and 130 execute the SQL requested by the client on the processing target resources copied to the work area. In step S104, the client 2 is sent from the server 110, 120, or 130.
10 to return the SQL processing result.

【0027】ステップS105では、クライアント21
0が各サーバ110、120、130から返送された処
理結果が全て同一であるか否かを判定する。各サーバ1
10、120、130から返送された処理結果が1つで
も異なる場合は、ステップS106へ進み、SQLのロ
ールバック回数が所定の回数より小さいときは、SQL
をロールバックしてステップS102に戻り、SQLを
再実行する。ステップS106でSQLのロールバック
回数が所定の回数以上のときは、ステップS108でト
ランザクションをロールバックし、トランザクションは
アボートされる。ステップS102でSQLが始めに実
行される前にロールバック回数は0に設定され、ステッ
プ107でロールバックされる毎にロールバック回数は
加算される。ステップ105で、クライアント210が
依頼したSQLについて、最初に1つのサーバからの返
答を受け取ってから所定の待ち時間以内に他の全てのサ
ーバからの返答がない場合も、処理結果が異なる場合と
同様にステップS106へ進み、同様の処理を行う。
In step S105, the client 21
0 determines whether the processing results returned from the servers 110, 120, and 130 are all the same. Each server 1
If at least one of the processing results returned from 10, 120, and 130 is different, the process proceeds to step S106, and if the number of SQL rollbacks is smaller than a predetermined number, the SQL
Is rolled back, and the process returns to step S102 to execute SQL again. If the SQL rollback count is equal to or greater than the predetermined count in step S106, the transaction is rolled back in step S108, and the transaction is aborted. The number of rollbacks is set to 0 before SQL is first executed in step S102, and the number of rollbacks is added each time the rollback is performed in step 107. In step 105, regarding the SQL requested by the client 210, when there is no response from all the other servers within a predetermined waiting time after the response is first received from one server, it is the same as when the processing results are different. In step S106, the same process is performed.

【0028】ステップS105で、各サーバから返送さ
れた処理結果が全て同一であると判定された場合は、ス
テップS109に進み、そのSQLがトランザクション
の中で最後のSQLであれば、ステップS111でトラ
ンザクションをコミットし、作業領域にあるSQLによ
る処理結果をデータベースに書き込み、トランザクショ
ンの実行を終了する。ステップS109で、最後のSQ
Lではないと判定された場合は、S110で次のSQL
を実行するように指定してステップS102に戻り、ク
ライアントからSQLの実行が依頼される。
If it is determined in step S105 that the processing results returned from the respective servers are all the same, the process proceeds to step S109, and if the SQL is the last SQL in the transaction, the transaction proceeds to step S111. And writes the processing result by SQL in the work area to the database, and terminates the execution of the transaction. In step S109, the last SQ
If it is determined that it is not L, the next SQL is executed in S110.
Is executed and the process returns to step S102, and the client requests execution of SQL.

【0029】上記の実施例では、同じ内容のデータベー
スが記録されたサーバを3つ備えるデータベース管理シ
ステムについて説明したが、サーバを2つまたは4つ以
上の任意の数とすることも可能である。
In the above embodiment, a database management system including three servers in which databases having the same contents are recorded has been described. However, the number of servers may be two or four or more.

【図面の簡単な説明】[Brief description of the drawings]

【図1】本発明実施例の高信頼度データベース管理シス
テムの概要を示すブロック図である。
FIG. 1 is a block diagram showing an outline of a high reliability database management system according to an embodiment of the present invention.

【図2】本発明実施例のデータベース管理システムによ
るデータベースの構造を示す模式図である。
FIG. 2 is a schematic diagram showing a structure of a database by the database management system according to the embodiment of the present invention.

【図3】本発明実施例のデータベース管理システムによ
り処理を実行する手順のフローチャートを示す図であ
る。
FIG. 3 is a diagram showing a flowchart of a procedure for executing processing by the database management system according to the embodiment of the present invention.

【符号の説明】[Explanation of symbols]

110 サーバ 111 処理手段 112 記憶装置 113 入力キュー 114 出力キュー 120 サーバ 121 処理手段 122 記憶装置 123 入力キュー 124 出力キュー 130 サーバ 131 処理手段 132 記憶装置 133 入力キュー 134 出力キュー 210 クライアント 220 クライアント 230 クライアント 110 server 111 processing means 112 storage device 113 input queue 114 output queue 120 server 121 processing means 122 storage device 123 input queue 124 output queue 130 server 131 processing means 132 storage device 133 input queue 134 output queue 210 client 220 client 230 client

───────────────────────────────────────────────────── フロントページの続き (51)Int.Cl.6 識別記号 FI G06F 15/16 470 G06F 15/16 470R 17/30 15/40 330B ──────────────────────────────────────────────────の Continued on the front page (51) Int.Cl. 6 Identification code FI G06F 15/16 470 G06F 15/16 470R 17/30 15/40 330B

Claims (9)

【特許請求の範囲】[Claims] 【請求項1】 それぞれ同一のデータベースを格納する
記憶装置を備える複数の独立したサーバと、前記サーバ
に前記データベースに対するデータ処理指令の実行を依
頼する1つ以上のクライアントとを備えるデータベース
管理システムであって、 前記サーバは、前記クライアントから依頼されたデータ
処理指令を実行する手段と、前記データ処理指令による
処理を打ち切り、実行前の状態に戻す手段と、前記デー
タ処理指令の処理結果を前記クライアントに返送する手
段とを備え、 前記クライアントは、前記複数のサーバそれぞれに同一
のデータ処理指令の実行を依頼する手段と、全てのサー
バから返送された処理結果が同一であるか否かを判定す
る手段と、前記複数のサーバから返送された処理結果の
少なくとも一つが他のサーバから返送された処理結果と
異なるときに、前記データ処理指令による処理を打ち切
り、実行前の状態に戻す依頼と、前記データ処理指令を
再実行する依頼とを前記複数のサーバの全てに対して行
う手段とを備えることを特徴とする高信頼度データベー
ス管理システム。
1. A database management system comprising: a plurality of independent servers each having a storage device storing the same database; and one or more clients requesting the server to execute a data processing command for the database. Means for executing a data processing command requested by the client, means for terminating processing according to the data processing command and returning to a state before execution, and processing the result of the data processing command to the client. Means for requesting each of the plurality of servers to execute the same data processing command, and means for determining whether or not the processing results returned from all servers are the same. And at least one of the processing results returned from the plurality of servers is returned from another server. Means for performing a request for terminating the process according to the data processing command and returning to a state before execution and a request for re-executing the data processing command when all of the plurality of servers are different from the processed result. A highly reliable database management system comprising:
【請求項2】 前記クライアントは、依頼したデータ処
理指令の処理結果が所定時間内に返送されないサーバが
あるとき、前記データ処理指令による処理を打ち切り、
実行前の状態に戻す依頼と、前記データ処理指令を再実
行する依頼とを前記複数のサーバの全てに対して行う手
段を備えることを特徴とする請求項1に記載の高信頼度
データベース管理システム。
2. The client terminates the processing according to the data processing command when there is a server in which the processing result of the requested data processing command is not returned within a predetermined time.
2. The highly reliable database management system according to claim 1, further comprising means for making a request to return to a state before execution and a request to re-execute the data processing command to all of the plurality of servers. .
【請求項3】 前記データ処理指令の再実行が所定回数
に達したとき、前記データ処理指令を含むトランザクシ
ョンによる処理を打ち切り、実行前の状態に戻す手段を
備えることを特徴とする請求項1または2のいずれかに
記載の高信頼度データベース管理システム。
3. The data processing apparatus according to claim 1, further comprising: means for terminating the processing by the transaction including the data processing instruction when the re-execution of the data processing instruction reaches a predetermined number of times, and returning to a state before the execution. 3. The high reliability database management system according to any one of 2.
【請求項4】 それぞれ同一のデータベースが記憶され
る記憶装置を有する複数の独立したサーバに、1つ以上
のクライアントが前記データベースに対するデータ処理
指令の実行を依頼するデータベース管理システムのデー
タ処理実行方法であって、 前記クライアントが前記複数のサーバそれぞれに同一の
データ処理指令の実行を依頼する行程と、 前記複数のサーバが各データベースに対して前記クライ
アントから依頼されたデータ処理指令を実行する行程
と、 前記複数のサーバが前記データ処理指令の処理結果を前
記クライアントに返送する行程と、 前記クライアントが前記複数のサーバから返送された処
理結果の全てが同一であるか否かを判定する行程と、 前記複数のサーバから返送された処理結果の少なくとも
一つが他のサーバから返送された処理結果と異なると
き、前記複数のサーバの全てが前記データ処理指令によ
る処理を打ち切り、実行前の状態に戻した後に、前記ク
ライアントが前記データ処理指令を再実行する依頼を前
記複数のサーバの全てに対して行う行程とを備えること
を特徴とする高信頼度データベースの処理実行方法。
4. A data processing execution method for a database management system in which one or more clients request execution of a data processing instruction for the database to a plurality of independent servers each having a storage device storing the same database. A step in which the client requests each of the plurality of servers to execute the same data processing instruction; and a step in which the plurality of servers executes the data processing instruction requested by the client for each database. A step in which the plurality of servers return processing results of the data processing command to the client; anda step in which the client determines whether all of the processing results returned from the plurality of servers are the same. At least one of the processing results returned from multiple servers is from another server When the processing result is different from the transmitted processing result, all of the plurality of servers abort the processing according to the data processing instruction, and after returning to the state before execution, the client requests the plurality of servers to re-execute the data processing instruction. And performing a process for all of the servers.
【請求項5】 前記クライアントが依頼したデータ処理
指令の処理結果が所定時間内に返送されないサーバがあ
るとき、前記複数のサーバの全てが前記データ処理指令
による処理を打ち切り、実行前の状態に戻した後に、前
記クライアントが前記データ処理指令を再実行する依頼
を前記複数のサーバの全てに対して行う行程を含むこと
を特徴とする請求項4に記載の高信頼度データベースの
処理実行方法。
5. When there is a server for which a processing result of a data processing command requested by the client is not returned within a predetermined time, all of the plurality of servers terminate processing by the data processing command and return to a state before execution. 5. The method according to claim 4, further comprising a step of, after the client, requesting the client to re-execute the data processing command to all of the plurality of servers.
【請求項6】 前記データ処理指令の再実行が所定回数
に達したとき、前記データ処理指令を含むトランザクシ
ョンによる処理を打ち切り、実行前の状態に戻す行程を
含むことを特徴とする請求項4または5のいずれかに記
載の高信頼度データベースの処理実行方法。
6. The method according to claim 4, further comprising a step of terminating processing by a transaction including the data processing instruction when the re-execution of the data processing instruction has reached a predetermined number of times, and returning to a state before execution. 5. The method for executing processing of a high reliability database according to any one of 5.
【請求項7】 それぞれ同一のデータベースが記録され
る複数の独立したサーバに、クライアントがデータ処理
指令の実行を依頼するデータベース管理プログラムであ
って、 前記クライアントが前記複数のサーバそれぞれに同一の
データ処理指令の実行を依頼する手順と、 前記複数のサーバが各データベースに対して前記クライ
アントから依頼されたデータ処理指令を実行する手順
と、 前記複数のサーバが前記データ処理指令の処理結果を前
記クライアントに返送する手順と、 前記クライアントが前記複数のサーバから返送された処
理結果の全てが同一であるか否かを判定する手順と、 前記複数のサーバから返送された処理結果の少なくとも
一つが他のサーバから返送された処理結果と異なると
き、前記複数のサーバの全てが前記データ処理指令によ
る処理を打ち切り、実行前の状態に戻した後に、前記ク
ライアントが前記データ処理指令を再実行する依頼を前
記複数のサーバの全てに対して行う手順とを含むことを
特徴とする高信頼度データベースプログラムを記録した
コンピュータ読み取り可能な記憶媒体。
7. A database management program wherein a client requests execution of a data processing command to a plurality of independent servers each storing the same database, wherein the client performs the same data processing on each of the plurality of servers. A step of requesting execution of a command, a step of the plurality of servers executing a data processing command requested by the client for each database, and a step of the plurality of servers processing the result of the data processing command to the client. A step of returning, a step of the client determining whether all of the processing results returned from the plurality of servers are the same, and at least one of the processing results returned from the plurality of servers is another server. If the result of the processing is different from the processing result returned from the Aborting the process according to the command and returning to the state before execution, and then performing a request for re-executing the data processing command to all of the plurality of servers. A computer-readable storage medium that stores a database program.
【請求項8】 前記クライアントが依頼したデータ処理
指令の処理結果が所定時間内に返送されないサーバがあ
るとき、前記複数のサーバの全てに対する前記データ処
理指令による処理を打ち切り、実行前の状態に戻した後
に、前記データ処理指令を再実行する依頼を前記複数の
サーバの全てに対して行う手順を含むことを特徴とする
請求項7に記載の高信頼度データベースプログラムを記
録したコンピュータ読み取り可能な記憶媒体。
8. When there is a server in which the processing result of the data processing command requested by the client is not returned within a predetermined time, processing by the data processing command for all of the plurality of servers is terminated, and the state before execution is returned. 8. The computer-readable storage according to claim 7, further comprising a step of requesting all of the plurality of servers to re-execute the data processing instruction after the request. Medium.
【請求項9】 前記データ処理指令の再実行が所定回数
に達したとき、前記データ処理指令を含むトランザクシ
ョンによる処理を打ち切り、実行前の状態に戻す手順を
含むことを特徴とする請求項7または8のいずれかに記
載の高信頼度データベースプログラムを記録したコンピ
ュータ読み取り可能な記憶媒体。
9. The method according to claim 7, further comprising a step of terminating processing by a transaction including the data processing instruction when the re-execution of the data processing instruction has reached a predetermined number of times, and returning to a state before execution. A computer-readable storage medium storing the high-reliability database program according to any one of claims 8 to 10.
JP10110603A 1998-04-21 1998-04-21 High reliability database management system Pending JPH11306063A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP10110603A JPH11306063A (en) 1998-04-21 1998-04-21 High reliability database management system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP10110603A JPH11306063A (en) 1998-04-21 1998-04-21 High reliability database management system

Publications (1)

Publication Number Publication Date
JPH11306063A true JPH11306063A (en) 1999-11-05

Family

ID=14540040

Family Applications (1)

Application Number Title Priority Date Filing Date
JP10110603A Pending JPH11306063A (en) 1998-04-21 1998-04-21 High reliability database management system

Country Status (1)

Country Link
JP (1) JPH11306063A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100693710B1 (en) * 1999-12-23 2007-03-13 주식회사 케이티 The Method for data consistency between master and slave database

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100693710B1 (en) * 1999-12-23 2007-03-13 주식회사 케이티 The Method for data consistency between master and slave database

Similar Documents

Publication Publication Date Title
US5452445A (en) Two-pass multi-version read consistency
EP1612700B1 (en) Concurrent transactions and page synchronization
US6879981B2 (en) Sharing live data with a non cooperative DBMS
US5796934A (en) Fault tolerant client server system
US10250693B2 (en) Idempotence for database transactions
US5586310A (en) System for distributed database replicated read with exclusive central server transfer of primary copies
US8209699B2 (en) System and method for subunit operations in a database
US9904721B1 (en) Source-side merging of distributed transactions prior to replication
US7996363B2 (en) Real-time apply mechanism in standby database environments
US20130110781A1 (en) Server replication and transaction commitment
CN111259083A (en) Distributed transaction processing method and device
US8589362B1 (en) Cluster metadata recovery
US20090300018A1 (en) Data processing system and method of handling requests
US6061708A (en) System and method for supporting mixed-phase transactions in an object-oriented environment
CN101350022B (en) Changing process method based on database logical lock
WO2004055674A1 (en) Distributed transaction apparatus, distributed transaction program, distributed transaction method, and distributed transaction system
US6330686B1 (en) Handling protected conversation messages across IMS restart in shared queues environment
US8370317B2 (en) Synchronizing shared resources in a collection
US11748212B1 (en) Method and apparatus for resolving automatic transaction facility (ATF) failures
Thomasian et al. A new distributed optimistic concurrency control method and a comparison of its performance with two-phase locking
Wang et al. RDMA-enabled concurrency control protocols for transactions in the cloud era
US11797523B2 (en) Schema and data modification concurrency in query processing pushdown
EP3063630B1 (en) Non-blocking registration in distributed transactions
JPH11306063A (en) High reliability database management system
US6539434B1 (en) UOWE's retry process in shared queues environment