JP2008146118A - Method for update and recovery of database in computer system - Google Patents
Method for update and recovery of database in computer system Download PDFInfo
- Publication number
- JP2008146118A JP2008146118A JP2006328933A JP2006328933A JP2008146118A JP 2008146118 A JP2008146118 A JP 2008146118A JP 2006328933 A JP2006328933 A JP 2006328933A JP 2006328933 A JP2006328933 A JP 2006328933A JP 2008146118 A JP2008146118 A JP 2008146118A
- Authority
- JP
- Japan
- Prior art keywords
- data
- update
- database
- time
- recovery
- 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.)
- Pending
Links
Images
Landscapes
- Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
Abstract
Description
本発明はコンピュータシステムにおけるデータベースの更新と回復の方法に関し、特に、在庫データベース等の数値の加減算による更新処理が主となるデータベースに対して、データ回復とともに不正データ混入時のデータ修正を容易にするデータベースの更新と回復の方法に関する。 The present invention relates to a method for updating and recovering a database in a computer system, and in particular, for a database mainly performing update processing by addition and subtraction of numerical values such as an inventory database, data correction and data correction when illegal data are mixed are facilitated. It relates to database update and recovery methods.
近年コンピュータシステムにおいて、データベースの障害に備えて更新履歴を取得し、障害時のデータ回復に備える技術が実用化されている。 In recent years, in computer systems, a technique for acquiring an update history in preparation for a database failure and preparing for data recovery in the event of a failure has been put into practical use.
例えば特開平01-166232号公報記載のようにデータベース更新時、更新履歴情報として更新前情報と更新日時を蓄積していくことで、希望する時点のデータ回復を実現する。 For example, as described in Japanese Patent Laid-Open No. 01-166232, at the time of database update, pre-update information and update date and time are accumulated as update history information, thereby realizing data recovery at a desired time.
従来の技術では、不正データが混入した事が判明した場合、不正データ混入以前の時点までデータを戻すかその影響を調査して個別にデータパッチを実施する必要がある。特に在庫データベースのような数値の加減算による更新処理が主となるデータベースについては、不正データから正しい数値(例えば、現在の在庫数量等)を計算してデータバッチを行わなければならないため、一度に複数の不正データが出力されてしまった場合等は作業が煩雑になる。 In the conventional technique, when it is determined that illegal data is mixed, it is necessary to return data to a point before the illegal data mixing or to investigate the influence thereof and to execute data patch individually. Especially for databases such as the inventory database, where update processing is mainly performed by adding and subtracting numerical values, it is necessary to calculate a correct numerical value (for example, the current inventory quantity) from incorrect data and perform data batching. If illegal data is output, the operation becomes complicated.
本発明の目的は、障害発生時に希望する時点への迅速なデータ回復を行うとともに、不正データ混入時には容易にデータ修正を行う方法を提供する事にある。 It is an object of the present invention to provide a method for performing quick data recovery to a desired time when a failure occurs and easily correcting data when illegal data is mixed.
上記目的を達成するために、本発明では各業務処理からの更新要求を受け付けてデータベース更新を行うデータ更新処理と、定期的に該当データベースのデータの退避を行うデータ退避処理と、障害発生時のデータ回復を行うデータ回復処理を設ける。 In order to achieve the above object, the present invention accepts an update request from each business process and updates the database, periodically saves data in the corresponding database, saves data in the event of a failure, A data recovery process for performing data recovery is provided.
データ更新処理では、各業務処理から更新要求があった場合、更新内容を元に該当データベースの更新を行うと同時に、更新履歴を出力する。この時、更新履歴に出力する内容は、該当データベースの更新前または後のレコードそのもの(例えば、現在の在庫数量)ではなく、各業務処理から受け取った更新要求内容(例えば、在庫の加減数量)と更新日時を出力し、蓄積する。 In the data update process, when there is an update request from each business process, the corresponding database is updated based on the update contents, and at the same time, an update history is output. At this time, the content to be output to the update history is not the record itself before or after the update of the corresponding database (for example, the current inventory quantity), but the update request content (for example, the inventory increment / decrement quantity) received from each business process. Output and store the update date and time.
データ退避処理では、定期的に該当データベースのレコード全てを退避する。
データ回復処理では、障害発生時に、まずデータ退避処理で退避しておいたデータを回復し、次にデータ退避を行った時点と回復を希望する時点の差分を更新履歴から回復する。不正データ混入時は、データ回復処理前に更新履歴を利用者が修正する事で、データ回復と同時に不正データの回復を可能とする。この時、更新履歴が業務処理からの更新要求内容に準じており、利用者に理解しやすい形で出力されているため、データベースに直接データパッチを実施するよりも容易にデータを修正する事が可能になる。
In the data saving process, all records of the corresponding database are periodically saved.
In the data recovery process, when a failure occurs, the data saved in the data saving process is first recovered, and the difference between the time when the data is saved and the time when the recovery is desired is recovered from the update history. When incorrect data is mixed, the user can correct the update history before the data recovery process, thereby enabling recovery of the incorrect data simultaneously with the data recovery. At this time, since the update history conforms to the update request contents from the business process and is output in a form that is easy for the user to understand, it is easier to correct the data than to apply the data patch directly to the database. It becomes possible.
以上説明したように、本発明によれば、コンピュータシステムにおいて、データ更新時に更新履歴を出力しておく事で障害発生時のデータ回復を実現するだけでなく、業務処理からの更新要求内容を更新履歴として出力することで、特に在庫データベースのような数値の加減算による更新処理が主となるデータベースについて、不正データ混入時には、直接データベースにデータパッチを実施するよりも容易にデータ修正を行うことが可能になる。 As described above, according to the present invention, in a computer system, not only data recovery in the event of a failure is realized by outputting an update history at the time of data update, but also update request contents from business processing are updated. By outputting as a history, especially for databases that mainly perform update processing by adding and subtracting numerical values such as an inventory database, it is possible to correct data more easily than when data patching is performed directly on the database when incorrect data is mixed become.
以下、本発明の実施の形態について図面により詳細に説明する。 Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings.
図1は本発明を適用してデータベースの更新と回復を行う形態を示したものである。図1において、各業務処理111〜113、業務処理からのデータ更新要求を受け付けるデータ更新処理120、定期的にデータの退避を行うデータ退避部130、障害発生時や不正データ混入時にデータの回復を行うデータ回復処理140が、CPU100上で動作する。図1では業務処理は111〜113の3つであるが、コンピュータシステムによってこれらの数は当然変わってくる。また、150はデータ更新処理120によって出力される更新履歴ファイル、160は更新と回復の対象となるデータベース、170はデータ退避処理140により定期的に対象データベースを退避する先である退避データベースである。ここで、対象データベース160は、在庫データベースのような数値の加減算による更新処理が主となるデータベースを想定しており、データは品目、現在の数量、その他情報で構成される。
FIG. 1 shows an embodiment in which the present invention is applied to update and recover a database. In FIG. 1, each
まず、データ更新処理について図2に例を示し説明する。ある業務処理201より、品目Bの在庫数量を20増加するという更新要求202がデータ更新処理203に渡されたとする。この時渡される更新要求202のデータは、品目、加減数量、その他情報で構成されている。データ更新処理203では渡された更新要求202を元に対象データベースの該当品目Bのレコードに更新処理(数量20増加)を実施するとともに、更新要求内容202に更新日時を加えたレコードを更新履歴ファイル204に出力する。即ち、更新履歴のデータは、更新日時、品目、加減数量、その他情報で構成される。以上の処理を業務処理から更新要求を受ける度に繰り返していく事で、対象データ更新と共に更新履歴が蓄積されていく。
First, the data update process will be described with reference to FIG. It is assumed that an
次に、データ退避処理について図3に例を示して説明する。データ退避処理302では、ある時点の対象データベース301のデータを全て退避データベースに複写する処理を定期的に行う。従って、退避データベース303のデータは、対象データベース301と全く同じく、品目、現在の数量、その他情報で構成される。
Next, the data saving process will be described with reference to FIG. In the
最後に、データ回復処理について説明する。データ回復処理では、まずデータ退避処理で退避しておいたデータを回復し、次にデータ退避を行った時点と回復を希望する時点の差分をデータ更新処理で出力しておいた更新履歴から回復する。データ回復処理を実施するべき状況は、障害発生時にデータを復旧させたい場合と、過去に混入した不正データを修正したい場合の2通りに分けられる。 Finally, data recovery processing will be described. In the data recovery process, first the data saved by the data save process is recovered, and then the difference between the time when the data was saved and the time when the data is desired to be recovered is recovered from the update history output by the data update process. To do. There are two situations in which data recovery processing should be performed: a case where it is desired to recover data when a failure occurs and a case where it is desired to correct illegal data mixed in the past.
障害発生時にデータを復旧させたい場合については、蓄積した更新履歴と退避データをそのまま利用してデータ回復を行う処理であり、不正データの混入は無い。この場合のデータ回復処理を、図4のフローチャート及び図5の例に従い説明する。まず、データ回復処理501は利用者に回復指定日時の入力を求める。回復指定日時とは、対象データベース505のどの時点のデータを回復させるかであり、利用者は希望の回復指定日時を入力する(ステップ401)。502はこの時の画面例であり、利用者は画面の指示に従い回復指定日時を入力する。次に、データ回復処理501は、データ退避処理で退避しておいたデータ503を、対象データベース505に回復する(ステップ402)。この時点で対象データベース505は、最後にデータ退避処理が実行された時点(退避日時)の状態に回復する。次に、退避日時と回復指定日時を比較し、その結果によって以降の処理を分岐させる(ステップ403)。退避日時より回復指定日時が新しい場合、更新履歴ファイル504内の、更新日付が退避日時から回復指定日時までの範囲のレコードを順に処理する(ステップ404)事によって、対象データベース505を利用者が指定した回復指定日時の状態まで回復させる事ができる。図5ではこの場合について示しており、更新日時T1からT3の3件が退避日時と回復指定日時の差分であるとすれば、この3件を処理する事で回復指定日時の状態に対象データベース505を回復させる事ができる。逆に退避日時より回復指定日時が古い場合、ステップ404と同様の処理を、時間を遡って順に処理する(ステップ405)事で、対象データベース505を回復指定日時の状態まで回復させる事ができる。
In the case where it is desired to recover data when a failure occurs, this is a process of performing data recovery using the accumulated update history and saved data as they are, and there is no mixing of illegal data. Data recovery processing in this case will be described according to the flowchart of FIG. 4 and the example of FIG. First, the
過去に混入した不正データを修正したい場合については、更新履歴を利用者が修正してから回復させる事で、対象データベースを正しい状態に回復することができる。通常、不正データが混入した場合はデータベースに直接データパッチを実施する手法が考えられるが、在庫データベースのような数値の加減算による更新処理が主となるデータベースの場合、不正データから正しい数値(例えば、現在の在庫数量等)を計算してデータバッチを行わなければならないため、一度に複数の不正データが出力されてしまった場合等は作業が煩雑になる。本発明では、更新履歴が業務処理からの更新要求内容に準じており、利用者に理解しやすい形で出力されているため、データベースに直接データパッチを実施するよりも容易にデータを修正する事が可能になる。また、障害発生時かつ不正データが混入した状態も、この方法で対象データベースを正しい状態に回復する事が可能である。このように、不正データが混入した場合のデータ回復処理を、図6のフローチャート及び図7の例に従い説明する。まず、データ回復処理701は、更新履歴ファイル702をコピーし、利用者による修正がなされる前の状態で修正前更新履歴ファイル703を作成する(ステップ601)。次に、更新履歴ファイル702を、利用者が修正できる形でオープンし、利用者に修正を求める(ステップ602)。利用者は画面上で、不正データレコードの修正や削除などを適切に修正を行う(ステップ603)。704はこの時の画面例であり、更新日時T2のレコードの加減数量が本来20であるべき所が50として更新してしまった場合であり、利用者は画面の指示に従い20に修正する。これにより、修正後更新履歴ファイル705が作成される。次に、データ回復処理701は、ステップ601で作成した修正前更新履歴ファイル703とステップ603で作成した修正後更新履歴ファイル705を比較して差分を検出し、差分が検出されたレコードのうち、最も更新日時の古いレコードの更新日付を、修正開始日時として取得する(ステップ604)。データ回復処理701は利用者に回復指定日時の入力を求め、利用者は希望する回復指定日時を入力する。(ステップ605)。この時の画面例を706に示す。次に、データ回復処理701は、データ退避処理で退避しておいたデータ707を、対象データベース708に回復する(ステップ606)。次に、退避日時と回復指定日時、さらに退避日時と修正開始日時を比較し、その結果によって以降の処理を分岐させる(ステップ607、608)。退避日時より回復指定日時も修正開始日時も新しい場合、修正後更新履歴ファイル内の、更新日付が退避日時から回復指定日時までの範囲のレコードを順に処理する(ステップ609)。図7はこの場合について示しており、更新日時T1からT3の3件が退避日時と回復指定日時の差分であるとすれば、この3件を処理する事で、利用者による更新履歴の修正(更新時刻T2のレコード)を反映させた形で、対象データベース708を回復指定日時の状態まで回復させる事ができる。逆に、退避日時より回復指定日時または修正開始日時が古い場合は、退避日時から回復指定日時までの更新履歴を順に処理しても、利用者による修正が反映されない可能性がある。そのため一旦、修正後更新履歴ファイル内の、更新日付が退避日時から修正開始日時までの範囲のレコードを時間を遡って処理(ステップ610)した後、修正開始日時から回復指定日時までの範囲のレコードを順に処理する(ステップ611)事により、対象データベース708を、利用者による更新履歴の修正を反映させた形で、回復指定日時の状態まで回復させる事ができる。
When it is desired to correct invalid data mixed in the past, the target database can be recovered to a correct state by recovering the update history after the user corrects it. Normally, when incorrect data is mixed, a method of directly patching the database can be considered, but in the case of a database mainly performing update processing by adding and subtracting numerical values such as an inventory database, correct data (for example, The current batch quantity etc.) must be calculated and a data batch must be performed. Therefore, when a plurality of invalid data are output at one time, the work becomes complicated. In the present invention, since the update history conforms to the update request contents from the business process and is output in a form that is easy for the user to understand, the data can be corrected more easily than when the data patch is directly applied to the database. Is possible. Further, even when a failure occurs and a state in which illegal data is mixed, the target database can be restored to a correct state by this method. In this way, the data recovery process when illegal data is mixed will be described according to the flowchart of FIG. 6 and the example of FIG. First, the
以上、本発明の実施の形態について説明したが、本発明は在庫データベースのような数値の加減算による更新処理が主となるデータベースに対して特に有効であるが、それ以外の特性を持つデータベースについても適用可能である。 Although the embodiment of the present invention has been described above, the present invention is particularly effective for a database that mainly performs update processing by addition and subtraction of numerical values such as an inventory database, but also for a database having other characteristics. Applicable.
100…CPU、111、112、113、201…業務処理、120、203…データ更新処理、130、302…データ退避処理、140、501、701…データ回復処理、150、204、504、702…更新履歴ファイル、160、205、301、505、708…更新、回復対象データベース、170、303、503、707…退避データベース、502、706…回復指定時刻入力時の画面例、703…修正前更新履歴ファイル、704…更新履歴修正時の画面例、705…修正後更新履歴ファイル。 100 ... CPU, 111, 112, 113, 201 ... Business processing, 120, 203 ... Data update processing, 130,302 ... Data save processing, 140,501,701 ... Data recovery processing, 150,204,504,702 ... Update History file, 160, 205, 301, 505, 708 ... Update, database to be recovered, 170, 303, 503, 707 ... Saved database, 502, 706 ... Screen example when inputting recovery specified time, 703 ... Update history file before correction 704: Example of screen when update history is corrected, 705: Update history file after correction.
Claims (1)
常時にはデータ更新処理が各業務処理の要求を受けてデータベースの更新を行うと同時に各業務処理からの更新要求内容を更新履歴として出力し、データ退避処理が任意のタイミングで該当データベースのデータを退避しておく事で、
障害時には利用者が希望する時点のデータにデータベースを回復し、また不正データ混入時には利用者が更新履歴を修正することでデータ回復と同時にデータ修正を実現することを特徴とするデータベースの更新と回復の方法。 Has a data update process that processes update requests from each business process, a data save process that periodically saves the data in the database, and a data recovery process that recovers when a failure occurs or illegal data is mixed,
At all times, the data update process receives a request for each business process and updates the database. At the same time, the update request contents from each business process are output as an update history, and the data save process saves the data in the corresponding database at an arbitrary timing. By doing so,
Database update and recovery, characterized in that the database is restored to the data at the time the user wants in the event of a failure, and the data is corrected at the same time as the data recovery by the user correcting the update history when unauthorized data is mixed the method of.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2006328933A JP2008146118A (en) | 2006-12-06 | 2006-12-06 | Method for update and recovery of database in computer system |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2006328933A JP2008146118A (en) | 2006-12-06 | 2006-12-06 | Method for update and recovery of database in computer system |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2008146118A true JP2008146118A (en) | 2008-06-26 |
Family
ID=39606275
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2006328933A Pending JP2008146118A (en) | 2006-12-06 | 2006-12-06 | Method for update and recovery of database in computer system |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2008146118A (en) |
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2011161735A1 (en) * | 2010-06-25 | 2011-12-29 | 株式会社日立製作所 | Method and system of operation retrieval for web application |
US11775497B2 (en) | 2021-03-15 | 2023-10-03 | Fujitsu Limited | Computer-readable recording medium storing information processing program for generating partial data lineage, method of generating partial data lineage, and information processing device for generating partial data lineage |
-
2006
- 2006-12-06 JP JP2006328933A patent/JP2008146118A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2011161735A1 (en) * | 2010-06-25 | 2011-12-29 | 株式会社日立製作所 | Method and system of operation retrieval for web application |
US11775497B2 (en) | 2021-03-15 | 2023-10-03 | Fujitsu Limited | Computer-readable recording medium storing information processing program for generating partial data lineage, method of generating partial data lineage, and information processing device for generating partial data lineage |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US20030004978A1 (en) | Method of automatically correcting broken links to files stored on a computer | |
US20160328227A1 (en) | Dynamically Applying A Software Patch To A Computer Program | |
US9183038B2 (en) | Job management system that determines if master data has been updated, then re-executes a sub-job based on available executing computers and data sharing status | |
CN112817625A (en) | System upgrading method and device, electronic equipment and storage medium | |
US7228526B2 (en) | Application imaging infrastructure | |
JP2011138309A (en) | System event log system | |
JP2008146118A (en) | Method for update and recovery of database in computer system | |
JP6541177B2 (en) | Computer terminal and program therefor, computer system | |
CN106888247B (en) | Method for unified terminal IE configuration and protection | |
JP2007226472A (en) | Job definition confirmation system, its method, and program | |
US9792130B2 (en) | Rebooting to a UEFI application from a UEFI supported system | |
CN111552673A (en) | File processing method and device, electronic equipment and storage medium | |
CN114691651A (en) | Event processing method, device, equipment and storage medium | |
US20200334029A1 (en) | Update system | |
CN109144967B (en) | Maintenance system and method for improving distributed computing system | |
JP6481489B2 (en) | Modification application information creation program, modification application information creation apparatus, and modification application information creation method | |
US9256626B2 (en) | Maintaining multiple copy versions of component values in a system | |
US20090158267A1 (en) | System and method for inserting authorized code into a program | |
JP4708057B2 (en) | File update program and file update method | |
JP2004318763A (en) | Job network management system and program | |
JPH0546378A (en) | Correction processing method for program | |
JP3422352B2 (en) | Master file generation management device | |
CN114510278A (en) | Data static recovery method, device and equipment and readable storage medium | |
JP2004038635A (en) | Programming method | |
CN117311764A (en) | Firmware upgrading and restoring method, device, equipment and storage medium |