JP2017068668A - Database system, replication controller, replication method and program - Google Patents
Database system, replication controller, replication method and program Download PDFInfo
- 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
Links
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
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,
一方、特許文献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.
ところで、複数の業務処理を管理する際には、各業務処理の開始時刻を基準にして、業務データの統計処理を行う場合がある。このような統計処理を行うためには、図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.
(発明の概要)
本発明は、例えば、オンライン業務処理で使用するデータベース(マスタデータベース)へのデータ更新を、バックアップ用のレプリカデータベースにレプリケーションする際に利用することができる。具体的には、本発明の一例では、各業務の業務データのマスタデータベースへの更新順ではなく、各業務のトランザクション処理単位で決定される通番順に、レプリカデータベースへのレプリケーション処理が実行される。これにより、レプリカデータベースから、業務処理の開始時刻を基準とした静止点を取得することができる。また、本発明の一例では、業務アプリケーションから、レプリケーション処理を停止させることができる。これにより、ユーザが所望する任意のタイミングでレプリケーション処理を停止することができる。その結果、レプリカデータベースから、ユーザが所望する任意の静止点を取得することができる。
(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
詳細は後述するが、データベースシステム10では、業務処理(トランザクション)の開始時刻を基準としてレプリケーション処理を実行することができる。これにより、データベースシステム10は、マスタDB12において行われるデータ更新とは非同期で、該データ更新をレプリカDB14に反映させることができる。また、データベースシステム10は、所定の条件が満たされた場合(例えば、レプリケーション処理の停止要求を受けた場合)に、レプリケーション処理を停止する。したがって、例えば、ユーザがデータベースシステム10に対して任意のタイミングでレプリケーション処理の停止要求を行うことにより、ユーザが所望する任意の静止点が作成される。以下、データベースシステム10の各構成要素について説明する。
Although details will be described later, the
マスタDB12は、業務データを格納している。本実施形態では、例えば、複数(本実施形態では3つ)の業務アプリケーション40a,40b,40cによって、マスタDB12の業務データが参照および更新される。業務アプリケーション40a,40b,40cは、例えばユーザアプリケーションであり、ユーザが実施した業務イベントごとのトランザクションを実行する。本実施形態では、業務アプリケーション40a,40b,40cは、オンラインで発生する業務イベントのイベントメッセージを受けて、トランザクションを実行する。業務アプリケーション40a,40b,40cは、並列に動作する。本実施形態では、業務アプリケーション40a,40b,40cは、互いに異なるレコードを更新する。
The
本実施形態では、業務アプリケーション40a,40b,40cは、例えば、トランザクションを実行する際に、通番採番部16に対して採番要求を行う。また、業務アプリケーション40a,40b,40cはそれぞれ、各トランザクションによって実行された全てのデータ更新の内容を、通番採番部16によって付与されるトランザクションごとの通番とともに、更新ログ生成部18に送信する。
In the present embodiment, the
レプリカDB14は、マスタDB12のバックアップ用のデータベースであり、かつ、データベースの静止点を作成するためのデータベースでもある。
The
通番採番部16は、業務アプリケーション40a,40b,40cからの採番要求を受けて、複数のトランザクションに通番を付与する。また、通番採番部16は、トランザクションに付与した通番を、そのトランザクションを実行するいずれかの業務アプリケーション40a,40b,40cに通知する。本実施形態では、通番採番部16は、各トランザクションの開始時刻を基準として、複数のトランザクションに通番を付与する。例えば、図12に示すように業務A、業務B、および業務Cの順にトランザクションが開始される場合、通番採番部16は、業務Aのトランザクション、業務Bのトランザクション、および業務Cのトランザクションの順に通番を付与する。
The serial
また、本実施の形態において「トランザクションの開始時刻」には、データベース領域におけるトランザクションの開始時刻、更には、データベース領域におけるトランザクションの開始が示唆された時刻も含まれる。例えば、業務アプリケーションが処理の途中で一旦、要求元に「受付しました」という旨を返信し、これによって、トランザクションの受付が確定したとする。この場合は、データベースにおいて実際の処理が実行される前、即ち、受付の確定時が、「トランザクションの開始時刻」となる。 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
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
図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
図1を参照して、制御部22は、所定の条件が満たされた場合に、非同期処理部20によるレプリカDB14のデータ更新を停止させる。本実施形態では、制御部22は、例えば、非同期処理制御アプリケーション50から停止要求を受けた場合に、上記所定の条件が満たされたとして、非同期処理部20を制御して、レプリカDB14のデータ更新を停止する。
With reference to FIG. 1, the
なお、非同期処理制御アプリケーション50は、非同期処理部20の処理を制御するための業務アプリケーションである。非同期処理制御アプリケーション50は、不定期または定期的に発生する停止イベントのイベントメッセージを受け取った場合に、制御部22に対して停止要求を行う。例えば、非同期処理制御アプリケーション50は、システム管理者が運用端末を用いて実施した停止イベントのイベントメッセージを受けて、制御部22に対して停止要求を行う。また、例えば、非同期処理制御アプリケーション50は、所定の時刻(例えば、午前0時)に発生するようにスケジュールされた停止イベントのイベントメッセージを受けて、制御部22に対して停止要求を行う。なお、上記停止イベントには、レプリケーション処理を停止させることのみを目的とするイベントに加えて、非同期処理部20にレプリケーション処理以外の処理(例えば、後述の変形例におけるバッチ処理)を実行させることを目的とするイベントも含まれる。したがって、上記停止要求には、非同期処理部20によるレプリケーション処理を停止させることのみを目的とする要求に加えて、非同期処理部20にレプリケーション処理以外の処理を実行させることを目的とする要求(例えば、後述の変形例におけるバッチ処理の実行要求)も含まれる。
The asynchronous
以上のように、本実施形態にかかるデータベースシステム10では、業務処理(トランザクション)の開始時刻を基準として、マスタDB12において行われるデータ更新がレプリカDB14に反映される。また、データベースシステム10は、制御部22に対して停止要求が行われた場合に、レプリカDB14へのレプリケーション処理を停止する。これにより、複数のトランザクションによるデータベースのデータ更新の時期について順序制御を行うことなく、トランザクションの開始時刻を基準とした静止点を作成することができる。例えば、図12に示すように業務A、業務B、および業務Cの順に処理が開始され、さらに、業務Aの処理開始後かつ業務Bの処理開始前に、制御部22に対して停止要求が行われた場合、業務Aのデータ更新のみがレプリカDB14に反映される。
As described above, in the
また、本実施形態にかかるデータベースシステム10によれば、マスタDB12に対する処理を停止することなく、レプリカDB14においてデータベースの静止点を作成することができる。したがって、スループットを低下させることなく、業務処理の開始時刻を基準にしてデータベースの静止点を作成することが可能になる。また、データベースシステム10によれば、例えば、データベースの静止点を作成したい任意のタイミングでユーザ等がオンラインで停止イベントを発生させることによって、ユーザ等が所望する任意の静止点を作成することができる。
Further, according to the
次に、本実施形態に係るデータベースシステム10の構成について具体的に説明する。図2は、データベースシステム10の構成を具体的に示すブロック図である。
Next, the configuration of the
図2を参照して、データベースシステム10は、上述のマスタDB12、上述のレプリカDB14およびレプリケーション制御装置30を備える。レプリケーション制御装置30は、上述の通番採番部16、更新ログ生成部18、非同期処理部20および制御部22に加えてさらに、通番管理部24、処理データ格納部26、および非同期処理開始指示部28を備える。なお、データベースシステム10の各構成要素、業務アプリケーション40a,40b,40cおよび非同期処理制御アプリケーション50に関する説明のうち、図1を用いて説明した内容については説明を省略する。
Referring to FIG. 2, the
本実施形態では、非同期処理制御アプリケーション50は、停止イベントのイベントメッセージを受け取った場合に、通番採番部16に対して採番要求を行う。通番採番部16は、非同期処理制御アプリケーション50からの採番要求を受けて、停止イベントに通番を付与する。また、通番採番部16は、停止イベントに付与した通番を、非同期処理制御アプリケーション50に通知する。非同期処理制御アプリケーション50は、通番採番部16によって付与された通番を、停止要求とともに制御部22へ送信する。
In this embodiment, the asynchronous
通番管理部24は、通番管理表を記憶する。図3は、通番管理部24に記憶される通番管理表の一例を示す図である。図3に示すように、通番管理表は、採番済通番と、処理済通番とを管理する。詳細は後述するが、採番済通番は、通番採番部16がこれまでに採番した通番のうち、最も新しい通番を示している。採番済通番は、通番採番部16によって更新される。処理済通番は、非同期処理部20によって実行された処理のうち、最も新しい処理に対応する通番を示している。処理済通番は、非同期処理部20によって更新される。
The serial
図2を参照して、本実施形態では、通番採番部16は、通番管理部24に記憶された通番管理表を参照して、上述の停止イベントおよびトランザクションに対して通番を付与する。具体的には、通番採番部16は、上記通番表の採番済通番を取得して、取得した通番に1を足した番号を、上述の停止イベントまたはトランザクションの通番として採番する。その後、採番済通番を、採番した通番に更新する。
With reference to FIG. 2, in this embodiment, the serial
更新ログ生成部18は、更新ログを、該更新ログに対応付けられた通番とともに、処理データ格納部26の後述する処理データ格納表に登録する。また、制御部22は、非同期処理制御アプリケーション50から送信されてきた停止要求に基づいて、非同期処理部20の処理を停止するための制御情報を生成する。さらに、制御部22は、生成した制御情報を、非同期処理制御アプリケーション50から送信されてきた通番とともに、処理データ格納部26の処理データ格納表に登録する。本実施形態では、上記の更新ログおよび制御情報は、制御部22が実行すべき処理内容(非同期処理データ)として、処理データ格納部26の処理データ格納表に登録される。
The update
処理データ格納部26は、処理データ格納表を記憶する。処理データ格納表には、非同
期処理部20が実行すべき処理の内容が登録される。図4は、処理データ格納部26に記憶される処理データ格納表の一例を示す図である。図4に示すように、処理データ格納表には、更新ログ生成部18および制御部22によって、通番、種別、および処理内容が登録される。種別は、処理内容に登録されているデータの種別を示す。種別が「DB更新」は、更新ログ生成部18が登録した処理内容であることを示し、種別が「制御」は、制御部22が登録した処理内容であることを示す。
The processing
なお、業務アプリケーション40a,40b,40cが、マスタDB12に対するデータ更新をロールバックした場合、業務アプリケーション40a,40b,40cは、更新ログ生成部18に、処理なしを示すデータを送信する。この場合、更新ログ生成部18は、図4に示すように、処理内容として、「処理なし」を示すデータを処理データ格納表に登録する。
When the
図2を参照して、非同期処理部20は、通番管理部24に記憶された通番管理表(図3参照)を参照し、実行していない処理が存在するか否かを確認する。非同期処理部20は、実行していない処理が存在すれば、該実行していない処理のデータを、処理データ格納部26に記憶された処理データ格納表(図4参照)から取得する。その後、非同期処理部20は、処理データ格納部26から取得したデータに基づいて、処理を実行する。
With reference to FIG. 2, the
例えば、通番管理表が図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
非同期処理開始指示部28は、運用端末60から開始要求を受けた場合に、非同期処理部20に、処理の開始を指示する。例えば、上述のようにレプリカDB14への処理が停止されている状態において、非同期処理開始指示部28が開始指示を送信すると、非同期処理部20は、通番に従って処理を再開する。なお、非同期処理開始指示部28からの開始指示には、例えば、レプリケーション処理再開のための"通常開始"の指示と、データベースの復旧処理のための"復旧開始"の指示とがある。
When receiving a start request from the
運用端末60は、例えば、データベースシステム10のユーザおよび管理者によって操作される端末である。データベースシステム10のユーザおよび管理者は、上述のように、運用端末60から非同期処理開始指示部28に対して開始要求を行うことができる。また、ユーザおよび管理者は、運用端末60を介して、レプリカDB14からデータベースの静止点を取得することができる。なお、詳細な説明は省略するが、上記停止イベントのイベントメッセージを、運用端末60から非同期処理制御アプリケーション50へ送信してもよい。
The
[システム動作]
次に、本実施形態にかかるデータベースシステム10の動作について説明する。なお、本実施形態では、データベースシステム10を動作させることによって、レプリケーション方法が実施される。よって、本実施形態におけるレプリケーション方法の説明は、以下のデータベースシステム10の動作説明に代える。なお、以下の説明においては、図2〜図4を適宜参照する。
[System operation]
Next, the operation of the
図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
次に、非同期処理部20は、採番済通番と処理済通番とが一致しているか否かを判断する(ステップS2)。採番済通番と処理済通番とが一致している場合、非同期処理部20が実行すべき処理が無いことを意味する。したがって、非同期処理部20は、一定時間待機した後、ステップS1の処理を再度実行する。
Next, the
ステップS2において、採番済通番と処理済通番とが一致していない場合、非同期処理部20は、処理データ格納部26に記憶された処理データ格納表(図4参照)を参照して、処理済通番に1を足した通番のデータが登録されているか否かを判断する(ステップS3)。
If the numbered serial number does not match the processed serial number in step S2, the
ステップS3においてデータが登録されていない場合、非同期処理部20は、一定時間待機した後、再度ステップS3の処理を行う。なお、ステップS3においてデータが登録されていない場合は、業務アプリケーション40a,40b,40cが処理中で、その処理の更新ログが、処理データ格納表にまだ登録されていない状態であることを意味する。
If no data is registered in step S3, the
ステップS3においてデータが登録されている場合、非同期処理部20は、処理データ格納表から処理内容を示すデータを取得する(ステップS4)。次に、非同期処理部20は、取得したデータに基づいて、処理内容の種別が「DB更新」か否かを判別する(ステップS5)。
When data is registered in step S3, the
ステップ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
次に、非同期処理部20は、通番管理部24に記憶された通番管理表(図3参照)の処理済通番に1を足して、該処理済通番を、ステップS6において実行した処理内容の通番に更新する(ステップS7)。その後、データベースシステム10は、ステップS1の処理に戻る。
Next, the
ステップ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,
次に、非同期処理部20は、非同期処理開始指示部28から上述の「通常開始」の指示があったか否かを判別する(ステップS9)。非同期処理開始指示部28から「通常開始」の指示が無い場合、非同期処理部20は、「通常開始」の指示があるまで待機する。これにより、非同期処理部20による非同期処理が停止される。すなわち、レプリカDB14のデータ更新が停止される。
Next, the
ステップS9において「通常開始」の指示があった場合、データベースシステム10は、ステップS1に戻る。
If there is an instruction of “normal start” in step S9, the
以上のように、データベースシステム10では、非同期処理部20からレプリカDB14へのデータ更新を停止することによって、レプリカDB14からデータベースの静止点を取得することができる。ユーザおよびシステム管理者は、運用端末60からレプリカDB14を参照することによって、上記静止点での統計処理等を行うことができる。また、非同期処理部20による処理が停止している間でも、業務アプリケーション40a,40b,40cの処理は継続させることができる。また、更新ログは、処理データ格納部26の処理データ格納表に蓄積される。静止点での処理(統計処理等)が完了すれば、運用端末60から「通常開始」の要求を非同期処理開始指示部28に送信することで、非同期処理開始指示部28から非同期処理部20へ開始指示が送信される。これにより、非同期処理部20は処理を再開する。
As described above, in the
ここで、処理時間の異なる複数の業務が並列で実行され、業務開始順とデータベース更新順とが異なる場合を例に挙げて、データベースシステム10の効果を説明する。
Here, the effect of the
図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
業務アプリケーション40aは、1月1日に業務処理を開始し、1月2日にマスタDB12のデータ更新を完了する。業務アプリケーション40bおよび業務アプリケーション40cは、1月2日に業務処理を開始する。この例では、1月1日中に処理を開始した業務アプリケーション40aの全ての更新が反映されたデータベースの静止点を取得することを考える。そのため、非同期処理制御アプリケーション50は、日付が1月2日に変わったタイミングで処理を開始する。
The
業務アプリケーション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
この例では、非同期処理部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
次に、マスタDB12に障害が発生した場合の、システム復旧までの動作を説明する。
マスタDB12に障害が発生すると、マスタDB12を更新する全ての業務アプリケーション40a,40b,40cの処理が停止される。この場合、例えば、システム管理者は、運用端末60から非同期処理開始指示部28へ「復旧開始」の開始要求を行う。これにより、非同期処理開始指示部28は、非同期処理部20に「復旧開始」の開始指示を送信する。
Next, operations up to system recovery when a failure occurs in the
When a failure occurs in the
非同期処理部20は、「復旧開始」の開始指示を受けると、後述する処理フロー(図8)に従って、処理データ格納部26の処理データ格納表に登録された全ての更新ログをレプリカDB14へ反映する。レプリカDB14への更新ログの反映が完了することにより、レプリカDB14において、マスタDB12の障害発生直前のデータ状態が復旧される。次に、データベースシステム10からマスタDB12を切り離して、該マスタDB12の代わりにレプリカDB14を用いる。その後、業務アプリケーション40a,40b,40cによるレプリカDB14への処理を再開させる。これにより、レプリカDB14を新たなマスタDBとして利用して、業務を復旧させることができる。以下、フロー図を参照しつつ、データベースシステム10の復旧動作について具体的に説明する。
When the
図8は、データベースシステム10の復旧動作の一例を示すフロー図である。図8を参照して、非同期処理部20が非同期処理開始指示部28から「復旧開始」の指示を受けると、通番採番部16は、通番管理部24に記憶された通番管理表(図3参照)から、採番済通番と処理済通番とを取得する(ステップA1)。
FIG. 8 is a flowchart showing an example of the recovery operation of the
次に、非同期処理部20は、採番済通番と処理済通番とが一致しているか否かを判断する(ステップA2)。採番済通番と処理済通番とが一致している場合、反映すべき全ての更新ログがレプリカDB14へ反映されているため、復旧処理を終了する。
Next, the
ステップA2において、採番済通番と処理済通番とが一致していない場合、非同期処理部20は、処理データ格納部26に記憶された処理データ格納表(図4参照)を参照して、処理済通番に1を足した通番に対応するデータが登録されているか否かを判断する(ステップA3)。
In step A2, if the numbered serial number and the processed serial number do not match, the
ステップA3においてデータが登録されていない場合、非同期処理部20は、後述するステップA7の処理に進み、処理済通番を更新した後、ステップA1に戻る。なお、ステップA3において処理内容が登録されていない場合は、業務アプリケーション40a,40b,40cの処理(トランザクション)に対して通番が付与されたが、その処理によるマスタDB12のデータ更新が完了していないことを意味している。復旧動作が行われている場合には、マスタDB12に障害が発生しているので、上記通番に対応する処理によって、マスタDB12のデータ更新が行われることはない。したがって、上記通番に対応する更新ログは、レプリカDB14へ反映する必要はない。そのため、後述のステップA4〜A6の処理をスキップすることができる。
If no data is registered in step A3, the
ステップA3においてデータが登録されている場合、非同期処理部20は、処理データ格納表から処理内容を示すデータを取得する(ステップA4)。次に、非同期処理部20は、取得したデータに基づいて、処理内容の種別が「DB更新」か否かを判別する(ステップA5)。種別が「DB更新」ではない場合、すなわち、種別が「制御」の場合、復旧処理とは関係がない処理内容であることを意味する。したがって、非同期処理部20は、後述するステップA7の処理に進み、処理済通番を更新した後、ステップA1に戻る。
When the data is registered in step A3, the
ステップA5において処理内容の種別が「DB更新」の場合、非同期処理部20は、処理内容に従ってレプリカDB14のデータ更新を行う(ステップA6)。これにより、レプリカDB14のデータの状態を、障害発生前のマスタDB12のデータの状態にするこ
とができる。
When the type of processing content is “DB update” in step A5, the
次に、非同期処理部20は、通番管理部24に記憶された通番管理表の処理済通番に1を足して、該処理済通番を、ステップA6において実行した処理内容の通番に更新する(ステップA7)。その後、データベースシステム10は、ステップA1の処理に戻る。
Next, the
(変形例)
上述の実施形態では、業務アプリケーション40a,40b,40cが、互いに異なるレコードを更新する場合について説明した。仮に、マスタDB12内の同一のレコードを更新する複数の業務アプリケーションが並列に動作する場合には、通番を採番した順に、マスタDB12のデータ更新を行うことが好ましい。例えば、連番を採番した順にマスタDB12のデータ更新が行われるように、複数の業務アプリケーションのデータ更新の時期について順序制御を行うことが好ましい。これにより、レプリカDB14におけるデータ更新の順番がマスタDB12におけるデータ更新の順番に対して逆転することを防止できる。その結果、レコードの状態が、マスタDB12とレプリカDB14とで一致しなくなることを防止できる。
(Modification)
In the above-described embodiment, the case where the
上述の実施形態では、データベースの静止点が取得可能な状態である間、システム管理者等が、レプリカ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
図9は、データベースシステムの変形例を示す図である。図9に示すデータベースシステム10aは、例えば、バッチ処理によって日付単位で業務データの統計処理を行い、統計データを作成するような場合に好適に利用できる。なお、統計処理は一例であり、データベースの静止点で実行したい任意のバッチ処理に対して、データベースシステム10aを好適に利用できる。
FIG. 9 is a diagram showing a modification of the database system. The
図9を参照して、データベースシステム10aが上述のデータベースシステム10と異なるのは、レプリケーション制御装置30の代わりにレプリケーション制御装置30aを有している点である。また、レプリケーション制御装置30aが上述のレプリケーション制御装置30と異なるのは、統計データ取得部32をさらに備えている点である。
Referring to FIG. 9, the
データベースシステム10aでは、例えば、非同期処理制御アプリケーション50は、制御部22に対してバッチ処理の実行要求を行う。制御部22は、バッチ処理の実行要求を受けると、統計データ取得部32によるバッチ処理を実行させるための制御情報を、通番採番部16によって付与された通番とともに、処理データ格納部26の処理データ格納表に登録する。図10は、データベースシステム10aの制御部22によって処理データ格納表に登録される処理内容の一例を示す図である。図10の例においては、通番31の処理内容(非同期処理データ)が、制御部22によって登録されたデータである。
In the
非同期処理部20は、例えば、図10に示す処理データ格納表から通番31のデータを取得する。通番31のデータは、種別が「制御」であり、処理内容が「統計データ取得部実行」であるので、非同期処理部20は、統計データ取得部32に対して、処理開始の指示を行う。統計データ取得部32は、非同期処理部20からの開始指示に従って、静止点となっているレプリカDB14を参照し、統計データを作成する。
For example, the
統計データ取得部32は、統計データの作成後、処理の完了を非同期処理部20に通知する。非同期処理部20は、統計データ取得部32から完了通知を受け取ると、通番管理部24に記憶された通番管理表の処理済通番を更新し、次の通番(図10の例では、通番32)の処理を行う。これにより、統計データ取得部32が動作している間は、レプリカDB14は更新されない。したがって、データベースシステム10aによれば、データベースの静止点でバッチ処理が可能である。また、データベースシステム10aによれば、バッチ処理が完了した後、速やかにレプリカDB14へのレプリケーション処理を再開することができる。
The statistical
[プログラム]
本発明の実施の形態におけるプログラムは、コンピュータに、図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
また、本実施の形態では、マスタDB12、レプリカDB14、通番管理部24、および処理データ格納部26は、コンピュータに備えられたハードディスク等の記憶装置に、これらを構成するデータファイルを格納することによって、又はこのデータファイルが格納された記録媒体をコンピュータと接続された読取装置に搭載することによって実現されている。
In the present embodiment, the
[物理構成]
ここで、本実施の形態におけるプログラムを実行することによって、レプリケーション制御装置30,30aを実現するコンピュータについて図11を用いて説明する。図11は、本発明の実施の形態におけるレプリケーション制御装置30,30aを実現するコンピュータの一例を示すブロック図である。
[Physical configuration]
Here, a computer that realizes the
図11に示すように、コンピュータ110は、CPU111と、メインメモリ112と、記憶装置113と、入力インターフェイス114と、表示コントローラ115と、データリーダ/ライタ116と、通信インターフェイス117とを備える。これらの各部は、バス121を介して、互いにデータ通信可能に接続される。
As shown in FIG. 11, the
CPU111は、記憶装置113に格納された、本実施の形態におけるプログラム(コード)をメインメモリ112に展開し、これらを所定順序で実行することにより、各種の演算を実施する。メインメモリ112は、典型的には、DRAM(Dynamic Random Access Memory)等の揮発性の記憶装置である。また、本実施の形態におけるプログラムは、コンピュータ読み取り可能な記録媒体120に格納された状態で提供される。なお、本実施の形態におけるプログラムは、通信インターフェイス117を介して接続されたインターネット上で流通するものであっても良い。
The
また、記憶装置113の具体例としては、ハードディスクドライブの他、フラッシュメモリ等の半導体記憶装置が挙げられる。入力インターフェイス114は、CPU111と、キーボード及びマウスといった入力機器118との間のデータ伝送を仲介する。表示コントローラ115は、ディスプレイ装置119と接続され、ディスプレイ装置119での表示を制御する。
Specific examples of the
データリーダ/ライタ116は、CPU111と記録媒体120との間のデータ伝送を
仲介し、記録媒体120からのプログラムの読み出し、及びコンピュータ110における処理結果の記録媒体120への書き込みを実行する。通信インターフェイス117は、CPU111と、他のコンピュータとの間のデータ伝送を仲介する。
The data reader /
また、記録媒体120の具体例としては、CF(Compact Flash(登録商標))及びSD(Secure Digital)等の汎用的な半導体記憶デバイス、フレキシブルディスク(Flexible Disk)等の磁気記憶媒体、又はCD−ROM(Compact Disk Read Only Memory)などの光学記憶媒体が挙げられる。
Specific examples of the
上述した実施の形態の一部又は全部は、以下に記載する(付記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
(付記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
(付記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
(付記11)
前記非同期処理部に対して前記レプリカデータベースのデータ更新の再開を指示する非同期処理開始指示ステップをさらに備える、付記10に記載のレプリケーション方法。
(Appendix 11)
The replication method according to
(付記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
(付記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,
14 Replica DB
16 serial
112
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.
前記通番採番部は、前記複数のトランザクションの開始時刻および前記制御情報の生成時刻を基準として、前記複数の更新ログおよび前記制御情報が時系列で並ぶように前記複数の更新ログと前記制御情報とに通番を付与し、
前記非同期処理部は、前記複数の更新ログと前記制御情報とに基づいて、かつ、前記複数の更新ログと前記制御情報とに付与された前記通番に従って、前記レプリカデータベースのデータ更新と前記バッチ処理とを行う、請求項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.
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)
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)
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 |
-
2015
- 2015-09-30 JP JP2015194714A patent/JP6657725B2/en active Active
Patent Citations (4)
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)
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 |