JP2002366407A - Data base replication system and data base automatic recovery method - Google Patents

Data base replication system and data base automatic recovery method

Info

Publication number
JP2002366407A
JP2002366407A JP2001170039A JP2001170039A JP2002366407A JP 2002366407 A JP2002366407 A JP 2002366407A JP 2001170039 A JP2001170039 A JP 2001170039A JP 2001170039 A JP2001170039 A JP 2001170039A JP 2002366407 A JP2002366407 A JP 2002366407A
Authority
JP
Japan
Prior art keywords
database
replication
transaction
replica
master
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2001170039A
Other languages
Japanese (ja)
Other versions
JP3797141B2 (en
JP3797141B6 (en
Inventor
Shinichiro Tsunako
振一郎 津波古
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.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to JP2001170039A priority Critical patent/JP3797141B6/en
Priority claimed from JP2001170039A external-priority patent/JP3797141B6/en
Publication of JP2002366407A publication Critical patent/JP2002366407A/en
Publication of JP3797141B2 publication Critical patent/JP3797141B2/en
Application granted granted Critical
Publication of JP3797141B6 publication Critical patent/JP3797141B6/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To provide a data base replication system capable of instantaneously detecting the occurrence of the mismatching of a master data base and a replica data base, and re-transferring only the mismatching data, and quickly executing the re-synchronizing processing of the master data base and the replica data base even when the abnormal end of transaction or system-down is generated. SOLUTION: In this data base replication system, a data base management system is provided with a transaction abandoning means for abandoning a transaction, and a replication control system is provided with a transaction sequence monitoring means for detecting the abnormal end of transaction, and a replication client system is provided with an update history re-transmitting means for reading the mismatching data of a master data base and a replica data base from the master data base, and for setting a correct value in the replica data base.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、データベースレプ
リケーションシステム、及びデータベース自動リカバリ
方法に関する。
The present invention relates to a database replication system and a database automatic recovery method.

【0002】[0002]

【従来の技術】従来から、1つの情報処理装置が保有す
るマスターデータベースの複製を別の情報処理装置にレ
プリカデータベースとして作成し、マスターデータベー
スとレプリカデータベースとの整合性を維持するような
データベースレプリケーション制御システムが知られて
いる。このような、従来のデータベースレプリケーショ
ン制御システムとしては、例えば特開2000−203
66号公報、特開2000−20374号公報、特開2
000−47918号公報、特開2001−34527
号公報及び特開平9−54718号公報に開示されたも
のがある。
2. Description of the Related Art Conventionally, a database replication control that creates a replica of a master database held by one information processing apparatus as a replica database in another information processing apparatus and maintains consistency between the master database and the replica database. Systems are known. As such a conventional database replication control system, for example, JP-A-2000-203
No. 66, JP-A-2000-20374, JP-A-2
000-47918, JP-A-2001-34527
And Japanese Patent Application Laid-Open No. 9-54718.

【0003】従来のデータベースレプリケーション制御
システムにおいては、データベース更新実行中のトラン
ザクション異常終了が発生したり、データベース更新実
行中にシステムクラッシュが発生することによるシステ
ム異常終了が起こることがある。このような異常終了時
においては、レプリケーション制御システムにおいて、
必ずしもマスターデータベースとレプリカデータベース
との整合性を保証することはできなかった。従って、上
述したような異常終了等によりマスターデータベースと
レプリカデータベースとの不整合が生じた場合はオンラ
イン業務処理を呈ししてマスターデータベースからレプ
リカデータベースへ全データを一括転送し、整合状態に
した上でオンライン業務を再開する必要があった。
In a conventional database replication control system, a transaction may be abnormally terminated during execution of a database update, or may be abnormally terminated due to a system crash during the execution of a database update. At the time of such abnormal termination, the replication control system
It was not always possible to guarantee the consistency between the master database and the replica database. Therefore, when inconsistency between the master database and the replica database occurs due to abnormal termination as described above, all data is transferred from the master database to the replica database in a batch by presenting online business processing, and then brought into a consistent state. It was necessary to resume online operations.

【0004】そのため、レプリケーションを正常稼動さ
せるためには、マスターデータベースとレプリカデータ
ベースとの内容を同一にしなければならず、そのために
は、一旦レプリケーション及びデータベース更新業務を
停止し、マスターデータベースからレプリカデータベー
スへの全データ一括転送を実施する必要がある。
[0004] Therefore, in order for replication to operate normally, the contents of the master database and the replica database must be the same. For this purpose, the replication and database update operations are temporarily stopped, and the master database is transferred from the replica database to the replica database. It is necessary to carry out batch transfer of all data.

【0005】従って、トランザクションの異常終了時や
システムダウン時においても、データベースの参照/更
新業務を停止したり、またレプリケーションを停止する
ことなく、瞬時にマスターデータベースとレプリカデー
タベースとの不整合の発生を検出し、不整合データのみ
を再転送し、マスターデータベースとレプリカデータベ
ースとの再同期処理を高速に実施可能なデータベースレ
プリケーションシステム及びデータベース自動リカバリ
方法が望まれていた。
Therefore, even when a transaction ends abnormally or when the system goes down, the inconsistency between the master database and the replica database can be instantaneously generated without stopping the database reference / update operation or stopping the replication. There has been a demand for a database replication system and a database automatic recovery method capable of detecting and retransferring only inconsistent data and performing high-speed resynchronization processing between a master database and a replica database.

【0006】[0006]

【発明が解決しようとする課題】従って、本発明の目的
は、トランザクションの異常終了時やシステムダウン時
においても、データベースの参照/更新業務を停止した
り、またレプリケーションを停止することなく、瞬時に
マスターデータベースとレプリカデータベースとの不整
合の発生を検出し、不整合データのみを再転送し、マス
ターデータベースとレプリカデータベースとの再同期処
理を高速に実施可能なデータベースレプリケーションシ
ステム及びデータベース自動リカバリ方法を提供するこ
とにある。
SUMMARY OF THE INVENTION Accordingly, an object of the present invention is to provide a method for instantaneously stopping database referencing / updating work and stopping replication even when a transaction ends abnormally or when a system goes down. Provide a database replication system and a database automatic recovery method capable of detecting occurrence of inconsistency between a master database and a replica database, retransferring only inconsistent data, and performing resynchronization processing between the master database and the replica database at high speed. Is to do.

【0007】[0007]

【課題を解決するための手段】前記課題を解決する本出
願の第1の発明は、マスターデータベースを有するレプ
リケーションサーバシステムと、レプリカデータベース
を有するレプリケーションクライアントシステムからな
るデータベースレプリケーションシステムであって、前
記レプリケーションサーバシステムが、データベース管
理システム及びレプリケーション制御システムを有し、
前記データベース管理システムがトランザクションを破
棄するトランザクション破棄手段を有し、前記レプリケ
ーション制御システムが、トランザクションの異常終了
を検出するトランザクションシーケンス監視手段を有
し、前記レプリケーションクライアントシステムが、前
記マスターデータベースと前記レプリカデータベースと
の不整合データをマスターデータベースから読み込み、
レプリカデータベースに正しい値を設定する、更新履歴
再送手段を有することを特徴とする、データベースレプ
リケーションシステムである。
According to a first aspect of the present invention, there is provided a database replication system comprising a replication server system having a master database and a replication client system having a replica database. The server system has a database management system and a replication control system,
The database management system has transaction abandonment means for abandoning a transaction, the replication control system has a transaction sequence monitoring means for detecting abnormal termination of a transaction, and the replication client system has the master database and the replica database. Read inconsistent data from the master database,
A database replication system comprising update history resending means for setting a correct value in a replica database.

【0008】かかる構成とすることにより、トランザク
ションが強制終了等により異常終了した場合、トランザ
クションシーケンス監視手段がトランザクションの異常
終了を検出し、トランザクション破棄手段がトランザク
ションを破棄し、更新履歴再送手段がマスターデータベ
ースとレプリカデータベースとの不整合データをマスタ
ーデータベースから読み込み、レプリカデータベースに
正しい値を設定するので、トランザクションが異常終了
した場合にマスターデータベースとレプリカデータベー
スとの整合をとることが可能となる。従って、本発明の
データベースレプリケーションシステムによれば、トラ
ンザクションの異常終了時やシステムダウン時において
も、データベースの参照/更新業務を停止したり、レプ
リケーションを停止することなく、データベースのレプ
リケーションを実施することが可能である。
With this configuration, when a transaction is abnormally terminated due to forced termination or the like, the transaction sequence monitoring means detects abnormal termination of the transaction, the transaction discarding means discards the transaction, and the update history resending means transmits the master database to the master database. Inconsistent data between the master database and the replica database is read from the master database, and a correct value is set in the replica database, so that if the transaction ends abnormally, the master database and the replica database can be matched. Therefore, according to the database replication system of the present invention, even when a transaction ends abnormally or the system goes down, database replication can be performed without stopping database reference / update operations or stopping replication. It is possible.

【0009】また、本出願の請求項2に記載の発明は、
請求項1に記載のデータレプリケーションシステムにお
いて、前記レプリケーション制御システムが、システム
ダウンが発生した際にデータの不整合を検出するシステ
ムダウン処理手段を有することを特徴とする。かかる構
成とすることにより、システムダウンが発生した場合に
も、不整合が自動検出され、マスターデータベースとレ
プリカデータベースとの整合をとることが可能となる。
The invention described in claim 2 of the present application is
2. The data replication system according to claim 1, wherein the replication control system includes a system down processing unit that detects data inconsistency when a system down occurs. With this configuration, even when a system failure occurs, inconsistency is automatically detected, and it is possible to match the master database and the replica database.

【0010】また、本出願の請求項3に記載の発明は、
マスターデータベース、データベース管理システム及び
レプリケーション制御システムを有するレプリケーショ
ンシステムとレプリカデータベースを有するレプリケー
ションクライアントシステムとからなるデータベースレ
プリケーションシステムを用いてデータベースを自動リ
カバリする方法であって、前記レプリケーション制御シ
ステムの有するトランザクションシーケンス監視手段が
トランザクションの異常終了を検出するステップ、前記
データベース管理システムの有するトランザクション破
棄手段がトランザクションを破棄するステップ、前記レ
プリケーションクライアントシステムの有する更新履歴
再送手段が、前記マスターデータベースと前記レプリカ
データベースとの不整合データをマスターデータベース
から読み込み、レプリカデータベースに正しい値を設定
するステップを有することを特徴とするデータベース自
動リカバリ方法である。
The invention described in claim 3 of the present application is
A method for automatically recovering a database using a database replication system including a replication system having a master database, a database management system, a replication control system, and a replication client system having a replica database, the transaction sequence monitoring of the replication control system Means for detecting abnormal termination of the transaction, steps for discarding the transaction by the transaction discarding means of the database management system, and means for updating the update history of the replication client system for inconsistency between the master database and the replica database. Reads data from the master database and A database automatic recovery method characterized by comprising the step of setting the correct value Rica database.

【0011】かかる構成とすることにより、トランザク
ションが強制終了等により異常終了した場合、トランザ
クションシーケンス監視手段がトランザクションの異常
終了を検出し、トランザクション破棄手段がトランザク
ションを破棄し、更新履歴再送手段がマスターデータベ
ースとレプリカデータベースとの不整合データをマスタ
ーデータベースから読み込み、レプリカデータベースに
正しい値を設定するので、トランザクションが異常終了
した場合にマスターデータベースとレプリカデータベー
スとの整合をとることのできるデータベース自動リカバ
リ方法となる。従って、本発明のデータベース自動リカ
バリ方法によれば、トランザクションの異常終了時やシ
ステムダウン時においても、データベースの参照/更新
業務を停止したり、レプリケーションを停止することな
く、データベースのレプリケーションを実施することが
可能である。
With this configuration, when a transaction is abnormally terminated due to forced termination or the like, the transaction sequence monitoring means detects the abnormal termination of the transaction, the transaction discarding means discards the transaction, and the update history resending means transmits the master database to the master database. Reads inconsistent data between the master database and the replica database from the master database, and sets the correct value in the replica database. This provides an automatic database recovery method that can match the master database and the replica database if a transaction ends abnormally. . Therefore, according to the automatic database recovery method of the present invention, even when a transaction ends abnormally or the system goes down, it is possible to execute database replication without stopping database reference / update operations or stopping replication. Is possible.

【0012】また、本出願の請求項4に記載の発明は、
請求項3に記載のデータベース自動リカバリ方法におい
て、前記レプリケーション制御システムの有するシステ
ムダウン処理手段がシステムダウンが発生した際にデー
タの不整合を検出するステップを有することを特徴とす
る。かかる構成とすることにより、本発明のデータベー
ス自動リカバリ方法は、システムダウンが発生した場合
にも不整合を自動検出しマスターデータベースとレプリ
カデータベースとの整合をとることのできる方法とな
る。
Further, the invention described in claim 4 of the present application is
4. The automatic database recovery method according to claim 3, wherein the system down processing means of the replication control system has a step of detecting data inconsistency when a system down occurs. With such a configuration, the automatic database recovery method of the present invention is a method that can automatically detect inconsistency even when a system failure occurs and make the master database and the replica database consistent.

【0013】また、本出願の請求項5に記載の発明は、
マスターデータベース、データベース管理システム及び
レプリケーション制御システムを有するレプリケーショ
ンシステムとレプリカデータベースを有するレプリケー
ションクライアントシステムとからなるデータベースレ
プリケーションシステムを用いてデータベースを自動リ
カバリする方法であって、前記レプリケーション制御シ
ステムの有するトランザクションシーケンス監視手段が
トランザクションの異常終了を検出するステップ、前記
データベース管理システムの有するトランザクション破
棄手段がトランザクションを破棄するステップ、前記レ
プリケーションクライアントシステムの有する更新履歴
再送手段が、前記マスターデータベースと前記レプリカ
データベースとの不整合データをマスターデータベース
から読み込み、レプリカデータベースに正しい値を設定
するステップを有することを特徴とするデータベース自
動リカバリ方法をコンピュータに実行させるプログラム
である。
[0013] The invention described in claim 5 of the present application provides:
A method for automatically recovering a database using a database replication system including a replication system having a master database, a database management system, a replication control system, and a replication client system having a replica database, the transaction sequence monitoring of the replication control system Means for detecting abnormal termination of the transaction, steps for discarding the transaction by the transaction discarding means of the database management system, and means for updating the update history of the replication client system for inconsistency between the master database and the replica database. Reads data from the master database and Is a program for executing the automatic database recovery method in a computer characterized in that it comprises the step of setting the correct value Rica database.

【0014】かかる構成とすることにより、トランザク
ションが強制終了等により異常終了した場合、トランザ
クションシーケンス監視手段がトランザクションの異常
終了を検出し、トランザクション破棄手段がトランザク
ションを破棄し、更新履歴再送手段がマスターデータベ
ースとレプリカデータベースとの不整合データをマスタ
ーデータベースから読み込み、レプリカデータベースに
正しい値を設定するので、トランザクションが異常終了
した場合にマスターデータベースとレプリカデータベー
スとの整合をとることのできるデータベース自動リカバ
リ方法を実行することができる。
With this configuration, when a transaction is abnormally terminated due to forced termination or the like, the transaction sequence monitoring means detects the abnormal termination of the transaction, the transaction discarding means discards the transaction, and the update history resending means transmits the master database to the master database. Inconsistent data between the master database and the replica database is read from the master database and the correct value is set in the replica database. Therefore, if the transaction ends abnormally, a database automatic recovery method that can match the master database and the replica database is executed. can do.

【0015】また、本出願の請求項6に記載の発明は、
請求項5に記載のデータベース自動リカバリ方法をコン
ピュータに実行させるプログラムにおいて、前記レプリ
ケーション制御システムの有するシステムダウン処理手
段がシステムダウンが発生した際にデータの不整合を検
出するステップを有することを特徴とする。かかる構成
とすることにより、システムダウンが発生した場合にも
不整合を自動検出しマスターデータベースとレプリカデ
ータベースとの整合をとることのできるデータベース自
動リカバリ方法を実行することができる。
Further, the invention described in claim 6 of the present application is
6. A program for causing a computer to execute the database automatic recovery method according to claim 5, further comprising a step of detecting a data inconsistency when a system failure occurs in the replication control system when the system failure occurs. I do. With such a configuration, it is possible to execute a database automatic recovery method that can automatically detect inconsistency even when a system failure occurs and make the master database and the replica database consistent.

【0016】[0016]

【発明の実施の形態】以下、先ず本発明のデータベース
レプリケーションシステムについて説明する。本発明の
データベースレプリケーションシステムは、マスターデ
ータベースを有するレプリケーションサーバシステム
と、レプリカデータベースを有するレプリケーションク
ライアントシステムからなり、前記レプリケーションサ
ーバシステムが、データベース管理システム及びレプリ
ケーション制御システムを有している。また、前記デー
タベース管理システムがトランザクションを破棄するト
ランザクション破棄手段を有し、前記レプリケーション
制御システムが、トランザクションの異常終了を検出す
るトランザクションシーケンス監視手段を有している。
DESCRIPTION OF THE PREFERRED EMBODIMENTS First, a database replication system according to the present invention will be described. The database replication system of the present invention includes a replication server system having a master database and a replication client system having a replica database, and the replication server system has a database management system and a replication control system. Further, the database management system has a transaction discarding unit for discarding the transaction, and the replication control system has a transaction sequence monitoring unit for detecting abnormal termination of the transaction.

【0017】また、前記レプリケーションクライアント
システムはレプリケーション制御システムを有し、前記
レプリケーション制御システムは更新履歴再送手段を有
し、該更新履歴再送手段は前記マスターデータベースと
前記レプリカデータベースとの不整合データをマスター
データベースから読み込み、レプリカデータベースに正
しい値を設定する手段を有する。
Further, the replication client system has a replication control system, and the replication control system has update history resending means, and the update history resending means masters inconsistent data between the master database and the replica database. It has means for reading from the database and setting correct values in the replica database.

【0018】本発明のデータベースレプリケーションシ
ステムの一実施の形態について図面を参照して説明す
る。図1は、本発明のデータベースレプリケーションシ
ステムの構成を示す図である。図1に示すように、本発
明のデータベースレプリケーションシステムは、レプリ
ケーションサーバシステム101とレプリケーションク
ライアントシステム401とからなる。
An embodiment of the database replication system of the present invention will be described with reference to the drawings. FIG. 1 is a diagram showing the configuration of the database replication system of the present invention. As shown in FIG. 1, the database replication system of the present invention includes a replication server system 101 and a replication client system 401.

【0019】レプリケーションサーバシステム101
は、データベース管理システム201(以下、本明細書
において「DBMS」ともいう)、レプリケーション制
御システム301、マスターデータベース207、更新
ジャーナル208及び更新履歴抽出ファイル306を有
する。また、レプリケーションクライアントシステム4
01は、レプリケーション制御システム402及びレプ
リカデータベース405を有する。
Replication server system 101
Has a database management system 201 (hereinafter, also referred to as "DBMS" in the present specification), a replication control system 301, a master database 207, an update journal 208, and an update history extraction file 306. In addition, the replication client system 4
01 has a replication control system 402 and a replica database 405.

【0020】前記DBMS201は、データベース参照
処理手段202、データベース更新処理手段203、ト
ランザクション確定手段204、更新ジャーナル処理手
段205及びトランザクション破棄手段206を有して
おり、前記レプリケーション制御システム301は、更
新履歴抽出手段302、トランザクションシーケンス監
視手段303、更新履歴送信手段304及びシステムダ
ウン処理手段305を有している。
The DBMS 201 includes a database reference processing unit 202, a database update processing unit 203, a transaction determination unit 204, an update journal processing unit 205, and a transaction discarding unit 206, and the replication control system 301 It has means 302, transaction sequence monitoring means 303, update history transmitting means 304, and system down processing means 305.

【0021】また、前記レプリケーションクライアント
システム401の有するレプリケーション制御システム
403は、更新履歴受信反映手段403及び更新履歴再
送手段405を有している。
The replication control system 403 of the replication client system 401 includes an update history reception / reflection unit 403 and an update history retransmission unit 405.

【0022】そして、本発明のデータベースレプリケー
ションシステム101においては、前記トランザクショ
ン破棄手段206がトランザクションを破棄する機能を
有し、前記トランザクションシーケンス監視手段303
がトランザクションの異常終了を検出する機能を有して
いる。また、前記更新履歴再送手段404が、前記マス
ターデータベース207と前記レプリカデータベース4
05との不整合データをマスターデータベース207か
ら読み込み、レプリカデータベース405に正しい値を
設定する機能を有している。
In the database replication system 101 of the present invention, the transaction discarding means 206 has a function of discarding a transaction, and the transaction sequence monitoring means 303
Has a function of detecting abnormal termination of a transaction. Further, the update history resending means 404 is configured to transmit the master database 207 and the replica database 4
05 is read from the master database 207 and a function of setting a correct value to the replica database 405 is provided.

【0023】また、本発明のデータベースレプリケーシ
ョンシステム101においては、前記レプリケーション
制御システム301がシステムダウン処理手段305を
有しており、該システムダウン処理手段305は、シス
テムダウンが発生した際にデータの不整合を検出する機
能を有している。
Further, in the database replication system 101 of the present invention, the replication control system 301 has a system down processing means 305, and the system down processing means 305 does not transfer data when a system down occurs. It has the function of detecting matching.

【0024】更新履歴抽出手段302における動作の流
れについて図面を参照して説明する。図2は、更新履歴
抽出手段302における動作の流れを示す図である。図
2に示すように、更新履歴抽出手段302は、引き数O
UTPUTの値を判別する機能を有している。OUTP
UT=DATAが指定された場合は(ステップ50
1)、ステップ502において直前に実施したデータベ
ース更新の内容よりデータベース更新履歴情報を生成す
る。
The flow of operation in the update history extracting means 302 will be described with reference to the drawings. FIG. 2 is a diagram showing a flow of the operation in the update history extracting means 302. As shown in FIG. 2, the update history extracting unit 302
It has a function of determining the value of UTPUT. OUTP
If UT = DATA is specified (step 50
1) In step 502, database update history information is generated from the contents of the database update performed immediately before.

【0025】OUTPUT=COMMIT1が指定され
た場合(ステップ503)は、ステップ504において
COMMIT1情報を生成し、また、OUTPUT=C
OMMIT2が指定された場合(ステップ505)は、
ステップ506においてCOMMIT2情報を生成し、
OUTPUT=ROLLBACKが指定された場合(ス
テップ507)は、ステップ508においてROLLB
ACK情報を生成する。また、OUTPUT=CHEC
Kが指定された場合(ステップ509)は、ステップ5
10においてCHECK情報を生成する。上記ステップ
502、504、506、508及び510において生
成された各情報は、ステップ511において更新履歴抽
出ファイルへ書き込まれる。
If OUTPUT = COMMIT1 is specified (step 503), COMMIT1 information is generated in step 504, and OUTPUT = C
If OMMIT2 is specified (step 505),
In step 506, COMMIT2 information is generated,
If OUTPUT = ROLLBACK is specified (step 507), ROLLB is set in step 508.
Generate ACK information. OUTPUT = CHECK
If K is designated (step 509), step 5
At 10, CHECK information is generated. Each information generated in the above steps 502, 504, 506, 508 and 510 is written in the update history extraction file in step 511.

【0026】次に、トランザクションシーケンス監視手
段303における動作の流れについて図面を参照して説
明する。図3は、トランザクションシーケンス監視手段
303における動作の流れを示す図である。図3に示す
ように、トランザクションシーケンス監視手段303
は、引き数OUTPUTの値を判別し、グローバル変数
SEQの値を設定する機能を有している。
Next, an operation flow in the transaction sequence monitoring means 303 will be described with reference to the drawings. FIG. 3 is a diagram showing a flow of operation in the transaction sequence monitoring means 303. As shown in FIG. 3, the transaction sequence monitoring means 303
Has the function of determining the value of the argument OUTPUT and setting the value of the global variable SEQ.

【0027】OUTPUT=DATAが指定された場合
(ステップ601)は、ステップ602においてSEQ
=0としステップ611に分岐する。OUTPUT=C
OMMIT1が指定された場合(ステップ603)は、
ステップ604においてSEQ=1としステップ611
に分岐する。また、OUTPUT=COMMIT2が指
定された場合(ステップ605)は、ステップ606に
おいてSEQ=2としステップ611に分岐する。
If OUTPUT = DATA is specified (step 601), the program proceeds to step 602 where SEQ
= 0 and the flow branches to step 611. OUTPUT = C
If OMMIT1 is specified (step 603),
At step 604, SEQ = 1 is set and step 611 is set.
Branch to If OUTPUT = COMMIT2 is specified (step 605), SEQ = 2 in step 606, and the flow branches to step 611.

【0028】また、OUTPUT=ROLLBACKが
指定された場合(ステップ607)は、ステップ608
において過去にグローバル変数SEQ設定された値を判
別し、SEQ=1である場合はステップ609において
SEQ=−1とし、SEQ=1でなければステップ61
0においてSEQ=3とし、ステップ611に分岐す
る。また、ステップ611ににおいて、グローバル変数
SEQの値を判別し、SEQ=−1の以外の場合には処
理を終了する。一方、SEQ=−1の場合は、ステップ
612においてOUTPUT=CHECKを設定し、更
新履歴抽出手段302を呼び出し、ステップ613にお
いてSEQ=0に設定し、処理を終了する。
If OUTPUT = ROLLBACK is specified (step 607), step 608 is executed.
In step 609, the value set in the past as a global variable SEQ is determined. If SEQ = 1, SEQ = −1 is set in step 609, and if SEQ = 1 is not set, step 61 is performed.
At 0, SEQ = 3, and the process branches to step 611. In step 611, the value of the global variable SEQ is determined, and if the value is not equal to −1, the process ends. On the other hand, if SEQ = −1, OUTPUT = CHECK is set in step 612, the update history extracting unit 302 is called, SEQ = 0 is set in step 613, and the process ends.

【0029】次に、更新履歴受信反映手段403におけ
る動作の流れについて図面を参照して説明する。図4
は、更新履歴受信反映手段403における動作の流れを
示す図である。図4に示すように、更新履歴受信反映手
段403は、更新履歴の種類を判別し、変数STATを
設定する機能を有している。
Next, the operation flow of the update history reception / reflection means 403 will be described with reference to the drawings. FIG.
FIG. 8 is a diagram showing a flow of operation in the update history reception / reflection unit 403. As shown in FIG. 4, the update history reception / reflection unit 403 has a function of determining the type of the update history and setting a variable STAT.

【0030】図4に示すように、更新履歴受信反映手段
403は、ステップ701において、予め変数STAT
を0に設定する。次いで、ステップ702において更新
履歴を1件読み込み、次いで更新履歴の種類を判別す
る。COMMIT1情報である場合(ステップ703)
は、ステップ704においてSTAT=1としステップ
712に分岐する。COMMIT2情報である場合(ス
テップ705)は、ステップ706においてSTAT=
2としステップ712に分岐する。また、ROLLBA
CK情報である場合(ステップ708)は、ステップ7
08においてでSTAT=3としステップ712に分岐
する。
As shown in FIG. 4, in step 701, the update history reception / reflection means 403 sets the variable STAT in advance.
Is set to 0. Next, in step 702, one update history is read, and then the type of the update history is determined. If it is COMMIT1 information (step 703)
Sets STAT = 1 in step 704 and branches to step 712. If the information is COMMIT2 information (step 705), STAT =
It is set to 2 and it branches to step 712. Also, ROLLBA
If it is CK information (step 708), step 7
At 08, STAT = 3 is set and the flow branches to step 712.

【0031】また、CHECK情報である場合(ステッ
プ709)は、ステップ710において以前のSTAT
の値を判別し、STAT=1でなければステップ712
に分岐し、STAT=1である場合(ステップ711)
は、STAT=−1と設定しステップ712に分岐す
る。
If it is CHECK information (step 709), the previous STAT
Is determined, and if STAT = 1 is not set, step 712 is executed.
And STAT = 1 (step 711)
Sets STAT = -1 and branches to step 712.

【0032】次いで、STATの値を判別し、STAT
=2である場合(ステップ712)は、ステップ713
においてトランザクションをレプリカDBへ反映しステ
ップ701に分岐する。また、STAT=3である場合
(ステップ714)は、ステップ715においてトラン
ザクションを破棄しステップ701に分岐する。また、
STAT=−1である場合(ステップ716)は、更新
履歴再送手段404を呼び出し、ステップ717におい
てトランザクションをレプリカDBへ反映しステップ7
01に分岐する。一方、STATがそれ以外の値である
場合は、トランザクションの途中であると判断しステッ
プ702に分岐する。
Next, the value of STAT is determined, and STAT is determined.
= 2 (Step 712), Step 713
At 701, the transaction is reflected in the replica DB, and the process branches to step 701. If STAT = 3 (step 714), the transaction is discarded in step 715, and the flow branches to step 701. Also,
If STAT = −1 (step 716), the update history retransmitting unit 404 is called, and in step 717, the transaction is reflected in the replica DB, and
Branch to 01. On the other hand, if the STAT has any other value, it is determined that the transaction is in the middle of a transaction, and the flow branches to step 702.

【0033】次に、データベース更新命令実行の動作に
ついて説明する。図5は、データベース更新命令実行の
動作の流れを示す図である。図5に示すように、データ
ベース更新命令実行の際(ステップ801)には、デー
タベース更新処理手段203が呼び出される。データベ
ース更新処理手段203において、マスターデータベー
スの更新が実施され(ステップ802)、レプリカデー
タベースの存在を判別し、レプリカデータベースが存在
しない場合は処理が終了する。一方、レプリカデータベ
ースが存在する場合(ステップ804)は、引き数OU
TPUT=DATAが設定され(ステップ804)、更
新履歴抽出手段302及びトランザクションシーケンス
監視手段303が呼び出され、処理が終了する。
Next, the operation of executing a database update instruction will be described. FIG. 5 is a diagram showing a flow of the operation of executing the database update instruction. As shown in FIG. 5, when executing a database update instruction (step 801), the database update processing means 203 is called. The database update processing unit 203 updates the master database (step 802), determines the existence of the replica database, and ends the process if the replica database does not exist. On the other hand, if a replica database exists (step 804), the argument OU
TPUT = DATA is set (step 804), the update history extraction unit 302 and the transaction sequence monitoring unit 303 are called, and the process ends.

【0034】次に、COMMIT命令実行の動作につい
て説明する。図6は、COMMIT命令実行の動作の流
れを示す図である。図6に示すように、COMMIT命
令実行の際(ステップ901)には、DBMS201の
有するトランザクション確定手段204及び更新ジャー
ナル処理手段205が呼び出される。
Next, the operation of executing the COMMIT instruction will be described. FIG. 6 is a diagram showing a flow of the operation of the COMMIT instruction execution. As shown in FIG. 6, when the COMMIT instruction is executed (step 901), the transaction determination means 204 and the update journal processing means 205 of the DBMS 201 are called.

【0035】トランザクション確定手段204において
は、ステップ902においてデータベースのCOMMI
T処理が実施され、ステップ903においてレプリカD
Bの存在を判別し、レプリカDBが存在しない場合は処
理は終了する。一方、レプリカデータベースが存在する
場合(ステップ904)は、引き数OUTPUT=CO
MMIT1が設定され(ステップ904)、更新履歴抽
出手段302及びトランザクションシーケンス監視手段
303が呼び出され、処理が終了する。
In the transaction determination means 204, in step 902, the COMMI
T processing is performed, and in step 903, the replica D
The presence of B is determined, and if the replica DB does not exist, the process ends. On the other hand, if a replica database exists (step 904), the argument OUTPUT = CO
MMIT1 is set (step 904), the update history extraction unit 302 and the transaction sequence monitoring unit 303 are called, and the process ends.

【0036】また、更新ジャーナル処理手段205にお
いては、ステップ905においてデータベースのCOM
MIT処理が実施され、ステップ906においてレプリ
カDBの存在を判別し、レプリカDBが存在しない場合
は処理は終了する。一方、レプリカデータベースが存在
する場合(ステップ904)は、引き数OUTPUT=
COMMIT2が設定され、更新履歴抽出手段302及
びトランザクションシーケンス監視手段303が呼び出
され、処理が終了する。
In the update journal processing means 205, in step 905, the COM
MIT processing is performed, and the existence of a replica DB is determined in step 906. If there is no replica DB, the processing ends. On the other hand, if a replica database exists (step 904), the argument OUTPUT =
COMMIT2 is set, the update history extraction unit 302 and the transaction sequence monitoring unit 303 are called, and the process ends.

【0037】次に、ROLLBACK命令実行の動作に
ついて説明する。図7は、ROLLBACK命令実行の
動作の流れを示す図である。図7に示すように、ROL
LBACK命令実行の際(ステップ1001)には、ト
ランザクション破棄手段206が呼び出される。
Next, the operation of executing the ROLLBACK instruction will be described. FIG. 7 is a diagram showing a flow of the operation of executing the ROLLBACK instruction. As shown in FIG.
When the LBACK instruction is executed (step 1001), the transaction discarding means 206 is called.

【0038】トランザクション破棄手段206において
は、ステップ1002においてROLLBACK処理が
実施され、ステップ1003においてレプリカデータベ
ースの存在を判別し、レプリカデータベースが存在しな
い場合は処理は終了する。一方、レプリカデータベース
が存在する場合(ステップ1004)は、引き数OUT
PUT=ROLLBACKが設定され、更新履歴抽出手
段302及びトランザクションシーケンス監視手段30
3が呼び出され、処理が終了する。
In the transaction discarding means 206, ROLLBACK processing is performed in step 1002, and the existence of a replica database is determined in step 1003. If there is no replica database, the processing ends. On the other hand, if a replica database exists (step 1004), the argument OUT
PUT = ROLLBACK is set, and the update history extracting unit 302 and the transaction sequence monitoring unit 30
3 is called, and the process ends.

【0039】次に、システムダウン処理の際の動作につ
いて説明する。図8は、システムダウンの際の動作の流
れを示す図である。図8に示すように、システムダウン
処理手段305は、ステップ1101においてシステム
起動前のシステムダウン発生を判別し、システムダウン
の発生がない場合は処理を終了する。一方、システムダ
ウンの発生がある場合は、ステップ1102において引
き数OUTPUT=CHECKを設定し、更新履歴抽出
手段302が呼び出され処理が終了する。
Next, the operation at the time of system down processing will be described. FIG. 8 is a diagram showing a flow of operation when the system goes down. As shown in FIG. 8, the system down processing means 305 determines in step 1101 whether a system down has occurred before the system is activated, and terminates the processing if no system down has occurred. On the other hand, if a system down has occurred, the argument OUTPUT = CHECK is set in step 1102, the update history extracting means 302 is called, and the process ends.

【0040】次に、トランザクションの一例について説
明する。図9は、あるトランザクションの一例1201
を示す図であり、データベース管理システム201によ
って処理される。図9に示す1202は、マスターデー
タベースを参照するSQLであり、データベース参照処
理手段202によって処理される。また、この場合はデ
ータベースの内容が更新されることはなく、レプリケー
ション制御システム301が呼び出されることはない。
Next, an example of a transaction will be described. FIG. 9 shows an example 1201 of a certain transaction.
FIG. 6 is a diagram illustrating a process performed by the database management system 201. Reference numeral 1202 shown in FIG. 9 denotes an SQL that refers to the master database, and is processed by the database reference processing unit 202. In this case, the contents of the database are not updated, and the replication control system 301 is not called.

【0041】図9に示す1203は、マスターデータベ
ースを更新するSQLであり、データベース更新命令実
行(ステップ801)によって処理される。データベー
ス更新命令実行(ステップ801)からデータベース更
新処理手段203が呼び出され、ステップ802により
マスターデータベースを更新後、レプリカデータベース
が存在する場合はOUTPUT=DATAで更新履歴抽
出手段302が呼び出され、ステップ502においてデ
ータベース更新履歴情報が生成され、ステップ511に
おいて図10に示す1301のように更新履歴が更新履
歴抽出ファイルへ書き込まれる。その後、OUTPUT
=DATAでトランザクションシーケンス管理手段30
3が呼び出され、ステップ602においてSEQ=0が
設定され、データベース更新処命令実行は終了する。
Reference numeral 1203 shown in FIG. 9 denotes an SQL for updating the master database, which is processed by executing a database update instruction (step 801). The database update processing means 203 is called from the execution of the database update instruction (step 801). After the master database is updated in step 802, if a replica database exists, the update history extraction means 302 is called with OUTPUT = DATA. Database update history information is generated, and in step 511, the update history is written to the update history extraction file as indicated by 1301 in FIG. After that, OUTPUT
= DATA, transaction sequence management means 30
3 is called, SEQ = 0 is set in step 602, and the execution of the database update processing instruction ends.

【0042】図9に示す1204は、トランザクション
の終了を明示する命令であり、COMMIT命令実行
(ステップ901)によって処理される。COMMIT
命令実行(ステップ901)からトランザクション確定
手段204が呼び出され、ステップ902においてマス
ターデータベースのCOMMIT処理を実行後、レプリ
カデータベースが存在する場合は、OUTPUT=CO
MMIT1で更新履歴抽出手段302が呼び出され、ス
テップ504においてCOMMIT1情報が生成され、
ステップ511において図10に示す1302のように
更新履歴が更新履歴抽出ファイルへ書き込まれる。
An instruction 1204 shown in FIG. 9 clearly indicates the end of the transaction, and is processed by executing the COMMIT instruction (step 901). COMMIT
The transaction determination means 204 is called from the instruction execution (step 901), and after executing the COMMIT processing of the master database in step 902, if a replica database exists, OUTPUT = CO
The update history extraction means 302 is called in MMIT1, and COMMIT1 information is generated in step 504,
In step 511, the update history is written to the update history extraction file as indicated by 1302 in FIG.

【0043】更に、OUTPUT=COMMIT1でト
ランザクションシーケンス監視手段303が呼び出さ
れ、ステップ604においてSEQ=1が設定される。
次に更新ジャーナル処理手段205が呼び出され、ステ
ップ905においてマスターデータベースの更新ジャー
ナル書き込み処理を実行後、レプリカデータベースが存
在する場合は、OUTPUT=COMMIT2で更新履
歴抽出手段302が呼び出され、ステップ506におい
てCOMMIT2情報が生成され、ステップ511にお
いて図10に示す1303のように更新履歴が更新履歴
抽出ファイルへ書き込まれる。
Further, the transaction sequence monitoring means 303 is called with OUTPUT = COMMIT1, and SEQ = 1 is set in step 604.
Next, the update journal processing means 205 is called. After the update journal write processing of the master database is executed in step 905, if a replica database exists, the update history extraction means 302 is called with OUTPUT = COMMIT2, and in step 506, COMMIT2 Information is generated, and in step 511, the update history is written to the update history extraction file as indicated by 1303 in FIG.

【0044】更に、OUTPUT=COMMIT2でト
ランザクションシーケンス監視手段303が呼び出さ
れ、ステップ605においてSEQ=2が設定され、レ
プリケーションクライアントシステム401のレプリケ
ーション制御システム402の更新履歴受信反映手段4
03は、定期的に受信した更新履歴抽出ファイルを読み
込み処理する。
Further, the transaction sequence monitoring means 303 is called with OUTPUT = COMMIT2, SEQ = 2 is set in step 605, and the update history reception / reflection means 4 of the replication control system 402 of the replication client system 401 is set.
03 reads and processes the update history extraction file received periodically.

【0045】先ず、ステップ702において更新履歴1
301を読み込み、本更新履歴はDATA情報であるた
め、情報を保持したままステップ702に戻る。次い
で、ステップ702において次の更新履歴1302を読
み込み、本更新履歴はCOMMIT1情報であるため、
ステップ704においてSTAT=1を設定し、ステッ
プ702に戻る。
First, in step 702, the update history 1
The update history is read, and since the update history is DATA information, the process returns to step 702 while retaining the information. Next, in step 702, the next update history 1302 is read, and since this update history is COMMIT1 information,
In step 704, STAT = 1 is set, and the process returns to step 702.

【0046】次いで、ステップ702において次の更新
履歴1303を読み込み、本更新履歴はCOMMIT2
情報であるため、ステップ706においてSTAT=2
を設定し、ステップ712においてステップ713に分
岐し、読み込んだ更新履歴をもとにステップ713にお
いてトランザクションをレプリカデータベースへ反映
し、反映が完了しマスターデータベースとレプリカデー
タベースとの内容が同一になった後にステップ701に
戻る。
Next, in step 702, the next update history 1303 is read, and this update history is stored in COMMIT2.
STAT = 2 in step 706 because it is information.
Is set, the process branches to step 713 in step 712, and the transaction is reflected in the replica database in step 713 based on the read update history. After the reflection is completed and the contents of the master database and the replica database become the same, Return to step 701.

【0047】次に、トランザクションの異常終了時の動
作について説明する。トランザクションが強制終了等に
より異常終了する場合、従来のシステムにおいては、正
常なレプリケーション制御処理が完了できない場合があ
った。本発明のデータベースレプリケーションシステム
においてトランザクションが強制終了等により異常終了
する場合の動作について図6を参照して説明する。
Next, the operation at the time of abnormal termination of a transaction will be described. When a transaction is abnormally terminated due to forced termination or the like, in a conventional system, normal replication control processing may not be completed. The operation of the database replication system according to the present invention when a transaction ends abnormally due to forced termination or the like will be described with reference to FIG.

【0048】図6におけるステップ902の後から更新
履歴抽出手段302が呼び出されるまでの間において異
常終了が発生した場合、マスターデータベースは更新ジ
ャーナル書き込み(ステップ905)終了まで正常に完
了したが、レプリケーション制御システムにおけるトラ
ンザクション完了を意味する更新履歴抽出手段302の
処理を完了できずに異常終了され、マスターデータベー
スとレプリカデータベースとの不整合が発生する可能性
がある。
If an abnormal end occurs after step 902 in FIG. 6 and before the update history extracting means 302 is called, the master database normally completes until the update journal writing (step 905) ends, but the replication control is terminated. There is a possibility that the processing of the update history extraction means 302, which means the completion of the transaction in the system, cannot be completed and abnormally terminated, resulting in inconsistency between the master database and the replica database.

【0049】本発明のデータベースレプリケーションシ
ステムにおいては、更新ジャーナル書き込み処理(ステ
ップ905)の直後にトランザクションが異常終了した
場合、マスターデータベースの処理はトランザクション
が全て完了した状態であり、更新履歴は図10に示す1
401及び1402のみが出力された状態であり、トラ
ンザクションの完了を示すCOMMIT2が出力されて
いない状態である。その後、データベース管理システム
201は、トランザクション異常終了を検出し、トラン
ザクション破棄手段206を呼び出し、トランザクショ
ンの破棄を実施する。
In the database replication system of the present invention, if a transaction ends abnormally immediately after the update journal writing process (step 905), the processing of the master database is in a state where all transactions are completed, and the update history is shown in FIG. Show 1
Only 401 and 1402 are output, and COMMIT2 indicating the completion of the transaction is not output. Thereafter, the database management system 201 detects the abnormal termination of the transaction, calls the transaction discarding means 206, and discards the transaction.

【0050】まず、ステップ1002においてデータベ
ースのROLLBACK処理を実施する。この場合、マ
スターデータベースは既にトランザクション完了してい
るため、該ROLLBACK処理はマスターデータベー
スに何ら影響を与えない。次いで、ステップ1004に
おいてOUTPUT=ROLLBACKで更新履歴抽出
手段302が呼び出され、ステップ508においてRO
LLBACK情報が生成され、ステップ511において
図10に示す1403のように更新履歴が更新履歴抽出
ファイルへ書き込まれる。
First, in step 1002, a ROLLBACK process of the database is performed. In this case, since the master database has already completed the transaction, the ROLLBACK processing has no effect on the master database. Next, in step 1004, the update history extraction means 302 is called with OUTPUT = ROLLBACK, and in step 508, the RO
The LLBACK information is generated, and in step 511, the update history is written to the update history extraction file as indicated by 1403 in FIG.

【0051】更に、トランザクションシーケンス監視手
段303において、OUTPUT=ROLLBACK、
かつSEQ=1であるため、ステップ609においてS
EQ=−1を設定して異常終了を検出し、ステップ61
2において直前に出力したROLLBACK情報を破棄
し、OUTPUT=CHECKを設定し、更新履歴抽出
手段302でCHECK情報を出力し、SEQ=0を設
定しクリアする。その時の更新履歴の状態が、図10に
示す1501、1502及び1503である。
Further, in the transaction sequence monitoring means 303, OUTPUT = ROLLBACK,
In addition, since SEQ = 1, in step 609 S
If EQ = −1 is set, abnormal termination is detected, and step 61
In step 2, the ROLLBACK information output immediately before is discarded, OUTPUT = CHECK is set, the CHECK information is output by the update history extraction means 302, and SEQ = 0 is set and cleared. The update history states at that time are 1501, 1502 and 1503 shown in FIG.

【0052】次いで、レプリケーションクライアントシ
ステム401の有するレプリケーション制御システム4
02の更新履歴受信反映手段403が、図10に示す1
501、1502及び1503の更新履歴抽出ファイル
を読み込み、処理を実施する。図10に示す1503の
CHECK情報を読み込むとステップ711においてS
TAT=−1を設定し、更新履歴再送手段404を用い
不整合の可能性のあるデータをマスターデータベースか
ら再度読み込み、ステップ717においてレプリカDB
に正しい値を設定する。
Next, the replication control system 4 of the replication client system 401
02, the update history reception / reflection means 403 shown in FIG.
The update history extraction files 501, 1502, and 1503 are read and the processing is performed. When the CHECK information of 1503 shown in FIG.
TAT = −1 is set, and data having a possibility of inconsistency is read again from the master database using the update history retransmitting means 404.
Set the correct value for.

【0053】次に、本発明のデータベースレプリケーシ
ョンシステムの他の実施の形態について説明する。本実
施の形態においては、システムダウンが発生した場合に
不整合を自動検出する。システム起動時に、まずシステ
ムダウン処理手段305が呼び出され、このシステム起
動がシステムダウン後の最初のシステム起動である場合
はステップ1102においてOUTPUT=CHECK
を設定し、更新履歴抽出手段302においてCHECK
情報を出力する。
Next, another embodiment of the database replication system of the present invention will be described. In the present embodiment, when a system failure occurs, inconsistency is automatically detected. When the system is started, first, the system down processing means 305 is called. If this system startup is the first system startup after the system down, in step 1102, OUTPUT = CHECK.
Is set in the update history extracting means 302.
Output information.

【0054】レプリケーションクライアントシステム4
01においては、トランザクション異常終了時と同様
に、CHECK情報を受取、更新履歴再送手段404を
呼び出し、不整合の可能性のあるデータをマスターデー
タベースから再度読み込み、ステップ717においてレ
プリカデータベースに正しい値を設定する。このような
ステップを有することにより、システムダウンが発生し
た場合においても、データの不整合を自動検出し、高速
なリカバリが可能となる。
Replication client system 4
In step 01, the CHECK information is received, the update history retransmitting means 404 is called, and data having a possibility of inconsistency is read from the master database again, and a correct value is set in the replica database in step 717, as in the case of abnormal termination of the transaction. I do. By having such steps, even when a system failure occurs, data inconsistency is automatically detected, and high-speed recovery is enabled.

【0055】次に、本発明のデータベース自動リカバリ
方法について説明する。本発明の自動リカバリ方法は、
マスターデータベース、データベース管理システム及び
レプリケーション制御システムを有するレプリケーショ
ンシステムとレプリカデータベースを有するレプリケー
ションクライアントシステムとからなるデータベースレ
プリケーションシステムを用いてデータベースを自動リ
カバリする方法であって、前記レプリケーション制御シ
ステムの有するトランザクションシーケンス監視手段が
トランザクションの異常終了を検出するステップ、前記
データベース管理システムの有するトランザクション破
棄手段がトランザクションを破棄するステップ、前記レ
プリケーションクライアントシステムの有する更新履歴
再送手段が、前記マスターデータベースと前記レプリカ
データベースとの不整合データをマスターデータベース
から読み込み、レプリカデータベースに正しい値を設定
するステップを有することを特徴とする。
Next, the automatic database recovery method of the present invention will be described. The automatic recovery method of the present invention
A method for automatically recovering a database using a database replication system including a replication system having a master database, a database management system, a replication control system, and a replication client system having a replica database, the transaction sequence monitoring of the replication control system Means for detecting abnormal termination of the transaction, steps for discarding the transaction by the transaction discarding means of the database management system, and means for updating the update history of the replication client system for inconsistency between the master database and the replica database. Reads data from the master database and It characterized by having a step of setting the correct value Rica database.

【0056】本発明のデータベース自動リカバリ方法
は、上述した本発明のデータベースレプリケーションシ
ステムを用いて実施することができる。本発明のデータ
ベース自動リカバリ方法においては、レプリケーション
制御システム310の有するトランザクションシーケン
ス監視手段303がトランザクションの異常終了を検出
するステップ、データベース管理システム201の有す
るトランザクション破棄手段がトランザクションを破棄
するステップ、レプリケーションクライアントシステム
401の有する更新履歴再送手段404が、マスターデ
ータベース207とレプリカデータベース405との不
整合データベースをマスターデータベース207から読
み込み、レプリカデータベース405に正しい値を設定
するステップを有している。上記ステップについては、
上述した本発明のデータベースレプリケーションシステ
ムの動作の説明において説明した通りである。
The automatic database recovery method of the present invention can be implemented using the above-described database replication system of the present invention. In the automatic database recovery method of the present invention, the transaction sequence monitoring means 303 of the replication control system 310 detects abnormal termination of the transaction, the transaction discarding means of the database management system 201 discards the transaction, the replication client system The update history retransmitting means 404 included in 401 has a step of reading an inconsistent database between the master database 207 and the replica database 405 from the master database 207 and setting a correct value in the replica database 405. For the above steps,
This is as described in the above description of the operation of the database replication system of the present invention.

【0057】また、本発明のデータベース自動リカバリ
方法においては、レプリケーション制御システム301
の有するシステムダウン処理手段305が、システムダ
ウンが発生した際にデータの不整合を検出するステップ
を有している。このステップについても、上述した本発
明のデータベースレプリケーションシステムの動作の説
明において説明した通りである。
In the automatic database recovery method of the present invention, the replication control system 301
Has a step of detecting data inconsistency when a system down occurs. This step is also as described in the above description of the operation of the database replication system of the present invention.

【0058】次に、本発明のデータベース自動リカバリ
方法をコンピュータに実行させるプログラムについて説
明する。本発明のデータベース自動リカバリ方法をコン
ピュータに実行させるプログラムとは、コンピュータの
動作を制御し、以上に説明した本発明のデータベース自
動リカバリ方法を実施するためのプログラムであり、プ
ログラム制御されたコンピュータがプログラムにより指
令され、以上に説明した本発明のデータベース自動リカ
バリ方法を実施するためのプログラムである。
Next, a program for causing a computer to execute the database automatic recovery method of the present invention will be described. The program for causing a computer to execute the automatic database recovery method of the present invention is a program for controlling the operation of the computer and for executing the automatic database recovery method of the present invention described above. Is a program for executing the database automatic recovery method of the present invention described above.

【0059】[0059]

【発明の効果】以上詳述した通り、本発明のデータベー
スレプリケーションシステムは、トランザクションの以
上終了時やシステムダウン時においても、データベース
の参照/更新業務を停止したり、レプリケーションを停
止することなく、データベースのレプリケーションを実
施することが可能なシステムである。また、本発明のデ
ータベース自動リカバリ方法によれば、トランザクショ
ンの以上終了時やシステムダウン時においても、データ
ベースの参照/更新業務を停止したり、レプリケーショ
ンを停止することなく、データベースのレプリケーショ
ンを実施することができる。
As described in detail above, the database replication system of the present invention does not stop the database reference / update work or stop the replication even at the end of the transaction or when the system goes down. It is a system that can implement replication. Further, according to the automatic database recovery method of the present invention, database replication can be performed without stopping database reference / update operations or stopping replication even at the end of a transaction or when the system goes down. Can be.

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

【図1】 本発明のデータベースレプリケーションシス
テムの構成を示す図である。
FIG. 1 is a diagram showing a configuration of a database replication system of the present invention.

【図2】 更新履歴抽出手段における動作の流れを示す
図である。
FIG. 2 is a diagram showing a flow of an operation in an update history extraction unit.

【図3】 トランザクションシーケンス監視手段におけ
る動作の流れを示す図である。
FIG. 3 is a diagram showing a flow of an operation in a transaction sequence monitoring means.

【図4】 更新履歴受信反映手段3における動作の流れ
を示す図である。
FIG. 4 is a diagram showing a flow of operation in an update history reception / reflection unit 3.

【図5】 データベース更新命令実行の動作の流れを示
す図である。
FIG. 5 is a diagram showing a flow of an operation of executing a database update instruction.

【図6】 COMMIT命令実行の動作の流れを示す図
である。
FIG. 6 is a diagram showing a flow of an operation of executing a COMMIT instruction.

【図7】 ROLLBACK命令実行の動作の流れを示
す図である。
FIG. 7 is a diagram showing a flow of an operation of executing a ROLLBACK instruction.

【図8】 システムダウンの際の動作の流れを示す図で
ある。
FIG. 8 is a diagram showing a flow of operation at the time of system down.

【図9】 トランザクションの一例を示す図でる。FIG. 9 is a diagram illustrating an example of a transaction.

【図10】 更新履歴の一例を示す図である。FIG. 10 is a diagram illustrating an example of an update history.

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

101 レプリケーションサーバシステム 201 データベース管理システム 202 データベース参照処理手段 203 データベース更新処理手段 204 トランザクション確定手段 205 更新ジャーナル処理手段 206 トランザクション破棄手段 207 マスターデータベース 208 更新ジャーナル 301 レプリケーション制御システム 302 更新履歴抽出手段 303 トランザクションシーケンス監視手段 304 更新履歴送信手段 305 システムダウン処理手段 306 更新履歴抽出ファイル 401 レプリケーションクライアントシステム 402 レプリケーション制御システム 403 更新履歴受信反映手段 404 更新履歴再送手段 101 Replication server system 201 Database management system 202 Database reference processing means 203 Database update processing means 204 Transaction determination means 205 Update journal processing means 206 Transaction discarding means 207 Master database 208 Update journal 301 Replication control system 302 Update history extraction means 303 Transaction sequence monitoring Means 304 Update history transmission means 305 System down processing means 306 Update history extraction file 401 Replication client system 402 Replication control system 403 Update history reception reflection means 404 Update history retransmission means

Claims (6)

【特許請求の範囲】[Claims] 【請求項1】 マスターデータベースを有するレプリケ
ーションサーバシステムと、レプリカデータベースを有
するレプリケーションクライアントシステムからなるデ
ータベースレプリケーションシステムであって、 前記レプリケーションサーバシステムが、データベース
管理システム及びレプリケーション制御システムを有
し、 前記データベース管理システムがトランザクションを破
棄するトランザクション破棄手段を有し、 前記レプリケーション制御システムが、トランザクショ
ンの異常終了を検出するトランザクションシーケンス監
視手段を有し、 前記レプリケーションクライアントシステムが、前記マ
スターデータベースと前記レプリカデータベースとの不
整合データをマスターデータベースから読み込み、レプ
リカデータベースに正しい値を設定する、更新履歴再送
手段を有することを特徴とする、データベースレプリケ
ーションシステム。
1. A database replication system comprising a replication server system having a master database and a replication client system having a replica database, wherein the replication server system has a database management system and a replication control system; The system includes a transaction discarding unit for discarding the transaction, the replication control system includes a transaction sequence monitoring unit for detecting abnormal termination of the transaction, and the replication client system is configured to determine whether or not the master database and the replica database have an error. Read the consistent data from the master database and the replica database To set the correct value, and having the update history retransmission means, a database replication system.
【請求項2】 前記レプリケーション制御システムが、
システムダウンが発生した際にデータの不整合を検出す
るシステムダウン処理手段を有する、請求項1に記載の
データレプリケーションシステム。
2. The replication control system according to claim 1,
2. The data replication system according to claim 1, further comprising system down processing means for detecting data inconsistency when a system down occurs.
【請求項3】 マスターデータベース、データベース管
理システム及びレプリケーション制御システムを有する
レプリケーションシステムとレプリカデータベースを有
するレプリケーションクライアントシステムとからなる
データベースレプリケーションシステムを用いてデータ
ベースを自動リカバリする方法であって、 前記レプリケーション制御システムの有するトランザク
ションシーケンス監視手段がトランザクションの異常終
了を検出するステップ、 前記データベース管理システムの有するトランザクショ
ン破棄手段がトランザクションを破棄するステップ、 前記レプリケーションクライアントシステムの有する更
新履歴再送手段が、前記マスターデータベースと前記レ
プリカデータベースとの不整合データをマスターデータ
ベースから読み込み、レプリカデータベースに正しい値
を設定するステップを有することを特徴とするデータベ
ース自動リカバリ方法。
3. A method for automatically recovering a database using a database replication system including a replication system having a master database, a database management system, a replication control system, and a replication client system having a replica database, wherein the replication control system Detecting the abnormal termination of the transaction by the transaction sequence monitoring means included in the database management system; and discarding the transaction by the transaction discarding means of the database management system. The update history resending means of the replication client system includes the master database and the replica. Is data inconsistent with the database the master database? Automatically restoring a replica database and setting a correct value in a replica database.
【請求項4】 前記レプリケーション制御システムの有
するシステムダウン処理手段がシステムダウンが発生し
た際にデータの不整合を検出するステップを有する、請
求項3に記載のデータベース自動リカバリ方法。
4. The database automatic recovery method according to claim 3, further comprising a step of detecting a data inconsistency when a system down occurs in a system down processing unit of the replication control system.
【請求項5】 マスターデータベース、データベース管
理システム及びレプリケーション制御システムを有する
レプリケーションシステムとレプリカデータベースを有
するレプリケーションクライアントシステムとからなる
データベースレプリケーションシステムを用いてデータ
ベースを自動リカバリする方法であって、 前記レプリケーション制御システムの有するトランザク
ションシーケンス監視手段がトランザクションの異常終
了を検出するステップ、 前記データベース管理システムの有するトランザクショ
ン破棄手段がトランザクションを破棄するステップ、 前記レプリケーションクライアントシステムの有する更
新履歴再送手段が、前記マスターデータベースと前記レ
プリカデータベースとの不整合データをマスターデータ
ベースから読み込み、レプリカデータベースに正しい値
を設定するステップを有することを特徴とするデータベ
ース自動リカバリ方法をコンピュータに実行させるプロ
グラム。
5. A method for automatically recovering a database using a database replication system including a replication system having a master database, a database management system, a replication control system, and a replication client system having a replica database, the replication control system comprising: Detecting the abnormal termination of the transaction by the transaction sequence monitoring means included in the database management system; and discarding the transaction by the transaction discarding means of the database management system. The update history resending means of the replication client system includes the master database and the replica. Is data inconsistent with the database the master database? A program for causing a computer to execute a database automatic recovery method, comprising the steps of: reading from a database and setting a correct value in a replica database.
【請求項6】 前記レプリケーション制御システムの有
するシステムダウン処理手段がシステムダウンが発生し
た際にデータの不整合を検出するステップを有する、請
求項5に記載のデータベース自動リカバリ方法をコンピ
ュータに実行させるプログラム。
6. A program for causing a computer to execute the database automatic recovery method according to claim 5, wherein the system down processing means of the replication control system has a step of detecting data inconsistency when a system down occurs. .
JP2001170039A 2001-06-05 Database replication system and database automatic recovery method Expired - Fee Related JP3797141B6 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001170039A JP3797141B6 (en) 2001-06-05 Database replication system and database automatic recovery method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001170039A JP3797141B6 (en) 2001-06-05 Database replication system and database automatic recovery method

Publications (3)

Publication Number Publication Date
JP2002366407A true JP2002366407A (en) 2002-12-20
JP3797141B2 JP3797141B2 (en) 2006-07-12
JP3797141B6 JP3797141B6 (en) 2009-06-10

Family

ID=

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2004097649A1 (en) * 2003-04-25 2004-11-11 Fujitsu Limited Method for conrolling a plurality of databases
US7870099B2 (en) 2006-06-30 2011-01-11 Fujitsu Limited Computer readable recording medium having stored therein database synchronizing process program, and apparatus for and method of performing database synchronizing process
JP2014106580A (en) * 2012-11-26 2014-06-09 Nec Corp Information processing device
JP2021096559A (en) * 2019-12-16 2021-06-24 ヤフー株式会社 Database management system, database management method, and program

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2004097649A1 (en) * 2003-04-25 2004-11-11 Fujitsu Limited Method for conrolling a plurality of databases
US7870099B2 (en) 2006-06-30 2011-01-11 Fujitsu Limited Computer readable recording medium having stored therein database synchronizing process program, and apparatus for and method of performing database synchronizing process
JP2014106580A (en) * 2012-11-26 2014-06-09 Nec Corp Information processing device
JP2021096559A (en) * 2019-12-16 2021-06-24 ヤフー株式会社 Database management system, database management method, and program
JP7120985B2 (en) 2019-12-16 2022-08-17 ヤフー株式会社 Database management system, database management method, and program

Also Published As

Publication number Publication date
JP3797141B2 (en) 2006-07-12

Similar Documents

Publication Publication Date Title
CN100435101C (en) Apparatus and method for maintaining resource integrity in a software environment
US7043504B1 (en) System and method for parallel primary and secondary backup reading in recovery of multiple shared database data sets
US6993537B2 (en) Data recovery system
US6594676B1 (en) System and method for recovery of multiple shared database data sets using multiple change accumulation data sets as inputs
US5371889A (en) Journalling optimization system and method for distributed computations
US5325528A (en) Distributed computation recovery management system and method
EP2877942B1 (en) Automatic transaction retry after session failure
US6161198A (en) System for providing transaction indivisibility in a transaction processing system upon recovery from a host processor failure by monitoring source message sequencing
US8868514B2 (en) Transaction support for distributed data
US6434555B1 (en) Method for transaction recovery in three-tier applications
US8103714B2 (en) Transactional quality of service in event stream processing middleware
US20030208511A1 (en) Database replication system
US20040187127A1 (en) Systems and methods for transaction chaining
US8321610B2 (en) Methods of multi-server application synchronization without stopping I/O
US20030115268A1 (en) Conflict resolution for collaborative work system
JP3094888B2 (en) Numbering mechanism, data consistency confirmation mechanism, transaction re-execution mechanism, and distributed transaction processing system
JPH02287858A (en) Restarting system for distributed processing system
US8006248B2 (en) Method, apparatus and computer program for facilitating communication between a client application and a server application
US5734897A (en) Reduction of logging in distributed systems
US6330686B1 (en) Handling protected conversation messages across IMS restart in shared queues environment
US10719388B2 (en) Decoupled maintenance and repository synchronization error detection
JP3797141B2 (en) Database replication system and database automatic recovery method
JP3797141B6 (en) Database replication system and database automatic recovery method
US7533132B2 (en) Parallel replication mechanism for state information produced by serialized processing
US6539434B1 (en) UOWE's retry process in shared queues environment

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20051227

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20060227

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: 20060328

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20060410

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20100428

Year of fee payment: 4

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20110428

Year of fee payment: 5

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120428

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20120428

Year of fee payment: 6

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130428

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20130428

Year of fee payment: 7

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20140428

Year of fee payment: 8

LAPS Cancellation because of no payment of annual fees