JP2017068668A - Database system, replication controller, replication method and program - Google Patents

Database system, replication controller, replication method and program Download PDF

Info

Publication number
JP2017068668A
JP2017068668A JP2015194714A JP2015194714A JP2017068668A JP 2017068668 A JP2017068668 A JP 2017068668A JP 2015194714 A JP2015194714 A JP 2015194714A JP 2015194714 A JP2015194714 A JP 2015194714A JP 2017068668 A JP2017068668 A JP 2017068668A
Authority
JP
Japan
Prior art keywords
update
data
database
transactions
unit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2015194714A
Other languages
Japanese (ja)
Other versions
JP6657725B2 (en
Inventor
祥人 中西
Yoshito Nakanishi
祥人 中西
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
NEC Corp
Original Assignee
NEC Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by NEC Corp filed Critical NEC Corp
Priority to JP2015194714A priority Critical patent/JP6657725B2/en
Publication of JP2017068668A publication Critical patent/JP2017068668A/en
Application granted granted Critical
Publication of JP6657725B2 publication Critical patent/JP6657725B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

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

Abstract

PROBLEM TO BE SOLVED: To suppress reduction of throughput, and create a rest point of a database in which a start time of business processing is reference.SOLUTION: A database system 10 comprises: a master database 12 (hereinafter, described a master DB); a replica database 14 (hereinafter, described a replica DB); a serial number numbering part 16; an update log creation part 18; a non-synchronous processing part 20; and a control part 22. The database system 10 executes replication processing in which a start time of business processing is reference. Therefore, in a non-synchronous to data update which is performed on the master DB 12, the data update can be reflected on the replica DB 14. The database system 10 stops the replication processing when a prescribed condition is satisfied.SELECTED DRAWING: Figure 1

Description

本発明は、データベースシステム、レプリケーション制御装置、レプリケーション方法、及びプログラムに関する。   The present invention relates to a database system, a replication control device, a replication method, and a program.

従来、オンラインで行われる業務処理のデータ(以下、業務データという。)を、データベースを利用して管理するシステムが知られている。このようなシステムでは、業務データを保存するために、マスタデータベースと、バックアップ用のレプリカデータベースとが用いられる場合が多い。例えば、ディスク障害等によりマスタデータベースに障害が発生した場合には、マスタデータベースがシステムから切り離され、レプリカデータベースが新しいマスタデータベースとしてシステムに組み込まれる。これにより、システムを即座に復旧させることができる。通常の運用時には、マスタデータベースにおける業務データの更新内容が、バックアップ用のレプリカデータベースに随時または定期的に反映される。   2. Description of the Related Art Conventionally, systems for managing business process data (hereinafter referred to as business data) performed online using a database are known. In such a system, a master database and a backup replica database are often used to store business data. For example, when a failure occurs in the master database due to a disk failure or the like, the master database is disconnected from the system, and the replica database is incorporated into the system as a new master database. As a result, the system can be immediately restored. During normal operation, the update contents of the business data in the master database are reflected in the backup replica database as needed or periodically.

ところで、データベースを利用して業務データを管理する場合、ある時点でのデータベースの静止点を作りたいという要求がしばしば存在する。例えば、前日の業務データの統計データが必要な場合には、日付が変わるタイミングで、データベースの静止点を作成することが考えられる。この場合、例えば、バッチ処理によって、データベースの上記静止点から前日の業務の統計データを取得することができる。   By the way, when business data is managed using a database, there is often a demand to create a quiesce point of the database at a certain point in time. For example, when statistical data of business data for the previous day is required, it is conceivable to create a quiesce point of the database at the timing when the date changes. In this case, for example, the statistical data of the previous day's work can be acquired from the quiesce point of the database by batch processing.

データベースの静止点を作成する方法は、例えば、特許文献1に開示されている。特許文献1に開示されたシステムでは、オンライン業務処理を一時中断することによってデータベースの更新を停止する。これにより、データベースの静止点を作成することができる。しかしながら、上記の方法では、オンライン業務処理を中断させる必要があるので、システムの可用性が低下する。   A method for creating a stationary point of a database is disclosed in, for example, Patent Document 1. In the system disclosed in Patent Document 1, the update of the database is stopped by temporarily interrupting the online business process. Thereby, a quiesce point of the database can be created. However, in the above method, since it is necessary to interrupt the online business process, the availability of the system is lowered.

一方、特許文献2には、オンライン業務処理を停止させることなくデータベースの静止点を作成することができる方法が開示されている。特許文献2に開示されたシステムでは、データベースは、複数の記憶エリアによって構成されている。このシステムでは、上記複数の記憶エリアのうちの一つに、最新データが記憶され、他の一つに、過去のある時点でのデータが記憶される。このため、特許文献2のシステムでは、静止点を作成するためにデータベースの更新を停止する必要がない。したがって、オンライン業務処理を停止させることなくデータベースの静止点を作成することができる。   On the other hand, Patent Document 2 discloses a method capable of creating a quiesce point of a database without stopping online business processing. In the system disclosed in Patent Document 2, the database is composed of a plurality of storage areas. In this system, the latest data is stored in one of the plurality of storage areas, and data at a certain point in the past is stored in the other one. For this reason, in the system of patent document 2, it is not necessary to stop the update of a database in order to create a stationary point. Therefore, it is possible to create a quiesce point of a database without stopping online business processing.

特開平5−314071号公報Japanese Patent Laid-Open No. 5-314071 特開平10−143411号公報JP-A-10-143411

ところで、複数の業務処理を管理する際には、各業務処理の開始時刻を基準にして、業務データの統計処理を行う場合がある。このような統計処理を行うためには、図12を用いて後述するように、業務処理の開始時刻を基準にして、データベースの静止点を作成する必要がある。一方、特許文献2に開示されているような従来のシステムでは、データベ
ースの静止点は、データベースの更新時刻を基準にして作成される。このため、上記のような従来のシステムでは、業務処理の開始時刻を基準にしてデータベースの静止点を作成する場合に、以下に説明するような問題が生じる。
By the way, when managing a plurality of business processes, statistical processing of business data may be performed based on the start time of each business process. In order to perform such statistical processing, it is necessary to create a quiesce point of the database on the basis of the start time of business processing, as will be described later with reference to FIG. On the other hand, in the conventional system as disclosed in Patent Document 2, the quiesce point of the database is created based on the update time of the database. For this reason, in the conventional system as described above, the problem described below arises when a database quiesce point is created based on the start time of business processing.

図12は、業務処理の開始時刻を基準にしたデータベースの静止点を、従来のシステムで作成しようとした場合に生じる問題を説明するための図である。図12では、業務A、業務Bおよび業務Cの処理(トランザクション)がオンラインで行われる場合について説明する。なお、業務A、業務Bおよび業務Cは、互いに独立して処理される。   FIG. 12 is a diagram for explaining a problem that occurs when a conventional system tries to create a quiesce point of a database based on the start time of business processing. FIG. 12 illustrates a case where the processing (transaction) of business A, business B, and business C is performed online. Note that business A, business B, and business C are processed independently of each other.

図12においては、業務A、業務Bおよび業務Cの処理にかかる時間を、矢印の長さで示している。したがって、図12の例では、業務Aの処理時間が最も長く、業務Cの処理時間が最も短い。また、図12の例では、業務Aの処理は1月1日に開始され、業務B,Cの処理は1月2日に開始されている。業務Cの処理は、業務Bの処理よりも後に開始されている。業務Aの処理は、業務Bの処理よりも後に完了し、業務Bの処理は、業務Cの処理よりも後に完了している。したがって、業務A,B,Cを、業務処理の開始時刻に基づいて時系列に並べると、業務A、業務Bおよび業務Cの順になる。一方、業務A,B,Cを、データベースにおいて業務データが更新された時刻に基づいて時系列に並べると、業務C、業務Bおよび業務Aの順になる。すなわち、図12の例では、業務A,B,Cの処理にかかる時間がそれぞれ異なり、業務A,B,Cの処理の開始順と、業務A,B,Cの業務データの更新順が異なっている。   In FIG. 12, the time required for the processing of the business A, the business B, and the business C is indicated by the length of the arrow. Therefore, in the example of FIG. 12, the processing time of the business A is the longest and the processing time of the business C is the shortest. Further, in the example of FIG. 12, the processing of the business A is started on January 1, and the processing of the business B and C is started on January 2. The process for business C is started after the process for business B. The business A process is completed after the business B process, and the business B process is completed after the business C process. Therefore, when the operations A, B, and C are arranged in time series based on the start time of the operation processing, the operations A, operations B, and operations C are performed in this order. On the other hand, when the operations A, B, and C are arranged in time series based on the time when the operation data is updated in the database, the operations C, operation B, and operation A are performed in this order. In other words, in the example of FIG. 12, the processing A, B, and C processing times are different from each other, and the processing A, B, and C processing data start order is different from the business A, B, and C business data update orders. ing.

ここで、例えば、1月1日に開始された業務処理の全ての更新内容を反映したデータベースの静止点を取得したいという要求があるとする。この場合、図12の例では、静止点には、業務Aの更新内容のみを反映させて、業務B,Cの更新内容は反映させない必要がある。   Here, for example, it is assumed that there is a request to acquire a quiesce point of a database reflecting all the update contents of the business process started on January 1st. In this case, in the example of FIG. 12, it is necessary to reflect only the updated content of the business A and not the updated content of the business B and C in the stationary point.

しかしながら、上述したように、従来のシステムでは、データベースの更新時刻を基準にして静止点が作成される。このため、従来のシステムでは、データベースのある時点でのデータの状態を示した静止点を作成することはできるが、上記の要求を満たした静止点を作成することはできない。具体的には、図12の例の場合、業務Bの更新内容のみを反映させた静止点、または業務B,Cの更新内容のみを反映させた静止点を作成することはできる。しかしながら、業務Aの更新内容のみを反映させた静止点を作成することはできない。   However, as described above, in the conventional system, a quiesce point is created based on the update time of the database. For this reason, the conventional system can create a quiesce point that indicates the state of data at a certain point in the database, but cannot create a quiesce point that satisfies the above requirements. Specifically, in the case of the example in FIG. 12, it is possible to create a quiesce point that reflects only the updated content of the business B or a quiesce point that reflects only the updated content of the business B and C. However, it is not possible to create a quiesce point that reflects only the updated contents of job A.

従来のシステムによって、業務Aの更新内容のみを反映させた静止点を作成するためには、業務Aの業務データが更新された後に、業務B,Cの業務データが更新されるように、データベースの更新時期について順序制御を行う必要がある。しかしながら、この場合、業務Aの処理が完了するまで、業務B,Cの処理を完了させることができないので、システムのスループットが低下する。   In order to create a quiesce point that reflects only the update contents of the business A by the conventional system, the business data of the business B and C are updated after the business data of the business A is updated. It is necessary to control the order of the update timing. However, in this case, the processes B and C cannot be completed until the process A is completed, and the system throughput decreases.

本発明の目的の一例は、上記問題を解消し、スループットを低下させることなく、業務処理の開始時刻を基準にしてデータベースの静止点を作成することができる、データベースシステム、レプリケーション制御装置、レプリケーション方法、及びプログラムを提供することにある。   An example of an object of the present invention is to provide a database system, a replication control apparatus, and a replication method capable of creating a quiesce point of a database on the basis of the start time of business processing without solving the above problem and reducing the throughput And providing a program.

上記目的を達成するため、本発明の一側面におけるデータベースシステムは、複数のトランザクションに基づいてデータ更新が行われるマスタデータベースと、前記マスタデータベースのレプリケーション先となるレプリカデータベースと、前記複数のトランザクションの開始時刻を基準として、該複数のトランザクションに通番を付与する通番採番部と
、前記複数のトランザクションに対応する複数の更新ログを生成し、かつ、該複数の更新ログと前記通番採番部によって前記複数のトランザクションに付与された通番とを対応付ける更新ログ生成部と、前記更新ログ生成部によって生成された前記複数の更新ログに基づいて、かつ、前記更新ログ生成部によって前記複数の更新ログに対応付けられた前記通番に従って、前記マスタデータベースのデータ更新とは非同期で前記レプリカデータベースのデータ更新を行う非同期処理部と、所定の条件が満たされた場合に、前記非同期処理部による前記レプリカデータベースのデータ更新を停止させる制御部とを備える。
In order to achieve the above object, a database system according to an aspect of the present invention includes a master database in which data is updated based on a plurality of transactions, a replica database serving as a replication destination of the master database, and start of the plurality of transactions. Generating a plurality of update logs corresponding to the plurality of transactions, and a plurality of update logs and the serial number generation unit, Corresponding to the plurality of update logs based on the plurality of update logs generated by the update log generation unit and the update log generation unit for associating serial numbers assigned to a plurality of transactions According to the serial number assigned, the master data An asynchronous processing unit that asynchronously updates the data in the replica database, and a control unit that stops data updating in the replica database by the asynchronous processing unit when a predetermined condition is satisfied. Prepare.

また、上記目的を達成するため、本願発明の一側面におけるレプリケーション制御装置は、複数のトランザクションに基づいてデータ更新が行われるマスタデータベースと、前記マスタデータベースのレプリケーション先となるレプリカデータベースとを備えるデータベースシステムにおいて、前記マスタデータベースのデータ更新とは非同期で前記レプリカデータベースのデータ更新を行うレプリケーション制御装置である。このレプリケーション装置は、前記複数のトランザクションの開始時刻を基準として、該複数のトランザクションに通番を付与する通番採番部と、前記複数のトランザクションに対応する複数の更新ログを生成し、かつ、該複数の更新ログと前記通番採番部によって前記複数のトランザクションに付与された通番とを対応付ける更新ログ生成部と、前記更新ログ生成部によって生成された前記複数の更新ログに基づいて、かつ、前記更新ログ生成部によって前記複数の更新ログに対応付けられた前記通番に従って、前記マスタデータベースのデータ更新とは非同期で前記レプリカデータベースのデータ更新を行う非同期処理部と、所定の条件が満たされた場合に、前記非同期処理部による前記レプリカデータベースのデータ更新を停止させる制御部とを備える。   In order to achieve the above object, a replication control apparatus according to one aspect of the present invention includes a master database in which data is updated based on a plurality of transactions, and a replica database serving as a replication destination of the master database. The replication control device performs data update of the replica database asynchronously with data update of the master database. The replication apparatus generates a plurality of update logs corresponding to the plurality of transactions, a serial numbering unit for assigning serial numbers to the plurality of transactions based on start times of the plurality of transactions, An update log generator that associates the update log with the serial numbers assigned to the plurality of transactions by the serial number generator, and the update log generator based on the plurality of update logs generated by the update log generator In accordance with the serial numbers associated with the plurality of update logs by the log generation unit, an asynchronous processing unit that performs data update of the replica database asynchronously with data update of the master database, and when a predetermined condition is satisfied And stop the update of data in the replica database by the asynchronous processing unit And a control unit.

また、上記目的を達成するため、本発明の一側面におけるレプリケーション方法は、複数のトランザクションに基づいてデータ更新が行われるマスタデータベースと、前記マスタデータベースのレプリケーション先となるレプリカデータベースとを備えるデータベースシステムにおいて、前記マスタデータベースのデータ更新とは非同期で前記レプリカデータベースのデータ更新を行うレプリケーション方法である。このレプリケーション方法は、(a)前記複数のトランザクションの開始時刻を基準として、該複数のトランザクションに通番を付与するステップと、(b)前記複数のトランザクションに対応する複数の更新ログを生成し、かつ、該複数の更新ログと前記(a)のステップにおいて前記複数のトランザクションに付与された通番とを対応付けるステップと、(c)前記(b)のステップにおいて生成された前記複数の更新ログに基づいて、かつ、前記(b)のステップにおいて前記複数の更新ログに対応付けられた前記通番に従って、前記マスタデータベースのデータ更新とは非同期で前記レプリカデータベースのデータ更新を行うステップと、(d)所定の条件が満たされた場合に、前記レプリカデータベースのデータ更新を停止するステップとを備える。   In order to achieve the above object, a replication method according to one aspect of the present invention is a database system including a master database in which data is updated based on a plurality of transactions, and a replica database serving as a replication destination of the master database. In this replication method, the data in the replica database is updated asynchronously with the data update in the master database. The replication method includes (a) a step of assigning serial numbers to the plurality of transactions on the basis of start times of the plurality of transactions, and (b) generating a plurality of update logs corresponding to the plurality of transactions, and A step of associating the plurality of update logs with the serial numbers assigned to the plurality of transactions in the step (a), and (c) based on the plurality of update logs generated in the step (b). And, in accordance with the serial numbers associated with the plurality of update logs in the step (b), updating the data in the replica database asynchronously with the data update in the master database, and (d) a predetermined value When the condition is met, the replica database data update is stopped. Tsu and a flop.

更に、上記目的を達成するため、本発明の一側面におけるプログラムは、複数のトランザクションに基づいてデータ更新が行われるマスタデータベースと、前記マスタデータベースのレプリケーション先となるレプリカデータベースとを備えるデータベースシステムにおいて、コンピュータに、前記マスタデータベースのデータ更新とは非同期で前記レプリカデータベースのデータ更新を実行させるためのプログラムである。このプログラムは、前記コンピュータに、(a)前記複数のトランザクションの開始時刻を基準として、該複数のトランザクションに通番を付与するステップと、(b)前記複数のトランザクションに対応する複数の更新ログを生成し、かつ、該複数の更新ログと前記(a)のステップにおいて前記複数のトランザクションに付与された通番とを対応付けるステップと、(c)前記(b)のステップにおいて生成された前記複数の更新ログに基づいて、かつ、前記(b)のステップにおいて前記複数の更新ログに対応付けられた前記通番に従って、前記マスタデータベースのデータ更新とは非同期で前記レプリカデータベースのデータ更新を
行うステップと、(d)所定の条件が満たされた場合に、前記レプリカデータベースのデータ更新を停止するステップとを実行させる。
Furthermore, in order to achieve the above object, a program according to one aspect of the present invention is a database system including a master database in which data is updated based on a plurality of transactions, and a replica database serving as a replication destination of the master database. A program for causing a computer to execute data update of the replica database asynchronously with data update of the master database. The program includes: (a) assigning serial numbers to the plurality of transactions on the basis of start times of the plurality of transactions; and (b) generating a plurality of update logs corresponding to the plurality of transactions. And a step of associating the plurality of update logs with the serial numbers assigned to the plurality of transactions in the step (a), and (c) the plurality of update logs generated in the step (b). And updating the data in the replica database asynchronously with the data update in the master database according to the serial numbers associated with the plurality of update logs in the step (b), and (d) ) Update data in the replica database when a predetermined condition is met And a step of stopping.

スループットを低下させることなく、業務処理の開始時刻を基準にしてデータベースの静止点を作成することができる、データベースシステム、レプリケーション制御装置、レプリケーション方法、及びプログラムを提供することができる。   It is possible to provide a database system, a replication control device, a replication method, and a program capable of creating a quiesce point of a database on the basis of the start time of business processing without reducing the throughput.

図1は、本発明の一実施形態にかかるデータベースシステムの概略構成を示すブロック図である。FIG. 1 is a block diagram showing a schematic configuration of a database system according to an embodiment of the present invention. 図2は、データベースシステムの構成を具体的に示すブロック図である。FIG. 2 is a block diagram specifically showing the configuration of the database system. 図3は、通番管理部に記憶される通番管理表の一例を示す図である。FIG. 3 is a diagram illustrating an example of a serial number management table stored in the serial number management unit. 図4は、処理データ格納部に記憶される処理データ格納表の一例を示す図である。FIG. 4 is a diagram illustrating an example of a processing data storage table stored in the processing data storage unit. 図5は、データベースシステムの基本動作の一例を示すフロー図である。FIG. 5 is a flowchart showing an example of the basic operation of the database system. 図6は、業務アプリケーションおよび非同期処理制御アプリケーションの処理時間、ならびに、通番採番部による通番の採番タイミングを表した図である。FIG. 6 is a diagram showing the processing time of the business application and the asynchronous process control application, and the serial numbering timing by the serial numbering unit. 図7は、処理データ格納表に格納された処理内容(非同期処理データ)の一例を示す図である。FIG. 7 is a diagram illustrating an example of processing contents (asynchronous processing data) stored in the processing data storage table. 図8は、データベースシステムの復旧動作の一例を示すフロー図である。FIG. 8 is a flowchart showing an example of the recovery operation of the database system. 図9は、データベースシステムの変形例を示す図である。FIG. 9 is a diagram showing a modification of the database system. 図10は、制御部によって処理データ格納表に登録される処理内容の一例を示す図である。FIG. 10 is a diagram illustrating an example of processing contents registered in the processing data storage table by the control unit. 図11は、本発明の実施の形態におけるレプリケーション制御装置を実現するコンピュータの一例を示すブロック図である。FIG. 11 is a block diagram illustrating an example of a computer that implements the replication control apparatus according to the embodiment of the present invention. 図12は、業務処理の開始時刻を基準にしたデータベースの静止点を、従来のシステムで作成しようとした場合に生じる問題を説明するための図である。FIG. 12 is a diagram for explaining a problem that occurs when a conventional system tries to create a quiesce point of a database based on the start time of business processing.

(発明の概要)
本発明は、例えば、オンライン業務処理で使用するデータベース(マスタデータベース)へのデータ更新を、バックアップ用のレプリカデータベースにレプリケーションする際に利用することができる。具体的には、本発明の一例では、各業務の業務データのマスタデータベースへの更新順ではなく、各業務のトランザクション処理単位で決定される通番順に、レプリカデータベースへのレプリケーション処理が実行される。これにより、レプリカデータベースから、業務処理の開始時刻を基準とした静止点を取得することができる。また、本発明の一例では、業務アプリケーションから、レプリケーション処理を停止させることができる。これにより、ユーザが所望する任意のタイミングでレプリケーション処理を停止することができる。その結果、レプリカデータベースから、ユーザが所望する任意の静止点を取得することができる。
(Summary of Invention)
The present invention can be used, for example, when data update to a database (master database) used in online business processing is replicated to a replica database for backup. Specifically, in an example of the present invention, replication processing to the replica database is executed in the order of serial numbers determined by the transaction processing unit of each business, not the order of updating the business data of each business to the master database. Thereby, a quiesce point based on the start time of the business process can be acquired from the replica database. In an example of the present invention, replication processing can be stopped from a business application. Thereby, the replication process can be stopped at an arbitrary timing desired by the user. As a result, an arbitrary quiesce point desired by the user can be acquired from the replica database.

(実施の形態)
以下、本発明の実施の形態にかかる、データベースシステム、レプリケーション制御装置、レプリケーション方法、及びプログラムについて、図1〜図11を参照しながら説明する。
(Embodiment)
Hereinafter, a database system, a replication control device, a replication method, and a program according to an embodiment of the present invention will be described with reference to FIGS.

[システム構成]
図1は、本発明の一実施形態にかかるデータベースシステムの概略構成を示すブロック図である。図1を参照して、本実施形態にかかるデータベースシステム10は、マスタデ
ータベース(以下、マスタDBと記す。)12、レプリカデータベース(以下、レプリカDBと記す。)14、通番採番部16、更新ログ生成部18、非同期処理部20および制御部22を備える。
[System configuration]
FIG. 1 is a block diagram showing a schematic configuration of a database system according to an embodiment of the present invention. Referring to FIG. 1, a database system 10 according to the present embodiment includes a master database (hereinafter referred to as a master DB) 12, a replica database (hereinafter referred to as a replica DB) 14, a serial number numbering unit 16, an update. A log generation unit 18, an asynchronous processing unit 20, and a control unit 22 are provided.

詳細は後述するが、データベースシステム10では、業務処理(トランザクション)の開始時刻を基準としてレプリケーション処理を実行することができる。これにより、データベースシステム10は、マスタDB12において行われるデータ更新とは非同期で、該データ更新をレプリカDB14に反映させることができる。また、データベースシステム10は、所定の条件が満たされた場合(例えば、レプリケーション処理の停止要求を受けた場合)に、レプリケーション処理を停止する。したがって、例えば、ユーザがデータベースシステム10に対して任意のタイミングでレプリケーション処理の停止要求を行うことにより、ユーザが所望する任意の静止点が作成される。以下、データベースシステム10の各構成要素について説明する。   Although details will be described later, the database system 10 can execute the replication process based on the start time of the business process (transaction). Thereby, the database system 10 can reflect the data update in the replica DB 14 asynchronously with the data update performed in the master DB 12. Further, the database system 10 stops the replication process when a predetermined condition is satisfied (for example, when a replication process stop request is received). Therefore, for example, when the user requests the database system 10 to stop the replication process at an arbitrary timing, an arbitrary quiesce point desired by the user is created. Hereinafter, each component of the database system 10 will be described.

マスタDB12は、業務データを格納している。本実施形態では、例えば、複数(本実施形態では3つ)の業務アプリケーション40a,40b,40cによって、マスタDB12の業務データが参照および更新される。業務アプリケーション40a,40b,40cは、例えばユーザアプリケーションであり、ユーザが実施した業務イベントごとのトランザクションを実行する。本実施形態では、業務アプリケーション40a,40b,40cは、オンラインで発生する業務イベントのイベントメッセージを受けて、トランザクションを実行する。業務アプリケーション40a,40b,40cは、並列に動作する。本実施形態では、業務アプリケーション40a,40b,40cは、互いに異なるレコードを更新する。   The master DB 12 stores business data. In the present embodiment, for example, business data in the master DB 12 is referred to and updated by a plurality (three in this embodiment) of business applications 40a, 40b, and 40c. The business applications 40a, 40b, and 40c are user applications, for example, and execute a transaction for each business event performed by the user. In the present embodiment, the business applications 40a, 40b, and 40c receive a business event event message that occurs online and execute a transaction. The business applications 40a, 40b, and 40c operate in parallel. In the present embodiment, the business applications 40a, 40b, and 40c update different records.

本実施形態では、業務アプリケーション40a,40b,40cは、例えば、トランザクションを実行する際に、通番採番部16に対して採番要求を行う。また、業務アプリケーション40a,40b,40cはそれぞれ、各トランザクションによって実行された全てのデータ更新の内容を、通番採番部16によって付与されるトランザクションごとの通番とともに、更新ログ生成部18に送信する。   In the present embodiment, the business applications 40a, 40b, and 40c make a numbering request to the serial numbering unit 16 when executing a transaction, for example. Each of the business applications 40a, 40b, and 40c transmits the contents of all data updates executed by each transaction to the update log generation unit 18 together with the transaction numbers assigned by the sequence numbering unit 16.

レプリカDB14は、マスタDB12のバックアップ用のデータベースであり、かつ、データベースの静止点を作成するためのデータベースでもある。   The replica DB 14 is a database for backup of the master DB 12, and is also a database for creating a quiesce point of the database.

通番採番部16は、業務アプリケーション40a,40b,40cからの採番要求を受けて、複数のトランザクションに通番を付与する。また、通番採番部16は、トランザクションに付与した通番を、そのトランザクションを実行するいずれかの業務アプリケーション40a,40b,40cに通知する。本実施形態では、通番採番部16は、各トランザクションの開始時刻を基準として、複数のトランザクションに通番を付与する。例えば、図12に示すように業務A、業務B、および業務Cの順にトランザクションが開始される場合、通番採番部16は、業務Aのトランザクション、業務Bのトランザクション、および業務Cのトランザクションの順に通番を付与する。   The serial number assignment unit 16 receives serial number requests from the business applications 40a, 40b, and 40c, and assigns serial numbers to a plurality of transactions. Further, the serial number numbering unit 16 notifies the business application 40a, 40b, 40c that executes the transaction of the serial number assigned to the transaction. In the present embodiment, the serial number numbering unit 16 assigns serial numbers to a plurality of transactions based on the start time of each transaction. For example, as shown in FIG. 12, when transactions are started in the order of business A, business B, and business C, the serial numbering unit 16 performs the business A transaction, business B transaction, and business C transaction in this order. Give a serial number.

また、本実施の形態において「トランザクションの開始時刻」には、データベース領域におけるトランザクションの開始時刻、更には、データベース領域におけるトランザクションの開始が示唆された時刻も含まれる。例えば、業務アプリケーションが処理の途中で一旦、要求元に「受付しました」という旨を返信し、これによって、トランザクションの受付が確定したとする。この場合は、データベースにおいて実際の処理が実行される前、即ち、受付の確定時が、「トランザクションの開始時刻」となる。   In the present embodiment, the “transaction start time” includes a transaction start time in the database area, and further a time suggested to start a transaction in the database area. For example, it is assumed that the business application once returns a message “accepted” to the request source in the middle of processing, thereby confirming the acceptance of the transaction. In this case, the “transaction start time” is the time before the actual processing is executed in the database, that is, when the acceptance is confirmed.

図1を参照して、更新ログ生成部18は、業務アプリケーション40a,40b,40c
から送信されてきたトランザクションごとのデータ更新の内容に従って、各トランザクションに対応する更新ログを生成する。また、更新ログ生成部18は、上記更新ログと業務アプリケーション40a,40b,40cから送信されてきた通番とを対応付ける。具体的には、更新ログ生成部18は、複数のトランザクションに対応する複数の更新ログと通番採番部16によって上記複数のトランザクションに付与された通番とを対応付ける。例えば、図12に示すように業務A、業務B、および業務Cのトランザクションが実行される場合、更新ログ生成部18は、業務A、業務B、および業務Cのトランザクションにそれぞれ対応する3つの更新ログを生成する。また、更新ログ生成部18は、業務A、業務B、および業務Cのトランザクションに対応する更新ログと、通番採番部16によって業務A、業務B、および業務Cのトランザクションに付与された通番とを対応付ける。
Referring to FIG. 1, the update log generator 18 includes business applications 40a, 40b, 40c.
An update log corresponding to each transaction is generated in accordance with the contents of the data update for each transaction transmitted from. In addition, the update log generation unit 18 associates the update log with the serial numbers transmitted from the business applications 40a, 40b, and 40c. Specifically, the update log generation unit 18 associates the plurality of update logs corresponding to the plurality of transactions with the serial numbers assigned to the plurality of transactions by the serial number numbering unit 16. For example, as shown in FIG. 12, when business A, business B, and business C transactions are executed, the update log generation unit 18 performs three updates corresponding to the business A, business B, and business C transactions, respectively. Generate logs. The update log generation unit 18 also includes an update log corresponding to the transactions of the business A, the business B, and the business C, and the serial numbers assigned to the transactions of the business A, the business B, and the business C by the serial numbering unit 16 Associate.

図1を参照して、非同期処理部20は、マスタDB12のデータ更新とは非同期で、レプリカDB14のデータ更新を行う。具体的には、非同期処理部20は、更新ログ生成部18によって生成された複数の更新ログに基づいて、かつ、更新ログ生成部18によって複数の更新ログに対応付けられた通番に従って、レプリカDB14のデータ更新を行う。例えば、図12に示すように業務A,B,Cのトランザクションが開始される場合、非同期処理部20は、マスタDB12において行われる業務A,B,Cのデータ更新を、業務A、業務B、および業務Cの順に、レプリカDB14に反映させる。   Referring to FIG. 1, the asynchronous processing unit 20 updates data in the replica DB 14 asynchronously with data update in the master DB 12. Specifically, the asynchronous processing unit 20 uses the replica DB 14 based on the plurality of update logs generated by the update log generation unit 18 and according to the serial numbers associated with the plurality of update logs by the update log generation unit 18. Update the data. For example, as shown in FIG. 12, when transactions of business A, B, and C are started, the asynchronous processing unit 20 updates the data of business A, B, and C performed in the master DB 12 with business A, business B, And in the order of business C, it is reflected in the replica DB 14.

図1を参照して、制御部22は、所定の条件が満たされた場合に、非同期処理部20によるレプリカDB14のデータ更新を停止させる。本実施形態では、制御部22は、例えば、非同期処理制御アプリケーション50から停止要求を受けた場合に、上記所定の条件が満たされたとして、非同期処理部20を制御して、レプリカDB14のデータ更新を停止する。   With reference to FIG. 1, the control unit 22 stops the data update of the replica DB 14 by the asynchronous processing unit 20 when a predetermined condition is satisfied. In this embodiment, for example, when the control unit 22 receives a stop request from the asynchronous processing control application 50, the control unit 22 controls the asynchronous processing unit 20 and updates the data in the replica DB 14 assuming that the predetermined condition is satisfied. To stop.

なお、非同期処理制御アプリケーション50は、非同期処理部20の処理を制御するための業務アプリケーションである。非同期処理制御アプリケーション50は、不定期または定期的に発生する停止イベントのイベントメッセージを受け取った場合に、制御部22に対して停止要求を行う。例えば、非同期処理制御アプリケーション50は、システム管理者が運用端末を用いて実施した停止イベントのイベントメッセージを受けて、制御部22に対して停止要求を行う。また、例えば、非同期処理制御アプリケーション50は、所定の時刻(例えば、午前0時)に発生するようにスケジュールされた停止イベントのイベントメッセージを受けて、制御部22に対して停止要求を行う。なお、上記停止イベントには、レプリケーション処理を停止させることのみを目的とするイベントに加えて、非同期処理部20にレプリケーション処理以外の処理(例えば、後述の変形例におけるバッチ処理)を実行させることを目的とするイベントも含まれる。したがって、上記停止要求には、非同期処理部20によるレプリケーション処理を停止させることのみを目的とする要求に加えて、非同期処理部20にレプリケーション処理以外の処理を実行させることを目的とする要求(例えば、後述の変形例におけるバッチ処理の実行要求)も含まれる。   The asynchronous process control application 50 is a business application for controlling the processing of the asynchronous processing unit 20. The asynchronous process control application 50 makes a stop request to the control unit 22 when receiving an event message of a stop event that occurs irregularly or periodically. For example, the asynchronous process control application 50 makes a stop request to the control unit 22 in response to an event message of a stop event performed by the system administrator using the operation terminal. Further, for example, the asynchronous process control application 50 receives an event message of a stop event scheduled to occur at a predetermined time (for example, midnight) and makes a stop request to the control unit 22. In addition to the event intended only to stop the replication process, the stop event may cause the asynchronous processing unit 20 to execute a process other than the replication process (for example, a batch process in a modified example described later). The target event is also included. Therefore, in the above stop request, in addition to a request only for stopping the replication processing by the asynchronous processing unit 20, a request for causing the asynchronous processing unit 20 to execute processing other than the replication processing (for example, , An execution request for batch processing in a modified example to be described later).

以上のように、本実施形態にかかるデータベースシステム10では、業務処理(トランザクション)の開始時刻を基準として、マスタDB12において行われるデータ更新がレプリカDB14に反映される。また、データベースシステム10は、制御部22に対して停止要求が行われた場合に、レプリカDB14へのレプリケーション処理を停止する。これにより、複数のトランザクションによるデータベースのデータ更新の時期について順序制御を行うことなく、トランザクションの開始時刻を基準とした静止点を作成することができる。例えば、図12に示すように業務A、業務B、および業務Cの順に処理が開始され、さらに、業務Aの処理開始後かつ業務Bの処理開始前に、制御部22に対して停止要求が行われた場合、業務Aのデータ更新のみがレプリカDB14に反映される。   As described above, in the database system 10 according to the present embodiment, the data update performed in the master DB 12 is reflected in the replica DB 14 with reference to the start time of the business process (transaction). Further, the database system 10 stops the replication process to the replica DB 14 when a stop request is made to the control unit 22. As a result, it is possible to create a quiesce point based on the start time of a transaction without performing order control on the timing of database data update by a plurality of transactions. For example, as shown in FIG. 12, processing is started in the order of business A, business B, and business C, and further, a stop request is sent to the control unit 22 after the processing of business A and before the processing of business B starts. When it is performed, only the data update of the job A is reflected in the replica DB 14.

また、本実施形態にかかるデータベースシステム10によれば、マスタDB12に対する処理を停止することなく、レプリカDB14においてデータベースの静止点を作成することができる。したがって、スループットを低下させることなく、業務処理の開始時刻を基準にしてデータベースの静止点を作成することが可能になる。また、データベースシステム10によれば、例えば、データベースの静止点を作成したい任意のタイミングでユーザ等がオンラインで停止イベントを発生させることによって、ユーザ等が所望する任意の静止点を作成することができる。   Further, according to the database system 10 according to the present embodiment, it is possible to create a quiesce point of a database in the replica DB 14 without stopping processing for the master DB 12. Therefore, it is possible to create a database quiesce point based on the start time of business processing without reducing the throughput. In addition, according to the database system 10, for example, a user or the like can create an arbitrary quiesce point desired by the user or the like by generating a stop event online at any time when the quiesce point of the database is desired to be created. .

次に、本実施形態に係るデータベースシステム10の構成について具体的に説明する。図2は、データベースシステム10の構成を具体的に示すブロック図である。   Next, the configuration of the database system 10 according to the present embodiment will be specifically described. FIG. 2 is a block diagram specifically showing the configuration of the database system 10.

図2を参照して、データベースシステム10は、上述のマスタDB12、上述のレプリカDB14およびレプリケーション制御装置30を備える。レプリケーション制御装置30は、上述の通番採番部16、更新ログ生成部18、非同期処理部20および制御部22に加えてさらに、通番管理部24、処理データ格納部26、および非同期処理開始指示部28を備える。なお、データベースシステム10の各構成要素、業務アプリケーション40a,40b,40cおよび非同期処理制御アプリケーション50に関する説明のうち、図1を用いて説明した内容については説明を省略する。   Referring to FIG. 2, the database system 10 includes the master DB 12 described above, the replica DB 14 described above, and the replication control device 30. In addition to the serial number numbering unit 16, the update log generation unit 18, the asynchronous processing unit 20, and the control unit 22, the replication control device 30 further includes a serial number management unit 24, a processing data storage unit 26, and an asynchronous processing start instruction unit. 28. In addition, among the descriptions regarding each component of the database system 10, the business applications 40a, 40b, and 40c, and the asynchronous processing control application 50, the description of the contents described with reference to FIG. 1 is omitted.

本実施形態では、非同期処理制御アプリケーション50は、停止イベントのイベントメッセージを受け取った場合に、通番採番部16に対して採番要求を行う。通番採番部16は、非同期処理制御アプリケーション50からの採番要求を受けて、停止イベントに通番を付与する。また、通番採番部16は、停止イベントに付与した通番を、非同期処理制御アプリケーション50に通知する。非同期処理制御アプリケーション50は、通番採番部16によって付与された通番を、停止要求とともに制御部22へ送信する。   In this embodiment, the asynchronous process control application 50 makes a numbering request to the serial numbering unit 16 when an event message of a stop event is received. The serial numbering unit 16 receives a numbering request from the asynchronous process control application 50 and assigns a serial number to the stop event. Further, the serial number assignment unit 16 notifies the asynchronous process control application 50 of the serial number assigned to the stop event. The asynchronous process control application 50 transmits the serial number assigned by the serial number assignment unit 16 to the control unit 22 together with the stop request.

通番管理部24は、通番管理表を記憶する。図3は、通番管理部24に記憶される通番管理表の一例を示す図である。図3に示すように、通番管理表は、採番済通番と、処理済通番とを管理する。詳細は後述するが、採番済通番は、通番採番部16がこれまでに採番した通番のうち、最も新しい通番を示している。採番済通番は、通番採番部16によって更新される。処理済通番は、非同期処理部20によって実行された処理のうち、最も新しい処理に対応する通番を示している。処理済通番は、非同期処理部20によって更新される。   The serial number management unit 24 stores a serial number management table. FIG. 3 is a diagram illustrating an example of a serial number management table stored in the serial number management unit 24. As shown in FIG. 3, the serial number management table manages numbered serial numbers and processed serial numbers. Although the details will be described later, the numbered serial number indicates the newest serial number among the serial numbers that the serial numbering unit 16 has assigned so far. The numbered serial number is updated by the serial numbering unit 16. The processed serial number indicates the serial number corresponding to the newest process among the processes executed by the asynchronous processing unit 20. The processed serial number is updated by the asynchronous processing unit 20.

図2を参照して、本実施形態では、通番採番部16は、通番管理部24に記憶された通番管理表を参照して、上述の停止イベントおよびトランザクションに対して通番を付与する。具体的には、通番採番部16は、上記通番表の採番済通番を取得して、取得した通番に1を足した番号を、上述の停止イベントまたはトランザクションの通番として採番する。その後、採番済通番を、採番した通番に更新する。   With reference to FIG. 2, in this embodiment, the serial number numbering part 16 refers to the serial number management table stored in the serial number management part 24 and assigns serial numbers to the above-described stop event and transaction. Specifically, the serial number numbering unit 16 acquires the serial number that has been numbered in the serial number table, and numbers the acquired serial number plus 1 as the serial number of the above-described stop event or transaction. Thereafter, the numbered serial number is updated to the numbered serial number.

更新ログ生成部18は、更新ログを、該更新ログに対応付けられた通番とともに、処理データ格納部26の後述する処理データ格納表に登録する。また、制御部22は、非同期処理制御アプリケーション50から送信されてきた停止要求に基づいて、非同期処理部20の処理を停止するための制御情報を生成する。さらに、制御部22は、生成した制御情報を、非同期処理制御アプリケーション50から送信されてきた通番とともに、処理データ格納部26の処理データ格納表に登録する。本実施形態では、上記の更新ログおよび制御情報は、制御部22が実行すべき処理内容(非同期処理データ)として、処理データ格納部26の処理データ格納表に登録される。   The update log generation unit 18 registers the update log in a processing data storage table (to be described later) of the processing data storage unit 26 together with a serial number associated with the update log. Further, the control unit 22 generates control information for stopping the processing of the asynchronous processing unit 20 based on the stop request transmitted from the asynchronous processing control application 50. Further, the control unit 22 registers the generated control information in the processing data storage table of the processing data storage unit 26 together with the serial number transmitted from the asynchronous processing control application 50. In the present embodiment, the update log and the control information are registered in the processing data storage table of the processing data storage unit 26 as the processing content (asynchronous processing data) to be executed by the control unit 22.

処理データ格納部26は、処理データ格納表を記憶する。処理データ格納表には、非同
期処理部20が実行すべき処理の内容が登録される。図4は、処理データ格納部26に記憶される処理データ格納表の一例を示す図である。図4に示すように、処理データ格納表には、更新ログ生成部18および制御部22によって、通番、種別、および処理内容が登録される。種別は、処理内容に登録されているデータの種別を示す。種別が「DB更新」は、更新ログ生成部18が登録した処理内容であることを示し、種別が「制御」は、制御部22が登録した処理内容であることを示す。
The processing data storage unit 26 stores a processing data storage table. The contents of the process to be executed by the asynchronous processing unit 20 are registered in the process data storage table. FIG. 4 is a diagram illustrating an example of a processing data storage table stored in the processing data storage unit 26. As shown in FIG. 4, the serial number, type, and processing content are registered in the processing data storage table by the update log generation unit 18 and the control unit 22. The type indicates the type of data registered in the processing content. The type “DB update” indicates that the process is registered by the update log generation unit 18, and the type “control” indicates that the process is registered by the control unit 22.

なお、業務アプリケーション40a,40b,40cが、マスタDB12に対するデータ更新をロールバックした場合、業務アプリケーション40a,40b,40cは、更新ログ生成部18に、処理なしを示すデータを送信する。この場合、更新ログ生成部18は、図4に示すように、処理内容として、「処理なし」を示すデータを処理データ格納表に登録する。   When the business applications 40a, 40b, and 40c roll back the data update for the master DB 12, the business applications 40a, 40b, and 40c transmit data indicating no processing to the update log generation unit 18. In this case, as illustrated in FIG. 4, the update log generation unit 18 registers data indicating “no processing” in the processing data storage table as the processing content.

図2を参照して、非同期処理部20は、通番管理部24に記憶された通番管理表(図3参照)を参照し、実行していない処理が存在するか否かを確認する。非同期処理部20は、実行していない処理が存在すれば、該実行していない処理のデータを、処理データ格納部26に記憶された処理データ格納表(図4参照)から取得する。その後、非同期処理部20は、処理データ格納部26から取得したデータに基づいて、処理を実行する。   With reference to FIG. 2, the asynchronous processing unit 20 refers to the serial number management table (see FIG. 3) stored in the serial number management unit 24 and confirms whether there is a process that has not been executed. If there is a process that has not been executed, the asynchronous processing unit 20 acquires the data of the process that has not been executed from the process data storage table (see FIG. 4) stored in the process data storage unit 26. Thereafter, the asynchronous processing unit 20 executes processing based on the data acquired from the processing data storage unit 26.

例えば、通番管理表が図3に示す状態で、かつ処理データ格納表が図4に示す状態の場合には、非同期処理部20は、実行していない処理のデータとして、処理データ格納表から、「非同期処理停止」を示すデータを取得する。その後、非同期処理部20は、非同期処理停止を示すデータに基づいて、レプリカDB14への処理を停止する。すなわち、レプリカDB14へのレプリケーション処理が停止される。なお、上記の「非同期処理停止」を示すデータは、非同期処理制御アプリケーション50からの停止要求に基づいて、制御部22が登録したデータである。   For example, when the serial number management table is in the state shown in FIG. 3 and the processing data storage table is in the state shown in FIG. 4, the asynchronous processing unit 20 uses the processing data storage table as data for processing that has not been executed. Acquire data indicating "stop asynchronous processing". Thereafter, the asynchronous processing unit 20 stops the processing to the replica DB 14 based on the data indicating the asynchronous processing stop. That is, the replication process to the replica DB 14 is stopped. The data indicating “stop of asynchronous processing” is data registered by the control unit 22 based on a stop request from the asynchronous processing control application 50.

非同期処理開始指示部28は、運用端末60から開始要求を受けた場合に、非同期処理部20に、処理の開始を指示する。例えば、上述のようにレプリカDB14への処理が停止されている状態において、非同期処理開始指示部28が開始指示を送信すると、非同期処理部20は、通番に従って処理を再開する。なお、非同期処理開始指示部28からの開始指示には、例えば、レプリケーション処理再開のための"通常開始"の指示と、データベースの復旧処理のための"復旧開始"の指示とがある。   When receiving a start request from the operation terminal 60, the asynchronous process start instruction unit 28 instructs the asynchronous process unit 20 to start processing. For example, when the processing to the replica DB 14 is stopped as described above, when the asynchronous processing start instruction unit 28 transmits a start instruction, the asynchronous processing unit 20 resumes the processing according to the serial number. The start instruction from the asynchronous process start instruction unit 28 includes, for example, a “normal start” instruction for resuming the replication process and a “recovery start” instruction for the database recovery process.

運用端末60は、例えば、データベースシステム10のユーザおよび管理者によって操作される端末である。データベースシステム10のユーザおよび管理者は、上述のように、運用端末60から非同期処理開始指示部28に対して開始要求を行うことができる。また、ユーザおよび管理者は、運用端末60を介して、レプリカDB14からデータベースの静止点を取得することができる。なお、詳細な説明は省略するが、上記停止イベントのイベントメッセージを、運用端末60から非同期処理制御アプリケーション50へ送信してもよい。   The operation terminal 60 is a terminal operated by a user and an administrator of the database system 10, for example. As described above, the user and the administrator of the database system 10 can make a start request from the operation terminal 60 to the asynchronous process start instruction unit 28. In addition, the user and the administrator can acquire a database quiesce point from the replica DB 14 via the operation terminal 60. Although detailed description is omitted, the event message of the stop event may be transmitted from the operation terminal 60 to the asynchronous process control application 50.

[システム動作]
次に、本実施形態にかかるデータベースシステム10の動作について説明する。なお、本実施形態では、データベースシステム10を動作させることによって、レプリケーション方法が実施される。よって、本実施形態におけるレプリケーション方法の説明は、以下のデータベースシステム10の動作説明に代える。なお、以下の説明においては、図2〜図4を適宜参照する。
[System operation]
Next, the operation of the database system 10 according to the present embodiment will be described. In this embodiment, the replication method is performed by operating the database system 10. Therefore, the description of the replication method in the present embodiment is replaced with the operation description of the database system 10 below. In the following description, FIGS. 2 to 4 are referred to as appropriate.

図5は、データベースシステム10の基本動作の一例を示すフロー図である。図5を参
照して、まず、業務アプリケーション40a,40b,40cから採番要求を受けると、通番採番部16が、複数のトランザクションに通番を付与し、通番管理部24に記憶された通番管理表(図3参照)を更新する。そして、非同期処理部20は、通番管理表から、採番済通番と処理済通番とを取得する(ステップS1)。
FIG. 5 is a flowchart showing an example of the basic operation of the database system 10. Referring to FIG. 5, first, when a numbering request is received from business application 40 a, 40 b, 40 c, serial number numbering unit 16 assigns serial numbers to a plurality of transactions and serial number management stored in serial number management unit 24. Update the table (see FIG. 3). And the asynchronous process part 20 acquires a numbered serial number and a processed serial number from a serial number management table (step S1).

次に、非同期処理部20は、採番済通番と処理済通番とが一致しているか否かを判断する(ステップS2)。採番済通番と処理済通番とが一致している場合、非同期処理部20が実行すべき処理が無いことを意味する。したがって、非同期処理部20は、一定時間待機した後、ステップS1の処理を再度実行する。   Next, the asynchronous processing unit 20 determines whether or not the numbered serial number matches the processed serial number (step S2). If the numbered serial number matches the processed serial number, it means that there is no processing to be executed by the asynchronous processing unit 20. Therefore, after waiting for a certain time, the asynchronous processing unit 20 executes the process of step S1 again.

ステップS2において、採番済通番と処理済通番とが一致していない場合、非同期処理部20は、処理データ格納部26に記憶された処理データ格納表(図4参照)を参照して、処理済通番に1を足した通番のデータが登録されているか否かを判断する(ステップS3)。   If the numbered serial number does not match the processed serial number in step S2, the asynchronous processing unit 20 refers to the processing data storage table (see FIG. 4) stored in the processing data storage unit 26, and performs processing. It is determined whether or not serial number data obtained by adding 1 to the completed serial number is registered (step S3).

ステップS3においてデータが登録されていない場合、非同期処理部20は、一定時間待機した後、再度ステップS3の処理を行う。なお、ステップS3においてデータが登録されていない場合は、業務アプリケーション40a,40b,40cが処理中で、その処理の更新ログが、処理データ格納表にまだ登録されていない状態であることを意味する。   If no data is registered in step S3, the asynchronous processing unit 20 waits for a predetermined time and then performs the process of step S3 again. If no data is registered in step S3, it means that the business applications 40a, 40b, and 40c are being processed, and the update log of the process is not yet registered in the process data storage table. .

ステップS3においてデータが登録されている場合、非同期処理部20は、処理データ格納表から処理内容を示すデータを取得する(ステップS4)。次に、非同期処理部20は、取得したデータに基づいて、処理内容の種別が「DB更新」か否かを判別する(ステップS5)。   When data is registered in step S3, the asynchronous processing unit 20 acquires data indicating the processing content from the processing data storage table (step S4). Next, the asynchronous processing unit 20 determines whether or not the type of processing content is “DB update” based on the acquired data (step S5).

ステップS5において、処理内容の種別が「DB更新」の場合、非同期処理部20は、処理内容に従ってレプリカDB14のデータ更新を行う(ステップS6)。これにより、マスタDB12において行われたデータ更新がレプリカDB14に反映される。なお、処理内容が「処理なし」の場合(例えば、図4の通番23参照)は、ステップS6において非同期処理部20は、レプリカDB14のデータ更新を行わない。   In step S5, when the type of processing content is “DB update”, the asynchronous processing unit 20 updates the data in the replica DB 14 according to the processing content (step S6). Thereby, the data update performed in the master DB 12 is reflected in the replica DB 14. If the processing content is “no processing” (see, for example, serial number 23 in FIG. 4), the asynchronous processing unit 20 does not update the data in the replica DB 14 in step S6.

次に、非同期処理部20は、通番管理部24に記憶された通番管理表(図3参照)の処理済通番に1を足して、該処理済通番を、ステップS6において実行した処理内容の通番に更新する(ステップS7)。その後、データベースシステム10は、ステップS1の処理に戻る。   Next, the asynchronous processing unit 20 adds 1 to the processed serial number of the serial number management table (see FIG. 3) stored in the serial number management unit 24, and the processed serial number is the serial number of the processing content executed in step S6. (Step S7). Thereafter, the database system 10 returns to the process of step S1.

ステップS5において、処理内容の種別が「DB更新」では無い場合、すなわち、処理内容の種別が「制御」の場合(例えば、図4の通番20参照)、非同期処理部20は、通番管理表(図3参照)の処理済通番に1を足して、該処理済通番を、ステップS4において取得したデータの通番に更新する(ステップS8)。   In step S5, when the type of processing content is not “DB update”, that is, when the type of processing content is “control” (see, for example, serial number 20 in FIG. 4), the asynchronous processing unit 20 uses the serial number management table ( 1 is added to the processed serial number in FIG. 3), and the processed serial number is updated to the serial number of the data acquired in step S4 (step S8).

次に、非同期処理部20は、非同期処理開始指示部28から上述の「通常開始」の指示があったか否かを判別する(ステップS9)。非同期処理開始指示部28から「通常開始」の指示が無い場合、非同期処理部20は、「通常開始」の指示があるまで待機する。これにより、非同期処理部20による非同期処理が停止される。すなわち、レプリカDB14のデータ更新が停止される。   Next, the asynchronous processing unit 20 determines whether or not the above-described “normal start” instruction is received from the asynchronous processing start instruction unit 28 (step S9). When there is no “normal start” instruction from the asynchronous process start instructing unit 28, the asynchronous processing unit 20 waits until there is a “normal start” instruction. Thereby, the asynchronous processing by the asynchronous processing unit 20 is stopped. That is, the data update of the replica DB 14 is stopped.

ステップS9において「通常開始」の指示があった場合、データベースシステム10は、ステップS1に戻る。   If there is an instruction of “normal start” in step S9, the database system 10 returns to step S1.

以上のように、データベースシステム10では、非同期処理部20からレプリカDB14へのデータ更新を停止することによって、レプリカDB14からデータベースの静止点を取得することができる。ユーザおよびシステム管理者は、運用端末60からレプリカDB14を参照することによって、上記静止点での統計処理等を行うことができる。また、非同期処理部20による処理が停止している間でも、業務アプリケーション40a,40b,40cの処理は継続させることができる。また、更新ログは、処理データ格納部26の処理データ格納表に蓄積される。静止点での処理(統計処理等)が完了すれば、運用端末60から「通常開始」の要求を非同期処理開始指示部28に送信することで、非同期処理開始指示部28から非同期処理部20へ開始指示が送信される。これにより、非同期処理部20は処理を再開する。   As described above, in the database system 10, the quiesce point of the database can be acquired from the replica DB 14 by stopping the data update from the asynchronous processing unit 20 to the replica DB 14. By referring to the replica DB 14 from the operation terminal 60, the user and the system administrator can perform statistical processing at the stationary point. Further, the processing of the business applications 40a, 40b, and 40c can be continued even while the processing by the asynchronous processing unit 20 is stopped. The update log is accumulated in the processing data storage table of the processing data storage unit 26. When processing (statistical processing, etc.) at a quiesce point is completed, a request for “normal start” is sent from the operation terminal 60 to the asynchronous processing start instructing unit 28, so that the asynchronous processing start instructing unit 28 sends to the asynchronous processing unit 20 A start instruction is sent. As a result, the asynchronous processing unit 20 resumes the processing.

ここで、処理時間の異なる複数の業務が並列で実行され、業務開始順とデータベース更新順とが異なる場合を例に挙げて、データベースシステム10の効果を説明する。   Here, the effect of the database system 10 will be described by taking as an example a case where a plurality of tasks having different processing times are executed in parallel and the task start order is different from the database update order.

図6は、業務アプリケーション40a,40b,40cおよび非同期処理制御アプリケーション50の処理時間、ならびに、通番採番部16による通番の採番タイミングを表した図である。この例では、業務アプリケーション40a,40b,40cがそれぞれ並列に動作し、マスタDB12を更新する。業務アプリケーション40a,40b,40cは、図6に示す矢印の先端のタイミングで、マスタDB12の更新および更新ログ生成部18への更新内容の登録を行う。   FIG. 6 is a diagram showing the processing time of the business applications 40a, 40b, 40c and the asynchronous process control application 50, and the serial numbering timing by the serial numbering unit 16. In this example, the business applications 40a, 40b, and 40c operate in parallel, and update the master DB 12. The business applications 40a, 40b, and 40c update the master DB 12 and register the updated contents in the update log generation unit 18 at the timing of the tip of the arrow shown in FIG.

業務アプリケーション40aは、1月1日に業務処理を開始し、1月2日にマスタDB12のデータ更新を完了する。業務アプリケーション40bおよび業務アプリケーション40cは、1月2日に業務処理を開始する。この例では、1月1日中に処理を開始した業務アプリケーション40aの全ての更新が反映されたデータベースの静止点を取得することを考える。そのため、非同期処理制御アプリケーション50は、日付が1月2日に変わったタイミングで処理を開始する。   The business application 40a starts business processing on January 1 and completes data update of the master DB 12 on January 2. The business application 40b and the business application 40c start business processing on January 2. In this example, it is assumed that a quiesce point of a database reflecting all the updates of the business application 40a that started processing during January 1 is reflected. Therefore, the asynchronous process control application 50 starts processing at the timing when the date changes to January 2.

業務アプリケーション40a,40b,40cおよび非同期処理制御アプリケーション50が、処理データ格納部26の処理データ格納表に格納した処理内容(非同期処理データ)の一例を図7に示す。図6および図7を参照して、この例では、業務アプリケーション40aの処理に対して通番25が採番され、非同期処理制御アプリケーション50の処理に対して通番26が採番され、業務アプリケーション40bの処理に対して通番27が採番され、業務アプリケーション40cの処理に対して通番28が採番されている。ただし、図7を参照して、処理内容が処理データ格納表に登録される順番は、上記通番の順番通りではない。この例では、通番26の処理内容、通番28の処理内容、通番27の処理内容および通番25の処理内容の順に、処理データ格納表に登録される。   An example of the processing contents (asynchronous processing data) stored in the processing data storage table of the processing data storage unit 26 by the business applications 40a, 40b, 40c and the asynchronous processing control application 50 is shown in FIG. With reference to FIGS. 6 and 7, in this example, serial number 25 is assigned to the process of business application 40a, serial number 26 is assigned to the process of asynchronous process control application 50, and A serial number 27 is assigned to the process, and a serial number 28 is assigned to the process of the business application 40c. However, referring to FIG. 7, the order in which the processing contents are registered in the processing data storage table is not the same as the order of the serial numbers. In this example, the processing content of serial number 26, the processing content of serial number 28, the processing content of serial number 27, and the processing content of serial number 25 are registered in the processing data storage table.

この例では、非同期処理部20は、処理データ格納部26の処理データ格納表(図7参照)を参照し、通番25の処理内容から順に実行する。通番25は種別が「DB更新」であるため、非同期処理部20は、処理内容に従ってレプリカDB14を更新する。通番26は、種別が「制御」であるため、非同期処理部20は、非同期処理(レプリカDB14のデータ更新)を停止する。これにより、1月1日に処理を開始した業務アプリケーション40aのデータ更新が反映されて、1月2日に処理を開始した業務アプリケーション40b,40cのデー更新が反映されていないデータベースの静止点を、レプリカDB14において作成できる。データベースシステム10のユーザ等は、運用端末60を使用してレプリカDB14を参照し、1月1日に発生した業務データの統計処理等を行うことができる。   In this example, the asynchronous processing unit 20 refers to the processing data storage table (see FIG. 7) of the processing data storage unit 26 and executes the processing contents of the serial number 25 in order. Since the serial number 25 has the type “DB update”, the asynchronous processing unit 20 updates the replica DB 14 according to the processing content. Since the serial number 26 has the type “control”, the asynchronous processing unit 20 stops the asynchronous processing (data update of the replica DB 14). As a result, the data update of the business application 40a that started processing on January 1 is reflected, and the quiesce point of the database that does not reflect the data update of the business applications 40b and 40c that started processing on January 2 is reflected. Can be created in the replica DB 14. A user of the database system 10 can use the operation terminal 60 to refer to the replica DB 14 and perform statistical processing of business data generated on January 1st.

次に、マスタDB12に障害が発生した場合の、システム復旧までの動作を説明する。
マスタDB12に障害が発生すると、マスタDB12を更新する全ての業務アプリケーション40a,40b,40cの処理が停止される。この場合、例えば、システム管理者は、運用端末60から非同期処理開始指示部28へ「復旧開始」の開始要求を行う。これにより、非同期処理開始指示部28は、非同期処理部20に「復旧開始」の開始指示を送信する。
Next, operations up to system recovery when a failure occurs in the master DB 12 will be described.
When a failure occurs in the master DB 12, processing of all business applications 40a, 40b, and 40c that update the master DB 12 is stopped. In this case, for example, the system administrator makes a “recovery start” start request from the operation terminal 60 to the asynchronous process start instruction unit 28. As a result, the asynchronous process start instruction unit 28 transmits a “recovery start” start instruction to the asynchronous process unit 20.

非同期処理部20は、「復旧開始」の開始指示を受けると、後述する処理フロー(図8)に従って、処理データ格納部26の処理データ格納表に登録された全ての更新ログをレプリカDB14へ反映する。レプリカDB14への更新ログの反映が完了することにより、レプリカDB14において、マスタDB12の障害発生直前のデータ状態が復旧される。次に、データベースシステム10からマスタDB12を切り離して、該マスタDB12の代わりにレプリカDB14を用いる。その後、業務アプリケーション40a,40b,40cによるレプリカDB14への処理を再開させる。これにより、レプリカDB14を新たなマスタDBとして利用して、業務を復旧させることができる。以下、フロー図を参照しつつ、データベースシステム10の復旧動作について具体的に説明する。   When the asynchronous processing unit 20 receives an instruction to start “recovery start”, the asynchronous processing unit 20 reflects all update logs registered in the processing data storage table of the processing data storage unit 26 to the replica DB 14 in accordance with a processing flow (FIG. 8) described later. To do. When the reflection of the update log to the replica DB 14 is completed, the data state immediately before the failure of the master DB 12 is restored in the replica DB 14. Next, the master DB 12 is disconnected from the database system 10 and the replica DB 14 is used instead of the master DB 12. Thereafter, the processing to the replica DB 14 by the business applications 40a, 40b, and 40c is resumed. As a result, the business can be recovered by using the replica DB 14 as a new master DB. Hereinafter, the recovery operation of the database system 10 will be specifically described with reference to a flowchart.

図8は、データベースシステム10の復旧動作の一例を示すフロー図である。図8を参照して、非同期処理部20が非同期処理開始指示部28から「復旧開始」の指示を受けると、通番採番部16は、通番管理部24に記憶された通番管理表(図3参照)から、採番済通番と処理済通番とを取得する(ステップA1)。   FIG. 8 is a flowchart showing an example of the recovery operation of the database system 10. Referring to FIG. 8, when asynchronous processing unit 20 receives an instruction of “recovery start” from asynchronous processing start instruction unit 28, serial numbering unit 16 stores a serial number management table (FIG. 3) stored in serial number management unit 24. The numbered serial number and the processed serial number are acquired from (refer to).

次に、非同期処理部20は、採番済通番と処理済通番とが一致しているか否かを判断する(ステップA2)。採番済通番と処理済通番とが一致している場合、反映すべき全ての更新ログがレプリカDB14へ反映されているため、復旧処理を終了する。   Next, the asynchronous processing unit 20 determines whether or not the numbered serial number matches the processed serial number (step A2). If the numbered serial number and the processed serial number match, all the update logs to be reflected are reflected in the replica DB 14, and the recovery process is terminated.

ステップA2において、採番済通番と処理済通番とが一致していない場合、非同期処理部20は、処理データ格納部26に記憶された処理データ格納表(図4参照)を参照して、処理済通番に1を足した通番に対応するデータが登録されているか否かを判断する(ステップA3)。   In step A2, if the numbered serial number and the processed serial number do not match, the asynchronous processing unit 20 refers to the processing data storage table (see FIG. 4) stored in the processing data storage unit 26 and performs processing. It is determined whether or not the data corresponding to the serial number obtained by adding 1 to the completed serial number is registered (step A3).

ステップA3においてデータが登録されていない場合、非同期処理部20は、後述するステップA7の処理に進み、処理済通番を更新した後、ステップA1に戻る。なお、ステップA3において処理内容が登録されていない場合は、業務アプリケーション40a,40b,40cの処理(トランザクション)に対して通番が付与されたが、その処理によるマスタDB12のデータ更新が完了していないことを意味している。復旧動作が行われている場合には、マスタDB12に障害が発生しているので、上記通番に対応する処理によって、マスタDB12のデータ更新が行われることはない。したがって、上記通番に対応する更新ログは、レプリカDB14へ反映する必要はない。そのため、後述のステップA4〜A6の処理をスキップすることができる。   If no data is registered in step A3, the asynchronous processing unit 20 proceeds to the process of step A7 described later, updates the processed serial number, and then returns to step A1. If the processing contents are not registered in step A3, serial numbers are assigned to the processing (transactions) of the business applications 40a, 40b, and 40c, but the data update of the master DB 12 by the processing is not completed. It means that. When the recovery operation is being performed, a failure has occurred in the master DB 12, so that the data update of the master DB 12 is not performed by the process corresponding to the serial number. Accordingly, the update log corresponding to the serial number need not be reflected in the replica DB 14. For this reason, processing in steps A4 to A6 described later can be skipped.

ステップA3においてデータが登録されている場合、非同期処理部20は、処理データ格納表から処理内容を示すデータを取得する(ステップA4)。次に、非同期処理部20は、取得したデータに基づいて、処理内容の種別が「DB更新」か否かを判別する(ステップA5)。種別が「DB更新」ではない場合、すなわち、種別が「制御」の場合、復旧処理とは関係がない処理内容であることを意味する。したがって、非同期処理部20は、後述するステップA7の処理に進み、処理済通番を更新した後、ステップA1に戻る。   When the data is registered in step A3, the asynchronous processing unit 20 acquires data indicating the processing content from the processing data storage table (step A4). Next, the asynchronous processing unit 20 determines whether or not the type of processing content is “DB update” based on the acquired data (step A5). When the type is not “DB update”, that is, when the type is “control”, it means that the processing content is not related to the recovery processing. Therefore, the asynchronous processor 20 proceeds to the process of step A7 described later, updates the processed serial number, and then returns to step A1.

ステップA5において処理内容の種別が「DB更新」の場合、非同期処理部20は、処理内容に従ってレプリカDB14のデータ更新を行う(ステップA6)。これにより、レプリカDB14のデータの状態を、障害発生前のマスタDB12のデータの状態にするこ
とができる。
When the type of processing content is “DB update” in step A5, the asynchronous processing unit 20 updates data in the replica DB 14 according to the processing content (step A6). Thereby, the data state of the replica DB 14 can be changed to the data state of the master DB 12 before the failure occurs.

次に、非同期処理部20は、通番管理部24に記憶された通番管理表の処理済通番に1を足して、該処理済通番を、ステップA6において実行した処理内容の通番に更新する(ステップA7)。その後、データベースシステム10は、ステップA1の処理に戻る。   Next, the asynchronous processing unit 20 adds 1 to the processed serial number of the serial number management table stored in the serial number management unit 24, and updates the processed serial number to the serial number of the processing content executed in step A6 (step S6). A7). Thereafter, the database system 10 returns to the process of step A1.

(変形例)
上述の実施形態では、業務アプリケーション40a,40b,40cが、互いに異なるレコードを更新する場合について説明した。仮に、マスタDB12内の同一のレコードを更新する複数の業務アプリケーションが並列に動作する場合には、通番を採番した順に、マスタDB12のデータ更新を行うことが好ましい。例えば、連番を採番した順にマスタDB12のデータ更新が行われるように、複数の業務アプリケーションのデータ更新の時期について順序制御を行うことが好ましい。これにより、レプリカDB14におけるデータ更新の順番がマスタDB12におけるデータ更新の順番に対して逆転することを防止できる。その結果、レコードの状態が、マスタDB12とレプリカDB14とで一致しなくなることを防止できる。
(Modification)
In the above-described embodiment, the case where the business applications 40a, 40b, and 40c update different records has been described. If a plurality of business applications that update the same record in the master DB 12 operate in parallel, it is preferable to update the data in the master DB 12 in the order in which serial numbers are assigned. For example, it is preferable to control the order of the data update timings of a plurality of business applications so that the data in the master DB 12 is updated in the order in which the serial numbers are assigned. Thereby, it is possible to prevent the data update order in the replica DB 14 from being reversed with respect to the data update order in the master DB 12. As a result, it is possible to prevent the record status from being inconsistent between the master DB 12 and the replica DB 14.

上述の実施形態では、データベースの静止点が取得可能な状態である間、システム管理者等が、レプリカDB14に対して任意のオペレーションを実行することができる構成を想定している。そのため、一端停止した非同期処理部20の処理は、例えば、システム管理者が運用端末60を操作することによって任意のタイミングで再開されることを想定している。しかしながら、例えば、データベースの静止点が取得可能な状態でレプリカDB14に対して実行される処理が、あらかじめバッチ処理として決められている場合にも、本発明に係るデータベースシステムを利用できる。以下、簡単に説明する。   In the above-described embodiment, it is assumed that the system administrator or the like can execute an arbitrary operation on the replica DB 14 while the quiesce point of the database can be acquired. Therefore, it is assumed that the processing of the asynchronous processing unit 20 that has stopped once is resumed at an arbitrary timing by the system administrator operating the operation terminal 60, for example. However, for example, the database system according to the present invention can be used even when the processing to be executed on the replica DB 14 in a state where the quiesce point of the database can be acquired is determined in advance as batch processing. A brief description is given below.

図9は、データベースシステムの変形例を示す図である。図9に示すデータベースシステム10aは、例えば、バッチ処理によって日付単位で業務データの統計処理を行い、統計データを作成するような場合に好適に利用できる。なお、統計処理は一例であり、データベースの静止点で実行したい任意のバッチ処理に対して、データベースシステム10aを好適に利用できる。   FIG. 9 is a diagram showing a modification of the database system. The database system 10a shown in FIG. 9 can be suitably used when, for example, statistical processing of business data is performed on a date basis by batch processing to create statistical data. The statistical processing is an example, and the database system 10a can be suitably used for any batch processing that is desired to be executed at a quiesce point of the database.

図9を参照して、データベースシステム10aが上述のデータベースシステム10と異なるのは、レプリケーション制御装置30の代わりにレプリケーション制御装置30aを有している点である。また、レプリケーション制御装置30aが上述のレプリケーション制御装置30と異なるのは、統計データ取得部32をさらに備えている点である。   Referring to FIG. 9, the database system 10 a is different from the database system 10 described above in that a replication control device 30 a is provided instead of the replication control device 30. The replication control device 30a differs from the replication control device 30 described above in that a statistical data acquisition unit 32 is further provided.

データベースシステム10aでは、例えば、非同期処理制御アプリケーション50は、制御部22に対してバッチ処理の実行要求を行う。制御部22は、バッチ処理の実行要求を受けると、統計データ取得部32によるバッチ処理を実行させるための制御情報を、通番採番部16によって付与された通番とともに、処理データ格納部26の処理データ格納表に登録する。図10は、データベースシステム10aの制御部22によって処理データ格納表に登録される処理内容の一例を示す図である。図10の例においては、通番31の処理内容(非同期処理データ)が、制御部22によって登録されたデータである。   In the database system 10 a, for example, the asynchronous process control application 50 makes a batch process execution request to the control unit 22. When the control unit 22 receives the execution request for the batch processing, the control information for causing the statistical data acquisition unit 32 to execute the batch processing together with the serial number assigned by the serial number numbering unit 16 is processed in the processing data storage unit 26. Register in the data storage table. FIG. 10 is a diagram illustrating an example of processing contents registered in the processing data storage table by the control unit 22 of the database system 10a. In the example of FIG. 10, the processing content of the serial number 31 (asynchronous processing data) is data registered by the control unit 22.

非同期処理部20は、例えば、図10に示す処理データ格納表から通番31のデータを取得する。通番31のデータは、種別が「制御」であり、処理内容が「統計データ取得部実行」であるので、非同期処理部20は、統計データ取得部32に対して、処理開始の指示を行う。統計データ取得部32は、非同期処理部20からの開始指示に従って、静止点となっているレプリカDB14を参照し、統計データを作成する。   For example, the asynchronous processing unit 20 acquires the data of the serial number 31 from the processing data storage table illustrated in FIG. Since the data of the serial number 31 is “control” and the processing content is “statistical data acquisition unit execution”, the asynchronous processing unit 20 instructs the statistical data acquisition unit 32 to start processing. In accordance with the start instruction from the asynchronous processing unit 20, the statistical data acquisition unit 32 refers to the replica DB 14 that is a stationary point and creates statistical data.

統計データ取得部32は、統計データの作成後、処理の完了を非同期処理部20に通知する。非同期処理部20は、統計データ取得部32から完了通知を受け取ると、通番管理部24に記憶された通番管理表の処理済通番を更新し、次の通番(図10の例では、通番32)の処理を行う。これにより、統計データ取得部32が動作している間は、レプリカDB14は更新されない。したがって、データベースシステム10aによれば、データベースの静止点でバッチ処理が可能である。また、データベースシステム10aによれば、バッチ処理が完了した後、速やかにレプリカDB14へのレプリケーション処理を再開することができる。   The statistical data acquisition unit 32 notifies the asynchronous processing unit 20 of the completion of the processing after the statistical data is created. When receiving the completion notification from the statistical data acquisition unit 32, the asynchronous processing unit 20 updates the processed serial number of the serial number management table stored in the serial number management unit 24, and the next serial number (in the example of FIG. 10, serial number 32). Perform the process. Thereby, the replica DB 14 is not updated while the statistical data acquisition unit 32 is operating. Therefore, according to the database system 10a, batch processing is possible at a stationary point of the database. Further, according to the database system 10a, the replication processing to the replica DB 14 can be restarted promptly after the batch processing is completed.

[プログラム]
本発明の実施の形態におけるプログラムは、コンピュータに、図5示すステップS1〜S9および/または図8に示すステップA1〜A7の処理を実行させるプログラムであればよい。このプログラムをコンピュータにインストールし、実行することによって、本実施の形態におけるレプリケーション制御装置30,30aとレプリケーション方法とを実現することができる。この場合、コンピュータのCPU(Central Processing Unit)は、通番採番部16、更新ログ生成部18、非同期処理部20、制御部22、非同期処理開始指示部28および統計データ取得部32として機能し、処理を行なう。
[program]
The program in the embodiment of the present invention may be a program that causes a computer to execute the processes of steps S1 to S9 shown in FIG. 5 and / or steps A1 to A7 shown in FIG. By installing and executing this program on a computer, the replication control apparatuses 30 and 30a and the replication method in the present embodiment can be realized. In this case, the CPU (Central Processing Unit) of the computer functions as a serial numbering unit 16, an update log generation unit 18, an asynchronous processing unit 20, a control unit 22, an asynchronous processing start instruction unit 28, and a statistical data acquisition unit 32. Perform processing.

また、本実施の形態では、マスタDB12、レプリカDB14、通番管理部24、および処理データ格納部26は、コンピュータに備えられたハードディスク等の記憶装置に、これらを構成するデータファイルを格納することによって、又はこのデータファイルが格納された記録媒体をコンピュータと接続された読取装置に搭載することによって実現されている。   In the present embodiment, the master DB 12, the replica DB 14, the serial number management unit 24, and the processing data storage unit 26 store data files constituting them in a storage device such as a hard disk provided in the computer. Alternatively, it is realized by mounting a recording medium storing this data file on a reading device connected to a computer.

[物理構成]
ここで、本実施の形態におけるプログラムを実行することによって、レプリケーション制御装置30,30aを実現するコンピュータについて図11を用いて説明する。図11は、本発明の実施の形態におけるレプリケーション制御装置30,30aを実現するコンピュータの一例を示すブロック図である。
[Physical configuration]
Here, a computer that realizes the replication control apparatuses 30 and 30a by executing the program according to the present embodiment will be described with reference to FIG. FIG. 11 is a block diagram illustrating an example of a computer that implements the replication control apparatuses 30 and 30a according to the embodiment of this invention.

図11に示すように、コンピュータ110は、CPU111と、メインメモリ112と、記憶装置113と、入力インターフェイス114と、表示コントローラ115と、データリーダ/ライタ116と、通信インターフェイス117とを備える。これらの各部は、バス121を介して、互いにデータ通信可能に接続される。   As shown in FIG. 11, the computer 110 includes a CPU 111, a main memory 112, a storage device 113, an input interface 114, a display controller 115, a data reader / writer 116, and a communication interface 117. These units are connected to each other via a bus 121 so that data communication is possible.

CPU111は、記憶装置113に格納された、本実施の形態におけるプログラム(コード)をメインメモリ112に展開し、これらを所定順序で実行することにより、各種の演算を実施する。メインメモリ112は、典型的には、DRAM(Dynamic Random Access Memory)等の揮発性の記憶装置である。また、本実施の形態におけるプログラムは、コンピュータ読み取り可能な記録媒体120に格納された状態で提供される。なお、本実施の形態におけるプログラムは、通信インターフェイス117を介して接続されたインターネット上で流通するものであっても良い。   The CPU 111 performs various calculations by developing the program (code) in the present embodiment stored in the storage device 113 in the main memory 112 and executing them in a predetermined order. The main memory 112 is typically a volatile storage device such as a DRAM (Dynamic Random Access Memory). Further, the program in the present embodiment is provided in a state of being stored in a computer-readable recording medium 120. Note that the program in the present embodiment may be distributed on the Internet connected via the communication interface 117.

また、記憶装置113の具体例としては、ハードディスクドライブの他、フラッシュメモリ等の半導体記憶装置が挙げられる。入力インターフェイス114は、CPU111と、キーボード及びマウスといった入力機器118との間のデータ伝送を仲介する。表示コントローラ115は、ディスプレイ装置119と接続され、ディスプレイ装置119での表示を制御する。   Specific examples of the storage device 113 include a hard disk drive and a semiconductor storage device such as a flash memory. The input interface 114 mediates data transmission between the CPU 111 and an input device 118 such as a keyboard and a mouse. The display controller 115 is connected to the display device 119 and controls display on the display device 119.

データリーダ/ライタ116は、CPU111と記録媒体120との間のデータ伝送を
仲介し、記録媒体120からのプログラムの読み出し、及びコンピュータ110における処理結果の記録媒体120への書き込みを実行する。通信インターフェイス117は、CPU111と、他のコンピュータとの間のデータ伝送を仲介する。
The data reader / writer 116 mediates data transmission between the CPU 111 and the recording medium 120, and reads a program from the recording medium 120 and writes a processing result in the computer 110 to the recording medium 120. The communication interface 117 mediates data transmission between the CPU 111 and another computer.

また、記録媒体120の具体例としては、CF(Compact Flash(登録商標))及びSD(Secure Digital)等の汎用的な半導体記憶デバイス、フレキシブルディスク(Flexible Disk)等の磁気記憶媒体、又はCD−ROM(Compact Disk Read Only Memory)などの光学記憶媒体が挙げられる。   Specific examples of the recording medium 120 include general-purpose semiconductor storage devices such as CF (Compact Flash (registered trademark)) and SD (Secure Digital), magnetic storage media such as a flexible disk, or CD- An optical storage medium such as ROM (Compact Disk Read Only Memory) can be used.

上述した実施の形態の一部又は全部は、以下に記載する(付記1)〜(付記15)によって表現することができるが、以下の記載に限定されるものではない。   Part or all of the above-described embodiment can be expressed by (Appendix 1) to (Appendix 15) described below, but is not limited to the following description.

(付記1)
複数のトランザクションに基づいてデータ更新が行われるマスタデータベースと、
前記マスタデータベースのレプリケーション先となるレプリカデータベースと、
前記複数のトランザクションの開始時刻を基準として、該複数のトランザクションに通番を付与する通番採番部と、
前記複数のトランザクションに対応する複数の更新ログを生成し、かつ、該複数の更新ログと前記通番採番部によって前記複数のトランザクションに付与された通番とを対応付ける更新ログ生成部と、
前記更新ログ生成部によって生成された前記複数の更新ログに基づいて、かつ、前記更新ログ生成部によって前記複数の更新ログに対応付けられた前記通番に従って、前記マスタデータベースのデータ更新とは非同期で前記レプリカデータベースのデータ更新を行う非同期処理部と、
所定の条件が満たされた場合に、前記非同期処理部による前記レプリカデータベースのデータ更新を停止させる制御部とを備える、データベースシステム。
(Appendix 1)
A master database that updates data based on multiple transactions;
A replica database as a replication destination of the master database;
With reference to the start times of the plurality of transactions, a serial number numbering unit that assigns serial numbers to the plurality of transactions,
An update log generation unit that generates a plurality of update logs corresponding to the plurality of transactions, and associates the plurality of update logs with the serial numbers assigned to the plurality of transactions by the serial numbering unit;
Based on the plurality of update logs generated by the update log generation unit and according to the serial numbers associated with the plurality of update logs by the update log generation unit, asynchronous with data update of the master database. An asynchronous processing unit for updating data in the replica database;
A database system comprising: a control unit that stops data update of the replica database by the asynchronous processing unit when a predetermined condition is satisfied.

(付記2)
前記制御部は、前記非同期処理部の停止要求を受けた場合に、前記所定の条件が満たされたとして、前記非同期処理部による前記データ更新を停止させるための制御情報を生成し、
前記通番採番部は、前記複数のトランザクションの開始時刻および前記制御情報の生成時刻を基準として、前記複数の更新ログおよび前記制御情報が時系列で並ぶように前記複数の更新ログと前記制御情報とに通番を付与し、
前記非同期処理部は、前記複数の更新ログと前記制御情報とに基づいて、かつ、前記複数の更新ログと前記制御情報とに付与された前記通番に従って、前記レプリカデータベースのデータ更新と、該データ更新の停止とを行う、付記1に記載のデータベースシステム。
(Appendix 2)
When the control unit receives a request to stop the asynchronous processing unit, the control unit generates control information for stopping the data update by the asynchronous processing unit, assuming that the predetermined condition is satisfied,
The serial number numbering unit includes the plurality of update logs and the control information so that the plurality of update logs and the control information are arranged in time series with reference to a start time of the plurality of transactions and a generation time of the control information. And give a serial number to
The asynchronous processing unit updates the data in the replica database based on the plurality of update logs and the control information, and according to the serial numbers assigned to the plurality of update logs and the control information, and the data The database system according to attachment 1, wherein the updating is stopped.

(付記3)
前記非同期処理部に対して前記レプリカデータベースのデータ更新の再開を指示する非同期処理開始指示部をさらに備える、付記2に記載のデータベースシステム。
(Appendix 3)
The database system according to appendix 2, further comprising an asynchronous processing start instruction unit that instructs the asynchronous processing unit to resume data update of the replica database.

(付記4)
前記制御部は、バッチ処理の実行要求を受けた場合に、前記所定の条件が満たされたとして、前非同期処理部にバッチ処理を実行させるための制御情報を生成し、
前記通番採番部は、前記複数のトランザクションの開始時刻および前記制御情報の生成時刻を基準として、前記複数の更新ログおよび前記制御情報が時系列で並ぶように前記複数の更新ログと前記制御情報とに通番を付与し、
前記非同期処理部は、前記複数の更新ログと前記制御情報とに基づいて、かつ、前記複
数の更新ログと前記制御情報とに付与された前記通番に従って、前記レプリカデータベースのデータ更新と前記バッチ処理とを行う、付記3に記載のデータベースシステム。
(Appendix 4)
When the control unit receives a request for execution of batch processing, the control unit generates control information for causing the previous asynchronous processing unit to execute batch processing, assuming that the predetermined condition is satisfied,
The serial number numbering unit includes the plurality of update logs and the control information so that the plurality of update logs and the control information are arranged in time series with reference to a start time of the plurality of transactions and a generation time of the control information. And give a serial number to
The asynchronous processing unit is configured to update the data in the replica database and perform batch processing based on the plurality of update logs and the control information and according to the serial numbers assigned to the plurality of update logs and the control information. The database system according to attachment 3, wherein:

(付記5)
複数のトランザクションに基づいてデータ更新が行われるマスタデータベースと、前記マスタデータベースのレプリケーション先となるレプリカデータベースとを備えるデータベースシステムにおいて、前記マスタデータベースのデータ更新とは非同期で前記レプリカデータベースのデータ更新を行うレプリケーション制御装置であって、
前記複数のトランザクションの開始時刻を基準として、該複数のトランザクションに通番を付与する通番採番部と、
前記複数のトランザクションに対応する複数の更新ログを生成し、かつ、該複数の更新ログと前記通番採番部によって前記複数のトランザクションに付与された通番とを対応付ける更新ログ生成部と、
前記更新ログ生成部によって生成された前記複数の更新ログに基づいて、かつ、前記更新ログ生成部によって前記複数の更新ログに対応付けられた前記通番に従って、前記マスタデータベースのデータ更新とは非同期で前記レプリカデータベースのデータ更新を行う非同期処理部と、
所定の条件が満たされた場合に、前記非同期処理部による前記レプリカデータベースのデータ更新を停止させる制御部とを備える、レプリケーション制御装置。
(Appendix 5)
In a database system comprising a master database in which data is updated based on a plurality of transactions and a replica database as a replication destination of the master database, data in the replica database is updated asynchronously with data update in the master database A replication control device,
With reference to the start times of the plurality of transactions, a serial number numbering unit that assigns serial numbers to the plurality of transactions,
An update log generation unit that generates a plurality of update logs corresponding to the plurality of transactions, and associates the plurality of update logs with the serial numbers assigned to the plurality of transactions by the serial numbering unit;
Based on the plurality of update logs generated by the update log generation unit and according to the serial numbers associated with the plurality of update logs by the update log generation unit, asynchronous with data update of the master database. An asynchronous processing unit for updating data in the replica database;
A replication control apparatus comprising: a control unit that stops data update of the replica database by the asynchronous processing unit when a predetermined condition is satisfied.

(付記6)
前記制御部は、前記非同期処理部の停止要求を受けた場合に、前記所定の条件が満たされたとして、前記非同期処理部による前記データ更新を停止させるための制御情報を生成し、
前記通番採番部は、前記複数のトランザクションの開始時刻および前記制御情報の生成時刻を基準として、前記複数の更新ログおよび前記制御情報が時系列で並ぶように前記複数の更新ログと前記制御情報とに通番を付与し、
前記非同期処理部は、前記複数の更新ログと前記制御情報とに基づいて、かつ、前記複数の更新ログと前記制御情報とに付与された前記通番に従って、前記レプリカデータベースのデータ更新と、該データ更新の停止とを行う、付記5に記載のレプリケーション制御装置。
(Appendix 6)
When the control unit receives a request to stop the asynchronous processing unit, the control unit generates control information for stopping the data update by the asynchronous processing unit, assuming that the predetermined condition is satisfied,
The serial number numbering unit includes the plurality of update logs and the control information so that the plurality of update logs and the control information are arranged in time series with reference to a start time of the plurality of transactions and a generation time of the control information. And give a serial number to
The asynchronous processing unit updates the data in the replica database based on the plurality of update logs and the control information, and according to the serial numbers assigned to the plurality of update logs and the control information, and the data The replication control device according to appendix 5, which performs updating stop.

(付記7)
前記非同期処理部に対して前記レプリカデータベースのデータ更新の再開を指示する非同期処理開始指示部をさらに備える、付記6に記載のレプリケーション制御装置。
(Appendix 7)
The replication control device according to appendix 6, further comprising an asynchronous processing start instruction unit that instructs the asynchronous processing unit to resume data update of the replica database.

(付記8)
前記制御部は、バッチ処理の実行要求を受けた場合に、前記所定の条件が満たされたとして、前非同期処理部にバッチ処理を実行させるための制御情報を生成し、
前記通番採番部は、前記複数のトランザクションの開始時刻および前記制御情報の生成時刻を基準として、前記複数の更新ログおよび前記制御情報が時系列で並ぶように前記複数の更新ログと前記制御情報とに通番を付与し、
前記非同期処理部は、前記複数の更新ログと前記制御情報とに基づいて、かつ、前記複数の更新ログと前記制御情報とに付与された前記通番に従って、前記レプリカデータベースのデータ更新と前記バッチ処理とを行う、付記7に記載のレプリケーション制御装置。
(Appendix 8)
When the control unit receives a request for execution of batch processing, the control unit generates control information for causing the previous asynchronous processing unit to execute batch processing, assuming that the predetermined condition is satisfied,
The serial number numbering unit includes the plurality of update logs and the control information so that the plurality of update logs and the control information are arranged in time series with reference to a start time of the plurality of transactions and a generation time of the control information. And give a serial number to
The asynchronous processing unit is configured to update the data in the replica database and perform batch processing based on the plurality of update logs and the control information and according to the serial numbers assigned to the plurality of update logs and the control information. The replication control device according to attachment 7, wherein:

(付記9)
複数のトランザクションに基づいてデータ更新が行われるマスタデータベースと、前記マスタデータベースのレプリケーション先となるレプリカデータベースとを備えるデータベースシステムにおいて、前記マスタデータベースのデータ更新とは非同期で前記レプリ
カデータベースのデータ更新を行うレプリケーション方法であって、
(a)前記複数のトランザクションの開始時刻を基準として、該複数のトランザクションに通番を付与するステップと、
(b)前記複数のトランザクションに対応する複数の更新ログを生成し、かつ、該複数の更新ログと前記(a)のステップにおいて前記複数のトランザクションに付与された通番とを対応付けるステップと、
(c)前記(b)のステップにおいて生成された前記複数の更新ログに基づいて、かつ、前記(b)のステップにおいて前記複数の更新ログに対応付けられた前記通番に従って、前記マスタデータベースのデータ更新とは非同期で前記レプリカデータベースのデータ更新を行うステップと、
(d)所定の条件が満たされた場合に、前記レプリカデータベースのデータ更新を停止するステップとを備える、レプリケーション方法。
(Appendix 9)
In a database system comprising a master database in which data is updated based on a plurality of transactions and a replica database as a replication destination of the master database, data in the replica database is updated asynchronously with data update in the master database A replication method,
(A) assigning serial numbers to the plurality of transactions on the basis of start times of the plurality of transactions;
(B) generating a plurality of update logs corresponding to the plurality of transactions, and associating the plurality of update logs with the serial numbers assigned to the plurality of transactions in the step (a);
(C) Data in the master database based on the plurality of update logs generated in the step (b) and according to the serial numbers associated with the plurality of update logs in the step (b) Updating the replica database data asynchronously with the update; and
(D) a replication method comprising a step of stopping data update of the replica database when a predetermined condition is satisfied.

(付記10)
前記(d)のステップは、前記非同期処理部の停止要求を受けた場合に、前記所定の条件が満たされたとして、前記非同期処理部による前記データ更新を停止させるための制御情報を生成し、
前記(a)のステップは、前記複数のトランザクションの開始時刻および前記制御情報の生成時刻を基準として、前記複数の更新ログおよび前記制御情報が時系列で並ぶように前記複数の更新ログと前記制御情報とに通番を付与し、
前記(c)のステップは、前記複数の更新ログと前記制御情報とに基づいて、かつ、前記複数の更新ログと前記制御情報とに付与された前記通番に従って、前記レプリカデータベースのデータ更新と、該データ更新の停止とを行う、付記9に記載のレプリケーション方法。
(Appendix 10)
The step (d) generates control information for stopping the data update by the asynchronous processing unit, assuming that the predetermined condition is satisfied when a request for stopping the asynchronous processing unit is received,
The step (a) includes the plurality of update logs and the control so that the plurality of update logs and the control information are arranged in time series with reference to a start time of the plurality of transactions and a generation time of the control information. Give a serial number to the information,
The step (c) includes updating the data in the replica database based on the plurality of update logs and the control information, and according to the serial numbers assigned to the plurality of update logs and the control information. The replication method according to appendix 9, wherein the data update is stopped.

(付記11)
前記非同期処理部に対して前記レプリカデータベースのデータ更新の再開を指示する非同期処理開始指示ステップをさらに備える、付記10に記載のレプリケーション方法。
(Appendix 11)
The replication method according to appendix 10, further comprising an asynchronous processing start instruction step for instructing the asynchronous processing unit to resume data update of the replica database.

(付記12)
前記(d)のステップは、バッチ処理の実行要求を受けた場合に、前記所定の条件が満たされたとして、前非同期処理部にバッチ処理を実行させるための制御情報を生成し、
前記(a)のステップは、前記複数のトランザクションの開始時刻および前記制御情報の生成時刻を基準として、前記複数の更新ログおよび前記制御情報が時系列で並ぶように前記複数の更新ログと前記制御情報とに通番を付与し、
前記(c)のステップは、前記複数の更新ログと前記制御情報とに基づいて、かつ、前記複数の更新ログと前記制御情報とに付与された前記通番に従って、前記レプリカデータベースのデータ更新と前記バッチ処理とを行う、付記11に記載のレプリケーション方法。
(Appendix 12)
The step (d) generates control information for causing the pre-asynchronous processing unit to execute batch processing, assuming that the predetermined condition is satisfied when a batch processing execution request is received,
The step (a) includes the plurality of update logs and the control so that the plurality of update logs and the control information are arranged in time series with reference to a start time of the plurality of transactions and a generation time of the control information. Give a serial number to the information,
The step (c) includes updating the data in the replica database based on the plurality of update logs and the control information, and according to the serial numbers assigned to the plurality of update logs and the control information. The replication method according to attachment 11, wherein batch processing is performed.

(付記13)
複数のトランザクションに基づいてデータ更新が行われるマスタデータベースと、前記マスタデータベースのレプリケーション先となるレプリカデータベースとを備えるデータベースシステムにおいて、コンピュータに、前記マスタデータベースのデータ更新とは非同期で前記レプリカデータベースのデータ更新を実行させるためのプログラムであって、
前記コンピュータに、
(a)前記複数のトランザクションの開始時刻を基準として、該複数のトランザクションに通番を付与するステップと、
(b)前記複数のトランザクションに対応する複数の更新ログを生成し、かつ、該複数の更新ログと前記(a)のステップにおいて前記複数のトランザクションに付与された通番
とを対応付けるステップと、
(c)前記(b)のステップにおいて生成された前記複数の更新ログに基づいて、かつ、前記(b)のステップにおいて前記複数の更新ログに対応付けられた前記通番に従って、前記マスタデータベースのデータ更新とは非同期で前記レプリカデータベースのデータ更新を行うステップと、
(d)所定の条件が満たされた場合に、前記レプリカデータベースのデータ更新を停止するステップとを実行させる、プログラム。
(Appendix 13)
In a database system comprising a master database in which data is updated based on a plurality of transactions, and a replica database that is a replication destination of the master database, the data in the replica database is asynchronous with the data update in the master database. A program for executing an update,
In the computer,
(A) assigning serial numbers to the plurality of transactions on the basis of start times of the plurality of transactions;
(B) generating a plurality of update logs corresponding to the plurality of transactions, and associating the plurality of update logs with the serial numbers assigned to the plurality of transactions in the step (a);
(C) Data in the master database based on the plurality of update logs generated in the step (b) and according to the serial numbers associated with the plurality of update logs in the step (b) Updating the replica database data asynchronously with the update; and
(D) A program that executes a step of stopping data update of the replica database when a predetermined condition is satisfied.

(付記14)
前記(d)のステップは、前記非同期処理部の停止要求を受けた場合に、前記所定の条件が満たされたとして、前記非同期処理部による前記データ更新を停止させるための制御情報を生成し、
前記(a)のステップは、前記複数のトランザクションの開始時刻および前記制御情報の生成時刻を基準として、前記複数の更新ログおよび前記制御情報が時系列で並ぶように前記複数の更新ログと前記制御情報とに通番を付与し、
前記(c)のステップは、前記複数の更新ログと前記制御情報とに基づいて、かつ、前記複数の更新ログと前記制御情報とに付与された前記通番に従って、前記レプリカデータベースのデータ更新と、該データ更新の停止とを行う、付記13に記載のプログラム。
(Appendix 14)
The step (d) generates control information for stopping the data update by the asynchronous processing unit, assuming that the predetermined condition is satisfied when a request for stopping the asynchronous processing unit is received,
The step (a) includes the plurality of update logs and the control so that the plurality of update logs and the control information are arranged in time series with reference to a start time of the plurality of transactions and a generation time of the control information. Give a serial number to the information,
The step (c) includes updating the data in the replica database based on the plurality of update logs and the control information, and according to the serial numbers assigned to the plurality of update logs and the control information. 14. The program according to appendix 13, which stops the data update.

(付記15)
前記非同期処理部に対して前記レプリカデータベースのデータ更新の再開を指示する非同期処理開始指示ステップをさらに備える、付記14に記載のプログラム。
(Appendix 15)
15. The program according to appendix 14, further comprising an asynchronous process start instruction step for instructing the asynchronous processor to resume data update of the replica database.

(付記16)
前記(d)のステップは、バッチ処理の実行要求を受けた場合に、前記所定の条件が満たされたとして、前非同期処理部にバッチ処理を実行させるための制御情報を生成し、
前記(a)のステップは、前記複数のトランザクションの開始時刻および前記制御情報の生成時刻を基準として、前記複数の更新ログおよび前記制御情報が時系列で並ぶように前記複数の更新ログと前記制御情報とに通番を付与し、
前記(c)のステップは、前記複数の更新ログと前記制御情報とに基づいて、かつ、前記複数の更新ログと前記制御情報とに付与された前記通番に従って、前記レプリカデータベースのデータ更新と前記バッチ処理とを行う、付記15に記載のプログラム。
(Appendix 16)
The step (d) generates control information for causing the pre-asynchronous processing unit to execute batch processing, assuming that the predetermined condition is satisfied when a batch processing execution request is received,
The step (a) includes the plurality of update logs and the control so that the plurality of update logs and the control information are arranged in time series with reference to a start time of the plurality of transactions and a generation time of the control information. Give a serial number to the information,
The step (c) includes updating the data in the replica database based on the plurality of update logs and the control information, and according to the serial numbers assigned to the plurality of update logs and the control information. The program according to appendix 15, which performs batch processing.

本発明は、例えば、勘定系システムのような、24時間稼働し、かつ定期的に集計処理が行われるオンラインシステムに好適に利用できる。   The present invention can be suitably used for, for example, an online system such as a billing system that operates for 24 hours and periodically performs aggregation processing.

10,10a データベースシステム
12 マスタDB
14 レプリカDB
16 通番採番部
18 更新ログ生成部
20 非同期処理部
22 制御部
24 通番管理部
26 処理データ格納部
28 非同期処理開始指示部
30,30a レプリケーション制御装置
32 統計データ取得部
40a,40b,40c 業務アプリケーション
50 非同期処理制御アプリケーション
110 コンピュータ
111 CPU
112 メインメモリ
113 記憶装置
114 入力インターフェイス
115 表示コントローラ
116 データリーダ/ライタ
117 通信インターフェイス
118 入力機器
119 ディスプレイ装置
120 記録媒体
121 バス
10,10a Database system 12 Master DB
14 Replica DB
16 serial number numbering unit 18 update log generation unit 20 asynchronous processing unit 22 control unit 24 serial number management unit 26 processing data storage unit 28 asynchronous processing start instruction unit 30, 30a replication control device 32 statistical data acquisition unit 40a, 40b, 40c business application 50 Asynchronous processing control application 110 Computer 111 CPU
112 Main Memory 113 Storage Device 114 Input Interface 115 Display Controller 116 Data Reader / Writer 117 Communication Interface 118 Input Device 119 Display Device 120 Recording Medium 121 Bus

Claims (7)

複数のトランザクションに基づいてデータ更新が行われるマスタデータベースと、
前記マスタデータベースのレプリケーション先となるレプリカデータベースと、
前記複数のトランザクションの開始時刻を基準として、該複数のトランザクションに通番を付与する通番採番部と、
前記複数のトランザクションに対応する複数の更新ログを生成し、かつ、該複数の更新ログと前記通番採番部によって前記複数のトランザクションに付与された通番とを対応付ける更新ログ生成部と、
前記更新ログ生成部によって生成された前記複数の更新ログに基づいて、かつ、前記更新ログ生成部によって前記複数の更新ログに対応付けられた前記通番に従って、前記マスタデータベースのデータ更新とは非同期で前記レプリカデータベースのデータ更新を行う非同期処理部と、
所定の条件が満たされた場合に、前記非同期処理部による前記レプリカデータベースのデータ更新を停止させる制御部とを備える、データベースシステム。
A master database that updates data based on multiple transactions;
A replica database as a replication destination of the master database;
With reference to the start times of the plurality of transactions, a serial number numbering unit that assigns serial numbers to the plurality of transactions,
An update log generation unit that generates a plurality of update logs corresponding to the plurality of transactions, and associates the plurality of update logs with the serial numbers assigned to the plurality of transactions by the serial numbering unit;
Based on the plurality of update logs generated by the update log generation unit and according to the serial numbers associated with the plurality of update logs by the update log generation unit, asynchronous with data update of the master database. An asynchronous processing unit for updating data in the replica database;
A database system comprising: a control unit that stops data update of the replica database by the asynchronous processing unit when a predetermined condition is satisfied.
前記制御部は、前記非同期処理部の停止要求を受けた場合に、前記所定の条件が満たされたとして、前記非同期処理部による前記データ更新を停止させるための制御情報を生成し、
前記通番採番部は、前記複数のトランザクションの開始時刻および前記制御情報の生成時刻を基準として、前記複数の更新ログおよび前記制御情報が時系列で並ぶように前記複数の更新ログと前記制御情報とに通番を付与し、
前記非同期処理部は、前記複数の更新ログと前記制御情報とに基づいて、かつ、前記複数の更新ログと前記制御情報とに付与された前記通番に従って、前記レプリカデータベースのデータ更新と、該データ更新の停止とを行う、請求項1に記載のデータベースシステム。
When the control unit receives a request to stop the asynchronous processing unit, the control unit generates control information for stopping the data update by the asynchronous processing unit, assuming that the predetermined condition is satisfied,
The serial number numbering unit includes the plurality of update logs and the control information so that the plurality of update logs and the control information are arranged in time series with reference to a start time of the plurality of transactions and a generation time of the control information. And give a serial number to
The asynchronous processing unit updates the data in the replica database based on the plurality of update logs and the control information, and according to the serial numbers assigned to the plurality of update logs and the control information, and the data The database system according to claim 1, wherein updating is stopped.
前記非同期処理部に対して前記レプリカデータベースのデータ更新の再開を指示する非同期処理開始指示部をさらに備える、請求項2に記載のデータベースシステム。   The database system according to claim 2, further comprising an asynchronous processing start instruction unit that instructs the asynchronous processing unit to resume data update of the replica database. 前記制御部は、バッチ処理の実行要求を受けた場合に、前記所定の条件が満たされたとして、前記非同期処理部にバッチ処理を実行させるための制御情報を生成し、
前記通番採番部は、前記複数のトランザクションの開始時刻および前記制御情報の生成時刻を基準として、前記複数の更新ログおよび前記制御情報が時系列で並ぶように前記複数の更新ログと前記制御情報とに通番を付与し、
前記非同期処理部は、前記複数の更新ログと前記制御情報とに基づいて、かつ、前記複数の更新ログと前記制御情報とに付与された前記通番に従って、前記レプリカデータベースのデータ更新と前記バッチ処理とを行う、請求項3に記載のデータベースシステム。
When the control unit receives a batch processing execution request, the control unit generates control information for causing the asynchronous processing unit to execute batch processing, assuming that the predetermined condition is satisfied,
The serial number numbering unit includes the plurality of update logs and the control information so that the plurality of update logs and the control information are arranged in time series with reference to a start time of the plurality of transactions and a generation time of the control information. And give a serial number to
The asynchronous processing unit is configured to update the data in the replica database and perform batch processing based on the plurality of update logs and the control information and according to the serial numbers assigned to the plurality of update logs and the control information. The database system according to claim 3, wherein:
複数のトランザクションに基づいてデータ更新が行われるマスタデータベースと、前記マスタデータベースのレプリケーション先となるレプリカデータベースとを備えるデータベースシステムにおいて、前記マスタデータベースのデータ更新とは非同期で前記レプリカデータベースのデータ更新を行うレプリケーション制御装置であって、
前記複数のトランザクションの開始時刻を基準として、該複数のトランザクションに通番を付与する通番採番部と、
前記複数のトランザクションに対応する複数の更新ログを生成し、かつ、該複数の更新ログと前記通番採番部によって前記複数のトランザクションに付与された通番とを対応付ける更新ログ生成部と、
前記更新ログ生成部によって生成された前記複数の更新ログに基づいて、かつ、前記更新ログ生成部によって前記複数の更新ログに対応付けられた前記通番に従って、前記マス
タデータベースのデータ更新とは非同期で前記レプリカデータベースのデータ更新を行う非同期処理部と、
所定の条件が満たされた場合に、前記非同期処理部による前記レプリカデータベースのデータ更新を停止させる制御部とを備える、レプリケーション制御装置。
In a database system comprising a master database in which data is updated based on a plurality of transactions and a replica database as a replication destination of the master database, data in the replica database is updated asynchronously with data update in the master database A replication control device,
With reference to the start times of the plurality of transactions, a serial number numbering unit that assigns serial numbers to the plurality of transactions,
An update log generation unit that generates a plurality of update logs corresponding to the plurality of transactions, and associates the plurality of update logs with the serial numbers assigned to the plurality of transactions by the serial numbering unit;
Based on the plurality of update logs generated by the update log generation unit and according to the serial numbers associated with the plurality of update logs by the update log generation unit, asynchronous with data update of the master database. An asynchronous processing unit for updating data in the replica database;
A replication control apparatus comprising: a control unit that stops data update of the replica database by the asynchronous processing unit when a predetermined condition is satisfied.
複数のトランザクションに基づいてデータ更新が行われるマスタデータベースと、前記マスタデータベースのレプリケーション先となるレプリカデータベースとを備えるデータベースシステムにおいて、前記マスタデータベースのデータ更新とは非同期で前記レプリカデータベースのデータ更新を行うレプリケーション方法であって、
(a)前記複数のトランザクションの開始時刻を基準として、該複数のトランザクションに通番を付与するステップと、
(b)前記複数のトランザクションに対応する複数の更新ログを生成し、かつ、該複数の更新ログと前記(a)のステップにおいて前記複数のトランザクションに付与された通番とを対応付けるステップと、
(c)前記(b)のステップにおいて生成された前記複数の更新ログに基づいて、かつ、前記(b)のステップにおいて前記複数の更新ログに対応付けられた前記通番に従って、前記マスタデータベースのデータ更新とは非同期で前記レプリカデータベースのデータ更新を行うステップと、
(d)所定の条件が満たされた場合に、前記レプリカデータベースのデータ更新を停止するステップとを備える、レプリケーション方法。
In a database system comprising a master database in which data is updated based on a plurality of transactions and a replica database as a replication destination of the master database, data in the replica database is updated asynchronously with data update in the master database A replication method,
(A) assigning serial numbers to the plurality of transactions on the basis of start times of the plurality of transactions;
(B) generating a plurality of update logs corresponding to the plurality of transactions, and associating the plurality of update logs with the serial numbers assigned to the plurality of transactions in the step (a);
(C) Data in the master database based on the plurality of update logs generated in the step (b) and according to the serial numbers associated with the plurality of update logs in the step (b) Updating the replica database data asynchronously with the update; and
(D) a replication method comprising a step of stopping data update of the replica database when a predetermined condition is satisfied.
複数のトランザクションに基づいてデータ更新が行われるマスタデータベースと、前記マスタデータベースのレプリケーション先となるレプリカデータベースとを備えるデータベースシステムにおいて、コンピュータに、前記マスタデータベースのデータ更新とは非同期で前記レプリカデータベースのデータ更新を実行させるためのプログラムであって、
前記コンピュータに、
(a)前記複数のトランザクションの開始時刻を基準として、該複数のトランザクションに通番を付与するステップと、
(b)前記複数のトランザクションに対応する複数の更新ログを生成し、かつ、該複数の更新ログと前記(a)のステップにおいて前記複数のトランザクションに付与された通番とを対応付けるステップと、
(c)前記(b)のステップにおいて生成された前記複数の更新ログに基づいて、かつ、前記(b)のステップにおいて前記複数の更新ログに対応付けられた前記通番に従って、前記マスタデータベースのデータ更新とは非同期で前記レプリカデータベースのデータ更新を行うステップと、
(d)所定の条件が満たされた場合に、前記レプリカデータベースのデータ更新を停止するステップとを実行させる、プログラム。
In a database system comprising a master database in which data is updated based on a plurality of transactions, and a replica database that is a replication destination of the master database, the data in the replica database is asynchronous with the data update in the master database. A program for executing an update,
In the computer,
(A) assigning serial numbers to the plurality of transactions on the basis of start times of the plurality of transactions;
(B) generating a plurality of update logs corresponding to the plurality of transactions, and associating the plurality of update logs with the serial numbers assigned to the plurality of transactions in the step (a);
(C) Data in the master database based on the plurality of update logs generated in the step (b) and according to the serial numbers associated with the plurality of update logs in the step (b) Updating the replica database data asynchronously with the update; and
(D) A program that executes a step of stopping data update of the replica database when a predetermined condition is satisfied.
JP2015194714A 2015-09-30 2015-09-30 Database system, replication control device, replication method, and program Active JP6657725B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2015194714A JP6657725B2 (en) 2015-09-30 2015-09-30 Database system, replication control device, replication method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2015194714A JP6657725B2 (en) 2015-09-30 2015-09-30 Database system, replication control device, replication method, and program

Publications (2)

Publication Number Publication Date
JP2017068668A true JP2017068668A (en) 2017-04-06
JP6657725B2 JP6657725B2 (en) 2020-03-04

Family

ID=58494820

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2015194714A Active JP6657725B2 (en) 2015-09-30 2015-09-30 Database system, replication control device, replication method, and program

Country Status (1)

Country Link
JP (1) JP6657725B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021168697A1 (en) * 2020-02-26 2021-09-02 深圳市欢太科技有限公司 Data synchronization method and apparatus, data storage system, and computer readable medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003006020A (en) * 2001-06-26 2003-01-10 Hitachi Ltd Duplicate data base access device and its accessing method
JP2006018796A (en) * 2004-06-03 2006-01-19 Hitachi Ltd Data processing method and device, and storage device and its processing program
JP2006092005A (en) * 2004-09-21 2006-04-06 Hitachi Ltd Data processing method, database system, and storage device
JP2015064850A (en) * 2013-09-26 2015-04-09 日本電気株式会社 Database monitoring device, database monitoring method, and computer program

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003006020A (en) * 2001-06-26 2003-01-10 Hitachi Ltd Duplicate data base access device and its accessing method
JP2006018796A (en) * 2004-06-03 2006-01-19 Hitachi Ltd Data processing method and device, and storage device and its processing program
JP2006092005A (en) * 2004-09-21 2006-04-06 Hitachi Ltd Data processing method, database system, and storage device
JP2015064850A (en) * 2013-09-26 2015-04-09 日本電気株式会社 Database monitoring device, database monitoring method, and computer program

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2021168697A1 (en) * 2020-02-26 2021-09-02 深圳市欢太科技有限公司 Data synchronization method and apparatus, data storage system, and computer readable medium

Also Published As

Publication number Publication date
JP6657725B2 (en) 2020-03-04

Similar Documents

Publication Publication Date Title
JP5156682B2 (en) Backup method in storage system
US8090917B2 (en) Managing storage and migration of backup data
JP5191062B2 (en) Storage control system, operation method related to storage control system, data carrier, and computer program
JP2009288836A (en) System failure recovery method of virtual server, and its system
JP5948933B2 (en) Job continuation management apparatus, job continuation management method, and job continuation management program
CN109558260B (en) Kubernetes fault elimination system, method, equipment and medium
JP2007323507A (en) Storage system and data processing method using the same
US20210089379A1 (en) Computer system
WO2017028375A1 (en) Version upgrading method and system
US11816000B2 (en) Virtual recovery of unstructured data
WO2020060620A1 (en) Storage segment server covered cache
JP2009110319A (en) Backup system, server device, backup method used for them, and its program
JPWO2012063339A1 (en) Computer system, job execution management method, and program
JPWO2019107232A1 (en) Data backup system, relay site storage, data backup method, and relay site storage control program
CN106339176B (en) Intermediate file processing method, client, server and system
JP2017167811A (en) Backup controller, backup controlling method, and program
JP6755680B2 (en) Data migration system and control method of data migration system
CN107783826B (en) Virtual machine migration method, device and system
JP6657725B2 (en) Database system, replication control device, replication method, and program
JP6229684B2 (en) Storage device, storage control method, and storage control program
JP6287308B2 (en) Replication control system, replication control method, and replication control program
JP2007293821A (en) Database system management method and database system
JP6251965B2 (en) Information system and database recovery method
US10409651B2 (en) Incremental workflow execution
JP2017004502A (en) Information system and update method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20180809

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20190528

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20190625

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20190730

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20200120

R150 Certificate of patent or registration of utility model

Ref document number: 6657725

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150