JP5601028B2 - Database replication system, database replication method, information processing apparatus, and program - Google Patents
Database replication system, database replication method, information processing apparatus, and program Download PDFInfo
- Publication number
- JP5601028B2 JP5601028B2 JP2010118106A JP2010118106A JP5601028B2 JP 5601028 B2 JP5601028 B2 JP 5601028B2 JP 2010118106 A JP2010118106 A JP 2010118106A JP 2010118106 A JP2010118106 A JP 2010118106A JP 5601028 B2 JP5601028 B2 JP 5601028B2
- Authority
- JP
- Japan
- Prior art keywords
- database
- record
- information
- change
- processing apparatus
- 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
Links
- 230000010365 information processing Effects 0.000 title claims description 146
- 230000010076 replication Effects 0.000 title claims description 67
- 238000000034 method Methods 0.000 title claims description 44
- 230000008859 change Effects 0.000 claims description 228
- 230000008520 organization Effects 0.000 claims description 26
- 238000012545 processing Methods 0.000 claims description 25
- 230000008569 process Effects 0.000 description 19
- 230000006870 function Effects 0.000 description 8
- 230000005540 biological transmission Effects 0.000 description 7
- 230000009471 action Effects 0.000 description 4
- 238000010586 diagram Methods 0.000 description 4
- 238000012217 deletion Methods 0.000 description 3
- 230000037430 deletion Effects 0.000 description 3
- 239000000284 extract Substances 0.000 description 3
- 238000012546 transfer Methods 0.000 description 3
- 238000004891 communication Methods 0.000 description 2
- 230000001360 synchronised effect Effects 0.000 description 2
- 230000003247 decreasing effect Effects 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 230000003287 optical effect Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Description
本発明は、データベースにおけるレコードの変更を他のデータベースに反映するデータベース・レプリケーション・システムに関する。 The present invention relates to a database replication system that reflects record changes in a database to other databases.
第1のデータベースにおけるレコードの変更を第2のデータベースに反映するデータベース・レプリケーション・システムが知られている。この種のデータベース・レプリケーション・システムの一つとして、特許文献1に記載のデータベース・レプリケーション・システムにおいて、第1のデータベース、及び、第2のデータベースのそれぞれは、1つのレコード形式を有するレコードを格納するテーブルを複数含む。
Database replication systems that reflect record changes in a first database to a second database are known. As one of this type of database replication system, in the database replication system described in
上記データベース・レプリケーション・システムは、第1のデータベースが含む第1のテーブルに格納されているレコードを、第2のデータベースが含むテーブルであって、当該第1のテーブルに対応するテーブルである第2のテーブルに格納するための命令を生成する。データベース・レプリケーション・システムは、生成された命令に従って、レコードを第2のテーブルに格納する。 In the database replication system, the second database includes a record stored in the first table included in the first database, and is a table corresponding to the first table. Generate instructions to store in the table. The database replication system stores the record in the second table according to the generated instruction.
ところで、データベースが、レコード形式を複数有する複数のレコードを格納するVSAM(Virtual Storage Access Method)編成ファイルにより構成される場合がある。VSAM編成ファイルは、主にメインフレームにおいて利用されている。VSAM編成ファイルにより構成されたデータベースにおいては、例えば、COBOL(Common Business Oriented Language)におけるREDEFINES句を用いて複数のレコード形式が定義される。 By the way, the database may be configured by a VSAM (Virtual Storage Access Method) organization file that stores a plurality of records having a plurality of record formats. The VSAM organization file is mainly used in the main frame. In a database composed of VSAM organization files, for example, a plurality of record formats are defined using a REDEFINES phrase in COBOL (Common Business Oriented Language).
ところで、上述したデータベース・レプリケーション・システムを用いた場合、VSAM編成ファイルにより構成されたデータベースにおけるレコードの変更を、他のデータベース(例えば、リレーショナル・データベース等)に反映することができない。また、ETL(Extract/Transform/Load)ツールを利用して、VSAM編成ファイルにより構成されたデータベースに蓄積されているレコードを抽出し、抽出したレコードを上記他のデータベースへ反映する場合、比較的長い時間を要するという問題があった。 By the way, when the above-described database replication system is used, the change of the record in the database constituted by the VSAM organization file cannot be reflected in another database (for example, a relational database). In addition, when an ETL (Extract / Transform / Load) tool is used to extract a record accumulated in a database configured by a VSAM organization file and the extracted record is reflected in the other database, it is relatively long. There was a problem of taking time.
即ち、上記データベース・レプリケーション・システムにおいては、VSAM編成ファイルにより構成されたデータベースにおけるレコードの変更をリアルタイムに他のデータベースに反映することができない場合が生じるという問題があった。 That is, in the above-mentioned database replication system, there has been a problem that the change of the record in the database constituted by the VSAM organization file cannot be reflected in another database in real time.
このため、本発明の目的は、上述した課題である「VSAM編成ファイルにより構成されたデータベースにおけるレコードの変更をリアルタイムに他のデータベースに反映することができない場合が生じること」を解決することが可能なデータベース・レプリケーション・システムを提供することにある。 For this reason, the object of the present invention is to solve the above-mentioned problem that “record changes in a database constituted by a VSAM organization file cannot be reflected in another database in real time”. Is to provide a simple database replication system.
かかる目的を達成するため本発明の一形態であるデータベース・レプリケーション・システムは、
レコードの形式であるレコード形式を複数有する複数のレコードを格納するVSAM(Virtual Storage Access Method)編成ファイルにより構成された第1のデータベースが蓄積しているレコードが変更された場合、1つのレコード形式を有するレコードを格納するテーブルを複数含む第2のデータベースに当該変更を反映する変更反映手段を備える。
In order to achieve such an object, a database replication system according to one aspect of the present invention provides:
When a record stored in the first database configured by a VSAM (Virtual Storage Access Method) organization file that stores a plurality of records having a plurality of record formats that are record formats is changed, one record format is changed. And a change reflecting means for reflecting the change in a second database including a plurality of tables for storing records.
また、本発明の他の形態であるデータベース・レプリケーション方法は、
レコードの形式であるレコード形式を複数有する複数のレコードを格納するVSAM(Virtual Storage Access Method)編成ファイルにより構成された第1のデータベースが蓄積しているレコードが変更された場合、1つのレコード形式を有するレコードを格納するテーブルを複数含む第2のデータベースに当該変更を反映する方法である。
In addition, the database replication method according to another aspect of the present invention,
When a record stored in the first database configured by a VSAM (Virtual Storage Access Method) organization file that stores a plurality of records having a plurality of record formats that are record formats is changed, one record format is changed. In this method, the change is reflected in a second database including a plurality of tables for storing records.
また、本発明の他の形態である第2の情報処理装置は、
レコードの形式であるレコード形式を複数有する複数のレコードを格納するVSAM(Virtual Storage Access Method)編成ファイルにより構成された第1のデータベースを保持する第1の情報処理装置と通信可能に構成された第2の情報処理装置である。
The second information processing apparatus according to another embodiment of the present invention
A first information processing apparatus configured to be able to communicate with a first information processing apparatus having a first database configured by a VSAM (Virtual Storage Access Method) organization file that stores a plurality of records having a plurality of record formats. 2 is an information processing apparatus.
更に、この第2の情報処理装置は、
1つのレコード形式を有するレコードを格納するテーブルを複数含む第2のデータベースを保持するとともに、
上記第1のデータベースが蓄積しているレコードが変更された場合、上記第1の情報処理装置から当該レコードの変更を表す変更ログ情報を受信する変更ログ情報受信手段と、
上記受信された変更ログ情報が表す上記レコードの変更を上記2のデータベースに反映する変更反映手段と、
を備える。
Furthermore, the second information processing apparatus
Holding a second database including a plurality of tables storing records having one record format;
Change log information receiving means for receiving change log information representing a change of the record from the first information processing apparatus when the record stored in the first database is changed;
Change reflecting means for reflecting the change of the record represented by the received change log information in the database of 2;
Is provided.
また、本発明の他の形態であるプログラムは、
レコードの形式であるレコード形式を複数有する複数のレコードを格納するVSAM(Virtual Storage Access Method)編成ファイルにより構成された第1のデータベースを保持する第1の情報処理装置と通信可能に構成されるとともに、1つのレコード形式を有するレコードを格納するテーブルを複数含む第2のデータベースを保持する第2の情報処理装置に、
上記第1のデータベースが蓄積しているレコードが変更された場合、上記第1の情報処理装置から当該レコードの変更を表す変更ログ情報を受信する変更ログ情報受信手段と、
上記受信された変更ログ情報が表す上記レコードの変更を上記2のデータベースに反映する変更反映手段と、
を実現させるためのプログラムである。
Moreover, the program which is the other form of this invention is:
It is configured to be communicable with a first information processing apparatus that holds a first database configured by a VSAM (Virtual Storage Access Method) organization file that stores a plurality of records having a plurality of record formats that are record formats. In a second information processing apparatus holding a second database including a plurality of tables for storing records having one record format,
Change log information receiving means for receiving change log information representing a change of the record from the first information processing apparatus when the record stored in the first database is changed;
Change reflecting means for reflecting the change of the record represented by the received change log information in the database of 2;
It is a program for realizing.
本発明は、以上のように構成されることにより、VSAM編成ファイルにより構成されたデータベースにおけるレコードの変更をリアルタイムに他のデータベースに反映することができる。 By configuring as described above, the present invention can reflect a change in a record in a database configured by a VSAM organization file to another database in real time.
以下、本発明に係る、データベース・レプリケーション・システム、データベース・レプリケーション方法、情報処理装置、及び、プログラム、の各実施形態について図1〜図19を参照しながら説明する。 Embodiments of a database replication system, a database replication method, an information processing apparatus, and a program according to the present invention will be described below with reference to FIGS.
<第1実施形態>
(構成)
図1に示したように、第1実施形態に係るデータベース・レプリケーション・システム1は、第1の情報処理装置(第1のデータベース・サーバ装置)100と、第2の情報処理装置(第2のデータベース・サーバ装置)200と、を含む。第1の情報処理装置100及び第2の情報処理装置200は、通信回線(本例では、IP(Internet Protocol)網を構成する通信回線)NWを介して、互いに通信可能に接続されている。
<First Embodiment>
(Constitution)
As shown in FIG. 1, the
第1の情報処理装置100は、図示しない中央処理装置(CPU;Central Processing Unit)、及び、記憶装置(メモリ及びハードディスク駆動装置(HDD;Hard Disk Drive))を備える。第1の情報処理装置100は、記憶装置に記憶されているプログラムをCPUが実行することにより、後述する機能を実現するように構成されている。
第2の情報処理装置200も第1の情報処理装置100と同様の構成を有する。
The first
The second
(機能)
図2は、上記のように構成されたデータベース・レプリケーション・システム1の機能を表すブロック図である。
(function)
FIG. 2 is a block diagram showing the functions of the
第1の情報処理装置100の機能は、第1のデータベース部101と、アプリケーション実行部102と、一時変更ログ情報生成部103と、一時変更ログ情報記憶部104と、シーケンス情報記憶部105と、変更ログ情報生成部106と、変更ログ情報記憶部107と、FD(File Descriptor)情報取得部108と、FD情報記憶部109と、情報送信部110と、を含む。
The functions of the first
第1のデータベース部101は、レコードの形式であるレコード形式を複数有する複数のレコードを格納するVSAM(Virtual Storage Access Method)編成ファイルにより構成された第1のデータベースを保持する。
The
アプリケーション実行部102は、第1のデータベース部101に蓄積されているレコードを用いた処理を行うアプリケーション・プログラムを実行する。アプリケーション実行部102は、アプリケーション・プログラムを実行することにより、第1のデータベース部101に蓄積されているレコードを変更(追加、削除、及び、更新)する。
The
このとき、アプリケーション実行部102は、レコードの変更をトランザクション処理として実行する。即ち、アプリケーション実行部102は、1つのトランザクション処理において、第1のデータベース部101に蓄積されているレコードを変更する旨を表す命令(変更命令)が生成された後に、コミット命令が生成された場合にのみ、当該変更命令を第1のデータベース部101へ出力する。これにより、当該変更命令に基づくレコードの変更が実際に第1のデータベースに反映される。
At this time, the
なお、アプリケーション実行部102は、複数のアプリケーション・プログラムを実行していてもよい。
The
一時変更ログ情報生成部103は、アプリケーション実行部102が、第1のデータベース部101に蓄積されているレコードを変更する旨を表す命令(変更命令)を生成した場合、一時変更ログ情報を生成する。一時変更ログ情報は、変更命令を生成したアプリケーション・プログラムを特定するためのアプリケーション特定情報と、当該変更命令に基づく変更後のレコードと、変更命令の種別(追加、削除、又は、更新)を特定するための命令種別情報と、を含む。
The temporary change log information generation unit 103 generates temporary change log information when the
一時変更ログ情報記憶部104は、一時変更ログ情報生成部103により生成された一時変更ログ情報を記憶する。
The temporary change log
シーケンス情報記憶部105は、シーケンス情報を記憶する。シーケンス情報は、コミット命令が生成された(即ち、コミット命令に基づく処理(コミット処理)が実行された)回数を表す情報である。本例では、シーケンス情報は、整数を表す。
The sequence
変更ログ情報生成部106は、アプリケーション実行部102がコミット命令を第1のデータベース部101へ出力した(即ち、コミット命令を生成した)場合、変更ログ情報を生成する。
The change log
具体的には、変更ログ情報生成部106は、生成されたコミット命令の対象となったトランザクション処理において生成された変更命令に基づいて生成された一時変更ログ情報を一時変更ログ情報記憶部104から取得する。また、変更ログ情報生成部106は、シーケンス情報記憶部105に記憶されているシーケンス情報を取得する。更に、変更ログ情報生成部106は、シーケンス情報記憶部105に記憶されているシーケンス情報を、当該シーケンス情報が表す値に1を加えた値に更新する。
Specifically, the change log
変更ログ情報記憶部107は、変更ログ情報生成部106により取得された変更ログ情報としての一時変更ログ情報と、変更ログ情報生成部106により取得されたシーケンス情報と、を対応付けて、当該変更ログ情報の基となった変更命令が生成された順に記憶する。
The change log
更に、変更ログ情報生成部106は、生成されたコミット命令を表すコミットログ情報を生成する。
変更ログ情報記憶部107は、変更命令に基づく変更ログ情報を記憶した後に、当該変更命令が生成されたトランザクション処理に対するコミット命令に基づいて変更ログ情報生成部106により生成された変更ログ情報としてのコミットログ情報と、変更ログ情報生成部106により取得されたシーケンス情報と、を対応付けて記憶する。
Furthermore, the change log
The change log
FD情報取得部108は、第1のデータベースに蓄積されているレコードが有するレコードの形式であるレコード形式を表すFD情報を取得する。本例では、FD情報取得部108は、アプリケーション実行部102が実行するアプリケーション・プログラムのソースコードを解析することによりFD情報を取得する。FD情報は、第1のデータベースにおけるレコード形式を定める第1の定義情報である。
The FD
本例では、アプリケーション実行部102が実行するアプリケーション・プログラムは、COBOL(Common Business Oriented Language)に従ったプログラムである。従って、FD情報取得部108は、ソースコードのうちのFD句として記述された部分に基づいてFD情報を取得する。
In this example, the application program executed by the
FD情報記憶部109は、FD情報取得部108により取得されたFD情報と、FD情報が取得される基となったアプリケーション・プログラムを特定するためのアプリケーション特定情報(本例では、アプリケーション名(AP名))と、を対応付けて記憶する。
The FD
情報送信部110は、予め設定された送信周期が経過する毎に、FD情報記憶部109に記憶されている、FD情報及びアプリケーション特定情報を第2の情報処理装置200へ送信する。更に、情報送信部110は、変更ログ情報記憶部107にコミットログ情報が記憶される毎に、変更ログ情報記憶部107に記憶されている、変更ログ情報及びシーケンス情報を、変更ログ情報記憶部107に記憶された順に第2の情報処理装置200へ送信する。
The
変更ログ情報記憶部107は、情報送信部110により送信された変更ログ情報及びシーケンス情報を消去する。
The change log
第2の情報処理装置200の機能は、第2のデータベース部201と、アプリケーション実行部202と、情報受信部(変更ログ情報受信手段)203と、FD情報解析部204と、テーブル生成部(テーブル生成手段)205と、分配条件記憶部(分配条件記憶手段)206と、反映処理部(変更反映手段)207と、を含む。
The functions of the second
第2のデータベース部201は、1つのレコード形式を有するレコードを格納するテーブルを複数含む第2のデータベースを保持する。
アプリケーション実行部202は、第2のデータベース部201に蓄積されているレコードを用いた処理を行うアプリケーション・プログラムを実行する。
The
The
情報受信部203は、第1の情報処理装置100により送信された情報(FD情報並びにアプリケーション特定情報、及び、変更ログ情報及びシーケンス情報)を受信する。
The
FD情報解析部204は、情報受信部203により受信された、FD情報及びアプリケーション特定情報を受け付ける。FD情報解析部204は、受け付けたFD情報が表すレコード形式を有するレコードを格納するテーブルを生成するためのDDL(Data Definition Language)情報(第2の定義情報)を生成する。本例では、DDL情報は、SQLに従った情報である。
The FD
テーブル生成部205は、FD情報解析部204により生成されたDDL情報が表すテーブルが、第2のデータベースに既に生成されている(即ち、第2のデータベースが当該テーブルを含む)か否かを判定する。テーブル生成部205は、当該テーブルが第2のデータベースに生成されていないと判定した場合、当該DDL情報に基づいて、第2のデータベースにテーブルを生成する。
The
FD情報解析部204は、受け付けたFD情報及びアプリケーション特定情報に基づいて分配条件を生成する。分配条件は、第2のデータベースに含まれるテーブルであり、且つ、第1のデータベースにおいて変更されたレコードが格納されるべきテーブルを変更ログ情報に基づいて特定するための情報である。
The FD
分配条件記憶部206は、FD情報解析部204により生成された分配条件を記憶する。
反映処理部207は、情報受信部203により受信された、変更ログ情報及びシーケンス情報を受け付ける。
The distribution
The
反映処理部207は、受け付けた変更ログ情報及びシーケンス情報と、分配条件記憶部206に記憶されている分配条件と、に基づいて、第2のデータベースが含むテーブルであり、且つ、変更ログ情報が表すレコードの変更が反映されるべきテーブルを特定する。反映処理部207は、特定されたテーブルに、当該変更ログ情報が表すレコードの変更を反映する(即ち、レコードを追加する、レコードを削除する、又は、レコードを更新する)。
The
このとき、反映処理部207は、変更ログ情報とともに受け付けたシーケンス情報が表す値が小さいほど、当該変更ログ情報に基づく処理を早期に実行する。また、反映処理部207は、同一のシーケンス情報とともに受け付けた変更ログ情報に基づく処理を、情報受信部203により変更ログ情報が受信された順に実行する。
At this time, the
(作動)
次に、上記のように構成されたデータベース・レプリケーション・システム1の作動について説明する。
図3にフローチャートにより示したように、第1の情報処理装置100は、FD情報を取得し、取得したFD情報を第2の情報処理装置200へ送信する。
(Operation)
Next, the operation of the
As illustrated by the flowchart in FIG. 3, the first
具体的に述べると、第1の情報処理装置100は、アプリケーション・プログラムのソースコードのうちの、FD句として記述された部分(図4の(A)〜(C))を抽出する(図3のステップS101)。次いで、第1の情報処理装置100は、抽出されたFD句のうちの、REDEFINES句として記述された部分(図4の(B)及び(C))を抽出する(図3のステップS102)。
Specifically, the first
第1の情報処理装置100は、FD句として抽出された部分、及び、REDEFINES句として抽出された部分、に基づいてFD情報を取得する。
次いで、第1の情報処理装置100は、取得されたFD情報と、FD情報が取得される基となったアプリケーション・プログラムを特定するためのアプリケーション特定情報(本例では、アプリケーション名(AP名))と、を対応付けて記憶装置に記憶させる(図3のステップS103)。
The first
Next, the first
そして、第1の情報処理装置100は、予め設定された送信周期が経過する毎に、記憶装置に記憶されている、FD情報及びアプリケーション特定情報を第2の情報処理装置200へ送信する(図3のステップS104)。
The first
また、図5にフローチャートにより示したように、第2の情報処理装置200は、FD情報を第1の情報処理装置100から受信し、受信したFD情報に基づいて分配条件及びテーブルを生成する。
Further, as illustrated by the flowchart in FIG. 5, the second
具体的に述べると、第2の情報処理装置200は、第1の情報処理装置100からFD情報を受信するまで待機する(図5のステップS201)。そして、第2の情報処理装置200は、FD情報を受信すると、受信したFD情報が表すレコード形式を有するレコードを格納するテーブルを生成するためのDDL情報(第2の定義情報、図6を参照)を生成する(図5のステップS202)。
Specifically, the second
更に、第2の情報処理装置200は、受信したFD情報及びアプリケーション特定情報に基づいて分配条件を生成する(図5のステップS203)。第2の情報処理装置200は、生成した分配条件を記憶装置に記憶させる。
Further, the second
分配条件は、図7に示したように、アプリケーション特定情報(AP名)と、レコード形式名と、テーブル名と、条件情報と、を含む。レコード形式名は、第1のデータベースにおけるレコード形式の名称である。テーブル名は、第2のデータベースにおけるテーブルの名称である。条件情報は、本例では、レコード内のカラムである「KEY」の値を定める情報である。 As shown in FIG. 7, the distribution condition includes application specifying information (AP name), a record format name, a table name, and condition information. The record format name is the name of the record format in the first database. The table name is the name of the table in the second database. In this example, the condition information is information that defines a value of “KEY” that is a column in the record.
次いで、第2の情報処理装置200は、生成されたDDL情報が表すテーブルが、第2のデータベースに存在する(即ち、第2のデータベースが当該テーブルを含む)か否かを判定する(図5のステップS204)。
Next, the second
第2のデータベースが当該テーブルを含まない場合、第2の情報処理装置200は、「No」と判定して、当該DDL情報に基づいて、第2のデータベースにテーブルを生成する(図5のステップS205)。なお、第2のデータベースが当該テーブルを含む場合、第2の情報処理装置200は、図5のステップS205の処理を実行しない。
If the second database does not include the table, the second
また、図8にフローチャートにより示したように、第1の情報処理装置100は、一時変更ログ情報を生成する。
具体的に述べると、第1の情報処理装置100は、第1のデータベース部101に蓄積されているレコードを変更する旨を表す命令(変更命令)がアプリケーション実行部102によって生成されるまで待機する(図8のステップS301)。
Further, as illustrated by the flowchart in FIG. 8, the first
More specifically, the first
そして、第1の情報処理装置100は、変更命令がアプリケーション実行部102によって生成されると、一時変更ログ情報を生成する(図8のステップS302)。一時変更ログ情報は、図9に示したように、変更命令を生成したアプリケーション・プログラムを特定するためのアプリケーション特定情報(本例では、「AP01」)と、当該変更命令に基づく変更後のレコード(本例では、「01AAABB」等)と、変更命令の種別(追加、削除、又は、更新)を特定するための命令種別情報(本例では、「INSERT」)と、を含む。
Then, when the change instruction is generated by the
そして、第1の情報処理装置100は、生成した一時変更ログ情報を記憶装置に記憶させる(図8のステップS303)。
そして、第1の情報処理装置100は、図8のステップS301へ戻り、ステップS301〜ステップS303の処理を繰り返し実行する。
Then, the first
Then, the first
また、図10にフローチャートにより示したように、第1の情報処理装置100は、変更ログ情報を第2の情報処理装置200へ送信する。
具体的に述べると、第1の情報処理装置100は、実行中のトランザクション処理に対するコミット命令がアプリケーション実行部102によって生成されるまで待機する(図10のステップS401)。
Further, as illustrated by the flowchart in FIG. 10, the first
More specifically, the first
そして、コミット命令がアプリケーション実行部102によって生成されると、生成されたコミット命令の対象となったトランザクション処理において生成された変更命令に基づいて生成された一時変更ログ情報を記憶装置から取得する(図10のステップS402)。
Then, when the commit instruction is generated by the
次いで、第1の情報処理装置100は、記憶装置に記憶されているシーケンス情報を取得する(図10のステップS403)。そして、第1の情報処理装置100は、記憶装置に記憶されているシーケンス情報を、当該シーケンス情報が表す値に1を加えた値に更新する。
Next, the first
次いで、第1の情報処理装置100は、取得された変更ログ情報としての一時変更ログ情報と、取得されたシーケンス情報と、を対応付けて、当該変更ログ情報の基となった変更命令が生成された順に記憶装置に記憶させる(図10のステップS404)。
Next, the first
更に、第1の情報処理装置100は、生成されたコミット命令を表すコミットログ情報を生成する(図10のステップS405)。次いで、第1の情報処理装置100は、生成した変更ログ情報としてのコミットログ情報と、上記ステップS403にて取得されたシーケンス情報と、を対応付けて記憶装置に記憶させる(図10のステップS406)。
Furthermore, the first
次いで、第1の情報処理装置100は、記憶装置に記憶されている、変更ログ情報及びシーケンス情報を、記憶装置に記憶された順に第2の情報処理装置200へ送信する(図10のステップS407)。そして、第1の情報処理装置100は、送信した変更ログ情報及びシーケンス情報を記憶装置から消去する。
そして、第1の情報処理装置100は、図10のステップS401へ戻り、ステップS401〜ステップS407の処理を繰り返し実行する。
Next, the first
Then, the first
即ち、コミット命令が生成されなかったトランザクション処理において生成された変更命令に基づく一時変更ログ情報は、第2の情報処理装置200へ送信されない。
In other words, the temporary change log information based on the change instruction generated in the transaction process in which the commit instruction has not been generated is not transmitted to the second
また、図11にフローチャートにより示したように、第2の情報処理装置200は、変更ログ情報を第1の情報処理装置100から受信し、受信した変更ログ情報を格納すべきテーブル毎に記憶する。
In addition, as illustrated by the flowchart in FIG. 11, the second
具体的に述べると、第2の情報処理装置200は、第1の情報処理装置100から変更ログ情報を受信するまで待機する(図11のステップS501)。そして、第2の情報処理装置200は、末尾の変更ログ情報がコミットログ情報である複数の変更ログ情報を受信すると、受信した複数の変更ログ情報のそれぞれに対して、ステップS502〜ステップS504の処理を行う。このとき、第2の情報処理装置200は、受信した複数の変更ログ情報の先頭側から順に処理を行う。
Specifically, the second
そして、第2の情報処理装置200は、処理対象となる変更ログ情報がコミットログ情報であるか否かを判定する(図11のステップS502)。変更ログ情報がコミットログ情報でない(即ち、変更ログ情報が一時変更ログ情報である)場合、第2の情報処理装置200は、変更ログ情報と、記憶装置に記憶されている分配条件と、に基づいて、当該変更ログ情報が表すレコードの変更が反映されるべきテーブルを特定する。
Then, the second
次いで、第2の情報処理装置200は、変更ログ情報を、特定されたテーブルと対応付けて記憶装置に記憶させる。即ち、第2の情報処理装置200は、変更ログ情報を、当該変更ログ情報が表すレコードの変更が反映されるべきテーブル毎に、記憶する(図11のステップS504)。
Next, the second
そして、処理対象となる変更ログ情報がコミットログ情報になると、第2の情報処理装置200は、図11のステップS503及びステップS504の処理を実行することなく、ステップS501へ戻り、ステップS501〜ステップS504の処理を繰り返し実行する。
Then, when the change log information to be processed becomes commit log information, the second
また、図12にフローチャートにより示したように、第2の情報処理装置200は、変更ログ情報が表すレコードの変更を第2のデータベースに反映する。
In addition, as illustrated by the flowchart in FIG. 12, the second
具体的に述べると、第2の情報処理装置200は、予め設定された反映周期が経過する毎に、記憶装置に変更ログ情報が記憶されているか否かを判定する。そして、記憶装置に変更ログ情報が記憶されている場合、第2の情報処理装置200は、テーブル毎に、変更ログ情報を並び替える(図12のステップS601)。
Specifically, the second
具体的には、第2の情報処理装置200は、より小さい値を表すシーケンス情報とともに受信された変更ログ情報ほど、先頭側に配置する。更に、第2の情報処理装置200は、同一のシーケンス情報とともに受信された変更ログ情報のうちの、受信された時点が早い変更ログ情報ほど、先頭側に配置する。
Specifically, the second
そして、第2の情報処理装置200は、テーブル毎に、先頭側に配置された変更ログ情報から順に、当該変更ログ情報が表すレコードの変更を反映する(即ち、レコードを追加する、レコードを削除する、又は、レコードを更新する)(図12のステップS602)。
これにより、第2のデータベースは、図13に示したように、テーブル毎に、レコードの変更が反映される。
Then, the second
As a result, the second database reflects the change of the record for each table, as shown in FIG.
以上、説明したように、本発明の第1実施形態に係るデータベース・レプリケーション・システムによれば、VSAM編成ファイルにより構成されたデータベースにおけるレコードの変更をリアルタイムに他のデータベース(本例では、リレーショナル・データベース)に反映することができる。 As described above, according to the database replication system according to the first embodiment of the present invention, a record change in a database configured by a VSAM organization file is changed in real time to another database (in this example, a relational database). Database).
更に、第1実施形態に係るデータベース・レプリケーション・システムによれば、第1のデータベースにおいて、トランザクション処理にてレコードが変更された後にコミット処理が行われなかった場合に、当該レコードの変更が第2のデータベースに反映されることを防止することができる。即ち、第1のデータベースと第2のデータベースとを確実に同期させることができる。 Furthermore, according to the database replication system according to the first embodiment, when the commit process is not performed after the record is changed in the transaction process in the first database, the change of the record is second. Can be prevented from being reflected in the database. That is, the first database and the second database can be reliably synchronized.
加えて、第1実施形態に係るデータベース・レプリケーション・システムによれば、第2の情報処理装置200において、レコード形式(テーブル)毎に並列して、レコードを変更するための処理を実行することができる。これにより、データベース・レプリケーション・システム1全体のスループットを向上させることができる。その理由は、レコード形式毎に、レコードの変更を表す情報を分割しているためである。
In addition, according to the database replication system according to the first embodiment, the second
<第2実施形態>
次に、本発明の第2実施形態に係るデータベース・レプリケーション・システムについて説明する。第2実施形態に係るデータベース・レプリケーション・システムは、上記第1実施形態に係るデータベース・レプリケーション・システムに対して、第1のデータベースに蓄積されているレコードがレコード毎に第1のレコード形式又は第2のレコード形式を有する点において相違している。従って、以下、かかる相違点を中心として説明する。
Second Embodiment
Next, a database replication system according to the second embodiment of the present invention will be described. The database replication system according to the second embodiment is different from the database replication system according to the first embodiment in that records stored in the first database are recorded in the first record format or the first record format. 2 in that it has two record formats. Accordingly, the following description will focus on such differences.
ところで、第2のデータベースを正規化するためには、VSAM編成ファイル内の1つのレコードに含まれる情報を複数のレコード形式(フォーマット)と対応付ける(マッピングする)必要がある。このため、第1の情報処理装置100において、レコードの変更を表す情報を、第2のデータベースにおけるレコード形式に変換した配信イメージを作成する処理を行う必要があった。
Incidentally, in order to normalize the second database, it is necessary to associate (map) information included in one record in the VSAM organization file with a plurality of record formats (formats). For this reason, in the first
しかしながら、第1の情報処理装置100において配信イメージを作成する処理を行うようにデータベース・レプリケーション・システム1が構成された場合、元の(第1のデータベースにおける)レコード単位で、レコードの変更を表す情報を転送できないという問題がある。即ち、この場合、何らかの障害が発生することにより、レコードの変更を表す情報の転送処理が失敗したとき、レコードの変更を表す情報においてレコードの一部のみに相当する部分だけが転送されてしまう虞がある。その結果、第2のデータベースにおいてレコード間の整合性が取れなくなる虞がある。
However, when the
そこで、第2実施形態に係るデータベース・レプリケーション・システム1において、第1の情報処理装置100は、レコードの変更を表す情報を、第2のデータベースにおけるレコード形式に変換することなく第2の情報処理装置200へ送信する。第2の情報処理装置200は、受信した、レコードの変更を表す情報を、第2のデータベースにおけるレコード形式に変換し、変換した情報に基づいて、当該レコードの変更を第2のデータベースに反映する。
Therefore, in the
次に、第2実施形態に係るデータベース・レプリケーション・システム1の作動について説明する。
Next, the operation of the
本例では、第1のデータベース部101に蓄積されている各レコードは、第1のレコード形式又は第2のレコード形式を有する。具体的には、図14に示したように、第1のレコード形式は、「FORMAT01」により定義されるレコード内のカラムである「列3」のデータとして、「FORMAT02」により定義されるレコードが挿入されたレコード形式である。また、第2のレコード形式は、「FORMAT01」により定義されるレコード内のカラムである「列3」のデータとして、「FORMAT03」により定義されるレコードが挿入されたレコード形式である。
In this example, each record stored in the
更に、第1のデータベース部101に蓄積されている各レコードは、当該レコードを特定するための情報としてのカラムである「PKEY」を、当該レコードの先頭に含む。第1の情報処理装置100は、アプリケーション実行部102が実行するアプリケーション・プログラムのソースコードを解析することによりFD情報を取得する。
Furthermore, each record stored in the
そして、図15に示したように、第2の情報処理装置200は、カラムとして「PKEY」が存在する場合、「FORMAT02」及び「FORMAT03」に対応するテーブルのカラムとして、「FORMAT01」に対応するテーブルのレコードを参照するための「PKEY」を追加したDDL情報を生成する。
Then, as illustrated in FIG. 15, when “PKEY” exists as a column, the second
また、第2の情報処理装置200は、第1の情報処理装置100から受信したFD情報及びアプリケーション特定情報に基づいて、図16に示したように、分配条件を生成する。
Further, the second
第1の情報処理装置100は、変更命令がアプリケーション実行部102によって生成されると、図17に示したように、一時変更ログ情報を生成する。一時変更ログ情報は、図9に示したように、変更命令を生成したアプリケーション・プログラムを特定するためのアプリケーション特定情報(本例では、「AP01」)と、当該変更命令に基づく変更後のレコード(本例では、「00001AAABB02LLMMM」等)と、変更命令の種別(追加、削除、又は、更新)を特定するための命令種別情報(本例では、「INSERT」)と、を含む。
When the change instruction is generated by the
そして、第1の情報処理装置100は、生成された一時変更ログ情報を第2の情報処理装置200へ送信する。第2の情報処理装置200は、一時変更ログ情報を受信し、受信した一時変更ログ情報が表すレコードの変更を、第2のデータベースに反映する。
これにより、第2のデータベースは、図18に示したように、テーブル毎に、レコードの変更が反映される。
Then, the first
Thereby, as shown in FIG. 18, the second database reflects the change of the record for each table.
以上、説明したように、本発明の第2実施形態に係るデータベース・レプリケーション・システム1によれば、第1実施形態と同様の作用及び効果を奏する。
As described above, according to the
更に、第2実施形態に係るデータベース・レプリケーション・システム1によれば、第1の情報処理装置100が、レコードの変更を表す情報を、第2のデータベースにおけるレコード形式に変換することなく第2の情報処理装置200へ送信するので、変換する場合と比較して、送信されるデータ量を少なくすることができる。その理由は、カラム「PKEY」の値を重複して送信する必要がないからである。
Furthermore, according to the
加えて、第1の情報処理装置100から第2の情報処理装置200へ送信される、レコードの変更を表す情報は、1つのレコードである。即ち、元の(第1のデータベースにおける)レコード単位で、レコードの変更を表す情報を転送することができる。従って、データベースの状態の管理を簡素化することができる。更に、第2のデータベースにおいてレコード間の整合性が取れなくなることを回避することができる。
In addition, information representing a record change transmitted from the first
<第3実施形態>
次に、本発明の第3実施形態に係るデータベース・レプリケーション・システムについて図19を参照しながら説明する。
第3実施形態に係るデータベース・レプリケーション・システム300は、
レコードの形式であるレコード形式を複数有する複数のレコードを格納するVSAM(Virtual Storage Access Method)編成ファイルにより構成された第1のデータベースが蓄積しているレコードが変更された場合、1つのレコード形式を有するレコードを格納するテーブルを複数含む第2のデータベースに当該変更を反映する変更反映部(変更反映手段)301を備える。
<Third Embodiment>
Next, a database replication system according to a third embodiment of the present invention will be described with reference to FIG.
A
When a record stored in the first database configured by a VSAM (Virtual Storage Access Method) organization file that stores a plurality of records having a plurality of record formats that are record formats is changed, one record format is changed. A change reflection unit (change reflection unit) 301 that reflects the change in a second database including a plurality of tables that store the records having the record is provided.
これによれば、VSAM編成ファイルにより構成されたデータベースにおけるレコードの変更をリアルタイムに他のデータベース(例えば、リレーショナル・データベース等)に反映することができる。 According to this, the change of the record in the database configured by the VSAM organization file can be reflected in another database (for example, a relational database) in real time.
以上、上記実施形態を参照して本願発明を説明したが、本願発明は、上述した実施形態に限定されるものではない。本願発明の構成及び詳細に、本願発明の範囲内において当業者が理解し得る様々な変更をすることができる。 Although the present invention has been described with reference to the above embodiment, the present invention is not limited to the above-described embodiment. Various changes that can be understood by those skilled in the art can be made to the configuration and details of the present invention within the scope of the present invention.
なお、上記各実施形態においてデータベース・レプリケーション・システム1の各機能は、CPUがプログラム(ソフトウェア)を実行することにより実現されていたが、回路等のハードウェアにより実現されていてもよい。
In each of the above embodiments, each function of the
また、上記各実施形態においてプログラムは、記憶装置に記憶されていたが、コンピュータが読み取り可能な記録媒体に記憶されていてもよい。例えば、記録媒体は、フレキシブルディスク、光ディスク、光磁気ディスク、及び、半導体メモリ等の可搬性を有する媒体である。 In each of the above embodiments, the program is stored in the storage device, but may be stored in a computer-readable recording medium. For example, the recording medium is a portable medium such as a flexible disk, an optical disk, a magneto-optical disk, and a semiconductor memory.
また、上記実施形態の他の変形例として、上述した実施形態及び変形例の任意の組み合わせが採用されてもよい。 In addition, as another modified example of the above-described embodiment, any combination of the above-described embodiments and modified examples may be employed.
<付記>
上記実施形態の一部又は全部は、以下の付記のように記載され得るが、以下には限られない。
<Appendix>
A part or all of the above embodiment can be described as the following supplementary notes, but is not limited thereto.
(付記1)
レコードの形式であるレコード形式を複数有する複数のレコードを格納するVSAM(Virtual Storage Access Method)編成ファイルにより構成された第1のデータベースが蓄積しているレコードが変更された場合、1つのレコード形式を有するレコードを格納するテーブルを複数含む第2のデータベースに当該変更を反映する変更反映手段を備えるデータベース・レプリケーション・システム。
(Appendix 1)
When a record stored in the first database configured by a VSAM (Virtual Storage Access Method) organization file that stores a plurality of records having a plurality of record formats that are record formats is changed, one record format is changed. A database replication system comprising a change reflection means for reflecting the change in a second database including a plurality of tables for storing records having the same.
これによれば、VSAM編成ファイルにより構成されたデータベースにおけるレコードの変更をリアルタイムに他のデータベース(例えば、リレーショナル・データベース等)に反映することができる。 According to this, the change of the record in the database configured by the VSAM organization file can be reflected in another database (for example, a relational database) in real time.
(付記2)
付記1に記載のデータベース・レプリケーション・システムであって、
前記第2のデータベースに含まれるテーブルであり、且つ、前記第1のデータベースにおいて変更されたレコードが格納されるべきテーブルを特定するための分配条件を記憶する分配条件記憶手段を備え、
前記変更反映手段は、前記記憶されている分配条件に基づいて特定されるテーブルに、前記変更を反映するように構成されたデータベース・レプリケーション・システム。
(Appendix 2)
The database replication system according to
A distribution condition storage means for storing a distribution condition for specifying a table that is a table included in the second database and in which a record changed in the first database is to be stored;
The change reflecting means is a database replication system configured to reflect the change in a table specified based on the stored distribution condition.
(付記3)
付記1又は付記2に記載のデータベース・レプリケーション・システムであって、
前記第1のデータベースにおいて変更されたレコードが格納されるべきテーブルを前記第2のデータベースが含まない場合、当該第1のデータベースにおける前記レコード形式を定める第1の定義情報を取得し、当該取得した第1の定義情報に基づいて当該第2のデータベースにおいて当該テーブルを生成するテーブル生成手段を備えるデータベース・レプリケーション・システム。
(Appendix 3)
A database replication system according to
When the second database does not include a table in which the record changed in the first database is to be stored, the first definition information defining the record format in the first database is acquired, and the acquired A database replication system comprising table generation means for generating the table in the second database based on first definition information.
(付記4)
付記3に記載のデータベース・レプリケーション・システムであって、
前記第1の定義情報は、COBOL(Common Business Oriented Language)に従った情報であるデータベース・レプリケーション・システム。
(Appendix 4)
The database replication system according to
The database definition system, wherein the first definition information is information according to COBOL (Common Business Oriented Language).
(付記5)
付記3又は付記4に記載のデータベース・レプリケーション・システムであって、
前記テーブル生成手段は、前記テーブルを生成するためのSQLに従った第2の定義情報を、前記取得された第1の定義情報に基づいて生成し、当該生成した第2の定義情報に基づいて前記テーブルを生成するように構成されたデータベース・レプリケーション・システム。
(Appendix 5)
The database replication system according to
The table generation unit generates second definition information according to SQL for generating the table based on the acquired first definition information, and based on the generated second definition information. A database replication system configured to generate the table.
(付記6)
付記1乃至付記5のいずれか一項に記載のデータベース・レプリケーション・システムであって、
前記変更反映手段は、前記第1のデータベースにおいてトランザクション処理におけるコミット処理が行われた場合に、当該トランザクション処理において行われたレコードの変更を前記第2のデータベースに反映するように構成されたデータベース・レプリケーション・システム。
(Appendix 6)
The database replication system according to any one of
The change reflecting means is a database configured to reflect the change of the record made in the transaction processing in the second database when the commit processing in the transaction processing is performed in the first database. Replication system.
これによれば、第1のデータベースにおいて、トランザクション処理にてレコードが変更された後にコミット処理が行われなかった場合に、当該レコードの変更が第2のデータベースに反映されることを防止することができる。即ち、第1のデータベースと第2のデータベースとを確実に同期させることができる。 According to this, in the first database, when the commit process is not performed after the record is changed in the transaction process, it is possible to prevent the change of the record from being reflected in the second database. it can. That is, the first database and the second database can be reliably synchronized.
(付記7)
付記1乃至付記6のいずれか一項に記載のデータベース・レプリケーション・システムであって、
前記第1のデータベースを保持する第1の情報処理装置と、前記第2のデータベースを保持する第2の情報処理装置と、を含み、
前記第1の情報処理装置は、前記第1のデータベースにおけるレコードの変更を表す情報を、前記第2のデータベースにおけるレコード形式に変更することなく前記第2の情報処理装置へ送信するように構成されたデータベース・レプリケーション・システム。
(Appendix 7)
The database replication system according to any one of
A first information processing device that holds the first database; and a second information processing device that holds the second database;
The first information processing apparatus is configured to transmit information representing a change in a record in the first database to the second information processing apparatus without changing to a record format in the second database. Database replication system.
これによれば、レコードの変更を表す情報を、第2のデータベースにおけるレコード形式に変換する場合と比較して、送信されるデータ量を少なくすることができる。更に、第1のデータベースにおけるレコード単位で、レコードの変更を表す情報を転送することができる。従って、データベースの状態の管理を簡素化することができる。更に、第2のデータベースにおいてレコード間の整合性が取れなくなることを回避することができる。 According to this, compared with the case where the information showing the change of a record is converted into the record format in the second database, the amount of data to be transmitted can be reduced. Furthermore, it is possible to transfer information representing record changes in units of records in the first database. Therefore, management of the database state can be simplified. Furthermore, it is possible to avoid the loss of consistency between records in the second database.
(付記8)
レコードの形式であるレコード形式を複数有する複数のレコードを格納するVSAM(Virtual Storage Access Method)編成ファイルにより構成された第1のデータベースが蓄積しているレコードが変更された場合、1つのレコード形式を有するレコードを格納するテーブルを複数含む第2のデータベースに当該変更を反映する、データベース・レプリケーション方法。
(Appendix 8)
When a record stored in the first database configured by a VSAM (Virtual Storage Access Method) organization file that stores a plurality of records having a plurality of record formats that are record formats is changed, one record format is changed. A database replication method for reflecting the change in a second database including a plurality of tables for storing records having the same.
(付記9)
付記8に記載のデータベース・レプリケーション方法であって、
前記第2のデータベースに含まれるテーブルであり、且つ、前記第1のデータベースにおいて変更されたレコードが格納されるべきテーブルを特定するための分配条件を記憶装置に記憶させるとともに、当該記憶装置に記憶されている分配条件に基づいて特定されるテーブルに、前記変更を反映する、データベース・レプリケーション方法。
(Appendix 9)
The database replication method according to attachment 8, wherein
A distribution condition for specifying a table that is included in the second database and in which a record changed in the first database is to be stored is stored in the storage device and stored in the storage device. A database replication method in which the change is reflected in a table specified based on a distributed condition.
(付記10)
付記8又は付記9に記載のデータベース・レプリケーション方法であって、
前記第1のデータベースにおいて変更されたレコードが格納されるべきテーブルを前記第2のデータベースが含まない場合、当該第1のデータベースにおける前記レコード形式を定める第1の定義情報を取得し、当該取得した第1の定義情報に基づいて当該第2のデータベースにおいて当該テーブルを生成する、データベース・レプリケーション方法。
(Appendix 10)
The database replication method according to appendix 8 or
When the second database does not include a table in which the record changed in the first database is to be stored, the first definition information defining the record format in the first database is acquired, and the acquired A database replication method for generating the table in the second database based on the first definition information.
(付記11)
レコードの形式であるレコード形式を複数有する複数のレコードを格納するVSAM(Virtual Storage Access Method)編成ファイルにより構成された第1のデータベースを保持する第1の情報処理装置と通信可能に構成された第2の情報処理装置であって、
1つのレコード形式を有するレコードを格納するテーブルを複数含む第2のデータベースを保持するとともに、
前記第1のデータベースが蓄積しているレコードが変更された場合、前記第1の情報処理装置から当該レコードの変更を表す変更ログ情報を受信する変更ログ情報受信手段と、
前記受信された変更ログ情報が表す前記レコードの変更を前記2のデータベースに反映する変更反映手段と、
を備える第2の情報処理装置。
(Appendix 11)
A first information processing apparatus configured to be able to communicate with a first information processing apparatus having a first database configured by a VSAM (Virtual Storage Access Method) organization file that stores a plurality of records having a plurality of record formats. 2 information processing apparatus,
Holding a second database including a plurality of tables storing records having one record format;
A change log information receiving means for receiving change log information representing a change of the record from the first information processing apparatus when a record stored in the first database is changed;
Change reflecting means for reflecting the change of the record represented by the received change log information in the database of 2;
A second information processing apparatus.
(付記12)
付記11に記載の第2の情報処理装置であって、
前記第2のデータベースに含まれるテーブルであり、且つ、前記第1のデータベースにおいて変更されたレコードが格納されるべきテーブルを特定するための分配条件を記憶する分配条件記憶手段を備え、
前記変更反映手段は、前記記憶されている分配条件に基づいて特定されるテーブルに、前記変更を反映するように構成された第2の情報処理装置。
(Appendix 12)
The second information processing apparatus according to attachment 11, wherein
A distribution condition storage means for storing a distribution condition for specifying a table that is a table included in the second database and in which a record changed in the first database is to be stored;
The second information processing apparatus configured to reflect the change in a table specified based on the stored distribution condition.
(付記13)
付記11又は付記12に記載の第2の情報処理装置であって、
前記第1のデータベースにおいて変更されたレコードが格納されるべきテーブルを前記第2のデータベースが含まない場合、当該第1のデータベースにおける前記レコード形式を定める第1の定義情報を受信し、当該受信した第1の定義情報に基づいて当該第2のデータベースにおいて当該テーブルを生成するテーブル生成手段を備える第2の情報処理装置。
(Appendix 13)
The second information processing apparatus according to appendix 11 or appendix 12,
When the second database does not include a table in which the record changed in the first database is to be stored, the first definition information defining the record format in the first database is received, and the received A second information processing apparatus comprising table generation means for generating the table in the second database based on the first definition information.
(付記14)
レコードの形式であるレコード形式を複数有する複数のレコードを格納するVSAM(Virtual Storage Access Method)編成ファイルにより構成された第1のデータベースを保持する第1の情報処理装置と通信可能に構成されるとともに、1つのレコード形式を有するレコードを格納するテーブルを複数含む第2のデータベースを保持する第2の情報処理装置に、
前記第1のデータベースが蓄積しているレコードが変更された場合、前記第1の情報処理装置から当該レコードの変更を表す変更ログ情報を受信する変更ログ情報受信手段と、
前記受信された変更ログ情報が表す前記レコードの変更を前記2のデータベースに反映する変更反映手段と、
を実現させるためのプログラム。
(Appendix 14)
It is configured to be communicable with a first information processing apparatus that holds a first database configured by a VSAM (Virtual Storage Access Method) organization file that stores a plurality of records having a plurality of record formats that are record formats. In a second information processing apparatus holding a second database including a plurality of tables for storing records having one record format,
A change log information receiving means for receiving change log information representing a change of the record from the first information processing apparatus when a record stored in the first database is changed;
Change reflecting means for reflecting the change of the record represented by the received change log information in the database of 2;
A program to realize
(付記15)
付記14に記載のプログラムであって、
前記第2の情報処理装置に、更に、
前記第2のデータベースに含まれるテーブルであり、且つ、前記第1のデータベースにおいて変更されたレコードが格納されるべきテーブルを特定するための分配条件を記憶装置に記憶させるとともに、
前記変更反映手段は、前記記憶されている分配条件に基づいて特定されるテーブルに、前記変更を反映するように構成されたプログラム。
(Appendix 15)
The program according to appendix 14, wherein
In the second information processing apparatus,
A storage condition is stored in the storage device for specifying a table that is included in the second database, and in which the table in which the record changed in the first database is to be stored,
The change reflecting means is a program configured to reflect the change in a table specified based on the stored distribution condition.
(付記16)
付記14又は付記15に記載のプログラムであって、
前記第2の情報処理装置に、更に、
前記第1のデータベースにおいて変更されたレコードが格納されるべきテーブルを前記第2のデータベースが含まない場合、当該第1のデータベースにおける前記レコード形式を定める第1の定義情報を受信し、当該受信した第1の定義情報に基づいて当該第2のデータベースにおいて当該テーブルを生成するテーブル生成手段を実現させるためのプログラム。
(Appendix 16)
The program according to appendix 14 or appendix 15,
In the second information processing apparatus,
When the second database does not include a table in which the record changed in the first database is to be stored, the first definition information defining the record format in the first database is received, and the received A program for realizing table generation means for generating the table in the second database based on the first definition information.
本発明は、データベースにおけるレコードの変更を他のデータベースに反映するデータベース・レプリケーション・システム等に適用可能である。 The present invention can be applied to a database replication system or the like that reflects changes in records in a database to other databases.
1 データベース・レプリケーション・システム
100 第1の情報処理装置
101 第1のデータベース部
102 アプリケーション実行部
103 一時変更ログ情報生成部
104 一時変更ログ情報記憶部
105 シーケンス情報記憶部
106 変更ログ情報生成部
107 変更ログ情報記憶部
108 FD情報取得部
109 FD情報記憶部
110 情報送信部
200 第2の情報処理装置
201 第2のデータベース部
202 アプリケーション実行部
203 情報受信部
204 FD情報解析部
205 テーブル生成部
206 分配条件記憶部
207 反映処理部
300 データベース・レプリケーション・システム
301 変更反映部
DESCRIPTION OF
Claims (9)
前記第2のデータベースに含まれるテーブルであり、且つ、前記第1のデータベースにおいて変更されたレコードが格納されるべきテーブルを特定するための分配条件を記憶する分配条件記憶手段と、
前記第1のデータベースに蓄積されているレコードが有するレコードの形式であるレコード形式を表すレコード形式情報を取得するレコード形式取得手段と、
前記レコード形式情報に基づいて前記分配条件を生成し前記分配条件記憶手段に記憶する情報解析手段と、を備え、
前記変更反映手段は、前記記憶されている分配条件に基づいて特定されるテーブルに、前記変更を反映するように構成されたデータベース・レプリケーション・システム。 When a record stored in the first database configured by a VSAM (Virtual Storage Access Method) organization file that stores a plurality of records having a plurality of record formats that are record formats is changed, one record format is changed. A change reflecting means for reflecting the change in a second database including a plurality of tables for storing records having ;
Distribution condition storage means for storing distribution conditions for specifying a table that is a table included in the second database and in which a record that has been changed in the first database is to be stored;
Record format acquisition means for acquiring record format information representing a record format that is a format of a record included in the record stored in the first database;
Information analyzing means for generating the distribution condition based on the record format information and storing it in the distribution condition storage means,
The change reflecting means is a database replication system configured to reflect the change in a table specified based on the stored distribution condition.
前記第1のデータベースにおいて変更されたレコードが格納されるべきテーブルを前記第2のデータベースが含まない場合、当該第1のデータベースにおける前記レコード形式を定める第1の定義情報を取得し、当該取得した第1の定義情報に基づいて当該第2のデータベースにおいて当該テーブルを生成するテーブル生成手段を備えるデータベース・レプリケーション・システム。 The database replication system according to claim 1 , wherein
When the second database does not include a table in which the record changed in the first database is to be stored, the first definition information defining the record format in the first database is acquired, and the acquired A database replication system comprising table generation means for generating the table in the second database based on first definition information.
前記第1の定義情報は、COBOL(Common Business Oriented Language)に従った情報であるデータベース・レプリケーション・システム。 A database replication system according to claim 2 , wherein
The database definition system, wherein the first definition information is information according to COBOL (Common Business Oriented Language).
前記テーブル生成手段は、前記テーブルを生成するためのSQLに従った第2の定義情報を、前記取得された第1の定義情報に基づいて生成し、当該生成した第2の定義情報に基づいて前記テーブルを生成するように構成されたデータベース・レプリケーション・システム。 A database replication system according to claim 2 or claim 3 , wherein
The table generation unit generates second definition information according to SQL for generating the table based on the acquired first definition information, and based on the generated second definition information. A database replication system configured to generate the table.
前記変更反映手段は、前記第1のデータベースにおいてトランザクション処理におけるコミット処理が行われた場合に、当該トランザクション処理において行われたレコードの変更を前記第2のデータベースに反映するように構成されたデータベース・レプリケーション・システム。 The database replication system according to any one of claims 1 to 4 , wherein
The change reflecting means is a database configured to reflect the change of the record made in the transaction processing in the second database when the commit processing in the transaction processing is performed in the first database. Replication system.
前記第1のデータベースを保持する第1の情報処理装置と、前記第2のデータベースを保持する第2の情報処理装置と、を含み、
前記第1の情報処理装置は、前記第1のデータベースにおけるレコードの変更を表す情報を、前記第2のデータベースにおけるレコード形式に変更することなく前記第2の情報処理装置へ送信するように構成されたデータベース・レプリケーション・システム。 A database replication system according to any one of claims 1 to 5 , wherein
A first information processing device that holds the first database; and a second information processing device that holds the second database;
The first information processing apparatus is configured to transmit information representing a change in a record in the first database to the second information processing apparatus without changing to a record format in the second database. Database replication system.
前記変更の反映は、前記第2のデータベースに含まれるテーブルであり、且つ、前記第1のデータベースにおいて変更されたレコードが格納されるべきテーブルを特定するための分配条件を、第1のデータベースに蓄積されているレコードが有するレコードの形式であるレコード形式を表すレコード形式情報に基づいて生成し記憶装置に記憶させるとともに、当該記憶装置に記憶されている分配条件に基づいて特定されるテーブルに、前記変更を反映する、データベース・レプリケーション方法。 When a record stored in the first database configured by a VSAM (Virtual Storage Access Method) organization file that stores a plurality of records having a plurality of record formats that are record formats is changed, one record format is changed. Reflect the change in a second database that includes a plurality of tables that store records ,
The reflection of the change is a table included in the second database, and a distribution condition for specifying a table in which the record changed in the first database is to be stored is stored in the first database. A table that is generated based on record format information that represents a record format that is a record format that the accumulated record has is stored in a storage device, and is specified in a table that is specified based on a distribution condition stored in the storage device. A database replication method that reflects the change.
1つのレコード形式を有するレコードを格納するテーブルを複数含む第2のデータベースを保持するとともに、
前記第1のデータベースが蓄積しているレコードが変更された場合、前記第1の情報処理装置から当該レコードの変更を表す変更ログ情報を受信する変更ログ情報受信手段と、
前記受信された変更ログ情報が表す前記レコードの変更を前記2のデータベースに反映する変更反映手段と、
前記第2のデータベースに含まれるテーブルであり、且つ、前記第1のデータベースにおいて変更されたレコードが格納されるべきテーブルを特定するための分配条件を記憶する分配条件記憶手段と、
前記第1のデータベースに蓄積されているレコードが有するレコードの形式であるレコード形式を表すレコード形式情報を取得して当該取得したレコード形式情報に基づいて前記分配条件を生成し前記分配条件記憶手段に記憶する情報解析手段と、を備え、
前記変更反映手段は、前記記憶されている分配条件に基づいて特定されるテーブルに、前記変更を反映するように構成された第2の情報処理装置。 A first information processing apparatus configured to be able to communicate with a first information processing apparatus having a first database configured by a VSAM (Virtual Storage Access Method) organization file that stores a plurality of records having a plurality of record formats. 2 information processing apparatus,
Holding a second database including a plurality of tables storing records having one record format;
A change log information receiving means for receiving change log information representing a change of the record from the first information processing apparatus when a record stored in the first database is changed;
Change reflecting means for reflecting the change of the record represented by the received change log information in the database of 2;
Distribution condition storage means for storing distribution conditions for specifying a table that is a table included in the second database and in which a record that has been changed in the first database is to be stored;
Record format information representing a record format which is a record format of the records stored in the first database is acquired, the distribution condition is generated based on the acquired record format information, and the distribution condition storage means An information analysis means for storing,
The second information processing apparatus configured to reflect the change in a table specified based on the stored distribution condition.
前記第1のデータベースが蓄積しているレコードが変更された場合、前記第1の情報処理装置から当該レコードの変更を表す変更ログ情報を受信する変更ログ情報受信手段と、
前記受信された変更ログ情報が表す前記レコードの変更を前記2のデータベースに反映する変更反映手段と、を実現させ、更に、
前記第2のデータベースに含まれるテーブルであり、且つ、前記第1のデータベースにおいて変更されたレコードが格納されるべきテーブルを特定するための分配条件を記憶装置に記憶させるとともに、
前記第1のデータベースに蓄積されているレコードが有するレコードの形式であるレコード形式を表すレコード形式情報を取得して当該取得したレコード形式情報に基づいて前記分配条件を生成して記憶させる情報解析手段を実現させ、
前記変更反映手段は、前記記憶されている分配条件に基づいて特定されるテーブルに、前記変更を反映するように構成されたプログラム。 It is configured to be communicable with a first information processing apparatus that holds a first database configured by a VSAM (Virtual Storage Access Method) organization file that stores a plurality of records having a plurality of record formats that are record formats. In a second information processing apparatus holding a second database including a plurality of tables for storing records having one record format,
A change log information receiving means for receiving change log information representing a change of the record from the first information processing apparatus when a record stored in the first database is changed;
A change reflection unit that reflects the change of the record represented by the received change log information in the database of 2 , and further,
A storage condition is stored in the storage device for specifying a table that is included in the second database, and in which the table in which the record changed in the first database is to be stored,
Information analysis means for acquiring record format information representing a record format that is a record format of the records stored in the first database, and generating and storing the distribution condition based on the acquired record format information Realized,
The change reflecting means is a program configured to reflect the change in a table specified based on the stored distribution condition .
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2010118106A JP5601028B2 (en) | 2010-05-24 | 2010-05-24 | Database replication system, database replication method, information processing apparatus, and program |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2010118106A JP5601028B2 (en) | 2010-05-24 | 2010-05-24 | Database replication system, database replication method, information processing apparatus, and program |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2011248434A JP2011248434A (en) | 2011-12-08 |
| JP5601028B2 true JP5601028B2 (en) | 2014-10-08 |
Family
ID=45413656
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2010118106A Expired - Fee Related JP5601028B2 (en) | 2010-05-24 | 2010-05-24 | Database replication system, database replication method, information processing apparatus, and program |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP5601028B2 (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP5827260B2 (en) * | 2013-03-22 | 2015-12-02 | 三菱電機インフォメーションシステムズ株式会社 | Method, apparatus and program for estimating foreign key in database |
Family Cites Families (2)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US5530855A (en) * | 1992-10-13 | 1996-06-25 | International Business Machines Corporation | Replicating a database by the sequential application of hierarchically sorted log records |
| JP2001297026A (en) * | 2000-04-11 | 2001-10-26 | Hitachi Ltd | Computer system having multiple database management systems |
-
2010
- 2010-05-24 JP JP2010118106A patent/JP5601028B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JP2011248434A (en) | 2011-12-08 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| CN109656934B (en) | Source Oracle database DDL synchronization method and device based on log analysis | |
| CN112000741B (en) | Internal and external network data exchange system, method, device, computer equipment and medium | |
| CN110032604B (en) | Data storage device, translation device and database access method | |
| CN107122355B (en) | Data Migration System and Method | |
| CN107122360B (en) | Data Migration System and Method | |
| JP5961689B2 (en) | Incremental data extraction | |
| JP5818394B2 (en) | System and method for operating a mass data platform | |
| US20190005105A1 (en) | Multi-replica asynchronous table replication | |
| CN102402596B (en) | A kind of reading/writing method of master slave separation database and system | |
| CN110413690A (en) | Method of data synchronization, server, electronic equipment, the storage medium of database | |
| CN105447014A (en) | Metadata management method based on binglog, and method and device used for providing metadata | |
| US10904316B2 (en) | Data processing method and apparatus in service-oriented architecture system, and the service-oriented architecture system | |
| CN107122361A (en) | Data mover system and method | |
| CN103793514A (en) | Database synchronization method and databases | |
| CN104809200A (en) | Database synchronization method and device | |
| US20120278429A1 (en) | Cluster system, synchronization controlling method, server, and synchronization controlling program | |
| US9218347B2 (en) | System and method for archiving to a single database table information located across multiple tables | |
| JP2015069461A (en) | Information processing device | |
| US20210318994A1 (en) | Extensible streams for operations on external systems | |
| US20160012070A1 (en) | Methods for managing a request to list previous versions of an object and devices thereof | |
| CN116501700A (en) | APP formatted file offline storage method, device, equipment and storage medium | |
| JP5601028B2 (en) | Database replication system, database replication method, information processing apparatus, and program | |
| US11442758B2 (en) | Integration flow execution renew | |
| CN110417892A (en) | Data Replication Link optimization method and device based on packet parsing | |
| CN111522688B (en) | Data backup method and device for distributed system |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| RD07 | Notification of extinguishment of power of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7427 Effective date: 20120718 |
|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20130403 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20140212 |
|
| A521 | Written amendment |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20140404 |
|
| 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: 20140722 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20140804 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 5601028 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| LAPS | Cancellation because of no payment of annual fees |