JP4138329B2 - Data processing system and data processing method - Google Patents

Data processing system and data processing method Download PDF

Info

Publication number
JP4138329B2
JP4138329B2 JP2002040395A JP2002040395A JP4138329B2 JP 4138329 B2 JP4138329 B2 JP 4138329B2 JP 2002040395 A JP2002040395 A JP 2002040395A JP 2002040395 A JP2002040395 A JP 2002040395A JP 4138329 B2 JP4138329 B2 JP 4138329B2
Authority
JP
Japan
Prior art keywords
database
transaction
dbms
data processing
database system
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.)
Expired - Fee Related
Application number
JP2002040395A
Other languages
Japanese (ja)
Other versions
JP2003242014A (en
Inventor
繁樹 土屋
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hitachi Ltd
Original Assignee
Hitachi Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Hitachi Ltd filed Critical Hitachi Ltd
Priority to JP2002040395A priority Critical patent/JP4138329B2/en
Publication of JP2003242014A publication Critical patent/JP2003242014A/en
Application granted granted Critical
Publication of JP4138329B2 publication Critical patent/JP4138329B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Description

【0001】
【発明の属する技術分野】
本発明は、データ処理システム及びデータ処理方法に係り、特に、複数のDB(データベース)を1つのグローバルトランザクションとして処理し、遠隔地のDBの状態をこのグローバルトランザクションの結果に同期させることを可能にしたデータ処理システム及びデータ処理方法に関する。
【0002】
【従来の技術】
一般に、DBの管理を行っているRM(リソースマネージャ、具体的にはDBMS等である。以下、DBMSという)は、独自にDBのデュプリケート機能を持っており、これを用いることにより、遠隔地のデータベースの内容との同期を取ることが可能である。
【0003】
図5は従来技術によるDBのデュプリケートを説明するDBシステムの構成を示すブロック図である。図5において、1、14はサーバ、35、36はDBMS、43はユーザアプリケーション(UAP)、44、45はDB、46はネットワーク、47は通信手段である。
【0004】
図5に示すDBシステムは、DB装置を構成する2台のサーバマシン1と14とがネットワーク46を介して接続されて構成されている。そして、本番システムとしてのDB装置が構成されるサーバマシン1内には、UAP43と、このUAP43により更新されるDB44と、DB44を管理するDBMS35が構成されている。また、遠隔地に設置さるバックアップシステムとしてのDB装置が構成されるサーバマシン14内には、DB45と、このDB45を管理するDBMSとが構成されている。
【0005】
サーバマシン1上のDBMS35は、DBMS35が管理するUAP43が更新するDB44を管理しており、独自の通信手段47を用いて、ネットワーク46を通じて、遠隔地にあるサーバマシン14のDBMS36に更新のための情報を転送する。この情報を受け取ったDBMS36は、これにより、自DBMS36が管理するデータベース45を更新すること、すなわち、サーバマシン1、14内のDBの内容を一致させて同期をとることが可能である。
【0006】
【発明が解決しようとする課題】
前述した従来技術は、更新に遅延があるとしても、遠隔地のシステムのデータベースを更新することが可能である。しかし、前述の従来技術は、単体のDB装置相互間の内容の更新を行うことができるものであり、この更新は、DBMS独自の機能によって行われるものである。このため、DBとDBMSとにより構成されるDB装置を複数有し、これらの複数のDBを1つのグローバルトランザクションとして処理するような大規模なシステムに、前述したような従来技術を適用した場合、遠隔地のデータベースの状態を前述のグローバルトランザクションの結果に同期させることが不可能になってしまう。
【0007】
グローバルトランザクションとは、複数のトランザクション(これらをトランザクションブランチと呼ぶ)を束ねて制御できる単位である。このグローバルトランザクションの中には、複数のDB装置を含むことが可能であり、この場合、複数のDBMS、複数のトランザクションブランチの決着を制御する機能が必要となる。この機能が、TM(トランザクションマネージャ)と呼ばれるプログラムの基本機能である。TMは、複数の決着のための情報を制御し、複数のトランザクションブランチを1つのグローバルトランザクションとして制御する。1つのグローバルトランザクションの制御下にあるトランザクションブランチ内のDBの更新結果は、TMが制御するグローバルトランザクションの決着に従って一意に決まる。
【0008】
図4はグローバルトランザクションによるDBの更新について説明するDBシステムの構成を示すブロック図である。図4において、22、27はTM、23、30はUAP、26は連絡手段、31、32はDB、33、34はDBMSである。図4に示すシステムは、TM22、27を含むそれぞれのDBシステムが、本番システム及びバックアップシステムとして動作するものとしている。
【0009】
図4において、各TMと各DBMSとの間には、X/OPENで定められたXA連係機能という連係機能28が備えられており、TMは、この連係機能28を使用してDBMSに対してトランザクション制御を行う。UAP23は、DB更新機能24、すなわち、SQLを使用してデータベース31を更新する機能を有し、また、TM22が提供する通信手段29を使用して別のUAP30に対して処理要求を行うことが可能である。このとき、UAP30は、UAP23のトランザクションに対するトランザクションブランチとなる。そして、UAP30のDB更新機能24によるデータベース32に対する更新は、UAP23のトランザクションと含めて1つのグローバルトランザクションとしてTM22、TM27によって管理される。
【0010】
UAP23は、TM22のトランザクション制御機能25を呼び出してトランザクションを決着させることができる。このとき、TM22は、TM27が管理するUAP30のトランザクションも決着させるために、連絡手段26を用いてTM27にそのトランザクションの決着を指示する。
【0011】
前述したように、TM22とTM27とによって管理されるグローバルトランザクション内でのUAP23によるDB31の更新と、UAP30によるDB32の更新とは同期を取って行われるため、一方のDBだけが更新されているという状態にはならない。すなわち、TMの制御によってグローバルトランザクション内の複数のトランザクションブランチの結果は一意に保たれることになる。
【0012】
現在のDBMSのデュプリケート機能は、例えば、図4により説明した例で言えば、DBMS33とDBMS34とが互いに独立したタイミングで遠隔地のDBMSで管理されているDBを更新する。このため、UAP23がDB31を更新した結果は、遠隔地におけるDB32に反映されているが、UAP30がDB32を更新した結果は、まだ、DB31に反映されていないというようなタイミングが存在し得る。
【0013】
このため、グローバルトランザクション内で複数のデータベースを更新する必要がある大規模システムであって、災害対策システムのような遠隔地のDBに更新結果を反映させる必要があるシステムにおいては、ユーザ自身の工夫で同期を取る手段を講じる必要があった。例えば、複数のDBに依存しないようにする、トランザクションブランチを作らないようにする等の業務アプリケーションの構成を制約したり、トランザクションを発生させた元データを転送し、同様のトランザクションを発生させる等の手段を用いる等により、並列処理を業務アプリケーションで実現する必要があった。
【0014】
本発明の目的は、前述したような必要を回避し、グローバルトランザクションを管理するTMにより、遠隔地における複数DBの同期更新手段を提供し、遠隔地における複数のDBのデータベースの更新をグローバルトランザクションに同期させることを可能にしたデータ処理システム及びデータ処理方法を提供することにある。
【0015】
【課題を解決するための手段】
本発明によれば前記目的は、データベースと該データベースを管理するDBMSとによるデータベース装置を複数備えると共に、トランザクションマネージャを備える少なくとも2台のデータベースシステムをトランザクションマネージャが提供する通信手段により接続して構成されるデータ処理システムにおいて、一方のデータベースシステムのトランザクションマネージャは、自データベースシステムのグローバルトランザクション内で更新された複数のデータベースの更新結果を他方データベースシステム内のデータベースに反映させるためのトランザクション管理情報を、他方のデータベースシステムのトランザクションマネージャに転送する手段を備え、他方のデータベースシステムの複数のデータベース装置のDBMSのそれぞれは、一方のデータベースシステムの複数のデータベース装置から送られてくる一方のデータベースシステムの複数のデータベースに対する更新情報を、DBMS内に回復情報として保持する手段を備え、他方のデータベースシステムのトランザクションマネージャは、受け取ったトランザクション管理情報に基づいて、トランザクションに参加していたDBMSに対してトランザクションの決着指示を行う手段と、自システムのDBMSのそれぞれに、前記保持している回復情報により、自システム内のデータベースの更新を行わせる手段とを備えることにより達成される。
【0016】
【発明の実施の形態】
以下、本発明によるグローバルトランザクション制御システム及び制御方法の実施形態を図面により詳細に説明する。
【0017】
図1は本発明の一実施形態によるグローバルトランザクション制御を使用するDBシステムの構成を示すブロック図、図2は遠隔地側のDBシステムでの回復処理を説明する遠隔地側DBシステムの構成を示すブロック図、図3はトランザクション管理情報13について説明する図である。図1〜図3において、2、12はTM、3はグローバルトランザクション、4はUAP、5、6、8、10はDB、9、11は回復情報、13はトランザクション管理情報、15、16、37、38はDBMSであり、他の符号は図5の場合と同一である。
【0018】
図1に示すDBシステムは、DBシステムを構成する2台のサーバマシン1と14とがネットワーク46を介して接続されて構成されている。そして、本番システムとしてのDBシステムが構成されるサーバマシン1内には、TM2と、UAP4と、このUAP4により更新されるDB5及びDB5を管理するDBMS15によるDB装置と、UAP4により更新されるDB6及びDB6を管理するDBMS16によるDB装置とが構成されている。そして、UAP4と、前述の2つのDB装置とによりグローバルトランザクションが構成されている。
【0019】
また、遠隔地に設置さる災害対策用のバックアップシステムとしてのDBシステムが構成されるサーバマシン14内には、TM12と、DB8及びDB8を管理するDBMS37によるDB装置と、DB10及びDB10を管理するDBMS38によるDB装置とが構成され、TM2から転送されるトランザクションを管理するトランザクション管理情報13が格納されている。
【0020】
通常、図1に示すDBシステムの図示しないクライアント端末は、サーバマシン1を相手に業務を行っているが、サーバマシン1が存在する地域に何らかの障害が発生し、サーバマシン1での業務が続行困難になった場合、サーバマシン14に対して業務の処理を要求をする。いま、クライアントからのある業務が、グローバルトランザクション3であるとする。通常、クライアント端末からトランザクションを発生させることはない。従って、以下では、サーバマシン内の動作について説明する。
【0021】
クライアント端末からの業務の要求により、グローバルトランザクション3内でDBMS15が管理するDB5、DBMS16が管理するDB6が更新され、グローバルトランザクション3をコミットする。DB5とDB6とは、TM2の機能によって同期を取ってデータベースの内容を更新するため、DB5とDB6との更新内容は同期が正しく取れている。クライアントからはさまざまな業務要求が図示システムに投入されており、DB5、DB6にその結果が反映される。
【0022】
DBMS15、DBMS16のそれぞれは、従来のデータベースのデュプリケート機能により、遠隔地のそれぞれに対応する複製用DBであるDBMS37が管理するDB8、DBMS38が管理するDB10をネットワーク7を通じてDB5、DB6の内容に更新することができる。この場合の転送処理は、DBMS15、16によって実行されるが、その転送間隔は、DBMS15とDBMS16とで同期しているわけではない。本発明の実施形態は、前述したようなDBMSのデュプリケート機能による遠隔地DBへの複製に加え、DB8とDB10との間の同期をとるためのトランザクションの管理情報13を、TM2がトランザクションの管理情報を転送する機能17を用いて遠隔地のTM12に対して転送することとしている。
【0023】
トランザクションの管理情報13は、図3に示すように、複数のトランザクション情報42を含んで構成されている。1つのトランザクション情報42には、トランザクション識別子39、トランザクションのコミット/ロールバック等の決着情報40、このトランザクションに参加していたDBMS41の情報等が含まれている。
【0024】
次に、図2を参照して、遠隔地側のサーバマシン14における回復処理について説明する。
【0025】
DBMS15、DBMS16により転送されてきているDB5、DB6の更新内容は、それぞれ、図2に示す回復情報9、11として、DBMS37とDBMS38との中に一旦保持されている。一方、遠隔地に設置されるサーバマシン14内のTM12は、転送されてきた転送元TM2でのトランザクションの管理情報13に基づき、参加していたDBMSの情報41によってDBMS37、DBMS38に対し、トランザクションの決着情報40のトランザクションの情報に従い、トランザクション決着準備指示を行う機能20を用いてDBMS37、38にトランザクション決着準備指示を行う。この指示には、トランザクション識別子39を使用する。
【0026】
トランザクションの決着準備指示を受けたDBMS37、DBMS38は、それぞれ、指示のあったトランザクション識別子39に対応するデータベース更新のための情報が回復情報9、回復情報11に存在するか否かをチェックし、存在していれば、準備ができている旨を回答する。TM12は、DBMS37、DBMS38からの回答を受け、更新可能な状態であると判断することができた場合、トランザクションの決着指示を行う機能21を用いて、DBMS37、DBMS38に対して更新を行うように指示する。更新指示を受けたDBMS37、DBMS38は、それぞれ、回復情報9、回復情報11を用いてデータベース8、データベース10を更新する。
【0027】
図6は前述した遠隔地側のDBシステムでの回復処理の動作を説明するフローチャートであり、次に、これについ説明する。
【0028】
(1)トランザクションの管理情報13の読み出しを行い、トランザクションの管理情報があれば、トランザクション識別子、トランザクションのコミットかロールバックか等の決着情報、参加していたDBMSの情報を取得する(ステップ100)。
【0029】
(2)ステップ100で取得した情報に基づいて、まず、情報内のトランザクションに参加していた1つのDBMSに対して決着準備の指示を行い、その指示に対する回答が決着してもよいという回答であるか否かをチェックする(ステップ101、102)。
【0030】
(3)ステップ102で、決着してもよいという回答が得られていれば、次のDB、すなわち、DBMSが存在するか確認し、他にDBがあるか否かをチェックする。もし、他にDBがあれば、ステップ101からの処理に戻って、他のDBMSに対して決着準備指示を行う(ステップ104、ステップ105)。
【0031】
(4)ステップ102のチェックで、決着してもよいという回答が得られなかった場合、一定時間保留した後、ステップ101からの処理に戻って、再度実行する(ステップ103)。
【0032】
(5)ステップ105のチェックで、他にDBがなかった場合、すなわち、全てのDBMSから準備ができているという回答をもらった場合、それら全てのトランザクションに参加しているDBMSに対して決着の指示を行う(ステップ106)。
【0033】
(6)その後、まだトランザクション情報があるか否かをチェックし、存在していれば、ステップ100からの処理に戻って、次に、その情報に基づいてそのトランザクションの処理を行い、また、トランザクション情報がなければ、情報が転送されくるのを待つ(ステップ107、108)。
【0034】
前述した本発明の実施形態による各処理は、処理プログラムとして構成することができ、この処理プログラムは、HD、DAT、FD、MO、DVD−ROM、CD−ROM等の記録媒体に格納して提供することができる。
【0035】
前述した本発明の実施形態によれば、転送元であるサーバマシン1でグローバルトランザクション3として更新されたDB5、DB6の更新内容を、遠隔地のサーバマシン14内のDB15、DB16に、同期を取って正しく更新することができ、災害対策システムのような遠隔地に冗長なシステムを構築して災害に備えるDBシステムの高信頼化を実現することができる。
【0036】
【発明の効果】
以上説明したように本発明によれば、複数のデータベースをグローバルトランザクションで更新する大規模なシステムにおいて、遠隔地でその更新情報を正しく同期を取って反映させることが可能になる。この結果、遠隔地に冗長なシステムを構築した災害対策システムの高信頼化を図ることができる。
【図面の簡単な説明】
【図1】本発明の一実施形態によるグローバルトランザクション制御を使用するDBシステムの構成を示すブロック図である。
【図2】遠隔地側のDBシステムでの回復処理を説明する遠隔地側DBシステムの構成を示すブロック図である。
【図3】トランザクション管理情報13について説明する図である。
【図4】グローバルトランザクションによるDBの更新について説明するDBシステムの構成を示すブロック図である。
【図5】従来技術によるDBのデュプリケートを説明するDBシステムの構成を示すブロック図である。
【図6】遠隔地側のDBシステムでの回復処理の動作を説明するフローチャートである。
【符号の説明】
1、14 サーバマシン
2、12、22、27 TM
3 グローバルトランザクション
4、23、30、43 ユーザアプリケーション(UAP)
5、6、8、10、31、32、44、45 DB
9、10 回復情報
13 トランザクション管理情報
15、16、、33〜38 DBMS
26 連絡手段
46 ネットワーク
47 通信手段
[0001]
BACKGROUND OF THE INVENTION
The present invention relates to a data processing system and a data processing method, and in particular, allows a plurality of DBs (databases) to be processed as one global transaction, and the state of a remote DB can be synchronized with the result of this global transaction. The present invention relates to a data processing system and a data processing method .
[0002]
[Prior art]
In general, RMs (resource managers, specifically DBMSs, etc., hereinafter referred to as DBMSs) that manage DBs have their own database duplication functions. It is possible to synchronize with the contents of the database.
[0003]
FIG. 5 is a block diagram showing the configuration of a DB system for explaining DB duplication according to the prior art. In FIG. 5, 1 and 14 are servers, 35 and 36 are DBMSs, 43 is a user application (UAP), 44 and 45 are DBs, 46 is a network, and 47 is a communication means.
[0004]
The DB system shown in FIG. 5 is configured by connecting two server machines 1 and 14 constituting a DB device via a network 46. In the server machine 1 in which the DB apparatus as the production system is configured, a UAP 43, a DB 44 updated by the UAP 43, and a DBMS 35 that manages the DB 44 are configured. In addition, a DB 45 and a DBMS that manages the DB 45 are configured in the server machine 14 configured with a DB device as a backup system installed in a remote place.
[0005]
The DBMS 35 on the server machine 1 manages the DB 44 updated by the UAP 43 managed by the DBMS 35, and uses the original communication means 47 to update the DBMS 36 of the server machine 14 at a remote location through the network 46. Transfer information. The DBMS 36 receiving this information can thereby update the database 45 managed by the own DBMS 36, that is, synchronize the contents of the DBs in the server machines 1 and 14 with each other.
[0006]
[Problems to be solved by the invention]
The above-described conventional technology can update the database of a remote system even if there is a delay in updating. However, the above-described conventional technology can update contents between single DB apparatuses, and this update is performed by a function unique to the DBMS. For this reason, when the conventional technology as described above is applied to a large-scale system that has a plurality of DB devices composed of a DB and a DBMS and processes the plurality of DBs as one global transaction, It becomes impossible to synchronize the state of the remote database with the result of the global transaction.
[0007]
A global transaction is a unit in which a plurality of transactions (these are called transaction branches) can be bundled and controlled. In this global transaction, it is possible to include a plurality of DB devices. In this case, a function for controlling the conclusion of a plurality of DBMSs and a plurality of transaction branches is required. This function is a basic function of a program called TM (transaction manager). The TM controls information for a plurality of settlements, and controls a plurality of transaction branches as one global transaction. The DB update result in the transaction branch under the control of one global transaction is uniquely determined according to the conclusion of the global transaction controlled by the TM.
[0008]
FIG. 4 is a block diagram showing the configuration of a DB system for explaining DB update by a global transaction. In FIG. 4, 22 and 27 are TMs, 23 and 30 are UAPs, 26 is a communication means, 31 and 32 are DBs, and 33 and 34 are DBMSs. In the system shown in FIG. 4, each DB system including TMs 22 and 27 is assumed to operate as a production system and a backup system.
[0009]
In FIG. 4, a link function 28 called an XA link function defined by X / OPEN is provided between each TM and each DBMS, and the TM uses this link function 28 to connect to the DBMS. Perform transaction control. The UAP 23 has a DB update function 24, that is, a function of updating the database 31 using SQL, and can make a processing request to another UAP 30 using the communication means 29 provided by the TM 22. Is possible. At this time, the UAP 30 becomes a transaction branch for the transaction of the UAP 23. The update to the database 32 by the DB update function 24 of the UAP 30 is managed by the TM 22 and TM 27 as one global transaction including the transaction of the UAP 23.
[0010]
The UAP 23 can call the transaction control function 25 of the TM 22 to settle the transaction. At this time, the TM 22 instructs the TM 27 to settle the transaction using the contact means 26 in order to settle the transaction of the UAP 30 managed by the TM 27.
[0011]
As described above, the update of the DB 31 by the UAP 23 and the update of the DB 32 by the UAP 30 in the global transaction managed by the TM 22 and the TM 27 are performed in synchronization, so that only one DB is updated. It will not be in a state. In other words, the results of a plurality of transaction branches in the global transaction are uniquely maintained by the TM control.
[0012]
The current duplicate function of the DBMS, for example, in the example described with reference to FIG. 4, the DBMS 33 and the DBMS 34 update the DB managed by the remote DBMS at a timing independent of each other. For this reason, the result of updating the DB 31 by the UAP 23 is reflected in the DB 32 at a remote location, but there may still be a timing that the result of updating the DB 32 by the UAP 30 is not reflected in the DB 31 yet.
[0013]
For this reason, in a large-scale system that needs to update a plurality of databases within a global transaction and that needs to reflect the update result in a remote DB such as a disaster countermeasure system, the user's own device It was necessary to take measures to synchronize. For example, restricting the configuration of business applications such as not depending on multiple DBs or creating a transaction branch, transferring the original data that caused the transaction, and generating a similar transaction It was necessary to implement parallel processing in business applications by using means.
[0014]
An object of the present invention is to provide a means for synchronously updating a plurality of DBs at a remote location by using a TM for managing a global transaction, avoiding the above-described necessity, and updating a database of a plurality of DBs at a remote location to a global transaction. It is an object of the present invention to provide a data processing system and a data processing method that can be synchronized.
[0015]
[Means for Solving the Problems]
According to the present invention, the object is configured by connecting a plurality of database devices including a database and a DBMS for managing the database, and connecting at least two database systems including a transaction manager by communication means provided by the transaction manager. In the data processing system, the transaction manager of one database system provides transaction management information for reflecting the update results of a plurality of databases updated in the global transaction of the own database system to the database in the other database system. Each of the DBMSs of the plurality of database devices of the other database system. The update information for a plurality of databases of one of the database system transmitted from a plurality of database apparatus of one of the database system, comprising means for holding in the DBMS as times Fukujo report, the transaction manager of the other database system Based on the received transaction management information, the means for instructing the transaction to the DBMS participating in the transaction and the recovery information stored in each DBMS of the own system And a means for updating the database.
[0016]
DETAILED DESCRIPTION OF THE INVENTION
Embodiments of a global transaction control system and a control method according to the present invention will be described below in detail with reference to the drawings.
[0017]
FIG. 1 is a block diagram showing the configuration of a DB system using global transaction control according to an embodiment of the present invention, and FIG. 2 shows the configuration of a remote site DB system for explaining recovery processing in the remote site DB system. FIG. 3 is a block diagram for explaining the transaction management information 13. 1-3, 2, 12 are TM, 3 is a global transaction, 4 is UAP, 5, 6, 8, 10 is DB, 9, 11 is recovery information, 13 is transaction management information, 15, 16, 37 , 38 are DBMSs, and the other symbols are the same as those in FIG.
[0018]
The DB system shown in FIG. 1 is configured by connecting two server machines 1 and 14 constituting a DB system via a network 46. In the server machine 1 in which the DB system as the production system is configured, TM2, UAP4, DB5 updated by this UAP4 and DB device by DBMS15 managing DB5, DB6 updated by UAP4, and A DB device by the DBMS 16 that manages the DB 6 is configured. A global transaction is configured by the UAP 4 and the two DB devices described above.
[0019]
Further, in the server machine 14 in which a DB system as a disaster countermeasure backup system installed in a remote place is configured, a DB device by TM12, a DBMS 37 that manages DB8 and DB8, and a DBMS38 that manages DB10 and DB10. A transaction management information 13 for managing a transaction transferred from TM2 is stored.
[0020]
Normally, the client terminal (not shown) of the DB system shown in FIG. 1 performs business with the server machine 1 as a partner, but some trouble occurs in the area where the server machine 1 exists, and the business on the server machine 1 continues. When it becomes difficult, the server machine 14 is requested to perform business processing. Now, it is assumed that a business from a client is a global transaction 3. Normally, a transaction is not generated from a client terminal. Therefore, the operation in the server machine will be described below.
[0021]
In response to a business request from the client terminal, the DB 5 managed by the DBMS 15 and the DB 6 managed by the DBMS 16 are updated in the global transaction 3 and the global transaction 3 is committed. Since DB5 and DB6 update the contents of the database in synchronization with the function of TM2, the update contents of DB5 and DB6 are correctly synchronized. Various business requests are input from the client to the illustrated system, and the results are reflected in DB5 and DB6.
[0022]
Each of the DBMS 15 and the DBMS 16 updates the DB 8 managed by the DBMS 37, which is a replication DB corresponding to each remote location, and the DB 10 managed by the DBMS 38 to the contents of the DB 5 and DB 6 through the network 7 by the conventional database duplication function. be able to. The transfer process in this case is executed by the DBMS 15 and 16, but the transfer interval is not synchronized between the DBMS 15 and the DBMS 16. In the embodiment of the present invention, in addition to the replication to the remote DB by the duplicate function of the DBMS as described above, the transaction management information 13 for synchronization between the DB 8 and the DB 10 is displayed. Is transferred to the remote TM 12 by using the function 17 for transferring.
[0023]
As shown in FIG. 3, the transaction management information 13 includes a plurality of transaction information 42. One transaction information 42 includes a transaction identifier 39, settlement information 40 such as transaction commit / rollback, information on the DBMS 41 participating in the transaction, and the like.
[0024]
Next, with reference to FIG. 2, the recovery process in the remote-side server machine 14 will be described.
[0025]
The updated contents of DB5 and DB6 transferred by the DBMS15 and DBMS16 are temporarily held in the DBMS 37 and DBMS 38 as the recovery information 9 and 11 shown in FIG. On the other hand, the TM 12 in the server machine 14 installed at a remote location, based on the transferred transaction management information 13 at the transfer source TM 2, transmits the transaction information to the DBMS 37 and DBMS 38 based on the participating DBMS information 41. In accordance with the transaction information of the settlement information 40, a transaction settlement preparation instruction is sent to the DBMS 37, 38 using the function 20 for issuing a transaction settlement preparation instruction. The transaction identifier 39 is used for this instruction.
[0026]
The DBMS 37 and DBMS 38 that have received the transaction settlement preparation instruction check whether the information for database update corresponding to the instructed transaction identifier 39 exists in the recovery information 9 and the recovery information 11, respectively. If yes, reply that you are ready. When the TM 12 receives the response from the DBMS 37 and DBMS 38 and can determine that the update is possible, the TM 12 updates the DBMS 37 and DBMS 38 using the function 21 for instructing the transaction completion. Instruct. Receiving the update instruction, the DBMS 37 and the DBMS 38 update the database 8 and the database 10 using the recovery information 9 and the recovery information 11, respectively.
[0027]
FIG. 6 is a flowchart for explaining the operation of the recovery process in the above-mentioned DB system on the remote site side. Next, this will be explained.
[0028]
(1) The transaction management information 13 is read, and if there is transaction management information, the transaction identifier, the settlement information such as the transaction commit or rollback, and the information of the participating DBMS are acquired (step 100). .
[0029]
(2) Based on the information acquired in step 100, first, an instruction for preparation for settlement is given to one DBMS participating in the transaction in the information, and an answer to the instruction may be settled. It is checked whether or not there is (steps 101 and 102).
[0030]
(3) If an answer indicating that it can be settled is obtained in step 102, it is confirmed whether or not the next DB, that is, DBMS exists, and whether or not there is another DB is checked. If there is another DB, the process returns to the process from step 101, and a decision preparation instruction is given to the other DBMS (step 104, step 105).
[0031]
(4) If the check in step 102 does not give an answer that it can be settled, after holding for a certain period of time, the process returns to step 101 and is executed again (step 103).
[0032]
(5) If there is no other DB in the check in step 105, that is, if there is an answer that all the DBMSs are ready, it will be settled for the DBMS participating in all these transactions. An instruction is given (step 106).
[0033]
(6) After that, it is checked whether or not there is transaction information. If it exists, the process returns to step 100, and the transaction is processed based on the information. If there is no information, it waits for information to be transferred (steps 107 and 108).
[0034]
Each processing according to the embodiment of the present invention described above can be configured as a processing program, and this processing program is stored in a recording medium such as HD, DAT, FD, MO, DVD-ROM, CD-ROM, and provided. can do.
[0035]
According to the above-described embodiment of the present invention, the update contents of DB5 and DB6 updated as the global transaction 3 in the server machine 1 that is the transfer source are synchronized with the DB15 and DB16 in the remote server machine 14. The database system can be updated correctly, and a highly reliable DB system can be realized by building a redundant system in a remote place such as a disaster countermeasure system.
[0036]
【The invention's effect】
As described above, according to the present invention, in a large-scale system in which a plurality of databases are updated by a global transaction, it is possible to correctly reflect and update the update information at a remote location. As a result, it is possible to improve the reliability of the disaster countermeasure system in which a redundant system is constructed in a remote place.
[Brief description of the drawings]
FIG. 1 is a block diagram showing a configuration of a DB system using global transaction control according to an embodiment of the present invention.
FIG. 2 is a block diagram showing a configuration of a remote site DB system for explaining recovery processing in the remote site DB system;
FIG. 3 is a diagram for explaining transaction management information 13;
FIG. 4 is a block diagram showing a configuration of a DB system for explaining DB update by a global transaction.
FIG. 5 is a block diagram showing the configuration of a DB system for explaining DB duplication according to the prior art.
FIG. 6 is a flowchart for explaining the operation of recovery processing in a remote-side DB system.
[Explanation of symbols]
1, 14 Server machine 2, 12, 22, 27 TM
3 Global transaction 4, 23, 30, 43 User application (UAP)
5, 6, 8, 10, 31, 32, 44, 45 DB
9, 10 Recovery information 13 Transaction management information 15, 16, 33-38 DBMS
26 Communication means 46 Network 47 Communication means

Claims (3)

データベースと該データベースを管理するDBMSとによるデータベース装置を複数備えると共に、トランザクションマネージャを備える少なくとも2台のデータベースシステムをトランザクションマネージャが提供する通信手段により接続して構成されるデータ処理システムにおいて、
一方のデータベースシステムのトランザクションマネージャは、自データベースシステムのグローバルトランザクション内で更新された複数のデータベースの更新結果を他方データベースシステム内のデータベースに反映させるためのトランザクション管理情報を、他方のデータベースシステムのトランザクションマネージャに転送する手段を備え、
他方のデータベースシステムの複数のデータベース装置のDBMSのそれぞれは、一方のデータベースシステムの複数のデータベース装置から送られてくる一方のデータベースシステムの複数のデータベースに対する更新情報を、DBMS内に回復情報として保持する手段を備え、
他方のデータベースシステムのトランザクションマネージャは、受け取ったトランザクション管理情報に基づいて、トランザクションに参加していたDBMSに対してトランザクションの決着指示を行う手段と、自システムのDBMSのそれぞれに、前記保持している回復情報により、自システム内のデータベースの更新を行わせる手段とを備えることを特徴とするデータ処理システム。
In a data processing system comprising a plurality of database devices including a database and a DBMS for managing the database and connecting at least two database systems including a transaction manager by communication means provided by the transaction manager,
The transaction manager of one database system transmits transaction management information for reflecting the update results of a plurality of databases updated in the global transaction of the own database system to the database in the other database system, and the transaction manager of the other database system. With means to transfer to
Each of the DBMS of the plurality of database apparatus of the other database system, the update information for a plurality of databases of one of the database system transmitted from a plurality of database apparatus of one of the database system, as in time Fukujo report the DBMS Means for holding,
The transaction manager of the other database system holds each of the means for instructing the transaction to the DBMS participating in the transaction based on the received transaction management information and the DBMS of its own system. A data processing system comprising: means for updating a database in the own system based on recovery information.
データベースと該データベースを管理するDBMSとによるデータベース装置を複数備えると共に、トランザクションマネージャを備える少なくとも2台のデータベースシステムをトランザクションマネージャが提供する通信手段により接続して構成されるデータ処理システムにおけるデータ処理方法において、
一方のデータベースシステムのトランザクションマネージャは、自データベースシステムのグローバルトランザクション内で更新された複数のデータベースの更新結果を他方データベースシステム内のデータベースに反映させるためのトランザクション管理情報を、他方のデータベースシステムのトランザクションマネージャに転送し、
他方のデータベースシステムの複数のデータベース装置のDBMSのそれぞれは、一方のデータベースシステムの複数のデータベース装置から送られてくる一方のデータベースシステムの複数のデータベースに対する更新情報を、DBMS内に回復情報として保持し、
他方のデータベースシステムのトランザクションマネージャは、受け取ったトランザクション管理情報に基づいて、トランザクションに参加していたDBMSに対してトランザクションの決着指示を行い、自システムのDBMSのそれぞれに、前記保持している回復情報により、自システム内のデータベースの更新を行わせることを特徴とするデータ処理方法。
In a data processing method in a data processing system including a plurality of database devices each including a database and a DBMS that manages the database and connecting at least two database systems including a transaction manager by communication means provided by the transaction manager ,
The transaction manager of one database system transmits transaction management information for reflecting the update results of a plurality of databases updated in the global transaction of the own database system to the database in the other database system, and the transaction manager of the other database system. Forward to
Each of the DBMS of the plurality of database apparatus of the other database system, the update information for a plurality of databases of one of the database system transmitted from a plurality of database apparatus of one of the database system, as in time Fukujo report the DBMS Hold and
Based on the received transaction management information, the transaction manager of the other database system issues a transaction settlement instruction to the DBMS participating in the transaction, and each of the DBMSs of its own system stores the recovery information held therein. A data processing method characterized in that the database in the own system is updated.
データベースと該データベースを管理するDBMSとによるデータベース装置を複数備えると共に、トランザクションマネージャを備える少なくとも2台のデータベースシステムをトランザクションマネージャが提供する通信手段により接続して構成されるデータ処理システムにおけるデータ処理プログラムであって、
他方のデータベースシステムに、
一方のデータベースシステムのトランザクションマネージャから送信されてくる一方のデータベースシステムのグローバルトランザクション内で更新された複数のデータベースの更新結果を他方データベースシステム内のデータベースに反映させるためのトランザクション管理情報を受け取るステップと、
一方のデータベースシステムの複数のデータベース装置から送られてくる一方のデータベースシステムの複数のデータベースに対する更新情報を、自システムのDBMS内に回復情報として保持させるステップと、
受け取ったトランザクション管理情報に基づいて、トランザクションに参加していたDBMSに対してトランザクションの決着指示を行うステップと、
自システムのDBMSのそれぞれに、前記保持している回復情報により、自システム内のデータベースの更新を行わせるステップとを実行させることを特徴とするデータ処理プログラム。
A data processing program in a data processing system comprising a plurality of database devices each including a database and a DBMS for managing the database and connecting at least two database systems including a transaction manager by communication means provided by the transaction manager There,
In the other database system,
Receiving transaction management information for reflecting the update results of a plurality of databases updated in the global transaction of one database system transmitted from the transaction manager of one database system to the database in the other database system;
Updates to multiple databases of one of the database system transmitted from a plurality of database apparatus of one of the database system, the step of holding in a DBMS of the own system as times Fukujo report,
A step of instructing the DBMS that has participated in the transaction based on the received transaction management information;
A data processing program that causes each DBMS of its own system to execute a step of updating a database in the own system based on the stored recovery information.
JP2002040395A 2002-02-18 2002-02-18 Data processing system and data processing method Expired - Fee Related JP4138329B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2002040395A JP4138329B2 (en) 2002-02-18 2002-02-18 Data processing system and data processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2002040395A JP4138329B2 (en) 2002-02-18 2002-02-18 Data processing system and data processing method

Publications (2)

Publication Number Publication Date
JP2003242014A JP2003242014A (en) 2003-08-29
JP4138329B2 true JP4138329B2 (en) 2008-08-27

Family

ID=27781143

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2002040395A Expired - Fee Related JP4138329B2 (en) 2002-02-18 2002-02-18 Data processing system and data processing method

Country Status (1)

Country Link
JP (1) JP4138329B2 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4549793B2 (en) * 2004-09-21 2010-09-22 株式会社日立製作所 Data processing method, database system, and storage device
KR100694161B1 (en) * 2006-02-10 2007-03-12 삼성전자주식회사 Method of managing distributed contents and apparatus therefor

Also Published As

Publication number Publication date
JP2003242014A (en) 2003-08-29

Similar Documents

Publication Publication Date Title
CN102648448B (en) Supply and manage replicated data
US7043665B2 (en) Method, system, and program for handling a failover to a remote storage location
US7657718B1 (en) Storage automated replication processing
JP4668763B2 (en) Storage device restore method and storage device
AU2005207573B2 (en) Geographically distributed clusters
EP1704480B1 (en) Cluster database with remote data mirroring
JP2003076592A (en) Data storage system
US20090019096A1 (en) System and article of manufacture for mirroring data at storage locations
US20020194015A1 (en) Distributed database clustering using asynchronous transactional replication
CN102640108A (en) Monitoring of replicated data instances
WO2003044697A1 (en) Data replication system and method
US20050210081A1 (en) Data synchronization method
US8504873B1 (en) Method and apparatus for providing in-memory checkpoint services within a distributed transaction
KR20110044858A (en) Maintain data indetermination in data servers across data centers
JP2008009707A (en) Storage system and data duplicating method
JP2005025432A (en) Transaction processing method, transaction controller, and transaction control program
JP4136615B2 (en) Database system and database access method
JP4289056B2 (en) Data duplication control method between computer systems
KR101605455B1 (en) Method for Replicationing of Redo Log without Data Loss and System Thereof
JP4138329B2 (en) Data processing system and data processing method
JP2012022379A (en) Distributed transaction processing system, device, method and program
JPH07114495A (en) Multiplexing file managing system
CN115297129B (en) Method and device for establishing data communication network
WO2023125412A9 (en) Method and system for synchronous data replication
KR20030015171A (en) Database replication system and the replication method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20040730

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20071120

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080121

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20080219

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20080418

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

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20080605

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

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20110613

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20120613

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20120613

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20130613

Year of fee payment: 5

LAPS Cancellation because of no payment of annual fees