JP6089985B2 - Online backup control system and program - Google Patents

Online backup control system and program Download PDF

Info

Publication number
JP6089985B2
JP6089985B2 JP2013123373A JP2013123373A JP6089985B2 JP 6089985 B2 JP6089985 B2 JP 6089985B2 JP 2013123373 A JP2013123373 A JP 2013123373A JP 2013123373 A JP2013123373 A JP 2013123373A JP 6089985 B2 JP6089985 B2 JP 6089985B2
Authority
JP
Japan
Prior art keywords
database
update
state
instruction
application
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2013123373A
Other languages
Japanese (ja)
Other versions
JP2014241059A (en
Inventor
徹 泉谷
徹 泉谷
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Fujifilm Business Innovation Corp
Original Assignee
Fuji Xerox Co Ltd
Fujifilm Business Innovation 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 Fuji Xerox Co Ltd, Fujifilm Business Innovation Corp filed Critical Fuji Xerox Co Ltd
Priority to JP2013123373A priority Critical patent/JP6089985B2/en
Publication of JP2014241059A publication Critical patent/JP2014241059A/en
Application granted granted Critical
Publication of JP6089985B2 publication Critical patent/JP6089985B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Description

本発明は、オンラインバックアップ制御システム及びプログラムに関する。   The present invention relates to an online backup control system and program.

可用性向上(24時間365日対応など)の実現などを目的として、データベースを起動した状態のままバックアップを取る機能(オンラインバックアップ機能と呼ばれる)を備えたデータベースが存在する。   There is a database having a function of taking a backup while the database is activated (called an online backup function) for the purpose of improving availability (for example, 24 hours 365 days).

このデータベースが有するオンラインバックアップ機能では、文書管理システム等のアプリケーションがデータベースに対して行う更新処理を確定するタイミングと、データベース側で行われるオンラインバックアップ処理のタイミングを完全に同期させることは保証されないため、バックアップデータがアプリケーションのデータとしては不正(想定外)の状態になる可能性がある。   In the online backup function that this database has, it is not guaranteed that the timing of the update processing performed on the database by the application such as the document management system is completely synchronized with the timing of the online backup processing performed on the database side. There is a possibility that the backup data is illegal (unexpected) as application data.

この問題に対する解決策の一例として、特許文献1に開示された技術では、オンラインバックアップを実施する際に更新内容を更新リストに記録している。そして、リストア時に、バックアップデータと記録しておいた更新内容を比較し、バックアップデータに対して、更新してしまった内容を元に戻すための更新処理を実行したり、逆にバックアップデータに対して足りない更新処理を行ったりすることで、文書管理システムとして整合性のとれたデータに修正する。   As an example of a solution to this problem, in the technique disclosed in Patent Document 1, update contents are recorded in an update list when online backup is performed. Then, at the time of restoration, the backup data is compared with the recorded update contents, and update processing is performed to restore the updated contents to the backup data. By performing inadequate update processing, the document management system corrects the data to be consistent.

特開2012−053660号公報JP 2012-053660 A

本発明は、複数のアプリケーションがデータベースに対して更新を行う場合において、データベースを、それら複数のアプリケーションのいずれからみても整合性のとれた状態で、オンラインバックアップできるようにすることを目的とする。   It is an object of the present invention to enable online backup of a database in a state in which the database is consistent when viewed from any of the plurality of applications when a plurality of applications update the database.

請求項1に係る発明は、複数のアプリケーションの各々の状態を記憶する状態記憶手段と、前記複数のアプリケーションのうちの少なくとも1つからデータベースの更新指示を受け取り、受け取った前記更新指示に応じて前記データベースを更新するか否かを制御する少なくとも1つの更新制御手段と、前記データベースのオンラインバックアップの開始条件が満たされた場合、前記状態記憶手段に記憶された前記複数のアプリケーションの状態をすべてあらかじめ定められた第1の状態とすると共に、前記状態記憶手段に記憶された前記複数のアプリケーションの状態がすべてあらかじめ定められた第2の状態となったことを検知すると、前記データベースのオンラインバックアップを開始するための制御を行うオンラインバックアップ制御手段と、を有し、前記更新制御手段は、受け取った前記更新指示を発したアプリケーションの状態が前記第1の状態である場合、当該更新指示に対応するセッションにおける当該アプリケーションからの他の更新指示に応じて前記データベースの更新を既に行っており且つ当該セッションについての更新確定指示を当該アプリケーションからまだ受け取っていなければ、前記更新指示に応じて前記データベースを更新し、受け取った前記更新指示に対応するセッションについての更新確定指示を当該アプリケーションから既に受け取っているか又は当該更新指示の前に当該セッションにおける他の更新指示に応じて前記データベースの更新を一度も行っていなければ、当該更新指示に応じた前記データベースの更新を少なくとも前記オンラインバックアップが完了するまでは取りやめると共に、前記第1の状態にある前記アプリケーションが実行しているすべてのセッションについて前記更新指示に応じた前記データベースの更新を取りやめた状態となると、前記状態記憶手段に記憶された当該アプリケーションの状態を前記第2の状態に変更する、ことを特徴とするオンラインバックアップ制御システムである。   The invention according to claim 1 is a status storage unit that stores the status of each of a plurality of applications, and receives a database update instruction from at least one of the plurality of applications, and receives the update instruction according to the received update instruction. When at least one update control means for controlling whether or not to update the database and the online backup start condition of the database are satisfied, the states of the plurality of applications stored in the state storage means are all determined in advance. When it is detected that all the states of the plurality of applications stored in the state storage unit have reached a predetermined second state, online backup of the database is started. Online backup system to control And when the status of the application that issued the received update instruction is the first state, the update control means is another update instruction from the application in the session corresponding to the update instruction. If the database has already been updated in response to the update and the update confirmation instruction for the session has not been received from the application, the database is updated in response to the update instruction, and the received update instruction is handled. If the update confirmation instruction for the session has already been received from the application or the database has not been updated in response to another update instruction in the session before the update instruction, At least the online update of the database Until the backup is completed, and when the update of the database according to the update instruction is canceled for all sessions executed by the application in the first state, the state storage means An on-line backup control system characterized in that the stored state of the application is changed to the second state.

請求項2に係る発明は、前記更新制御手段は、受け取った前記更新指示に対応するセッションについての更新確定指示を当該アプリケーションから既に受け取っているか又は当該更新指示の前に当該セッションにおける他の更新指示に応じて前記データベースの更新を一度も行っていなければ、当該更新指示を待機させると共に、前記オンラインバックアップが完了すると、待機させていた前記更新指示に応じて前記データベースの更新が行われるようにする、ことを特徴とする請求項1に記載のオンラインバックアップ制御システムである。   In the invention according to claim 2, the update control means has already received an update confirmation instruction for the session corresponding to the received update instruction from the application or another update instruction in the session before the update instruction. If the database has never been updated in response to the request, the update instruction is made to wait, and when the online backup is completed, the database is updated in accordance with the update instruction that has been kept on standby. The online backup control system according to claim 1.

請求項3に係る発明は、コンピュータを、複数のアプリケーションの各々の状態を記憶する状態記憶手段、前記複数のアプリケーションのうちの少なくとも1つからデータベースの更新指示を受け取り、受け取った前記更新指示に応じて前記データベースを更新するか否かを制御する少なくとも1つの更新制御手段、前記データベースのオンラインバックアップの開始条件が満たされた場合、前記状態記憶手段に記憶された前記複数のアプリケーションの状態をすべてあらかじめ定められた第1の状態とすると共に、前記状態記憶手段に記憶された前記複数のアプリケーションの状態がすべてあらかじめ定められた第2の状態となったことを検知すると、前記データベースのオンラインバックアップを開始するための制御を行うオンラインバックアップ制御手段、として機能させるためのプログラムであって、前記更新制御手段は、受け取った前記更新指示を発したアプリケーションの状態が前記第1の状態である場合、当該更新指示に対応するセッションにおける当該アプリケーションからの他の更新指示に応じて前記データベースの更新を既に行っており且つ当該セッションについての更新確定指示を当該アプリケーションからまだ受け取っていなければ、前記更新指示に応じて前記データベースを更新し、受け取った前記更新指示に対応するセッションについての更新確定指示を当該アプリケーションから既に受け取っているか又は当該更新指示の前に当該セッションにおける他の更新指示に応じて前記データベースの更新を一度も行っていなければ、当該更新指示に応じた前記データベースの更新を少なくとも前記オンラインバックアップが完了するまでは取りやめると共に、前記第1の状態にある前記アプリケーションが実行しているすべてのセッションについて前記更新指示に応じた前記データベースの更新を取りやめた状態となると、前記状態記憶手段に記憶された当該アプリケーションの状態を前記第2の状態に変更する、ことを特徴とするプログラムである。   According to a third aspect of the present invention, the computer receives state update means for storing the state of each of the plurality of applications, receives a database update instruction from at least one of the plurality of applications, and responds to the received update instruction. At least one update control means for controlling whether or not to update the database, and when the start condition for online backup of the database is satisfied, all the states of the plurality of applications stored in the state storage means are On-line backup of the database is started when it is detected that all the states of the plurality of applications stored in the state storage unit have reached a predetermined second state, as well as a predetermined first state Online bar to control The update control means, when the state of the application that issued the received update instruction is the first state, in the session corresponding to the update instruction. If the database has already been updated in response to another update instruction from the application and an update confirmation instruction for the session has not yet been received from the application, the database is updated in response to the update instruction and received. If the update confirmation instruction for the session corresponding to the update instruction has already been received from the application or the database has not been updated in response to another update instruction in the session before the update instruction, According to the update instruction The database update is canceled at least until the online backup is completed, and the update of the database according to the update instruction is canceled for all sessions executed by the application in the first state; In other words, the program is characterized in that the state of the application stored in the state storage means is changed to the second state.

請求項1又は3に係る発明によれば、複数のアプリケーションがデータベースに対して更新を行う場合において、データベースを、それら複数のアプリケーションのいずれからみても整合性のとれた状態で、オンラインバックアップできる。   According to the first or third aspect of the invention, when a plurality of applications update the database, the database can be backed up online in a state that is consistent with any of the plurality of applications.

請求項2に係る発明によれば、第1の状態にあるアプリケーションから発せられた更新指示に応じたデータベースの更新を取りやめた場合において、オンラインバックアップが完了した後に、アプリケーションが再度その更新指示を発行しなくても、その更新指示に応じた更新を実行することができる。   According to the second aspect of the present invention, when the update of the database corresponding to the update instruction issued from the application in the first state is canceled, the application issues the update instruction again after the online backup is completed. Even if it does not do, the update according to the update instruction | indication can be performed.

実施形態のシステム構成の一例を示す図である。It is a figure which shows an example of the system configuration | structure of embodiment. I/Oステータス管理テーブルのデータ内容の一例を示す図である。It is a figure which shows an example of the data content of an I / O status management table. セッションステータス管理テーブルのデータ内容の一例を示す図である。It is a figure which shows an example of the data content of a session status management table. データベースI/O部の処理手順の一例を説明する。An example of the processing procedure of the database I / O unit will be described. オンラインバックアップトリガー部の処理手順の一例を説明する。An example of the processing procedure of the online backup trigger unit will be described. 処理の進行に応じたI/Oステータス管理テーブルのデータ内容の変遷の例を示す図である。It is a figure which shows the example of transition of the data content of the I / O status management table according to progress of a process.

以下、図面を参照して,本発明の実施形態を説明する。   Embodiments of the present invention will be described below with reference to the drawings.

まず、図1を参照して、本実施形態のシステム構成の一例を説明する。図1において、アプリケーション10a、10bは、文書管理などといった特定の目的のために使用されるソフトウエアである。アプリケーション10a、10bは、互いに別の目的のためのソフトウエアであってよい。   First, an example of the system configuration of this embodiment will be described with reference to FIG. In FIG. 1, applications 10a and 10b are software used for specific purposes such as document management. The applications 10a and 10b may be software for different purposes.

アプリケーション10a、10bは、それぞれ、自らの処理の実行の中で、データベース20に対して読み書きを行う。アプリケーション10a、10bは、データベース20に格納されたデータオブジェクトを参照する場合には、参照指示を発する。また、データベース20内のオブジェクトを更新する場合には、更新指示を発する。ここで、データベース20の「更新」には、データベース20内にある既存のオブジェクトのデータ内容を変更する処理と、データベース20に対して新規のオブジェクトを登録する処理との両方が含まれるものとする。また、更新指示に対応する更新が完了して、その更新結果を確定する場合は、更新確定指示を発する。   Each of the applications 10a and 10b reads / writes from / to the database 20 during execution of its own process. The applications 10a and 10b issue a reference instruction when referring to a data object stored in the database 20. In addition, when an object in the database 20 is updated, an update instruction is issued. Here, the “update” of the database 20 includes both a process of changing the data content of an existing object in the database 20 and a process of registering a new object in the database 20. . When the update corresponding to the update instruction is completed and the update result is confirmed, an update confirmation instruction is issued.

ここで、アプリケーション10a、10bは、データベース20内の互いに関連する複数のデータオブジェクト(データ項目)を、1つのセッションの中でまとめて更新する。   Here, the applications 10a and 10b collectively update a plurality of data objects (data items) related to each other in the database 20 in one session.

すなわち、それら互いに関連する複数のデータオブジェクトは、データベース20内では複数のオブジェクトに別れているが、アプリケーションからみれば、それら複数のオブジェクトの値の組合せが1つの意味を有している。したがって、アプリケーションがそれら互いに関連する複数のオブジェクトを更新する場合、それら複数のオブジェクトが全て更新前の状態であるか、全て更新後の状態であるかが、そのアプリケーションが想定している、意味のある状態である。データベース20がこのようにアプリケーションが想定している状態にあることを、「データベースの整合性がとれている」状態と呼ぶ。逆に、それら複数のオブジェクトの中に更新済みのものと未更新のものとが混在する状態は、更新を指示したアプリケーションにとっては想定外の状態である。データベース20がこのようにアプリケーションから見て想定外の状態にあることを、「データベースの整合性がとれていない」状態と呼ぶ。例えば、電子掲示板にメッセージを登録する際、そのメッセージの内容、投稿者及び投稿日時という3つのオブジェクトをデータベースに登録するが、それら3つのオブジェクトのうちの1つでも欠けると、電子掲示板のメッセージとしては完全なものではなくなる。これが「整合性がとれていない状態」である。逆に3つのオブジェクトが全部揃って更新された状態は、「整合性がとれている状態」である。   That is, the plurality of data objects related to each other are separated into a plurality of objects in the database 20, but from the viewpoint of the application, a combination of values of the plurality of objects has one meaning. Therefore, when an application updates a plurality of objects related to each other, it means that the application assumes whether the plurality of objects are all in the state before the update or after the update. It is in a certain state. The state in which the database 20 is assumed by the application in this way is referred to as a “database is consistent” state. On the contrary, a state in which the updated and unupdated objects are mixed among the plurality of objects is an unexpected state for the application instructing the update. The state in which the database 20 is in an unexpected state as viewed from the application is referred to as a “database is not consistent” state. For example, when a message is registered on an electronic bulletin board, three objects, the content of the message, the poster, and the posting date / time are registered in the database. If one of these three objects is missing, the message on the electronic bulletin board is Is no longer perfect. This is the “state where consistency is not taken”. Conversely, the state in which all three objects are updated together is the “consistent state”.

各アプリケーション10a、10bは、そのようにまとめて更新すべき1以上のオブジェクトを1つのセッション内でまとめて更新することで、データベース20が常に「整合性がとれている状態」になるようにする。   Each of the applications 10a and 10b updates the one or more objects that should be updated together in a single session so that the database 20 is always in a “consistent state”. .

アプリケーション10a、10bは、1つのデータベース更新セッションのなかで、更新(すなわちデータ内容の変更、又は新規登録)対象の各オブジェクトについての更新指示を順次(データベースI/O部30経由で)データベース20に送る。そして、アプリケーション10a、10bは、まとめて更新すべき互いに関連する複数のオブジェクトのすべてについて更新が完了した段階で、データベース20に対して、それらすべてのオブジェクトの更新の確定を指示する。このように、まとめて更新すべき全オブジェクトの更新が完了し、これに応じてアプリケーションが更新確定指示を発すると、その指示を受けたデータベース20がそれら全オブジェクトの更新結果を確定状態にする。この状態が、そのアプリケーションにとってデータベース20の「整合性がとれている状態」である。逆に、まとめて更新すべきそれらオブジェクトのうちの一部のオブジェクトのみ更新され、残りが更新されていない状態は、アプリケーションが想定している整合状態ではない。このような不整合状態(前述の「整合性がとれていない状態」のこと)では、アプリケーション10a、10bは更新確定指示を出さないので、データベース20が「整合性がとれていない状態」のまま更新が確定されることはない。   The applications 10a and 10b sequentially send update instructions (via the database I / O unit 30) to the database 20 for each object to be updated (that is, change of data contents or new registration) in one database update session. send. Then, the applications 10a and 10b instruct the database 20 to confirm the update of all the objects when the update is completed for all of the plurality of mutually related objects to be updated together. As described above, when the update of all objects to be updated together is completed and the application issues an update confirmation instruction accordingly, the database 20 that has received the instruction places the update results of all the objects in a confirmed state. This state is the “consistent state” of the database 20 for the application. Conversely, a state in which only some of the objects to be updated at a time are updated and the rest are not updated is not the consistent state assumed by the application. In such an inconsistency state (the above-mentioned “inconsistent state”), the applications 10a and 10b do not issue an update confirmation instruction, so the database 20 remains in the “inconsistent state”. Updates are never finalized.

アプリケーション10a、10bは、1セッションの中で、まとめて更新すべき互いに関連するオブジェクトの組を複数組、更新するよう指示する場合もある。この場合、アプリケーション10a、10bは、データベース20との間での読み書きのセッションを開始した後、そのセッションの中でまず第1の組に含まれる各オブジェクトについての更新指示を順に発し、それらオブジェクトのすべてについてデータ更新が完了した旨の応答をデータベース20から受けると、第1の組についての更新確定指示を発する。続いて、そのセッションの中で、第2の組に含まれる各オブジェクトについて順に更新指示を発行し、それらオブジェクトのすべてについて更新が完了すると、第2の組についての更新確定指示を発する。このように、アプリケーションは、1セッションの中で、まとめて更新すべきオブジェクトの組ごとに更新確定指示を発するように構成されていてもよい。   The applications 10a and 10b may instruct to update a plurality of sets of mutually related objects to be updated collectively in one session. In this case, after starting a read / write session with the database 20, the applications 10 a and 10 b first issue update instructions for the objects included in the first group in the session in order. When a response indicating that the data update has been completed is received from the database 20, an update confirmation instruction for the first group is issued. Subsequently, in the session, an update instruction is issued in order for each object included in the second group, and when all the objects are updated, an update confirmation instruction for the second group is issued. As described above, the application may be configured to issue an update confirmation instruction for each set of objects to be updated together in one session.

さて、本実施形態では、アプリケーション10a、10bは、データベース20に対して直接読み書きを行うのではなく、データベースI/O部30を介して読み書きを行う。すなわち、アプリケーション10a、10bは、それぞれ、データベース20に対する参照指示、更新指示、及び更新確定指示を、データベース20に送るのではなく、対応するデータベースI/O部30に対して送る。   In the present embodiment, the applications 10 a and 10 b do not directly read from and write to the database 20, but perform reading and writing via the database I / O unit 30. That is, the applications 10a and 10b send the reference instruction, update instruction, and update confirmation instruction for the database 20 to the corresponding database I / O unit 30 instead of sending them to the database 20.

アプリケーション10a、10bが発するそれら読み書きのための指示(参照指示、更新指示、及び更新確定指示)は、データベースI/O部30が存在せず、アプリケーションとデータベースとが直接やりとりを行う従来構成において、アプリケーションがデータベースに対して発行する指示と同じものとしてもよい。   Instructions for reading and writing (reference instruction, update instruction, and update confirmation instruction) issued by the applications 10a and 10b are not included in the database I / O unit 30, and the application and the database directly communicate with each other in the conventional configuration. It may be the same as the instruction issued by the application to the database.

この実施形態では、アプリケーション10a、10bは、従来、データベース20に対して直接送っていた読み書きのための指示を、データベースI/O部30に送るようにしたものであり、その他の点では従来の同様のアプリケーションと同じでよい。   In this embodiment, the applications 10a and 10b are configured to send an instruction for reading and writing, which has been conventionally sent directly to the database 20, to the database I / O unit 30. It can be the same as a similar application.

また、これらアプリケーション10a、10bは、互いに連携して1つの大きな目的を達成する機能を有していてもよい。例えば、アプリケーション10aが電子掲示板等を管理するメッセージングアプリケーションであり、アプリケーション10aが文書群を管理する文書管理システムアプリケーションである場合がその一例である。このケースでは、ユーザから前者に対してメッセージと添付文書がアップロードされた場合、1つのセッションの中で、前者は、メッセージをデータベース20に書き込むと共に、後者に対して添付文書のデータベース20への登録を依頼する。この結果、前者と後者がそれぞれデータベース20の更新を行うこととなる。この例では、前者のメッセージ登録機能と後者の文書登録機能とが連携して、メッセージとそれに対応した添付文書とのデータベース登録という大きな目的を達成する。   Further, these applications 10a and 10b may have a function of achieving one large purpose in cooperation with each other. For example, the application 10a is a messaging application that manages an electronic bulletin board or the like, and the application 10a is a document management system application that manages a document group. In this case, when a message and an attached document are uploaded from the user to the former, the former writes the message in the database 20 and registers the attached document in the database 20 for the latter in one session. Request. As a result, the former and the latter update the database 20 respectively. In this example, the former message registration function and the latter document registration function cooperate to achieve a major purpose of database registration of messages and attached documents corresponding thereto.

ここで、複数のアプリケーションによる連携したデータベース更新は、1つのセッション内で行われる。上述の例で言えば、アプリケーション10aによるメッセージのデータベース20への登録と、アプリケーション10bによる添付文書のデータベースへの登録とは、それら2つのアプリケーションが連携した1つのセッションとして行われる。これにより、異なる複数のアプリケーションが、それぞれ互いに関連するオブジェクトの更新を行う際に、それらオブジェクト群が「整合性がとれている状態」になるよう一括して更新されるようにする。   Here, the coordinated database update by a plurality of applications is performed within one session. In the above example, the registration of the message in the database 20 by the application 10a and the registration of the attached document in the database by the application 10b are performed as one session in which these two applications are linked. As a result, when a plurality of different applications update objects related to each other, the objects are collectively updated so as to be in a “consistent state”.

図1には、2つのアプリケーション10a、10bを図示したが、データベース20を利用するアプリケーションが3以上存在してももちろんよい。   Although two applications 10a and 10b are illustrated in FIG. 1, there may be three or more applications that use the database 20.

データベース20は、それらアプリケーションが利用するデータを保持しており、データベースI/O部30を介した各アプリケーションからの指示に従い、保持しているデータをアプリケーションに提供したり、保持しているデータを新しい値に更新したりする。   The database 20 holds data used by these applications. According to instructions from each application via the database I / O unit 30, the database 20 provides the held data to the application, or holds the held data. Or update to a new value.

アプリケーション10a、10bから、後述するデータベースI/O部30経由で参照指示を受けた場合、データベース20は、その指示の対象として指定されたオブジェクトのデータ内容を、指示元のアプリケーション宛に送信する。この参照処理では、対象となったオブジェクトは変更されない。また更新指示を受けた場合には、自分自身が保持するその更新指示の対象のオブジェクトを、その指示に応じたデータ内容に更新する(あるいは、更新指示が新たなオブジェクトの登録を指示するものである場合はその登録を行う)。データベース20は、保持するオブジェクトごとにそのオブジェクトが確定状態であるか否かを示すフラグ情報を有しており、更新指示に応じてオブジェクトの更新を行った時点ではそのオブジェクトのフラグ情報は未確定状態を示す値にする。また、あるセッションの中でアプリケーション10a、10bから更新確定指示を受けた場合、データベース20は、そのセッションにおいてこれまでに更新した、未確定状態のオブジェクトのフラグ情報を、確定状態を示す値に変更する。   When receiving a reference instruction from the applications 10a and 10b via the database I / O unit 30 (to be described later), the database 20 transmits the data contents of the object specified as the target of the instruction to the instruction source application. In this reference process, the target object is not changed. When an update instruction is received, the object of the update instruction held by itself is updated to the data contents corresponding to the instruction (or the update instruction instructs registration of a new object). If so, register it). The database 20 has flag information indicating whether or not the object is in a fixed state for each object to be held, and when the object is updated according to the update instruction, the flag information of the object is not fixed. A value indicating the state. Further, when an update confirmation instruction is received from the applications 10a and 10b in a session, the database 20 changes the flag information of the object in the unconfirmed state that has been updated so far in the session to a value indicating the confirmed state. To do.

データベース20は、データベースI/O部30経由で受け取ったアプリケーション10a、10bからの指示に対する応答を、そのデータベースI/O部30経由でアプリケーション10a、10bに返す。すなわち、データベース20は、アプリケーション10a、10bが発した更新指示等の指示を、データベースI/O部30から受け取るので、その指示に対する応答は、その指示の発信元であるデータベースI/O部30に返せばよい。その応答を受け取ったデータベースI/O部30は、その応答を、その指示を指示元であるアプリケーション10a又は10bに転送する。   The database 20 returns a response to the instruction from the applications 10a and 10b received via the database I / O unit 30 to the applications 10a and 10b via the database I / O unit 30. That is, since the database 20 receives an instruction such as an update instruction issued by the applications 10a and 10b from the database I / O unit 30, a response to the instruction is sent to the database I / O unit 30 that is the source of the instruction. Return it. Upon receiving the response, the database I / O unit 30 transfers the response to the application 10a or 10b that is the instruction source.

データベース20は、物理的に1つのコンピュータ上に構築されてもよいし、複数の別々のコンピュータ上に分散されて構築されていてよい。   The database 20 may be physically constructed on one computer, or may be constructed by being distributed on a plurality of separate computers.

また、データベース20は、例えば電子掲示板のメッセージ群とそれらメッセージに添付された文書ファイルのように、異なる種類のデータオブジェクト(この例ではメッセージ、文書ファイルがそれぞれオブジェクトである)を格納することができる。データベース20は、そのような複数種類のオブジェクトを格納可能な論理的に1つのデータベースであってもよいし、個々の種類のオブジェクトを格納するための論理的なデータベースが複数集まった集合体であってもよい。   Further, the database 20 can store different types of data objects (in this example, the message and the document file are objects), such as a group of messages on an electronic bulletin board and a document file attached to the messages. . The database 20 may be a logical one database capable of storing such a plurality of types of objects, or a collection of a plurality of logical databases for storing individual types of objects. May be.

この実施形態では、データベース20は、アプリケーション10a、10bからの指示を、データベースI/O部30を介して受け取る。   In this embodiment, the database 20 receives instructions from the applications 10 a and 10 b via the database I / O unit 30.

データベース20は、保持しているデータオブジェクトに対する読み書きの指示を、アプリケーション10a、10bから直接ではなく、データベースI/O部30を介して受け取る点以外は、従来のデータベースと同様である。   The database 20 is the same as the conventional database except that it receives a read / write instruction for the stored data object not from the applications 10a and 10b but via the database I / O unit 30.

データベースI/O部30は、アプリケーション10a、10bとデータベース20との間に介在し、アプリケーション10a、10bとデータベース20との間の指示及びデータのやりとりを制御する。   The database I / O unit 30 is interposed between the applications 10a and 10b and the database 20, and controls instructions and data exchange between the applications 10a and 10b and the database 20.

図示例では、データベースI/O部30は、1つ1つのアプリケーション10a、10bに対応して1つずつ設けられている。アプリケーション10a、10bは、データベース20に対して読み書きを行う際、その読み書きのための指示を、対応するデータベースI/O部30に送る。   In the illustrated example, one database I / O unit 30 is provided for each of the applications 10a and 10b. When the applications 10 a and 10 b perform reading and writing with respect to the database 20, an instruction for the reading and writing is sent to the corresponding database I / O unit 30.

データベースI/O部30は、アプリケーション10a、10bとデータベース20との間の指示、データのやりとりの制御の中で、後述するステータス管理部32と連携して、オンラインバックアップ中にデータベース20の更新(すなわちデータベース20内に保存されたオブジェクトの更新)が行われないようにする。このオンラインバックアップ対応のための制御については、後で詳しく説明する。   The database I / O unit 30 updates the database 20 during online backup in cooperation with a status management unit 32 (to be described later) while controlling the exchange of instructions and data between the applications 10a and 10b and the database 20. That is, the update of the object stored in the database 20 is not performed. This control for online backup will be described in detail later.

ステータス管理部32は、各アプリケーション10a、10bに対応する各データベースI/O部30のステータス(状態)を保持し、管理する。データベースI/O部30のステータスには、「通常」、「抑制依頼中」、「抑制完了」の3つがある。   The status management unit 32 holds and manages the status (state) of each database I / O unit 30 corresponding to each application 10a, 10b. There are three statuses of the database I / O unit 30: “normal”, “request for suppression”, and “completion of suppression”.

ステータス「通常」は、対応するアプリケーション10a又は10bが当該データベースI/O部30を介してデータベース20に対して通常通り読み書きを行うことができる状態である。   The status “normal” is a state in which the corresponding application 10 a or 10 b can read and write to the database 20 through the database I / O unit 30 as usual.

ステータス「抑制依頼中」は、データベースI/O部30が後述するオンラインバックアップトリガー部34から「抑制依頼」を受けてから、その「抑制依頼」を受けた時点で既に実行中のすべてのデータベース更新セッションが完了(「更新確定」)されるまでの状態である。また、ステータス「抑制完了」とは、「抑制依頼中」状態にあるデータベースI/O部30が実行していたすべてのデータベース更新セッションが「更新確定」された場合の遷移先の状態である。本実施形態では、すべてのデータベースI/O部30が「抑制完了」状態となってはじめて、オンラインバックアップが実行される。そして、オンラインバックアップが完了すると、各データベースI/O部30のステータスは、「抑制完了」状態から「通常」状態に変更される。   The status “Suppression Requesting” indicates that the database I / O unit 30 receives all “update requests” from the online backup trigger unit 34, which will be described later, and then updates all databases that are already being executed. This is the state until the session is completed (“update confirmed”). Further, the status “suppression complete” is a transition destination state when all the database update sessions executed by the database I / O unit 30 in the “suppression requesting” state are “update confirmed”. In the present embodiment, online backup is executed only when all the database I / O units 30 are in the “suppression complete” state. When online backup is completed, the status of each database I / O unit 30 is changed from the “suppression complete” state to the “normal” state.

「抑制依頼」及び「抑制完了」というステータスの理解を助けるために、その技術的な意義を以下に説明する。   In order to help understanding the status of “suppression request” and “suppression complete”, its technical significance will be described below.

本実施形態では、データベース20のオンラインバックアップを開始する前に、データベースI/O部30が、対応するアプリケーション10a又は10bからのデータベース20に対するデータベース更新指示を抑制する。すなわち、データベースI/O部30がアプリケーション10a及び10bからの更新指示をデータベース20に伝達しないことで、データベース20が更新されない状態を作り出す。そして、このようにデータベース20が更新されない状態を作り出した後で、データベース20のオンラインバックアップを実行する。   In this embodiment, before starting online backup of the database 20, the database I / O unit 30 suppresses a database update instruction for the database 20 from the corresponding application 10a or 10b. That is, the database I / O unit 30 does not transmit the update instructions from the applications 10a and 10b to the database 20, thereby creating a state in which the database 20 is not updated. Then, after creating a state in which the database 20 is not updated in this way, online backup of the database 20 is executed.

ここで、オンラインバックアップの開始条件が満たされる(例えばユーザから明示的に開始指示があった場合や、規則により導かれる開始タイミングが到来した場合)と同時に各アプリケーション10a及び10bからの更新指示を完全に抑制したのでは、アプリケーションによる1つのデータベース更新セッションの途中でデータベース20の更新が抑制されてしまう場合がある。この場合、アプリケーションがそのセッションでまとめて更新しようとしている複数のオブジェクトのうちの一部のみが更新され、残りが未更新のままとなってしまう。この状態は、そのアプリケーションからみて不整合状態(「整合性がとれていない状態」)であり、仮にこの状態のデータベース20がオンラインバックアップされても、そのバックアップ結果は、そのアプリケーションが想定していない(すなわちそのアプリケーションがそのままでは正しく処理できない)ものとなる。このようにアプリケーションがそのままでは正しく処理できないようなバックアップデータを作成することは、有益であるとはいえない。   Here, the update instruction from each application 10a and 10b is completely executed at the same time when the online backup start condition is satisfied (for example, when a start instruction is explicitly given by the user or when a start timing guided by a rule arrives) However, the update of the database 20 may be suppressed during one database update session by the application. In this case, only a part of the plurality of objects that the application intends to update collectively in the session is updated, and the rest remains unupdated. This state is inconsistent from the viewpoint of the application (“state of inconsistency”), and even if the database 20 in this state is backed up online, the backup result is not assumed by the application. (That is, the application cannot be processed correctly as it is). It is not useful to create backup data that cannot be processed correctly as it is by an application.

そこで、本実施形態では、オンラインバックアップの開始条件が満たされたときに即座にそのオンラインバックアップを実行するのではなく、データベース20の状態がすべてのアプリケーション10a及び10bにとって「整合性がとれている状態」となるまで待ってからオンラインバックアップを実行する。すなわち、このようにデータベース20がすべてのアプリケーション10a及び10bにとって「整合性がとれている状態」で、それらすべてのアプリケーション10a及び10bからの更新指示を待機させつつ、データベース20のオンラインバックアップを行うことで、得られるバックアップはすべてのアプリケーション10a及び10bにとって「整合性がとれている状態」となる。   Therefore, in this embodiment, when the online backup start condition is satisfied, the online backup is not immediately executed, but the state of the database 20 is “consistent” for all the applications 10a and 10b. Wait until “” is displayed, and then perform online backup. That is, the database 20 is backed up online while the database 20 is in a “consistent state” for all the applications 10a and 10b while waiting for an update instruction from all the applications 10a and 10b. Thus, the backup obtained is in a “consistent state” for all the applications 10a and 10b.

このように、データベース20が「整合性のとれている状態」でオンラインバックアップが実行されるようにするために、本実施形態では、オンラインバックアップの開始条件が満たされた時点では、各データベースI/O部30を「抑制依頼中」状態とする。この状態では、データベースI/O部30は、まだデータベース更新を開始していないセッションや、データベース更新を確定済みであるセッションについては、対応するアプリケーション10a又は10bからの新たな更新指示をデータベース20に取り次がずに待機させる。一方、この状態に入った時点で既にデータベース20の更新を開始しており、まだ確定していないセッションについては、対応するアプリケーション10a又は10bから更新確定指示を発するまでは、そのアプリケーション10a又は10bからの更新指示をデータベース20に取り次ぐ。そして、データベースI/O部30が「抑制依頼中」状態となった時点でデータベース更新を開始しており、かつその更新が未確定であるすべてのセッションについて、対応するアプリケーション10a又は10bから更新確定指示を受け取ると、データベースI/O部30は「抑制完了」状態に遷移する。「抑制完了」状態にあるデータベースI/O部30は、すべてのアプリケーション10a及び10bからの更新指示を待機させる。   As described above, in order to perform online backup in a state where the database 20 is “consistent”, in the present embodiment, when the online backup start condition is satisfied, each database I / O The O unit 30 is set to the “request for suppression” state. In this state, the database I / O unit 30 sends a new update instruction from the corresponding application 10a or 10b to the database 20 for a session that has not yet started database update or a session for which database update has been confirmed. Wait without intermediary. On the other hand, for the session that has already started updating the database 20 at the time of entering this state and has not yet been confirmed, from the corresponding application 10a or 10b until the update confirmation instruction is issued from the corresponding application 10a or 10b, Are updated in the database 20. The database update is started when the database I / O unit 30 is in the “request for suppression” state, and the update is confirmed from the corresponding application 10a or 10b for all the sessions for which the update has not been confirmed. Upon receiving the instruction, the database I / O unit 30 transitions to a “suppression complete” state. The database I / O unit 30 in the “suppression complete” state waits for an update instruction from all the applications 10a and 10b.

以上、「抑制依頼」及び「抑制完了」というステータスを設けた意義について説明した。   The significance of providing the status “suppression request” and “suppression complete” has been described above.

ステータス管理部32は、各データベースI/O部30のステータスを記憶したI/Oステータス管理テーブルを有する。そして、オンラインバックアップのための制御の進行に応じて、このテーブルに保持される情報を更新していく。   The status management unit 32 has an I / O status management table that stores the status of each database I / O unit 30. Then, as the control for online backup progresses, the information held in this table is updated.

図2に、I/Oステータス管理テーブルのデータ内容の一例を示す。図2に例示したテーブルには、データベースI/O部30ごとに、そのデータベースI/O部30に対応するアプリケーション10a又は10bの識別情報(「アプリケーションID」)と、そのデータベースI/O部30のステータス値とが保持されている。   FIG. 2 shows an example of data contents of the I / O status management table. In the table illustrated in FIG. 2, for each database I / O unit 30, identification information (“application ID”) of the application 10 a or 10 b corresponding to the database I / O unit 30, and the database I / O unit 30. Status value.

また、ステータス管理部32は、アプリケーション10a及び10からのデータベース20に対する読み書きのセッションのステータスを管理する。セッションのステータスには「通常」と「更新中」がある。   The status management unit 32 manages the status of a read / write session with respect to the database 20 from the applications 10a and 10. Session status includes “Normal” and “Updating”.

ステータス「更新中」は、当該セッションにおいてデータベース20の更新が開始されてから、その更新が確定されるまでの間の状態である。すなわち、アプリケーションから当該セッションの中での最初のデータベース20に対する更新指示が発せられ、その更新指示が実行可能である(すなわちまだ更新が抑制されていない)場合に、そのセッションは「通常」状態から「更新中」状態に遷移する。そして、「更新中」状態にあるセッションにおいて、対応するアプリケーションから更新確定が指示されると、そのセッションの状態は「通常」に戻る。   The status “Updating” is a state from when the update of the database 20 is started in the session until the update is confirmed. That is, when an update instruction for the first database 20 in the session is issued from the application and the update instruction can be executed (that is, the update is not yet suppressed), the session is moved from the “normal” state. Transition to "Updating" state. Then, in a session in the “updating” state, when update confirmation is instructed from the corresponding application, the state of the session returns to “normal”.

ステータス「通常」は、「更新中」以外の状態である。言い換えれば、セッションが「通常」状態にあるということは、そのセッションの中でまだデータベース20の更新が始まっていないか、又はそのセッションの中でまとめて更新すべき複数のオブジェクトの更新が確定済みであるか、のいずれかであることを意味する。   The status “Normal” is a state other than “Updating”. In other words, if the session is in the “normal” state, the update of the database 20 has not yet started in the session, or the update of a plurality of objects to be updated in the session has been confirmed. Or any of them.

「更新中」状態であるセッションを中断すると、データベース20が整合性のとれていない状態となり、その状態でデータベース20をオンラインバックアップすると、上述したように有益でないバックアップが生成される。そこで、本実施形態では、「更新中」状態であるセッションは、「通常」状態に遷移するのを待って中断(すなわち更新を「抑制」)し、オンラインバックアップを実行する。   If a session that is in the “updating” state is interrupted, the database 20 becomes inconsistent, and if the database 20 is backed up online in that state, a backup that is not useful is generated as described above. Therefore, in the present embodiment, a session that is in the “updating” state waits for a transition to the “normal” state (ie, “suppresses” the update), and executes online backup.

ステータス管理部32は、各アプリケーション10a及び10bが実行しているセッションのステータスを記憶したセッションステータス管理テーブルを有する。そして、オンラインバックアップのための制御の進行に応じて、このテーブルに保持される情報を更新していく。   The status management unit 32 has a session status management table that stores the statuses of sessions executed by the applications 10a and 10b. Then, as the control for online backup progresses, the information held in this table is updated.

図3に、セッションステータス管理テーブルのデータ内容の一例を示す。図3に例示したテーブルには、アプリケーションのIDと、そのアプリケーションが実行しているセッションのIDと、そのセッションのステータスと、の3つの項目の組が保持されている。図3の例では、アプリケーションID「0001」に対応するアプリケーションは2つのセッション「S0001」及び「S0002」を実行中であり、アプリケーションID「0002」に対応するアプリケーションは1つのセッション「S0001」を実行中である。このうち、セッション「S0001」は、2つのアプリケーション「0001」と「0002」が連携して行うセッションであり、それら2つのアプリケーションの両方がデータベースに対して更新を行う可能性がある。また、図3の例では、セッション「S0001」は「通常」状態であり、セッション「S0002」は「更新中」状態である。   FIG. 3 shows an example of the data contents of the session status management table. The table illustrated in FIG. 3 holds a set of three items: an application ID, a session ID executed by the application, and a status of the session. In the example of FIG. 3, the application corresponding to the application ID “0001” is executing two sessions “S0001” and “S0002”, and the application corresponding to the application ID “0002” is executing one session “S0001”. It is in. Among these, the session “S0001” is a session that the two applications “0001” and “0002” perform in cooperation, and both of these two applications may update the database. In the example of FIG. 3, the session “S0001” is in the “normal” state, and the session “S0002” is in the “updating” state.

図3の例は、すべてのアプリケーションが実行中のセッションのステータスを1つのセッションステータス管理テーブルに保持するものであったが、これは一例に過ぎない。セッションの管理はアプリケーションごとにできれば足りるので、アプリケーションごとのセッションステータス管理テーブルを用いてもよい。アプリケーションごとのセッションステータス管理テーブルには、当該アプリケーションが実行しているセッションのセッションIDと、そのセッションのステータスが保持される。またこの場合、アプリケーションごとのセッションステータス管理テーブルを、ステータス管理部32ではなく、当該アプリケーションに対応するデータベースI/O部30が保持していてもよい。   In the example of FIG. 3, the status of sessions being executed by all applications is held in one session status management table, but this is only an example. Since session management is sufficient for each application, a session status management table for each application may be used. The session status management table for each application holds the session ID of the session being executed by the application and the status of the session. In this case, the session status management table for each application may be held not by the status management unit 32 but by the database I / O unit 30 corresponding to the application.

図1の説明に戻ると、オンラインバックアップ部22は、データベース20のオンラインバックアップを担当する機能モジュールである。オンラインバックアップ部22は、従来のものと同様のものでよい。   Returning to the description of FIG. 1, the online backup unit 22 is a functional module responsible for online backup of the database 20. The online backup unit 22 may be the same as the conventional one.

オンラインバックアップトリガー部34は、オンラインバックアップ部22に対してオンラインバックアップの実行を指示するモジュールである。オンラインバックアップトリガー部34は、ステータス管理部32を参照することで、データベース20がどのアプリケーション10a及び10bから見ても「整合性がとれている状態」となっており、かつ、どのアプリケーション10a及び10bからのデータベース更新も抑制されているときに、オンラインバックアップが実行されるようにする。   The online backup trigger unit 34 is a module that instructs the online backup unit 22 to execute online backup. The online backup trigger unit 34 refers to the status management unit 32 so that the database 20 is in a “consistent state” when viewed from any application 10a and 10b, and which application 10a and 10b. Online backups are performed when database updates from are suppressed.

以上、図1を参照して、本実施形態のシステム構成の一例を説明した。図1のシステム構成は、1つのコンピュータ上、又は複数のコンピュータから構成されるコンピュータシステム上に、ソフトウエア的に構築される。すなわち、ある例では、図1に示したすべての要素が1台のコンピュータ上にソフトウエアとして実装される。別の例では、図1に示した要素が、複数のコンピュータ上に分散してインストールされ、それら要素がネットワークを介して通信を行いながら、各々の機能を発揮する。例えば、図1に示した要素のうち、アプリケーション10a及び10b以外の要素が1台のコンピュータ上に構築され、アプリケーション10a及び10bがそれぞれ、そのコンピュータとは別の個別のコンピュータ上に構築されるようなシステム構成も可能である。   The example of the system configuration of the present embodiment has been described above with reference to FIG. The system configuration shown in FIG. 1 is constructed by software on one computer or a computer system composed of a plurality of computers. That is, in one example, all the elements shown in FIG. 1 are implemented as software on one computer. In another example, the elements shown in FIG. 1 are installed in a distributed manner on a plurality of computers, and these elements perform their functions while communicating via a network. For example, among the elements shown in FIG. 1, elements other than the applications 10a and 10b are constructed on a single computer, and the applications 10a and 10b are constructed on separate computers different from the computers. A simple system configuration is also possible.

ここで、コンピュータは、例えば、ハードウエアとして、CPU等のマイクロプロセッサ、ランダムアクセスメモリ(RAM)およびリードオンリメモリ(ROM)等のメモリ(一次記憶)、HDD(ハードディスクドライブ)等の二次記憶装置を制御するコントローラ、各種I/O(入出力)インタフェース、ローカルエリアネットワークなどのネットワークとの接続のための制御を行うネットワークインタフェース等の要素群が、たとえばバスを介して相互に接続された回路構成を有する。また、そのバスに対し、例えばI/Oインタフェース経由で、CDやDVDなどの可搬型ディスク記録媒体に対する読み取り及び/又は書き込みのためのディスクドライブ、フラッシュメモリなどの各種規格の可搬型の不揮発性記録媒体に対する読み取り及び/又は書き込みのためのメモリリーダライタ、などが接続されてもよい。上に例示した各機能モジュールの処理内容が記述されたプログラムがCDやDVD等の記録媒体を経由して、又はネットワーク等の通信手段経由で、ハードディスクドライブ等の固定記憶装置に保存され、コンピュータにインストールされる。固定記憶装置に記憶されたプログラムがRAMに読み出されCPU等のマイクロプロセッサにより実行されることにより、上に例示した機能モジュール群が実現される。   Here, the computer is, for example, a microprocessor such as a CPU, a memory such as a random access memory (RAM) and a read only memory (ROM) (primary storage), or a secondary storage device such as an HDD (hard disk drive). Configuration in which elements such as a controller for controlling the network, various I / O (input / output) interfaces, and a network interface for controlling connection to a network such as a local area network are connected to each other via a bus, for example Have Also, portable non-volatile recording of various standards such as a disk drive and a flash memory for reading and / or writing to a portable disk recording medium such as a CD or a DVD via the I / O interface, for example. A memory reader / writer for reading from and / or writing to a medium may be connected. A program in which the processing contents of each functional module exemplified above are described is stored in a fixed storage device such as a hard disk drive via a recording medium such as a CD or DVD, or via a communication means such as a network, and stored in a computer. Installed. The program stored in the fixed storage device is read into the RAM and executed by a microprocessor such as a CPU, thereby realizing the functional module group exemplified above.

次に、図4を参照して、データベースI/O部30の処理手順の一例を説明する。この手順は、対応するアプリケーション10a又は10bから、データベース20に対する読み書きの指示が到来するごとに実行される。   Next, an example of the processing procedure of the database I / O unit 30 will be described with reference to FIG. This procedure is executed every time a read / write instruction to the database 20 comes from the corresponding application 10a or 10b.

この処理の前提として、アプリケーション10a及び10bがデータベースI/O部30に送る指示には、当該アプリケーションのIDと、その指示が属するセッションのセッションIDとが含まれる。ここで、セッションIDは、アプリケーションが新規のセッションを開始するごとに、例えばそのアプリケーション自身が、そのセッションのために一意的な値として生成する。そして、同じセッションの中でデータベース20内の複数のオブジェクトの更新処理を行う場合、アプリケーションは、それら個々のオブジェクトについて、アプリケーションID及びセッションIDを含んだ更新指示を発する。また、あるアプリケーションが、自分が始めたセッションの中で、別のアプリケーションに対してデータベース20内のオブジェクトの依頼する場合には、前者のアプリケーションは、後者のアプリケーションに対してそのセッションのセッションIDを通知する。前者からの依頼に応じて後者のアプリケーションが発する更新指示は、後者のアプリケーションIDと共に、前者から通知されたセッションIDを含む。   As a premise of this processing, the instruction sent from the applications 10a and 10b to the database I / O unit 30 includes the ID of the application and the session ID of the session to which the instruction belongs. Here, every time an application starts a new session, for example, the application itself generates a session ID as a unique value for the session. When updating a plurality of objects in the database 20 in the same session, the application issues an update instruction including an application ID and a session ID for each of the objects. When an application requests an object in the database 20 from another application in a session started by itself, the former application gives the session ID of the session to the latter application. Notice. The update instruction issued by the latter application in response to the request from the former includes the session ID notified from the former together with the latter application ID.

図4の処理手順では、まず、データベースI/O部30は、対応するアプリケーション10a又は10bから指示された処理の種別が、「参照」、「更新」、「更新確定」のいずれであるかを判定する(S10)。指示された処理が「参照」である場合、データベースI/O部30は、その指示(すなわち「参照指示」)を、データベース20に転送することで、その指示に応じた処理(参照)が実行されるようにする(S12)。S12にて指示をデータベース20に転送すると、データベースI/O部30は、その指示についての処理を終了する。このように、本実施形態では、データベース20に更新が発生しない参照指示については、後述のように更新指示を待機させている間も、待機させずに実行されるようにしている。   In the processing procedure of FIG. 4, first, the database I / O unit 30 determines whether the type of processing instructed from the corresponding application 10a or 10b is “reference”, “update”, or “update confirmed”. Determine (S10). When the instructed process is “reference”, the database I / O unit 30 transfers the instruction (ie, “reference instruction”) to the database 20, so that the process (reference) according to the instruction is executed. (S12). When the instruction is transferred to the database 20 in S12, the database I / O unit 30 ends the process for the instruction. As described above, in this embodiment, a reference instruction that does not cause an update in the database 20 is executed without waiting while the update instruction is on standby, as will be described later.

指示された処理が「更新」である場合、データベースI/O部30は、ステータス管理部32のI/Oステータス管理テーブルを参照して、自分自身のステータスを確認し(S14)、確認したステータスの値が「通常」、「抑制依頼中」、「抑制完了」のいずれであるかを判定する(S16)。   When the instructed process is “update”, the database I / O unit 30 refers to the I / O status management table of the status management unit 32 and confirms its own status (S14), and the confirmed status. It is determined whether the value of “Normal”, “Requesting suppression”, or “Suppression completed” (S16).

S16で自分のステータスが「通常」であると判定した場合、データベースI/O部30は、ステータス管理部32に対して、その更新指示のセッションIDと、データベースIO部30自身の識別情報(「アプリケーションID」)と、更新指示を実行する旨と、を通知する(S18)。この通知に応じ、ステータス管理部32は、セッションステータス管理テーブル内の、そのセッションIDとアプリ−ケーションIDとの組合せに対応するステータスの値を「更新中」とする。すなわち、そのセッションIDとアプリ−ケーションIDとの組合せに対応するステータス値が「通常」である場合は、そのステータス値を「更新中」に書き換え、「更新中」ならばその値を維持する。また、そのセッションIDとアプリ−ケーションIDとの組合せがセッションステータス管理テーブルに未登録である場合は、そのテーブルに、その組合せに含まれるセッションID及びアプリケーションIDとを含んだエントリを追加し、そのエントリのステータスを「更新中」とする。   If it is determined in S16 that its own status is “normal”, the database I / O unit 30 instructs the status management unit 32 of the session ID of the update instruction and the identification information (“ Application ID ") and update instruction are executed (S18). In response to this notification, the status management unit 32 sets the status value corresponding to the combination of the session ID and the application ID in the session status management table to “Updating”. That is, when the status value corresponding to the combination of the session ID and the application ID is “normal”, the status value is rewritten to “updating”, and if it is “updating”, the value is maintained. If the combination of the session ID and application ID is not registered in the session status management table, an entry including the session ID and application ID included in the combination is added to the table, The entry status is “Updating”.

そして、データベースI/O部30は、その更新指示をデータベース20に転送することで、その指示に応じた処理(更新)が実行されるようにする(S12)。   Then, the database I / O unit 30 transfers the update instruction to the database 20 so that the process (update) according to the instruction is executed (S12).

このように、データベースI/O部30のステータスが「通常」である場合は、オンラインバックアップ又はその準備が行われていないということなので、アプリケーションからの指示に応じてデータベース20の更新が行われる。   Thus, when the status of the database I / O unit 30 is “normal”, it means that online backup or preparation has not been performed, and the database 20 is updated in accordance with an instruction from the application.

さて、S16で自分自身のステータスが「抑制依頼中」であることがわかると、データベースI/O部30は、ステータス管理部32のセッションステータス管理テーブルにアクセスし、当該更新指示のセッションIDに対応するステータスの値を確認する(S20)。そして、確認により得たステータスの値が「通常」及び「更新中」のいずれであるかを判定する(S22)。ここで、S20では、セッションステータス管理テーブル内に、そのセッションIDに対応するエントリが複数ある場合(例えば複数のアプリケーションが1セッション内で連携して、互いに関連するオブジェクト群を更新する場合)には、それら複数のエントリすべてのステータスを調べる。そして、S22では、それら複数のエントリのステータスがすべて「通常」である場合、当該セッションのステータスは「通常」であると判定し、それら複数のエントリのステータスのなかに「更新中」のものが1以上あれば、当該セッションのステータスは「更新中」と判定する。   When it is determined in S16 that the status of itself is “request for suppression”, the database I / O unit 30 accesses the session status management table of the status management unit 32 and corresponds to the session ID of the update instruction. The status value to be checked is confirmed (S20). Then, it is determined whether the status value obtained by the confirmation is “Normal” or “Updating” (S22). Here, in S20, when there are a plurality of entries corresponding to the session ID in the session status management table (for example, when a plurality of applications cooperate with each other in one session to update objects related to each other). Investigate the status of all those multiple entries. In S22, when the statuses of the plurality of entries are all “normal”, it is determined that the status of the session is “normal”. If the number is 1 or more, the status of the session is determined to be “updating”.

S22で当該セッションのステータスが「更新中」であるとわかった場合、データベースI/O部30は、その更新指示をデータベース20に転送することで、その指示に応じた処理(更新)が実行されるようにする(S12)。すなわち、この時点では、オンラインバックアップの準備が始まっており(これはデータベースI/O部30自身のステータスが「抑制依頼中」であることからわかる)、かつ、その準備開始の時点で既に開始されているオブジェクト群の更新が確定していない(これは当該セッションのステータスが「更新中」であることからわかる)ので、データベース20の状態が当該セッションの発行元のアプリケーションからみて「整合性がとれている状態」となるまで(すなわち対応するアプリケーションから当該セッションについての更新確定指示が来るまで)は、更新指示を受け入れるのである。   If it is determined in S22 that the status of the session is “Updating”, the database I / O unit 30 transfers the update instruction to the database 20 to execute processing (update) according to the instruction. (S12). That is, at this time, preparation for online backup has started (this can be seen from the status of the database I / O unit 30 itself being “request for suppression”), and has already started at the time of the start of preparation. The update of the object group is not finalized (this is known from the fact that the status of the session is “updating”), so that the state of the database 20 is “consistent with respect to the application that issued the session. The update instruction is accepted until it reaches the state of being in the state (that is, until an update confirmation instruction for the session is received from the corresponding application).

S22で当該セッションのステータスが「通常」であるとわかった場合、データベースI/O部30は、その更新指示を待機させる(S24)。例えば、その更新指示をデータベースI/O部30自身の内部に保留する。   If it is determined in S22 that the status of the session is “normal”, the database I / O unit 30 waits for the update instruction (S24). For example, the update instruction is held in the database I / O unit 30 itself.

すなわち、S22で当該セッションのステータスが「通常」であるとわかった時点では、オンラインバックアップの準備が始まっており、かつ、当該セッションの更新対象のオブジェクトの更新処理がまだ1つも始まっていないか又はそれら更新対象のすべてのオブジェクトの更新が「確定」されている。複数のアプリケーションが、まとめて更新すべき互いに関連する複数のオブジェクトを1セッション内でそれぞれ更新する状況でも、S22の判定結果が「通常」であれば、それら複数のオブジェクトの更新はすべて確定されている。したがって、この時点では、データベース20は、そのセッションの発行元のそれら複数のアプリケーションすべてから見て「整合性がとれている状態」であり、この状態でオンラインバックアップを行っても問題はない。そこで、この場合は、更新処理の指示を待機させる(S24)のである。   That is, when it is determined in S22 that the status of the session is “normal”, preparation for online backup has started and update processing of the object to be updated in the session has not yet started. The update of all the objects to be updated is “confirmed”. Even in a situation where a plurality of applications update a plurality of mutually related objects to be updated together in one session, if the determination result in S22 is “normal”, all the updates of the plurality of objects are confirmed. Yes. Therefore, at this point, the database 20 is in a “consistent state” when viewed from all of the plurality of applications that issued the session, and there is no problem even if online backup is performed in this state. Therefore, in this case, an instruction for update processing is waited (S24).

また、データベースI/O部30は、S24で更新指示を待機させた場合、その更新指示を送ってきたアプリケーションに対して、その更新指示を待機させた旨を示す情報を送ってもよい。また、その情報を待機させた時点で送る代わりに、あるいはそれに加えて、アプリケーションからその更新指示の状況の問い合わせが到来したときに、その情報をアプリケーションに回答してもよい。アプリケーションは、その情報により、更新指示が待機中であることを知ることができ、更新指示に応じたデータベース更新処理が遅れているのが、エラーなどの不具合ではなく、(オンラインバックアップのための)正常な待機のためであることがわかる。アプリケーションは、データベースI/O部30から提供された待機の旨の情報に応じて、現在データベース20のオンラインバックアップ中であるためデータベースの更新が遅れることなどを知らせるメッセージを表示してもよい。   Further, when the database I / O unit 30 waits for an update instruction in S24, the database I / O unit 30 may send information indicating that the update instruction has been waited to the application that has sent the update instruction. Further, instead of sending the information at the time of waiting, or in addition, when the inquiry about the status of the update instruction comes from the application, the information may be returned to the application. The application can know from the information that the update instruction is waiting, and the database update process in response to the update instruction is delayed because of a failure such as an error (for online backup) It turns out that it is for normal waiting. The application may display a message notifying that the update of the database is delayed because the database 20 is currently being backed up online according to the information indicating that the standby is provided from the database I / O unit 30.

S16の判定に戻ると、データベースI/O部30は、この判定で自分自身のステータスが「抑制完了」であることがわかると、更新指示を待機させる(S24)。「抑制完了」状態では、「抑制依頼中」状態の開始時点でデータベースI/O部30が既に始めていたデータベース更新はすべて確定され、アプリケーションにとって「整合性がとれている状態」となっているので、更新指示に対応するセッションのステータスを確認するまでもなく、その更新指示を待機させるのである。   Returning to the determination in S16, the database I / O unit 30 waits for an update instruction when it is determined by this determination that its own status is “completion of suppression” (S24). In the “Suppression Completed” state, all database updates that the database I / O unit 30 has already started at the start of the “Suppression Requesting” state are confirmed and are in a “consistent state” for the application. The update instruction is made to wait without confirming the status of the session corresponding to the update instruction.

このようにして、すべてのデータベースI/O部30が「抑制完了」状態である間(この間は、すべてのアプリケーションから発せられるすべての更新指示が待機させられる)に、オンラインバックアップが実行される(詳しくは,図6の手順を参照)。   In this way, online backup is executed while all the database I / O units 30 are in the “suppression complete” state (all update instructions issued from all applications are kept waiting during this period) ( For details, see the procedure in FIG.

そして、S24の後、データベースI/O部30は、例えば定期的に、ステータス管理部32内の自分自身のステータスを確認し(S26)、そのステータスが「通常」に戻っているかどうかを判定する(S28)。S16の時点で「抑制依頼中」又は「抑制完了」状態であったデータベースI/O部30が「通常」状態に戻るのは、オンラインバックアップが完了した場合である(後述する図5の手順を参照)。したがって、S28の判定結果がYESであれば、オンラインバックアップは既に完了しているので、データベースI/O部30は、それまでに待機させていた更新指示を順にデータベース20に転送し、各指示に応じてオブジェクトの更新処理を行わせる(S12)。一方、S28の判定結果がNOであれば、オンラインバックアップはまだ完了していないと言うことなので、S24に戻り、更新指示の待機を続行する。   Then, after S24, for example, the database I / O unit 30 periodically checks its own status in the status management unit 32 (S26), and determines whether or not the status has returned to “normal”. (S28). The database I / O unit 30 that was in the “suppression requesting” or “suppression complete” state at the time of S16 returns to the “normal” state when the online backup is completed (the procedure of FIG. 5 described later is performed). reference). Therefore, if the determination result in S28 is YES, the online backup has already been completed, so the database I / O unit 30 sequentially transfers the update instructions that have been on standby until then to the database 20, and responds to each instruction. Accordingly, an object update process is performed (S12). On the other hand, if the determination result in S28 is NO, it means that the online backup has not been completed yet, so the process returns to S24 to continue waiting for an update instruction.

さて、S10の判定に戻ると、ここで判定した指示の種別が「更新確定」であれば、データベースI/O部30は、その更新確定指示をデータベース20に転送する(S30)。これにより、データベース20は、その更新確定指示の対象である各オブジェクトの更新を確定する。これにより、それら各オブジェクトの値は、アプリケーションにとって「整合性のとれている状態」で確定される。逆に言えば、更新指示に応じてデータ内容の更新が行われたとしても、まだ更新確定指示が来ていないオブジェクトのデータ内容は、アプリケーションにとって「整合性がとれていない状態」である可能性がある。   Now, returning to the determination in S10, if the type of instruction determined here is “update confirmed”, the database I / O unit 30 transfers the update confirmed instruction to the database 20 (S30). As a result, the database 20 confirms the update of each object that is the target of the update confirmation instruction. As a result, the values of these objects are determined in a “consistent state” for the application. In other words, even if the data content is updated in response to the update instruction, the data content of the object for which an update confirmation instruction has not yet been received may be in an “inconsistent state” for the application There is.

このようにして各オブジェクトの更新処理を確定した後、データベースI/O部30は、ステータス管理部32内のセッションステータス管理テーブルにアクセスし、当該更新確定処理のセッションIDと当該データベースI/O部30のアプリケーションIDとの組に対応するステータスの値を「通常」にする(S32)。すなわち、更新確定指示が到来すると言うことは、必ずその前に更新指示が到来しており、その更新指示に応じ、当該指示に係るセッションのステータスが「更新中」にセットされている(S18)はずなので、これを「通常」に戻す。このように、S32の時点では、更新確定により、更新確定指示を発したアプリケーションが当該セッションでそれまでに更新していたオブジェクトはすべて確定され、「整合性のとれている状態」となっているので、当該アプリケーションについての当該セッションの状態を「通常」に戻すことで、それ以降にそのアプリケーションから新たな更新指示が来てもそれを待機させるようにするのである(S22及びS24参照)。   After confirming the update processing of each object in this way, the database I / O unit 30 accesses the session status management table in the status management unit 32, and determines the session ID of the update confirmation processing and the database I / O unit. The status value corresponding to the set of 30 application IDs is set to “normal” (S32). That is, when an update confirmation instruction arrives, the update instruction has always arrived, and the status of the session related to the instruction is set to “Updating” according to the update instruction (S18). This should be returned to “normal”. As described above, at the time of S32, all the objects that have been updated in the session by the application that issued the update confirmation instruction are confirmed by the update confirmation, and are in a “consistent state”. Therefore, by returning the state of the session for the application to “normal”, even if a new update instruction is subsequently received from the application, it is made to wait (see S22 and S24).

その後、データベースI/O部30は、ステータス管理部32を参照して自分自身のステータスを確認し(S34)、確認したステータスが「抑制依頼中」であるか否かを判定する(S36)。この判定の結果がYESの場合、更に、ステータス管理部32を参照して、当該データベースI/O部30に対応するアプリケーションが実行しているすべてのセッション(すなわちそのアプリケーションのIDに対応する各セッション)が「通常」状態であるかどうかを判定する(S38)。S38の判定結果がYESの場合、当該データベースI/O部30が実行していたすべてのセッションにおけるデータベース更新がすべて確定され、「整合性がとれている状態」となっている。したがって、この場合データベースI/O部30は、ステータス管理部32が保持している当該データベースI/O部30の状態(すなわち当該I/O部30に対応するアプリケーションのステータス)を「抑制依頼中」から「抑制完了」に変更する(S40)。これ以降、データベースI/O部30のステータスが「通常」に戻るまでの間は、データベースI/O部30はすべてのアプリケーションからのすべての更新指示を待機させる(S16及びS24参照)ことで、データベース20のオンラインバックアップが実行できる状況を整える。S40でデータベースI/O部30のステータスを変更した後、データベースI/O部30は、その更新確定指示についての処理を終了する。   Thereafter, the database I / O unit 30 refers to the status management unit 32 to confirm its own status (S34), and determines whether or not the confirmed status is “requesting suppression” (S36). If the result of this determination is YES, further, referring to the status management unit 32, all sessions executed by the application corresponding to the database I / O unit 30 (that is, each session corresponding to the ID of the application) ) Is in the “normal” state (S38). When the determination result in S38 is YES, all database updates in all sessions executed by the database I / O unit 30 are confirmed, and the state is “consistent”. Accordingly, in this case, the database I / O unit 30 sets the status of the database I / O unit 30 held by the status management unit 32 (that is, the status of the application corresponding to the I / O unit 30) to “Suppression requesting”. To “completion of suppression” (S40). Thereafter, until the status of the database I / O unit 30 returns to “normal”, the database I / O unit 30 waits for all update instructions from all applications (see S16 and S24). Prepare a situation where online backup of the database 20 can be executed. After changing the status of the database I / O unit 30 in S40, the database I / O unit 30 ends the process for the update confirmation instruction.

また、S36又はS38の判定結果がNOである場合には、ステータス管理部32のテーブルに保持されたデータベースI/O部30自身のステータスを変更せずに、当該更新確定指示についての処理を終了する。   If the determination result in S36 or S38 is NO, the processing for the update confirmation instruction is terminated without changing the status of the database I / O unit 30 itself stored in the table of the status management unit 32. To do.

次に、図5を参照して、オンラインバックアップトリガー部34の処理手順の例を説明する。   Next, an example of the processing procedure of the online backup trigger unit 34 will be described with reference to FIG.

図5の手順は、オンラインバックアップの開始条件が満たされた場合、例えばユーザから開始指示があった場合や、あらかじめ定めた規則により定まる開始タイミングが到来したときに、開始される。オンラインバックアップのタイミングを決める規則は、従来のものと同様でよい。一例を挙げるならば、定期的なオンラインバックアップのタイミングを規定する規則がある。   The procedure of FIG. 5 is started when the online backup start condition is satisfied, for example, when a start instruction is given from the user, or when a start timing determined by a predetermined rule arrives. The rules for determining the timing of online backup may be the same as the conventional one. For example, there are rules that govern the timing of regular online backups.

この処理では、オンラインバックアップトリガー部34は、まず、ステータス管理部32のI/Oステータス管理テーブルを参照して、すべてのデータベースI/O部30のステータスを確認する(S50)。そして、それらデータベースI/O部30のステータスがすべて「通常」、それらステータスのうちの少なくとも1つが「抑制依頼中」、又は、それらステータスのすべてが「抑制完了中」、のいずれであるかを判定する(S52)。   In this process, the online backup trigger unit 34 first checks the status of all the database I / O units 30 with reference to the I / O status management table of the status management unit 32 (S50). Whether the statuses of the database I / O units 30 are all “normal”, at least one of the statuses is “requesting suppression”, or whether all of these statuses are “completion of suppression”. Determine (S52).

この判定の結果が、データベースI/O部30のステータスがすべて「抑制完了」であるか、又は少なくとも1つが「抑制依頼中」である場合には、オンラインバックアップトリガー部34は、今回のオンラインバックアップを取りやめるなどのエラー処理を行う(S54)。このような場合が生じるのは、例えば、前回のオンラインバックアップが完了していない時点で、今回のオンラインバックアップのタイミングが到来するなどの異常な場合なので、エラー処理を行うのである。   If the result of this determination is that all the statuses of the database I / O unit 30 are “suppression complete” or at least one is “request for suppression”, the online backup trigger unit 34 determines that the online backup Error processing such as canceling is performed (S54). Such a case occurs because, for example, when the previous online backup has not been completed and the current online backup timing has come to an abnormal case, error processing is performed.

一方、S52の判定の結果、データベースI/O部30のステータスがすべて「通常」であることがわかると、オンラインバックアップトリガー部34は、ステータス管理部32のI/Oステータス管理テーブル内の、すべてのデータベースI/O部30のステータスを「抑制依頼中」に変更する(S56)。データベースI/O部30は、更新指示をデータベース20に取り次ぐか待機させるかを判定する際、I/Oステータス管理テーブル内の自分自身のステータスを確認するので、S56でのステータス変更は、データベースI/O部30に対して「抑制依頼」を行うことと実質的に等価である。   On the other hand, if the status of the database I / O unit 30 is all “normal” as a result of the determination in S52, the online backup trigger unit 34 determines that all of the statuses in the I / O status management table of the status management unit 32 are present. The status of the database I / O unit 30 is changed to “suppressing request” (S56). The database I / O unit 30 checks its own status in the I / O status management table when determining whether to wait for the update instruction to be transferred to the database 20 or not. This is substantially equivalent to performing a “suppression request” for the / O unit 30.

S56の後、オンラインバックアップトリガー部34は、今回行おうとしているオンラインバックアップ処理を待機させる(S58)。そして、I/Oステータス管理テーブルを例えば定期的に監視して、すべてのデータベースI/O部30のステータスを確認し(S60)、それらステータスがすべて「抑制完了」となっているかどうかを判定する(S62)。「抑制依頼中」のままのデータベースI/O部30が1つでもあれば、S62の判定結果はNOとなる。この場合、オンラインバックアップトリガー部34は、オンラインバックアップの実行の待機を続ける(S58)。この待機は、S62で、すべてのデータベースI/O部30のステータスが「抑制完了」となったと判定されるまで続く。   After S56, the online backup trigger unit 34 waits for the online backup process to be performed this time (S58). Then, for example, the I / O status management table is periodically monitored to check the statuses of all the database I / O units 30 (S60) and determine whether or not all the statuses are “suppression complete”. (S62). If there is even one database I / O unit 30 that is still “in request of suppression”, the determination result in S62 is NO. In this case, the online backup trigger unit 34 continues to wait for online backup (S58). This standby continues until it is determined in S62 that the statuses of all the database I / O units 30 are “suppression complete”.

S62ですべてのデータベースI/O部30のステータスが「抑制完了」となったと判定されると、オンラインバックアップトリガー部34は、オンラインバックアップ部22に対してオンラインバックアップの実行を指示する(S64)。すなわち、この状態では、すべてのアプリケーションからの更新指示が待機させられていると共に、データベース20はすべてのアプリケーションにとって「整合性がとれている状態」なので、オンラインバックアップを実行するのである。オンラインバックアップ部22は、この指示に応じて、データベース20のオンラインバックアップを実行する。   If it is determined in S62 that the statuses of all the database I / O units 30 are “suppression complete”, the online backup trigger unit 34 instructs the online backup unit 22 to execute online backup (S64). That is, in this state, update instructions from all applications are kept waiting, and the database 20 is in a “consistent state” for all applications, so online backup is executed. The online backup unit 22 performs online backup of the database 20 in response to this instruction.

データベース20のオンラインバックアップが完了すると、オンラインバックアップ部22は、オンラインバックアップトリガー部34に対して、オンラインバックアップが完了した旨を通知する。この通知を受けたオンラインバックアップトリガー部34は、ステータス管理部32内のI/Oステータス管理テーブルにおけるすべてのデータベースI/O部30のステータスを、「抑制完了」から「通常」に変更する(S66)。これにより、各データベースI/O部30は、いままで待機させていた更新指示をデータベース20に転送する(図4のS28からS12に続く流れを参照)。   When the online backup of the database 20 is completed, the online backup unit 22 notifies the online backup trigger unit 34 that the online backup is completed. Upon receiving this notification, the online backup trigger unit 34 changes the status of all the database I / O units 30 in the I / O status management table in the status management unit 32 from “supplement complete” to “normal” (S66). ). Thereby, each database I / O unit 30 transfers the update instruction that has been on standby until now to the database 20 (see the flow from S28 to S12 in FIG. 4).

以上に説明したデータベースI/O部30の処理(図4参照)とオンラインバックアップトリガー部34の処理(図5参照)との連携により、データベース20がすべてのアプリケーションにとって整合性がとれている状態で、オンラインバックアップが実行される。   In the state in which the database 20 is consistent for all the applications by the cooperation of the processing of the database I / O unit 30 (see FIG. 4) and the processing of the online backup trigger unit 34 (see FIG. 5) described above. An online backup is performed.

次に、図6を参照して、具体的な処理の流れの中での、ステータス管理部32内のI/Oステータス管理テーブルの変遷の例を説明する。   Next, an example of transition of the I / O status management table in the status management unit 32 in a specific processing flow will be described with reference to FIG.

まず、データベース20が起動したが、まだどのアプリケーション10a、10bからもアクセスがない場合は、I/Oステータス管理テーブルは空である(図6の(1))。   First, when the database 20 is activated but there is no access from any of the applications 10a and 10b, the I / O status management table is empty ((1) in FIG. 6).

この後、あるアプリケーション(IDが「0001」であるとする)が、データベース20へアクセスするための初期化処理を実行すると、このアプリケーションに対応するデータベースI/O部30が起動され、そのデータベースI/O部30がI/Oステータス管理テーブルに対して、そのアプリケーションID「0001」に対応するエントリを追加し、そのエントリのステータス値を「通常」に設定する(図6の(2))。   Thereafter, when an application (assuming that the ID is “0001”) executes an initialization process for accessing the database 20, the database I / O unit 30 corresponding to the application is started, and the database I The / O unit 30 adds an entry corresponding to the application ID “0001” to the I / O status management table, and sets the status value of the entry to “normal” ((2) in FIG. 6).

その後、別のアプリケーション(ID「0002」)が、データベース20へアクセスするための初期化を実行すると、このアプリケーションに対応するデータベースI/O部30がI/Oステータス管理テーブルに対して、そのアプリケーションID「0002」に対応するエントリを追加し、そのエントリのステータス値を「通常」に設定する(図6の(3))。   After that, when another application (ID “0002”) executes initialization for accessing the database 20, the database I / O unit 30 corresponding to this application applies the application to the I / O status management table. An entry corresponding to the ID “0002” is added, and the status value of the entry is set to “normal” ((3) in FIG. 6).

次に、データベース20を管理するユーザが、本システムに対して、オンラインバックアップの実行を指示すると、その指示を受けたオンラインバックアップトリガー部34が、その時点でI/Oステータス管理テーブルに登録されているすべてのエントリ(上述した2つのアプリケーションに対応)のステータス値を「抑制依頼中」に変更する(図6の(4))。   Next, when the user who manages the database 20 instructs the system to execute online backup, the online backup trigger unit 34 that has received the instruction is registered in the I / O status management table at that time. The status values of all existing entries (corresponding to the two applications described above) are changed to “Suppression requested” ((4) in FIG. 6).

それら2つのアプリケーションに対応する各データベースI/O部30は、そのステータス変更を検知し、既に開始しているまとめて更新すべき一連のオブジェクトの更新は続行するが、それ以外の新たな更新処理は待機させる。そして、例えばアプリケーション「0001」が実行中の更新処理がすべて確定した場合には、そのアプリケーションに対応するデータベースI/O部30は、I/Oステータス管理テーブル内のそのアプリケーション「0001」のエントリのステータスを「抑制完了」に変更する(図6の(5))。   Each database I / O unit 30 corresponding to these two applications detects the status change, and continues to update a series of objects that have already started and should be updated together, but other new update processing Makes you wait. For example, when all update processes being executed by the application “0001” are confirmed, the database I / O unit 30 corresponding to the application has the entry of the application “0001” in the I / O status management table. The status is changed to “completion of suppression” ((5) in FIG. 6).

その後アプリケーション「0002」が実行中の更新処理がすべて確定すると、対応するデータベースI/O部30が、I/Oステータス管理テーブル内のID「0002」のエントリのステータスを「抑制完了」に変更する(図6の(6))。   Thereafter, when all update processes being executed by the application “0002” are confirmed, the corresponding database I / O unit 30 changes the status of the entry with the ID “0002” in the I / O status management table to “suppression completed”. ((6) in FIG. 6).

このようにしてI/Oステータス管理テーブル内のすべてのエントリのステータスが「抑制完了」になると、オンラインバックアップトリガー部34は、オンラインバックアップ部22に対してデータベース20のオンラインバックアップを開始させる。   When the status of all entries in the I / O status management table becomes “suppression complete” in this way, the online backup trigger unit 34 causes the online backup unit 22 to start online backup of the database 20.

そして、そのオンラインバックアップが成功裏に完了すると、オンラインバックアップトリガー部34は、I/Oステータス管理テーブル内のすべてのエントリのステータスを「通常」に戻す(図6の(7))。これにより、データベース20に対する更新が再開され、各データベースI/O部30は、「抑制依頼中」及び「抑制完了」状態の時に待機させた更新指示をデータベース20に伝達し、更新を実行させる。   When the online backup is successfully completed, the online backup trigger unit 34 returns the status of all entries in the I / O status management table to “normal” ((7) in FIG. 6). As a result, the update to the database 20 is resumed, and each database I / O unit 30 transmits to the database 20 the update instruction that has been put on standby when in the “suppression requesting” and “suppression complete” states, and executes the update.

以上、本発明の実施形態を説明した。以上に説明したように、本実施形態では、データベース20が複数のアプリケーションのすべてからみて整合性のとれている状態となるように制御し、そのような状態になるとオンラインバックアップを実行する。したがって、オンラインバックアップにより生成されるバックアップデータは、複数のアプリケーションのすべてからみて整合性のとれているものとなっており、いずれのアプリケーションからも利用しやすいものとなっている。   The embodiments of the present invention have been described above. As described above, in this embodiment, the database 20 is controlled so as to be in a consistent state in view of all of a plurality of applications, and when such a state is reached, online backup is executed. Therefore, the backup data generated by online backup is consistent from the viewpoint of all of the plurality of applications, and is easy to use from any application.

また、上記実施形態では、データベース20内のまとめて更新すべき互いに関連するオブジェクト群を、複数のアプリケーションが連携して更新する場合でも、データベース20がそれら複数のアプリケーションすべてにとって「整合性のとれている状態」となっているときにオンラインバックアップが行われる。   Further, in the above embodiment, even when a plurality of applications cooperate with each other and update a group of objects that should be updated together in the database 20, the database 20 is “consistent” for all of the plurality of applications. Online backup will be performed when

以上に説明した実施形態はあくまで一例に過ぎず、本発明の技術的思想の範囲内で様々な変形が考えられる。   The embodiment described above is merely an example, and various modifications are conceivable within the scope of the technical idea of the present invention.

例えば、図1の例では、アプリケーション10a、10bの各々に対応してそれぞれ個別にデータベースI/O部30を設けたが、この代わりにデータベースI/O部30を1つだけ設けることとし、複数のアプリケーションがその唯一のデータベースI/O部30を介してデータベース20とやりとりを行うようにしてもよい。ただし、この場合その唯一のデータベースI/O部30は、受け取った更新指示等の指示がどのアプリケーションからのものかを認識する必要がある。データベースI/O部30は、その認識の結果に従い、その指示に対するデータベース20からの応答を、その指示の発信元のアプリケーションに返す。また、この場合、ステータス管理部32内のI/Oステータス管理テーブルは、データベースI/O部30のステータスの代わりに、各アプリケーションのステータスを管理する。ただし、上記実施形態のI/Oステータス管理テーブルは、もともと、各アプリケーションに対して一対一に対応するデータベースI/O部30のステータスを、それら各アプリケーションのIDに対応づけて管理していたので、そのテーブルのデータ構造は上記実施形態のものと同様(図2参照)でよい。また、データベースI/O部30を1つだけ設ける構成の場合、そのデータベースI/O部30は、アプリケーションから更新確定指示を受け取ると、その更新確定指示を発したアプリケーションのIDを特定し、そのI/Oステータス管理テーブル内のそのアプリケーションIDに対応するエントリのステータスを「抑制完了」に書き換えればよい。   For example, in the example of FIG. 1, the database I / O unit 30 is individually provided corresponding to each of the applications 10a and 10b. Instead, only one database I / O unit 30 is provided, and a plurality of database I / O units 30 are provided. May communicate with the database 20 via the only database I / O unit 30. However, in this case, the only database I / O unit 30 needs to recognize from which application the received instruction such as an update instruction is. In accordance with the recognition result, the database I / O unit 30 returns a response from the database 20 to the instruction to the application that has transmitted the instruction. In this case, the I / O status management table in the status management unit 32 manages the status of each application instead of the status of the database I / O unit 30. However, the I / O status management table of the above embodiment originally managed the status of the database I / O unit 30 corresponding to each application in a one-to-one correspondence with the ID of each application. The data structure of the table may be the same as that of the above embodiment (see FIG. 2). Further, in the case of a configuration in which only one database I / O unit 30 is provided, when the database I / O unit 30 receives an update confirmation instruction from an application, the database I / O unit 30 identifies the ID of the application that issued the update confirmation instruction. The status of the entry corresponding to the application ID in the I / O status management table may be rewritten to “Suppression completed”.

また、図1の例では、データベースI/O部30、ステータス管理部32、及びオンラインバックアップトリガー部34をそれぞれ別々の機能モジュールとして実現しているが、この代わりに、それら3種のモジュールの機能を1つの機能モジュールとして実装してもよいし、それら3種のうちの2種のモジュールの機能を1つのモジュールにまとめて実装してもよい。例えば、ステータス管理部32とオンラインバックアップトリガー部34とを1つの機能モジュールにまとめて実装してもよい。   In the example of FIG. 1, the database I / O unit 30, the status management unit 32, and the online backup trigger unit 34 are realized as separate functional modules, but instead, the functions of these three types of modules are implemented. May be mounted as one functional module, or the functions of two of these three types of modules may be combined into one module and mounted. For example, the status management unit 32 and the online backup trigger unit 34 may be mounted together in one functional module.

また、上記実施形態では、S24(図4)にて更新指示の実行を待機させたが、この代わりに、更新指示の発行元のアプリケーションに対し、現時点ではオンラインバックアップのために更新ができない旨を通知した上で、その更新指示を破棄するようにしてもよい。この場合、アプリケーションは、データベースI/O部30等からオンラインバックアップの完了通知を受けた後、破棄された更新指示を再度発行すればよい。なお、S24にて更新指示の実行を待機させる上記実施形態の方式の方が、アプリケーションの処理負担が少なく、また既存のアプリケーションを本実施形態のシステムに対応させるための改変も少なくて済む。   In the above embodiment, the execution of the update instruction is waited in S24 (FIG. 4). Instead, the update source issuer application cannot be updated for online backup at this time. After the notification, the update instruction may be discarded. In this case, after receiving an online backup completion notification from the database I / O unit 30 or the like, the application may issue a discarded update instruction again. Note that the method of the above-described embodiment that waits for the execution of the update instruction in S24 requires less processing load on the application, and requires fewer modifications to make the existing application compatible with the system of the present embodiment.

10a,10b アプリケーション、20 データベース、22 オンラインバックアップ部、30 データベースI/O部、32 ステータス管理部、34 オンラインバックアップトリガー部。
10a, 10b Application, 20 database, 22 online backup unit, 30 database I / O unit, 32 status management unit, 34 online backup trigger unit.

Claims (3)

複数のアプリケーションの各々の状態を記憶する状態記憶手段と、
前記複数のアプリケーションのうちの少なくとも1つからデータベースの更新指示を受け取り、受け取った前記更新指示に応じて前記データベースを更新するか否かを制御する少なくとも1つの更新制御手段と、
前記データベースのオンラインバックアップの開始条件が満たされた場合、前記状態記憶手段に記憶された前記複数のアプリケーションの状態をすべてあらかじめ定められた第1の状態とすると共に、前記状態記憶手段に記憶された前記複数のアプリケーションの状態がすべてあらかじめ定められた第2の状態となったことを検知すると、前記データベースのオンラインバックアップを開始するための制御を行うオンラインバックアップ制御手段と、
を有し、
前記更新制御手段は、受け取った前記更新指示を発したアプリケーションの状態が前記第1の状態である場合、当該更新指示に対応するセッションにおける当該アプリケーションからの他の更新指示に応じて前記データベースの更新を既に行っており且つ当該セッションについての更新確定指示を当該アプリケーションからまだ受け取っていなければ、前記更新指示に応じて前記データベースを更新し、受け取った前記更新指示に対応するセッションについての更新確定指示を当該アプリケーションから既に受け取っているか又は当該更新指示の前に当該セッションにおける他の更新指示に応じて前記データベースの更新を一度も行っていなければ、当該更新指示に応じた前記データベースの更新を少なくとも前記オンラインバックアップが完了するまでは取りやめると共に、前記第1の状態にある前記アプリケーションが実行しているすべてのセッションについて前記更新指示に応じた前記データベースの更新を取りやめた状態となると、前記状態記憶手段に記憶された当該アプリケーションの状態を前記第2の状態に変更する、
ことを特徴とするオンラインバックアップ制御システム。
State storage means for storing the state of each of a plurality of applications;
At least one update control means for receiving a database update instruction from at least one of the plurality of applications and controlling whether to update the database according to the received update instruction;
When the start condition for online backup of the database is satisfied, all the states of the plurality of applications stored in the state storage unit are set to a predetermined first state and stored in the state storage unit An online backup control means for performing control for starting online backup of the database when detecting that all of the plurality of applications are in a predetermined second state;
Have
When the state of the application that issued the received update instruction is the first state, the update control means updates the database in accordance with another update instruction from the application in a session corresponding to the update instruction. Has already been performed and the update confirmation instruction for the session has not been received from the application, the database is updated according to the update instruction, and an update confirmation instruction for the session corresponding to the received update instruction is issued. If the database has already been received from the application or has not been updated in response to another update instruction in the session before the update instruction, at least the online update of the database in accordance with the update instruction has been made Backup And canceling the update until completion, and when the update of the database according to the update instruction is canceled for all sessions executed by the application in the first state, the state is stored in the state storage unit. Changing the state of the application to the second state;
An online backup control system characterized by that.
前記更新制御手段は、受け取った前記更新指示に対応するセッションについての更新確定指示を当該アプリケーションから既に受け取っているか又は当該更新指示の前に当該セッションにおける他の更新指示に応じて前記データベースの更新を一度も行っていなければ、当該更新指示を待機させると共に、前記オンラインバックアップが完了すると、待機させていた前記更新指示に応じて前記データベースの更新が行われるようにする、ことを特徴とする請求項1に記載のオンラインバックアップ制御システム。   The update control means has already received an update confirmation instruction for the session corresponding to the received update instruction from the application or updates the database in accordance with another update instruction in the session before the update instruction. The update instruction is awaited if it has never been performed, and when the online backup is completed, the database is updated according to the update instruction that has been waited. The online backup control system according to 1. コンピュータを、
複数のアプリケーションの各々の状態を記憶する状態記憶手段、
前記複数のアプリケーションのうちの少なくとも1つからデータベースの更新指示を受け取り、受け取った前記更新指示に応じて前記データベースを更新するか否かを制御する少なくとも1つの更新制御手段、
前記データベースのオンラインバックアップの開始条件が満たされた場合、前記状態記憶手段に記憶された前記複数のアプリケーションの状態をすべてあらかじめ定められた第1の状態とすると共に、前記状態記憶手段に記憶された前記複数のアプリケーションの状態がすべてあらかじめ定められた第2の状態となったことを検知すると、前記データベースのオンラインバックアップを開始するための制御を行うオンラインバックアップ制御手段、
として機能させるためのプログラムであって、
前記更新制御手段は、受け取った前記更新指示を発したアプリケーションの状態が前記第1の状態である場合、当該更新指示に対応するセッションにおける当該アプリケーションからの他の更新指示に応じて前記データベースの更新を既に行っており且つ当該セッションについての更新確定指示を当該アプリケーションからまだ受け取っていなければ、前記更新指示に応じて前記データベースを更新し、受け取った前記更新指示に対応するセッションについての更新確定指示を当該アプリケーションから既に受け取っているか又は当該更新指示の前に当該セッションにおける他の更新指示に応じて前記データベースの更新を一度も行っていなければ、当該更新指示に応じた前記データベースの更新を少なくとも前記オンラインバックアップが完了するまでは取りやめると共に、前記第1の状態にある前記アプリケーションが実行しているすべてのセッションについて前記更新指示に応じた前記データベースの更新を取りやめた状態となると、前記状態記憶手段に記憶された当該アプリケーションの状態を前記第2の状態に変更する、
ことを特徴とするプログラム。
Computer
Status storage means for storing the status of each of a plurality of applications;
At least one update control means for receiving a database update instruction from at least one of the plurality of applications and controlling whether to update the database in accordance with the received update instruction;
When the start condition for online backup of the database is satisfied, all the states of the plurality of applications stored in the state storage unit are set to a predetermined first state and stored in the state storage unit An online backup control means for performing control for starting an online backup of the database when detecting that all of the plurality of applications are in a predetermined second state;
Is a program for functioning as
When the state of the application that issued the received update instruction is the first state, the update control means updates the database in accordance with another update instruction from the application in a session corresponding to the update instruction. Has already been performed and the update confirmation instruction for the session has not been received from the application, the database is updated according to the update instruction, and an update confirmation instruction for the session corresponding to the received update instruction is issued. If the database has already been received from the application or has not been updated in response to another update instruction in the session before the update instruction, at least the online update of the database in accordance with the update instruction has been made Backup And canceling the update until completion, and when the update of the database according to the update instruction is canceled for all sessions executed by the application in the first state, the state is stored in the state storage unit. Changing the state of the application to the second state;
A program characterized by that.
JP2013123373A 2013-06-12 2013-06-12 Online backup control system and program Expired - Fee Related JP6089985B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013123373A JP6089985B2 (en) 2013-06-12 2013-06-12 Online backup control system and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013123373A JP6089985B2 (en) 2013-06-12 2013-06-12 Online backup control system and program

Publications (2)

Publication Number Publication Date
JP2014241059A JP2014241059A (en) 2014-12-25
JP6089985B2 true JP6089985B2 (en) 2017-03-08

Family

ID=52140269

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013123373A Expired - Fee Related JP6089985B2 (en) 2013-06-12 2013-06-12 Online backup control system and program

Country Status (1)

Country Link
JP (1) JP6089985B2 (en)

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3952640B2 (en) * 1999-09-07 2007-08-01 株式会社日立製作所 Data backup method, mainframe storage system, and mainframe host computer
JP2002318717A (en) * 2001-04-19 2002-10-31 Ricoh Co Ltd Database system
JP2012068693A (en) * 2010-09-21 2012-04-05 Mitsubishi Electric Corp Database management device, database management method, and program

Also Published As

Publication number Publication date
JP2014241059A (en) 2014-12-25

Similar Documents

Publication Publication Date Title
US9984140B1 (en) Lease based leader election system
JP4277873B2 (en) Transaction processing apparatus and transaction processing method
JP6001773B2 (en) Nondisruptive controller replacement in network storage systems
JP6700815B2 (en) License management system, client device, application program
US7823008B2 (en) Maintaining consistency in a remote copy data storage system
JP2009223780A (en) Data replication method and data replication system
JP2013171301A (en) Device, method, and program for job continuation management
US20170126908A1 (en) Robust mesh printer network with distributed queue management
US11500812B2 (en) Intermediate file processing method, client, server, and system
CN111062723B (en) Virtual account transfer method, device, system and storage medium
US8234243B2 (en) Third tier transactional commit for asynchronous replication
JP5900094B2 (en) Data alignment system, data alignment method, and data alignment program
CN110737716B (en) Data writing method and device
JP2007058506A (en) Document management server, document management system, and document management program and its recording medium
US9846555B2 (en) Storage system and method of creating backup of storage system
JP6089985B2 (en) Online backup control system and program
JP7243207B2 (en) Information processing system, information processing device and program
JP2007286952A (en) Server system and server load reduction method
JP4305007B2 (en) System switching system, processing method therefor, and processing program therefor
JP2020008999A (en) Information processing system, information processing apparatus, and control program
JP6172294B2 (en) Transaction distributed processing apparatus, method, system, and storage medium
JP2009098715A (en) Redundant system device, job execution method in redundant system device, and execution program
US9300738B2 (en) Virtual state machine for managing operation requests in a client server environment
US20190073128A1 (en) Computer system, data management method, and data management program
CN104220982A (en) Transaction processing method and device

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20160218

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20161220

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20170123

R150 Certificate of patent or registration of utility model

Ref document number: 6089985

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

LAPS Cancellation because of no payment of annual fees