JPH01140353A - System for maintaining data in data base - Google Patents

System for maintaining data in data base

Info

Publication number
JPH01140353A
JPH01140353A JP62299334A JP29933487A JPH01140353A JP H01140353 A JPH01140353 A JP H01140353A JP 62299334 A JP62299334 A JP 62299334A JP 29933487 A JP29933487 A JP 29933487A JP H01140353 A JPH01140353 A JP H01140353A
Authority
JP
Japan
Prior art keywords
data
file
updated
output
database
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
Application number
JP62299334A
Other languages
Japanese (ja)
Inventor
Masayoshi Minoda
簑田 政義
Yoshiteru Kawai
川井 義照
Itaru Kusuyama
楠山 至
Tsutomu Saito
力 斉藤
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.)
Hitachi Ltd
Hitachi Computer Engineering Co Ltd
Original Assignee
Hitachi Ltd
Hitachi Computer Engineering Co Ltd
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 Hitachi Ltd, Hitachi Computer Engineering Co Ltd filed Critical Hitachi Ltd
Priority to JP62299334A priority Critical patent/JPH01140353A/en
Publication of JPH01140353A publication Critical patent/JPH01140353A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PURPOSE:To acquire spare data for the recovery of a fault by the minimum number of recording media and to perform management for the generating of data by outputting backup only when the data is updated. CONSTITUTION:An update flag to show that the data is generated newly or is updated is provided. And only the data on which the flag an attached is outputted to a retention file 8 after updating, and all data names are outputted to a data name managing list at the time of outputting to the retention file 8, and at the time of recovering a data base, only the data whose data name is registered in the data name managing list 9 is recovered. In such a way, it is possible to acquire the spare data for the recovery of the fault by the minimum capacity of recording media, and to perform the management for the data extending over plural generations.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、データベースのデータ保全方式に関し、特に
データベースシステムにおける予備データの取得時間の
短縮と記憶媒体の削減を可能にしたデータ保全方式に関
するものである。
[Detailed Description of the Invention] [Field of Industrial Application] The present invention relates to a data preservation method for a database, and in particular to a data preservation method that makes it possible to shorten the acquisition time of preliminary data and reduce the number of storage media in a database system. It is.

〔従来の技術〕[Conventional technology]

従来より、データベースシステムにおいては、ハードウ
ェアの障害やソフトウェアの障害に備えて、定期的に予
備のデータを取得する必要があった。しかし、予備デー
タの取得中は、利用者のアクセスが制限されてしまうた
め、できる限り予備データ取得の影響を少なくしなけれ
ばならない。
Conventionally, in database systems, it has been necessary to periodically acquire backup data in case of hardware or software failures. However, since user access is restricted while preliminary data is being acquired, the impact of preliminary data acquisition must be minimized as much as possible.

一般に、日常の業務処理に必要なデータ等のファイルは
、補助記憶装置に常駐されている。この補助記憶装置上
のファイルは、業務処理プログラムの実行に伴って時々
刻々と更新されていく。この補助記憶装置上のファイル
に書き込みを行った結果の更新ファイルは、システム障
害からの復元処理に備えて、大容量の保存ファイルに退
避(複写)させ、これを保存している。
Generally, files such as data necessary for daily business processing are resident in an auxiliary storage device. The files on this auxiliary storage device are updated from time to time as the business processing program is executed. Updated files resulting from writing to files on this auxiliary storage device are evacuated (copied) to a large-capacity storage file and stored in preparation for restoration processing from a system failure.

この退避方法として、従来は、更新ファイルを保存ファ
イルに退避させる場合、オペレータによって、あるいは
制御プログラムによって、随時、あるいは定期的に行わ
れていた。
Conventionally, this saving method has been performed by an operator or a control program at any time or periodically when updating files are saved to a save file.

一方、例えば特開昭61−127047号公報に記載の
退避方式のように、保存ファイルと更新ファイルとの対
応を記憶しておく対応ファイルを備えることにより、常
に最新の更新ファイルの内容のみを保存できるようにし
たものが提案されている。すなわち、対応ファイルには
、更新ファイル名、保存ファイル名、および退避日時を
記憶しておき、退避すべき更新ファイル名に対応する保
存ファイル名を対応ファイルから検索し、退避すべき更
新ファイルの内容を対応の保存フ薔イルに退避させる。
On the other hand, by providing a corresponding file that memorizes the correspondence between saved files and updated files, such as the saving method described in JP-A No. 61-127047, only the contents of the latest updated files are always saved. It has been proposed that this can be done. That is, the updated file name, saved file name, and save date and time are stored in the corresponding file, and the saved file name corresponding to the updated file name to be saved is searched from the corresponding file, and the contents of the updated file to be saved are searched. to the corresponding storage file.

これによって、特に重要な更新ファイル等については、
常に最新の更新ファイルの内容を保存できる。
As a result, especially important update files, etc.
You can always save the contents of the latest updated file.

〔発明が解決しようとする問題点〕[Problem that the invention seeks to solve]

従来の更新ファイルの退避方法(例えば、前述の公報に
記載の方法)では、最新の更新データを保存することを
目的としているため、データ破壊時には全データの予備
データと、それ以降の最新の更新データを用いることに
より、データ破壊の直前の状態に戻すことができるが、
データベース利用者にとっては、次のような配慮に欠け
ていた。
Conventional methods for saving update files (for example, the method described in the above-mentioned publication) aim to save the latest update data, so when data is destroyed, backup data of all data and the latest updates after that are saved. By using the data, it is possible to return to the state immediately before the data was destroyed, but
For database users, the following considerations were lacking.

すなわち。Namely.

(イ)データベース利用者が誤って複数回データを更新
してしまった場合、更新前の状態のデータに戻す必要が
あり、正しいデータに戻すためには再度、同じ業務処理
ジョブを順に実行しなければならないため、操作上、そ
の負担が大きく、また時間もかかる。
(b) If a database user accidentally updates data multiple times, it is necessary to restore the data to the state before the update, and to restore the correct data, the same business processing job must be executed again in order. Therefore, the operation is burdensome and time-consuming.

(ロ)また、データベース利用者が、データをテストで
更新して使用する場合、テスト完了後、更新前のデータ
に戻す必要があり更新前のデータを予備データとして保
存しておかなければならないため、その負担が大きかっ
た。
(b) Also, when a database user updates and uses data in a test, it is necessary to restore the data before the update after the test is completed, and the data before the update must be saved as preliminary data. , the burden was heavy.

このため、データベース利用者は複数世代にわたってデ
ータを自動的に保存し、操作性の向上を図って欲しいと
いう要望がある。
For this reason, database users have a desire to automatically save data across multiple generations to improve operability.

第7図は、上記の要望を満たす更新ファイルの退避方法
の説明図である。
FIG. 7 is an explanatory diagram of a method for saving update files that satisfies the above requirements.

ここでは、一定期間を1週間として、その一定期間経過
時に全データを全データファイルに格納し、そこからの
更新データをジャーナルに移す。
Here, the fixed period is one week, and when the fixed period elapses, all data is stored in the all data file, and updated data from there is transferred to the journal.

この方法では、複数世代前にさかのぼって更新ファイル
を回復する場合に備えて、全データと更新データを複数
世代にわたって保存する必要がある。
With this method, it is necessary to save all data and updated data over multiple generations in case you want to recover updated files going back multiple generations.

すなわち、全データを何回も出力してバックアップを取
得しなければならず、かつ複数世代にさかのぼって全デ
ータを保存するので、媒体の量が極めて多くなる。
In other words, all the data must be output many times and backed up, and all the data is saved going back to multiple generations, so the amount of media becomes extremely large.

このように、データベース利用者の要望を実現するため
には、第7図に示すように、データベースのデータ量の
一世代分に対して数倍の記憶容量の媒体が必要になると
いう問題があった。
As shown in Figure 7, in order to realize the requests of database users, there is a problem in that a medium with a storage capacity several times that of one generation of database data is required. Ta.

本発明の目的は、このような従来の問題を解決し、最少
限の容量の記録媒体で、障害回復のための予備データを
取得でき、かつデータの複数世代の管理を実現できるデ
ータベースのデータ保全方式を提供することにある。
The purpose of the present invention is to solve these conventional problems and to provide database data preservation that enables the acquisition of preliminary data for disaster recovery using a recording medium with a minimum capacity, as well as the management of multiple generations of data. The goal is to provide a method.

〔問題点を解決するための手段〕[Means for solving problems]

上記目的を達成するため、本発明によるデータベースの
データ保全方式は、格納されたデータ群が業務処理ジョ
ブにより更新され、また新規にデータが作成されるよう
なデータベースシステムにおいて、データベース上のデ
ータが新規作成および更新されたことを示すフラグ情報
を備えたデータ管理テーブルと、データベースから新規
作成および更新されたデータを保存ファイルに出力する
際に、データベースに格納されている全データ名を記録
するためのデータ名管理簿とを有し、最初にデータベー
ス上の全データを保存した後、フラグ情報が立っている
データのみを更新後保存ファイルに出力し、データを回
復する時には、データ名管理簿に基づいて、全データを
回復した後、新規作成および更新されたデータのみを格
納した更新後保存ファイルから、格納した順にデータを
重ね合わせて回復処理することに特徴がある。
In order to achieve the above object, the database data maintenance method according to the present invention is applicable to database systems in which stored data groups are updated by business processing jobs and new data is created. A data management table with flag information indicating that it has been created or updated, and a table for recording the names of all data stored in the database when outputting newly created or updated data from the database to a save file. After first saving all data in the database, only data with flag information is output to the saved file after updating, and when recovering data, it is based on the data name management list. The feature is that after all data is recovered, the data is superimposed in the order in which it was stored, and the recovery process is performed from an updated save file that stores only newly created and updated data.

〔作  用〕[For production]

本発明においては、データが更新された場合のみバック
アップを出力することによって、バックアップ媒体およ
びバックアップ時間を最少にする。
In the present invention, backup media and backup time are minimized by outputting a backup only when data is updated.

そのため、データが新規作成または更新されたことを示
す更新フラグを設けて、このフラグがあるデータのみを
更新後に保存ファイルに出力し、保存ファイル出力時点
で全データ名をデータ名管理簿に出力しておき、データ
ベース回復時には、データ名管理簿にデータ名があるデ
ータのみ回復するのである。
Therefore, an update flag is set to indicate that data has been newly created or updated, and only data with this flag is output to the save file after updating, and all data names are output to the data name management list at the time of outputting the save file. In addition, when restoring the database, only the data whose data name is in the data name management list will be recovered.

最初は、予備データの取得のために、データ群中の全デ
ータを保存ファイルに出力する。その後、データ群中の
データが新規作成または更新された場合、更新フラグを
オンにすると同時に、データの作成、更新、削除を順に
記録するためのジャーナルに出力する。データ群中のデ
ータが削除された場合、データの削除情報をジャーナル
に出力する。一定期間後に、更新フラグがオンになって
いるデータのみ、更新後保存ファイルに予備データを取
得し、同時にデータ群中のデータ名をデータ名管理簿に
出力する。更新フラグがオンになっているデータのみ予
備データを取得するので、複数回更新が行われていても
、最新のデータのみ予備データを取得することになり、
予備データ取得時間の短縮と予備データ取得媒体を削減
することができる。更新後のデータを保存ファイルへ出
力した後、更新フラグをオフにする。このようにして、
更新後の保存ファイルへの予備データの取得は。
Initially, all data in the data group is output to a save file in order to obtain preliminary data. Thereafter, when data in the data group is newly created or updated, the update flag is turned on and simultaneously output to a journal for sequentially recording data creation, update, and deletion. When data in a data group is deleted, data deletion information is output to the journal. After a certain period of time, only the data whose update flag is on is acquired as preliminary data in the post-update save file, and at the same time, the data names in the data group are output to the data name management list. Preliminary data is obtained only for data whose update flag is turned on, so even if it has been updated multiple times, only the latest data will be obtained as preliminary data.
It is possible to shorten preliminary data acquisition time and reduce the number of preliminary data acquisition media. After outputting the updated data to the save file, turn off the update flag. In this way,
Acquisition of preliminary data to the saved file after updating.

複数回繰り返される。Repeated multiple times.

次に、障害時のデータ回復方法は、次のようにして行わ
れる。すなわち、データ群がハードウェア障害またはソ
フトウェア障害により使用できなくなった場合には、最
初に全データ保存ファイル中のデータを回復するが、こ
の時、データ名管理簿にデータ名があるもののみを回復
することにより、業務処理ジョブにより削除されたデー
タを回復することはない。
Next, the data recovery method in the event of a failure is performed as follows. In other words, if a data group becomes unusable due to a hardware or software failure, first recover all the data in the data storage file, but at this time, only those that have data names in the data name management list are recovered. By doing so, data deleted by business processing jobs will not be recovered.

続いて、更新後の保存ファイルを保存時間が古い順に回
復する。このときにも、データ名管理簿にデータ名があ
るもののみを回復する。これによって、最終の更新後保
存ファイルの出力時点の状態にデータベースを回復する
ことができる。
Subsequently, the updated saved files are recovered in order of oldest saved time. At this time, only those data whose names are in the data name management list are recovered. This allows the database to be restored to the state at the time of output of the last updated saved file.

最後に、最新の更新後保存ファイル出力時点以降のジャ
ーナルを、出力順に従って回復処理する。
Finally, the journals after the latest updated save file output point are recovered in the output order.

ジャーナルの回復処理は、ジャーナル上に新規作成デー
タがあった場合、データをデータ群に格納し、更新デー
タがあった場合にはデータ群上のデータを更新し、デー
タの削除情報があった場合にはデータ群からそのデータ
を削除する。これによって、データ群がハードウェア障
害またはソフトウェア障害により使用できなくなった直
前の状態に、戻すことが可能である。
Journal recovery processing involves storing the data in a data group if there is newly created data on the journal, updating the data in the data group if there is updated data, and updating the data in the data group if there is data deletion information. delete the data from the data set. This makes it possible to return the data group to the state immediately before it became unusable due to a hardware or software failure.

〔実施例〕〔Example〕

以下、本発明の一実施例を、図面により詳細に説明する
Hereinafter, one embodiment of the present invention will be described in detail with reference to the drawings.

第1図は、本発明によるデータベースのデータ保全方式
を適用する情報処理システムの機能ブロック図である。
FIG. 1 is a functional block diagram of an information processing system to which a database data preservation method according to the present invention is applied.

第1図において、4はデータベースを形成するデータフ
ァイル(データ群)であって、データとデータ管理テー
ブルが格納される。10は保存ファイルであって、これ
らの保存ファイル10には、全データの保存ファイル7
と更新後の保存ファイル(1回目〜n回目)8とデータ
名管理簿9とがある。3はジャーナルであって、保存フ
ァイル8に退避するまでの間はこのジャーナル3に蓄積
する。
In FIG. 1, 4 is a data file (data group) forming a database, in which data and data management tables are stored. 10 are save files, and these save files 10 include a save file 7 for all data.
There are a saved file after updating (1st to nth time) 8, and a data name management list 9. 3 is a journal, and data is accumulated in this journal 3 until it is saved to the save file 8.

2.5.6はそれぞれデータアクセス制御部、データ保
存処理部、およびデータ回復処理部であって、これらは
いずれもプロセッサにより実現可能である。なお、これ
らのデータアクセス制御部2゜データ保存処理部5.デ
ータ回復処理部6は1台のプロセッサで共用させること
もできる。1は、業務処理ジョブであって、常時メモリ
に格納され、必要時にメモリから読み出されてユーザに
より実行される。
2.5.6 are a data access control section, a data storage processing section, and a data recovery processing section, which can all be realized by a processor. It should be noted that these data access control unit 2゜data storage processing unit 5. The data recovery processing section 6 can also be shared by one processor. Reference numeral 1 denotes a business processing job, which is always stored in the memory, read out from the memory when necessary, and executed by the user.

業務処理ジョブ1が実行されると、データアクセス制御
部2がデータベース・ファイル4のデータ群に対しアク
セス要求を行うことにより、データの読み出し、データ
の新規作成、データの更新、およびデータの削除を行う
When the business processing job 1 is executed, the data access control unit 2 makes an access request to the data group of the database file 4, thereby reading data, creating new data, updating data, and deleting data. conduct.

データアクセス制御部2は、データの読み出し要求があ
った場合、ファイル4からデータを読み出して、業務処
理ジョブ1に渡す。また、データの新規作成要求があっ
た場合、ファイル4に格納されているデータ群のうち、
データ管理テーブルにデータが更新されたことを示す更
新フラグを立て、ジャーナル3に新規作成データを出力
する。
When there is a request to read data, the data access control unit 2 reads the data from the file 4 and passes it to the business processing job 1 . In addition, when there is a request to create new data, among the data group stored in file 4,
An update flag is set in the data management table to indicate that the data has been updated, and newly created data is output to the journal 3.

第6図は、第1図のデータ管理テーブルの内容を示す図
である。
FIG. 6 is a diagram showing the contents of the data management table of FIG. 1.

データ管理テーブルには、ファイル4に格納されている
全てのデータ名a・・・・Cが記載されるエリアと、そ
れらに対応した更新フラグおよび他の情報が書き込まれ
るエリアがある。更新フラグは通常は「0」でオフであ
り、更新されたとき「1」を立てオンとする。更新フラ
グは、業務処理ジョブ1がファイル4にデータを新規作
成または更新した時に、データアクセス制御部2により
オンにされ、またデータ保存処理部5は更新フラグがオ
ンになっているデータのみを更新後保存ファイル8に出
力し、出力した後、更新フラグをオフにする。
The data management table includes an area where all data names a...C stored in the file 4 are written, and an area where update flags and other information corresponding to them are written. The update flag is normally "0" and off, and when updated, it is set to "1" and turned on. The update flag is turned on by the data access control unit 2 when the business processing job 1 creates new data or updates data in the file 4, and the data storage processing unit 5 updates only the data for which the update flag is turned on. Output to post-save file 8, and after outputting, turn off the update flag.

第1図のデータアクセス制御部2は、データの更新要求
があった場合、ファイル4の該当するデータを更新し、
ファイル4内のデータ管理テーブルの該当データに対応
する更新フラグを1にして、そのデータが更新されたこ
とを示す。そして、更新された情報をジャーナル3に出
力する。また、データの削除要求があった場合には、フ
ァイル4の該当するデータを削除し、ジャーナル3に削
除情報を出力する。
When there is a data update request, the data access control unit 2 in FIG. 1 updates the corresponding data in the file 4,
The update flag corresponding to the corresponding data in the data management table in file 4 is set to 1 to indicate that the data has been updated. Then, the updated information is output to the journal 3. Further, when there is a request to delete data, the corresponding data in the file 4 is deleted and the deletion information is output to the journal 3.

データ保存処理部5は、ファイル4から一定の周期(例
えば、1週間ごと、1箇月ごと)で全データ保存ファイ
ル7を出力し、全データ保存ファイル7の出力周期の間
に、更新後保存ファイル8とデータ名管理簿9を出力す
る。
The data storage processing unit 5 outputs the entire data storage file 7 from the file 4 at regular intervals (for example, every week, every month), and outputs the updated storage file 7 during the output cycle of the entire data storage file 7. 8 and data name management list 9 are output.

全データ保存ファイル7は、ファイル4のデータ群の内
容を全て出力して蓄積させたものである。
The all data storage file 7 is a file in which all the contents of the data group of the file 4 are output and accumulated.

また、更新後保存ファイル8は、ファイル4のデータ群
のうち、前回の保存ファイル出力後、更新されたデータ
のみを出力することにより、保存ファイルへの出力量と
出力時間とを削減する。なお、ファイル4が更新された
ことは、ファイル4内のデータ管理テーブルにおける更
新フラグで判定することができる。
In addition, the updated save file 8 reduces the amount of output and the output time to the save file by outputting only the data that has been updated after the previous save file output out of the data group of the file 4. Note that it can be determined that the file 4 has been updated based on the update flag in the data management table within the file 4.

データ名管理簿9は、ファイル4に格納されているデー
タ名称を記録したものであって、更新後保存ファイル8
の出力時に必ず出力される。
The data name management list 9 records the data names stored in the file 4, and the data name management list 9 records the data names stored in the file 4.
Always output when outputting.

第5図は、第1図におけるデータ管理簿の内容を示す図
である。
FIG. 5 is a diagram showing the contents of the data management list in FIG. 1.

データ管理簿内のテーブル内容は、データ保存処理部5
により出力され、ファイル4上のデータ名が全て格納さ
れる。
The table contents in the data management list are stored in the data storage processing unit 5.
is output, and all data names on file 4 are stored.

第2図は、データ保存処理部の動作例を示すフローチャ
ートである。
FIG. 2 is a flowchart showing an example of the operation of the data storage processing section.

データ保存処理部5の動作には、(イ)ファイル4に格
納されている全データを出力する動作と、(ロ)更新さ
れたデータのみを更新後保存ファイルに出力する動作の
2種類がある。
There are two types of operations of the data storage processing unit 5: (a) an operation that outputs all data stored in the file 4, and (b) an operation that outputs only updated data to an updated save file. .

(イ)  −一タ  フ  ル カ 全データ保存ファイルは、一定の周期でファイル4に格
納されている全データが出力されて、このファイル7に
蓄積されるものである。先ず、ファイル4からのデータ
の出力が、全データ保存処理であるか否かを判定しくス
テップ211)、全データ保存の場合には、ファイル4
の全データを全データ保存ファイルに出力する(ステッ
プ212)。
(B) - One data full-ka All data storage file is a file in which all data stored in file 4 is outputted at regular intervals and stored in this file 7. First, it is determined whether or not the output of data from file 4 is to save all data (step 211). If all data is to be saved, file 4 is
All data of is output to an all data storage file (step 212).

次に、データ名管理簿にデータ名を出力する(ステップ
216)。
Next, the data name is output to the data name management list (step 216).

(ロ)      ファイル1カ 更新後保存ファイルは、全データ保存ファイル出力から
次の全データ保存ファイル出力までの間に、業務処理ジ
ョブにより更新されたデータのみを、更新後保存ファイ
ルに出力し、これを蓄積するものである。
(b) The 1 file update save file outputs only the data updated by the business processing job between the output of the all data save file and the output of the next all data save file to the update save file. It is something that accumulates.

第2図において、全データ保存であるか否かを判定して
(ステップ211)、否、つまり更新後保存ファイル出
力処理の場合には、さらにファイル4中のデータが更新
されたことを示す更新フラグの内容を判定しくステップ
213)、更新フラグがオンの場合には、更新後保存フ
ァイルに更新済みデータを出力する(ステップ214)
。更新フラグがオフの場合には(ステップ213)、デ
ータ名管理簿にデータ名を出力する(ステップ216)
In FIG. 2, it is determined whether or not all data is to be saved (step 211), and if no, that is, post-update save file output processing, an update indicating that the data in file 4 has been updated. Determine the contents of the flag (step 213), and if the update flag is on, output the updated data to the post-update save file (step 214)
. If the update flag is off (step 213), the data name is output to the data name management book (step 216).
.

従って、更新されたデータのみが保存ファイルに出力さ
れるので、予備データの取得時間を短縮することができ
、かつ予備データの格納媒体を削減することができる。
Therefore, since only the updated data is output to the save file, it is possible to shorten the acquisition time of preliminary data and to reduce the number of storage media for preliminary data.

更新後保存ファイルにデータを出力した後、ファイル4
のデータ群中の更新フラグをオフにする(ステップ21
5)。この後に、新規作成されたデータや更新されたデ
ータはジャーナル3に、その都度出力する。
After outputting the data to the post-update save file, file 4
Turn off the update flag in the data group (step 21
5). After this, newly created data and updated data are output to the journal 3 each time.

第3図は、第1図におけるデータ回復処理部の動作フロ
ーチャートである。
FIG. 3 is an operation flowchart of the data recovery processing section in FIG. 1.

ファイル4がハードウェア障害またはソフトウェア障害
により破壊された場合に、第3図のフローチャートに従
ってデータ回復処理部が動作する。
When the file 4 is destroyed due to a hardware failure or software failure, the data recovery processing section operates according to the flowchart of FIG. 3.

これにより、障害が発生した直曲の状態まで、データの
状態を戻す。
As a result, the data state is returned to the straight curve state where the failure occurred.

(A)全データ  ファイルの回復 先ず、最新の全データ保存ファイル7からデータをファ
イル4に格納する。そのために、全データ保存ファイル
7からデータを読み出しくステップ321)、データが
終了したか否か、つまり読み出すべきデータが残ってい
ないか否かを判定して(ステップ322)、読み出すべ
きデータが残っていないならば、更新後保存ファイルの
回復に移る(ステップ325)。データが終了していな
ければ、ステップ321で読んだデータのデータ名がデ
ータ名管理簿9にあるか否かを判定しくステップ323
)、データ名があった場合にはデータをファイル4に出
力する(ステップ324)。次に、最初に戻り、全デー
タ保存ファイル7からデータを読む(ステップ321)
。全データ保存ファイル7のデータ回復処理が終了、つ
まり読み出すべきデータがファイル7になくなったとき
には、更新後保存ファイル8の回復に移る。
(A) Recovery of all data files First, data from the latest all data storage file 7 is stored in the file 4. To do this, data is read from all data storage files 7 (step 321), and it is determined whether the data has ended, that is, there is no data left to read (step 322). If not, the process moves to restoring the saved file after the update (step 325). If the data is not completed, it is determined whether the data name of the data read in step 321 is in the data name management book 9 or not.Step 323
), if there is a data name, the data is output to file 4 (step 324). Next, return to the beginning and read data from all data storage file 7 (step 321).
. When the data recovery process for all data storage files 7 is completed, that is, there is no more data to be read in the file 7, the process moves to recovery of the updated storage file 8.

(B)   ′  ファイルの0′ 更新後保存フアイルの回復処理が全て終了したか否か、
つまり更新後保存ファイルにデータが残っていないか否
かを判断しくステップ325)、残っているときには、
更新後保存ファイル8からデータを読む(ステップ32
6)。データが終了したか否か、つまり読み出すべきデ
ータが終ったか否かを判断して(ステップ327)、終
了したときには元に戻って、更新後保存ファイル8が全
て回復したか否かを調べる(ステップ325)。もし、
1区画のデータを読み出した後、まだ次のデータが残っ
ているときには、ステップ26で読み出したデータ名が
データ名管理簿9にあるか否かを判定しくステップ32
8)、あればそのデータをファイル4に出力する(ステ
ップ329)。そして、前に戻って、更新後保存ファイ
ル8から次のデータを読み出す(ステップ326)。も
し、データ名がデータ名管理簿9になかったときには、
そのデータをファイル4に出力せずに、元に戻って更新
後保存ファイル8の次のデータを読み出す(ステップ3
26)。
(B) 'File 0' Check whether the recovery process for the updated saved file has been completed or not.
In other words, it is necessary to determine whether or not there is any data left in the saved file after the update (step 325), and if there is,
Read data from saved file 8 after update (step 32)
6). It is determined whether the data has finished, that is, whether the data to be read has finished (step 327), and when it has finished, it returns to the original state and checks whether the post-update saved file 8 has been completely recovered (step 327). 325). if,
After reading one section of data, if the next data still remains, it is determined whether the data name read in step 26 is in the data name management book 9 or not.Step 32
8), if any, output that data to file 4 (step 329). Then, the process returns to the previous step and reads the next data from the post-update save file 8 (step 326). If the data name is not in the data name management book 9,
Without outputting that data to file 4, go back and read the next data in post-update save file 8 (step 3
26).

このようにして、更新後保存ファイル8のデータ回復処
理が、全て終了した場合には、ジャーナルの読み出し動
作に移る(ステップ330)。
In this way, when the data recovery process for the post-update save file 8 is completely completed, the process moves to a journal reading operation (step 330).

(C)ジャーナルの回復 最新の更新後保存ファイル出力時点以降のジャーナル3
を、出力順に従って次の処理を行う。
(C) Journal recovery Journal 3 after the latest updated saved file output
, perform the following processing in the output order.

■ジャーナル3上に新規作成データがあった場合、新規
作成データをファイル4に格納し、■更新データがあっ
た場合、ファイル4の該当するデータを更新し、■デー
タの削除情報があった場合、ファイル4のデータ群から
該当データを削除する。
■If there is newly created data on journal 3, store the newly created data in file 4, ■If there is updated data, update the corresponding data in file 4, and ■If there is data deletion information. , delete the corresponding data from the data group of file 4.

これにより、ファイル4のデータ群がハードウェア障害
またはソフトウェア障害によって使用できなくなった直
前の状態に戻ることができる。
Thereby, it is possible to return to the state immediately before the data group of file 4 became unusable due to a hardware or software failure.

第4図は、本発明のデータ退避処理および回復処理の説
明図である。
FIG. 4 is an explanatory diagram of data saving processing and recovery processing of the present invention.

先ず最初に、ファイル4に格納されている全てのデータ
を全データ保存ファイル7に出力する(■データ1.デ
ータ2.データ3)。その後、デ−タ1が更新され、デ
ータ3が削除され、データ4が追加されたと仮定する。
First, all data stored in the file 4 is output to the all data storage file 7 (■Data 1, Data 2, Data 3). Assume that data 1 is subsequently updated, data 3 is deleted, and data 4 is added.

1回目の更新後保存ファイル8に出力するとき、データ
1の更新された部分1′と新たに追加されたデータ4の
みを出力し、同時にデータ名管理簿9には、その時点で
ファイル4に残っているデータ名のみ、つまりデータ1
、データ2、およびデータ4のデータ名を記録する。2
回目までの間では、データ1の内容のみが更新されたと
する。そこで、2回目の更新後保存ファイル8への出力
時には、データ1の更新された部分1′のみを出力する
。同時に、データ名管理簿9には、その時点でファイル
4に残っているデータ名のみ、つまり、データ1.デー
タ2およびデータ4のデータ名を記録する。その直後、
ハードウェア障害またはソフトウェア障害が発生したの
で、障害発生直前の状態に戻す必要がある。
When outputting to the save file 8 after the first update, only the updated part 1' of data 1 and the newly added data 4 are output, and at the same time, the data name management list 9 contains the data stored in file 4 at that point. Only the remaining data name, that is, data 1
, data 2, and data 4 are recorded. 2
It is assumed that only the contents of data 1 have been updated up to the first time. Therefore, when outputting to the second updated save file 8, only the updated portion 1' of the data 1 is output. At the same time, the data name management list 9 contains only the data names remaining in the file 4 at that time, that is, data 1. Record the data names of data 2 and data 4. Immediately after that,
A hardware or software failure has occurred and you need to return to the state immediately before the failure occurred.

回復処理は、(a)(b)(c)の順序に行われる。The recovery process is performed in the order of (a), (b), and (c).

すなわち、先ず、全データ保存ファイル7に格納された
データ、つまりデータ1、データ2、およびデータ3を
ファイル4に出力した後、1回目の更新後保存ファイル
8に格納されたデータ、つまりデータ1′、データ4を
ファイル4に出力する。
That is, first, the data stored in the all data storage file 7, that is, data 1, data 2, and data 3, are output to the file 4, and then the data stored in the storage file 8 after the first update, that is, data 1 ', output data 4 to file 4.

このとき、同一データは重ね合わせて書き込まれる。す
なわち、データ1の上にデータ1′が書き込まれる。次
に、2回目の更新後保存ファイル8に格納されたデータ
、つまりデータ1′をデータ1′の上に重ね合わせて書
き込む。これ番とよって、データ1′、データ2.デー
タ4が回復され、ファイル4は障害直前の状態と同じに
なる。
At this time, the same data is written in an overlapping manner. That is, data 1' is written over data 1. Next, the data stored in the save file 8 after the second update, that is, data 1', is written superimposed on data 1'. Depending on the number, data 1', data 2, etc. Data 4 is recovered and file 4 is in the same state as it was immediately before the failure.

本発明のデータ保全方式と第7図のデータ保全方式を比
較すると、■バックアップ取得時間は、第7図の方法で
は、未更新データを何度も出力するので1時間が長いの
に対し、本発明の方法では、更新データのみ出力するの
で、時間が短くてすむ。
Comparing the data preservation method of the present invention and the data preservation method shown in Fig. 7, ■The backup acquisition time is 1 hour longer in the method shown in Fig. 7 because unupdated data is output many times; In the method of the invention, only updated data is output, so it takes less time.

■複数世代前にさかのぼってデータを保存するための媒
体容量は、第7図では未更新データも格納するので多く
の容量を必要とするのに対し、本発明では更新データの
み格納するので、容量は少なくてすむ。■データベース
破壊時の回復時間は、第7図の方が全データを回復し、
ジャーナルを回復するだけであるため早く回復できるの
に対し、本発明では、全データを回復した後、更新デー
タを回復し、さらにジャーナルを回復するので、遅くな
る。■バックアップ取得および回復処理は、第7図の方
が簡単であるのに対し、本発明は複雑となる。■ジャー
ナル数は、第7図と本発明とでは同じである。
■The medium capacity for storing data going back to multiple generations requires a large capacity in Figure 7 as it also stores unupdated data, whereas in the present invention only updated data is stored, so the capacity is large. less. ■As for the recovery time when the database is destroyed, Figure 7 shows that all data is recovered,
Whereas recovery is quick because only the journal is recovered, the present invention is slower because it recovers all data, then the updated data, and then the journal. (2) Backup acquisition and recovery processing are simpler in FIG. 7, but are more complicated in the present invention. (2) The number of journals is the same in FIG. 7 and in the present invention.

〔発明の効果〕〔Effect of the invention〕

以上説明したように1本発明によれば、データベースシ
ステムにおいて、最小限の記録媒体で、障害回復のため
の予備データを取得でき、かつデータの世代管理を実現
することが可能である。
As explained above, according to one aspect of the present invention, in a database system, preliminary data for failure recovery can be obtained using a minimum number of recording media, and data generation management can be realized.

【図面の簡単な説明】[Brief explanation of the drawing]

第1図は本発明のデータ保全方式を適用した情報処理シ
ステムのブロック図、第2図は第1図におけるデータ保
存処理部の動作フローチャート、第3図は第1図におけ
るデータ回復処理部の動作フローチャート、第4図は本
発明のデータ保存処理とデータ回復処理の説明図、第5
図は第1図におけるデータ名管理簿のテーブル内容を示
す図、第6図は第1図のファイルに内蔵されたデータ管
理テーブルの内容を示す図、第7図は従来のデータ保全
方式の説明図である。 1:業務処理ジョブ、2:データアクセス制御部、3:
ジャーナル、4:データベースのファイル、5:データ
保存処理部、6:データ回復処理部、7:全データ保存
ファイル、8:更新後保存ファイル、9:データ名管理
簿、10:予備データファイル。
FIG. 1 is a block diagram of an information processing system to which the data preservation method of the present invention is applied, FIG. 2 is an operation flowchart of the data storage processing section in FIG. 1, and FIG. 3 is an operation flowchart of the data recovery processing section in FIG. 1. Flowchart, FIG. 4 is an explanatory diagram of the data storage process and data recovery process of the present invention, FIG.
The figure shows the table contents of the data name management list in Figure 1, Figure 6 shows the contents of the data management table built into the file in Figure 1, and Figure 7 explains the conventional data preservation method. It is a diagram. 1: Business processing job, 2: Data access control unit, 3:
Journal, 4: Database file, 5: Data storage processing unit, 6: Data recovery processing unit, 7: All data storage file, 8: Updated storage file, 9: Data name management list, 10: Preliminary data file.

Claims (1)

【特許請求の範囲】[Claims] 1、格納されたデータ群が業務処理ジョブにより更新さ
れ、また新規にデータが作成されるデータベースシステ
ムにおいて、データベース上のデータが新規作成および
更新されたことを示すフラグ情報を備えたデータ管理テ
ーブルと、該データベースから新規作成および更新され
たデータを保存ファイルに出力する際に、該データベー
スに格納されている全データ名を記録するためのデータ
名管理簿とを有し、最初に該データベース上の全データ
を保存した後、上記フラグ情報が立っているデータのみ
を更新後保存ファイルに出力し、データを回復する時に
は、上記データ名管理簿に基づいて、全データを回復し
た後、新規作成および更新されたデータのみを格納した
更新後保存ファイルから、格納した順にデータを重ね合
わせて回復処理することを特徴とするデータベースのデ
ータ保全方式。
1. In a database system where stored data groups are updated by business processing jobs and new data is created, there is a data management table with flag information indicating that data on the database has been newly created and updated. , has a data name management list for recording the names of all data stored in the database when newly created or updated data is output from the database to a storage file, and first the data on the database is output. After all data is saved, only the data for which the above flag information is set is output to the post-update save file, and when recovering the data, based on the above data name management list, after all data is recovered, new and A database data preservation method that performs recovery processing by overlapping data in the order in which it was stored, starting from an updated save file that stores only updated data.
JP62299334A 1987-11-27 1987-11-27 System for maintaining data in data base Pending JPH01140353A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP62299334A JPH01140353A (en) 1987-11-27 1987-11-27 System for maintaining data in data base

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP62299334A JPH01140353A (en) 1987-11-27 1987-11-27 System for maintaining data in data base

Publications (1)

Publication Number Publication Date
JPH01140353A true JPH01140353A (en) 1989-06-01

Family

ID=17871209

Family Applications (1)

Application Number Title Priority Date Filing Date
JP62299334A Pending JPH01140353A (en) 1987-11-27 1987-11-27 System for maintaining data in data base

Country Status (1)

Country Link
JP (1) JPH01140353A (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5137268A (en) * 1990-01-12 1992-08-11 Fuji Photo Film Co., Ltd. Method of and device for feeding sheets
JPH0644116A (en) * 1990-12-04 1994-02-18 Nec Corp Disk file saving control system
US20130139080A1 (en) * 2011-11-30 2013-05-30 Thomson Licensing Method and apparatus for visualizing a data set

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62224843A (en) * 1986-03-26 1987-10-02 Hitachi Ltd Database medium content maintaining system

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS62224843A (en) * 1986-03-26 1987-10-02 Hitachi Ltd Database medium content maintaining system

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5137268A (en) * 1990-01-12 1992-08-11 Fuji Photo Film Co., Ltd. Method of and device for feeding sheets
JPH0644116A (en) * 1990-12-04 1994-02-18 Nec Corp Disk file saving control system
US20130139080A1 (en) * 2011-11-30 2013-05-30 Thomson Licensing Method and apparatus for visualizing a data set

Similar Documents

Publication Publication Date Title
JP2531776B2 (en) How to recover your database
JP2531894B2 (en) Data processing device
US6665815B1 (en) Physical incremental backup using snapshots
CA2933790C (en) Apparatus and method for creating a real time database replica
US6038569A (en) System for data structure loading with concurrent image copy
JP2001344139A (en) Database management device
JP4127461B2 (en) Backup system and method in disk shared file system
JPH01140353A (en) System for maintaining data in data base
JPH033046A (en) Log record control system
JPS63187347A (en) Data base file recovering system
JPH0385650A (en) Disk volume restoration system
JP2822869B2 (en) Library file management device
JPH04184641A (en) Data base restoring system
JP2000207264A (en) Backup method and restoring method
JP2610972B2 (en) Database data integrity method
JPH0277950A (en) Data base processing system
JPH0991182A (en) Method and device for managing data base
JPH01214947A (en) Data preserving system
JPH05173864A (en) File recovery system
JPH04209044A (en) Data base control system
JPS63262737A (en) Data base updating and recording processing method
JPH0612308A (en) Data base restoration system and data base setting system
JP2000347918A (en) Data storage system and data backup method
JPS58168165A (en) Recovery system in data base system
JPH05173863A (en) Data base recovery control system