JPH0589050A - File recovery control system - Google Patents

File recovery control system

Info

Publication number
JPH0589050A
JPH0589050A JP3248586A JP24858691A JPH0589050A JP H0589050 A JPH0589050 A JP H0589050A JP 3248586 A JP3248586 A JP 3248586A JP 24858691 A JP24858691 A JP 24858691A JP H0589050 A JPH0589050 A JP H0589050A
Authority
JP
Japan
Prior art keywords
record
transaction
file
image
bitmap
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
JP3248586A
Other languages
Japanese (ja)
Inventor
Shinji 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.)
NEC Solution Innovators Ltd
Original Assignee
NEC Solution Innovators 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 NEC Solution Innovators Ltd filed Critical NEC Solution Innovators Ltd
Priority to JP3248586A priority Critical patent/JPH0589050A/en
Publication of JPH0589050A publication Critical patent/JPH0589050A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To speed up and facilitate the recovery control of a file used for processing a transaction, and to define the capacity of the use file. CONSTITUTION:First and second images are possessed in the respective records of a file area 22. The respective bits of a bit map 12 are made correspondent to the respective records and at the bits '0' and '1', it is displayed whether the latest data are shown in the first image or the second image. Transaction access information 11 registers the identifier of the record updated in the transaction processing for each file. When an updating request in received, a record update part 4 updates the image into the other image not shoeing the latest data while referring to a bit 12, and the identifier of the record is registered on the transaction access information 11. When an approval input is received, a transaction approval processing part 5 inverts the value of the bit map.

Description

【発明の詳細な説明】Detailed Description of the Invention

【0001】[0001]

【産業上の利用分野】本発明はファイル回復制御方式、
特に電子計算機システムのトランザクションの処理に用
いられるファイルの更新是認または否認により、ファイ
ルの内容をそれぞれトランザクションの処理完了の後の
状態、または処理開始前の状態に制御するファイル回復
制御方式に関する。
The present invention relates to a file recovery control system,
In particular, the present invention relates to a file recovery control method for controlling the contents of a file to a state after completion of transaction processing or a state before processing is started, by approval or denial of update of a file used for transaction processing of an electronic computer system.

【0002】[0002]

【従来の技術】従来、この種のファイル回復制御方式
は、ファイルの更新前の内容(以下イメージという)を
予め記憶装置の別のファイルに蓄積・保存しておき、フ
ァイルを更新するときはトランザクションの処理の終了
時点でトランザクションの処理の是認により、処理によ
り更新したファイルを新ファイルとして、保存した更新
前イメージを破棄している。一方、トランザクションの
複数のプロセス間でのデッドロック、装置障害やソフト
ウェア障害時、あるいはトランザクションの処理中断等
による処理中の全てのレコード更新をキャンセルすると
きに行なうトランザクションの処理の否認により、上記
の保存した更新前のイメージをファイルに書込み、トラ
ンザクションの処理開始前のファイルの状態に戻すよう
に構成されている。
2. Description of the Related Art Conventionally, this type of file recovery control system stores the contents of a file before updating (hereinafter referred to as an image) in another file in a storage device in advance, and when updating the file, a transaction is performed. At the end of the process, the transaction process is approved and the file updated by the process is set as a new file and the saved pre-update image is discarded. On the other hand, due to the denial of transaction processing performed when deadlocks among multiple processes of a transaction, device failure or software failure, or cancellation of all record updates in progress due to transaction processing interruption, etc. The pre-updated image is written to a file, and the state of the file before the start of transaction processing is restored.

【0003】[0003]

【発明が解決しようとする課題】上述した従来のファイ
ル回復制御方式は、トランザクションの処理起動の前の
状態にファイルの内容を戻すために、ファイルの内容を
更新するときに、更新する直前の更新前イメージを別の
ファイルに蓄積し保存しなければならない。また複数の
トランザクションが同時に動作するために、更新前のイ
メージはそれぞれのトランザクションごとに論理的に関
連付け、一意に参照できる必要があり、さらにトランザ
クション処理の是認および否認によるファイル回復後
は、保存していた関連する更新前のイメージを廃棄しな
ければならず、ファイルを収容する補助記憶装置または
大容量記憶装置に対するデータの入出力処理を増加さ
せ、更に更新前イメージを格納するファイル容量を確定
しずらいという欠点がある。
The above-mentioned conventional file recovery control method, when the contents of a file are updated in order to restore the contents of the file to the state before the transaction processing is started, the update just before the update is performed. The previous image must be stored and stored in a separate file. In addition, since multiple transactions operate at the same time, the pre-update image must be logically associated and uniquely referenced for each transaction, and saved after file recovery due to transaction process approval or rejection. The related pre-update image must be discarded, the data input / output processing to / from the auxiliary storage device or the mass storage device that stores the file is increased, and the file capacity for storing the pre-update image is not fixed. It has the drawback of being leprosy.

【0004】[0004]

【課題を解決するための手段】本発明のファイル回復制
御方式は主記憶装置と外部記憶装置のファイルとの間で
トランザクションの処理単位にファイル更新のデータを
転送する電子計算機システムのファイル回復制御方式に
おいて、それぞれのレコードに二つのイメージを有し、
一方のイメージは更新前のイメージを他方のイメージは
更新後のイメージを同時に保持するファイルと、このフ
ァイルのレコードのそれぞれに対応するビットの値によ
り何れのイメージが最新の是認されたイメージであるか
を示す主記憶装置に設けられたビットマップと、トラン
ザクションが処理中に更新したファイルとレコードとの
識別情報を登録する主記憶装置に設けられたトランザク
ションのアクセス情報と、前記ビットマップを参照して
レコードの最新のイメージを検索して出力する検索手段
と、レコードの更新時に前記ビットマップのビットが最
新の是認されたイメージでないことを示すイメージを書
換えてレコードを更新し、前記アクセス情報にアクセス
したレコードの識別子を登録する更新手段と、トランザ
クションのレコード更新処理の是認によりそのトランザ
クションがアクセスしたレコードに対応する前記ビット
マップのビットの値を反転する是認処理手段と、トラン
ザクションがアクセスしたファイルに対応するアクセス
情報を破棄して対応するビットマップを変更しない否認
処理手段とを有することにより構成される。
A file recovery control system of the present invention is a file recovery control system of an electronic computer system for transferring file update data in transaction processing units between a main storage device and a file of an external storage device. In, each record has two images,
One image holds the image before update and the other image holds the image after update at the same time, and which image is the latest approved image according to the value of the bit corresponding to each record of this file Referring to the bitmap provided in the main storage device, the access information of the transaction provided in the main storage device for registering the identification information of the file and the record updated during the transaction, and the bitmap. A search means for searching and outputting the latest image of the record, and updating the record by rewriting the image indicating that the bit of the bitmap is not the latest approved image when updating the record, and accessed the access information. Update method to register the record identifier and transaction record The approval processing means for inverting the value of the bit of the bitmap corresponding to the record accessed by the transaction by approval of the update processing, and the access information corresponding to the file accessed by the transaction are discarded and the corresponding bitmap is not changed. It has a denial processing means.

【0005】[0005]

【実施例】次に、本発明について図面を参照して説明す
る。
DESCRIPTION OF THE PREFERRED EMBODIMENTS Next, the present invention will be described with reference to the drawings.

【0006】図1は本発明の一実施例の構成図である。
図1の実施例は主記憶域1,外部記憶域2,レコード検
索部3,レコード更新部4,トランザクション是認処理
部5,およびトランザクション否認処理部6により構成
され、主記憶域1はトランザクションアクセス情報11
およびビットマップ12を有し、外部記憶域2はビット
マップ21およびファイル領域22を有する。
FIG. 1 is a block diagram of an embodiment of the present invention.
The embodiment shown in FIG. 1 comprises a main storage area 1, an external storage area 2, a record retrieval section 3, a record update section 4, a transaction approval processing section 5, and a transaction denial processing section 6, and the main storage area 1 is transaction access information. 11
And a bitmap 12, and the external storage area 2 has a bitmap 21 and a file area 22.

【0007】図2は図1のビットマップ12およびファ
イル領域22の構成を示す図である。ファイル領域22
およびビットマップ12は、通常、システムとしては複
数のファイル領域およびそれぞれのファイル領域に対応
するビットマップを有するが、説明を簡単にするためそ
れぞれ一つのみを示している。ファイル領域(ファイ
ル)22は複数のレコードから構成され、各レコードは
二つのイメージを有している。例えばレコードR80は
第1イメージ221および第2イメージ222を有す
る。一方、ビットマップ12はファイル22の各レコー
ドに対応したビットを有している。例えばレコードR
0,R1,〜R80に対応してそれぞれビットB0,B
1,〜B80を有している。またビットマップ12のビ
ットが“0”であれば、対応するレコードの第1イメー
ジに最新の正しいデータが格納していて、ビットが
“1”であれば対応するレコードの第2イメージに最新
の正しいデータが格納されていることを示している。例
えばビットB80が“0”であることはレコードR80
の第1イメージ221に最近の正しいデータが格納され
ている。
FIG. 2 is a diagram showing the configurations of the bitmap 12 and the file area 22 of FIG. File area 22
The bit map 12 and the bit map 12 usually have a plurality of file areas and a bit map corresponding to each file area as a system, but only one is shown for simplicity of description. The file area (file) 22 is composed of a plurality of records, and each record has two images. For example, the record R80 has a first image 221 and a second image 222. On the other hand, the bitmap 12 has a bit corresponding to each record of the file 22. For example, record R
0, R1, to R80 corresponding to bits B0 and B, respectively
1 to B80. If the bit of the bitmap 12 is "0", the latest correct data is stored in the first image of the corresponding record, and if the bit is "1", the latest image of the second image of the corresponding record is stored. It indicates that the correct data is stored. For example, if the bit B80 is “0”, the record R80
The first correct image data 221 stores the latest correct data.

【0008】図3はトランザクションアクセス情報11
の内容を示す図で、通常、システムとしては複数のトラ
ンザクションアクセス情報を有するが、図3は一つの構
成を示している。トランザクションアクセス情報は一つ
のトランザクションが起動されてから終了するまで、更
新した全てのファイルごとに設けられていて、ファイル
の識別子を登録したファイル識別子111を先頭に、更
新した全てのレコードの識別子が順に第1レコード識別
子112,第2レコード識別子113,〜として登録さ
れる。
FIG. 3 shows transaction access information 11
In general, the system has a plurality of transaction access information, but FIG. 3 shows one configuration. The transaction access information is provided for every updated file from the start of a transaction until the end of the transaction. The file identifier 111 in which the file identifier is registered is the head, and the identifiers of all the updated records are in order. The first record identifier 112, the second record identifier 113, ... Are registered.

【0009】図4は図1のレコード更新部4の処理のフ
ロー図で、図4を参照してレコード更新部4の処理につ
いて説明を進める。レコード更新入力41に外部からレ
コード更新要求があると、要求されたレコードに対応す
るビットマップ12のビットが“1”かを調べる(ステ
ップ401)。次いでファイル領域22から要求された
レコードの第1,第2イメージを読込み(ステップ40
2,405)ステップ401で読込んだビットが“0”
のときは、更新するレコードを第2イメージに転送して
書込む(ステップ403)。またステップ401で読込
んだビットが“1”のときは、更新するレコードを第1
イメージに転送して書込む(ステップ406)。次い
で、トランザクションアクセス情報11にファイル識別
子とこのレコードのレコード識別子とを順に書込む(ス
テップ404)。なお同一トランザクションの処理によ
る同一レコードに対するアクセスでは、トランザクショ
ンアクセス情報に重複してレコード識別子を登録しな
い。なおまた他のトランザクションの処理から一つのト
ランザクションが処理中の同一のレコードに対するアス
セスは、排他制御により一つのトランザクションの処理
が完了するまで待たされる。
FIG. 4 is a flow chart of the process of the record update unit 4 of FIG. 1. The process of the record update unit 4 will be described with reference to FIG. When the record update input 41 receives a record update request from the outside, it is checked whether the bit of the bitmap 12 corresponding to the requested record is "1" (step 401). Next, the first and second images of the requested record are read from the file area 22 (step 40
2, 405) The bit read in step 401 is "0"
If so, the record to be updated is transferred to the second image and written (step 403). If the bit read in step 401 is "1", the record to be updated is set to the first
The image is transferred and written (step 406). Next, the file identifier and the record identifier of this record are written in the transaction access information 11 in order (step 404). When accessing the same record by processing the same transaction, the record identifier is not registered in the transaction access information. Further, the access to the same record that one transaction is processing from the processing of another transaction is made to wait until the processing of one transaction is completed by the exclusive control.

【0010】図5は図1のレコード検索部3の処理のフ
ロー図で、図3を参照してレコード検索部3の処理につ
いて説明を進める。レコード検索入力31に外部からレ
コード検索要求があると、要求されたレコードに対応す
るビットマップ12のビットが“1”かを調べる(ステ
ップ301)。ビットが“0”であるときはファイル領
域22の該当するレコードの第1イメージを読込み、読
込んだデータを要求元に送る(ステップ302)。ビッ
トが“1”であるときは該当するレコードの第2イメー
ジを読込み、このデータを要求元に送る(ステップ30
3)。
FIG. 5 is a flow chart of the process of the record search unit 3 of FIG. 1. The process of the record search unit 3 will be described with reference to FIG. When the record search input 31 has a record search request from the outside, it is checked whether the bit of the bitmap 12 corresponding to the requested record is "1" (step 301). When the bit is "0", the first image of the corresponding record in the file area 22 is read, and the read data is sent to the request source (step 302). When the bit is "1", the second image of the corresponding record is read and this data is sent to the request source (step 30).
3).

【0011】図6はトランザクション是認処理部5の処
理のフロー図で、図6を参照してトランザクション是認
処理部5の処理について説明を進める。トランザクショ
ン是認入力42からトランザクションの処理間でのデー
タ更新を承認する指示が入力されると、このトランザク
ションによって登録されたトランザクションアクセス情
報11を参照して、一連のレコード識別子112,11
3,〜に対応するビットマップ12の該当ビットの値を
返転する(ステップ501)。次いで、電源断等のシス
テムダウンに備え、主記憶域1のビットマップ12を外
部記憶域2のビットマップ21に書込む(ステップ50
2)。次にトランザクションの処理の全てが完了したと
して、そのトランザクションで登録したトランザクショ
ンアクセス情報11のデータをクリアする(ステップ5
03)。
FIG. 6 is a flow chart of the processing of the transaction approval processing unit 5. The processing of the transaction approval processing unit 5 will be described with reference to FIG. When an instruction to approve the data update between transactions of the transaction is input from the transaction approval input 42, a series of record identifiers 112, 11 is referred to by referring to the transaction access information 11 registered by this transaction.
The value of the corresponding bit of the bitmap 12 corresponding to 3 to is returned (step 501). Next, in preparation for a system failure such as power failure, the bitmap 12 in the main storage area 1 is written in the bitmap 21 in the external storage area 2 (step 50).
2). Next, assuming that all processing of the transaction is completed, the data of the transaction access information 11 registered in the transaction is cleared (step 5
03).

【0012】トランザクション否認処理部6の処理につ
いて説明を進めると、トランザクション否認入力43か
らトランザクションの処理間でのデータ更新を否認する
指示が入力されると、このトランザクションによって登
録されたトランザクションアクセス情報11のファイル
識別子111,第1レコード識別子112,〜の全ての
データをクリアする。従ってファイル領域22に対応す
るビットマップ12はトランザクションによる処理を開
始する前の状態を維持している。
To explain the processing of the transaction denial processing unit 6, when the transaction denial input 43 inputs an instruction to deny the data update between transactions, the transaction access information 11 registered by this transaction is deleted. All the data of the file identifier 111, the first record identifier 112, ... Are cleared. Therefore, the bitmap 12 corresponding to the file area 22 maintains the state before the processing by the transaction is started.

【0013】なお、以上の実施例ではファイル領域(フ
ァイル)のそれぞれのレコードを第1および第2のイメ
ージの分け、一方のイメージにトランザクションの処理
を開始する直前のデータを保持させ、他方のイメージに
処理中の更新データを格納するものとしたが、ファイル
を第1のファイルと第2のファイルとに分け、それぞれ
の同一位置のレコードの一方のレコードにトランザクシ
ョンの処理を開始する直前のデータを保持させ、他方の
レコードに処理中の更新データを格納して、レコードの
何れのファイル側に処理を開始する直前のデータが保持
されているかを、ビットマップのレコードに対応するビ
ットの値によって表示するようにすることにより、図1
の実施例と同じ処理を行うことができる。
In the above embodiment, each record of the file area (file) is divided into the first image and the second image, one image is made to hold the data immediately before the start of transaction processing, and the other image is made to hold. Although the update data being processed is stored in, the file is divided into the first file and the second file, and the data immediately before the transaction processing is started is stored in one of the records at the same position. The update data being processed is stored in the other record, and which file side of the record holds the data immediately before the processing is started is displayed by the value of the bit corresponding to the bitmap record. As shown in FIG.
The same processing as in the above embodiment can be performed.

【0014】[0014]

【発明の効果】以上説明したように本発明は、ファイル
のレコードに2種類のイメージを設けて、レコードの更
新時にビットマップが指定する最新でないイメージに更
新データを格納させ、トランザクションの処理による是
認または否認によってビットマップの指定を確定するこ
とにより、ファイルの回復制御が迅速かつ容易に行なえ
るという効果がある。
As described above, according to the present invention, two kinds of images are provided in the record of the file, the update data is stored in the image which is not the latest specified by the bitmap when the record is updated, and it is confirmed by the transaction processing. Alternatively, by confirming the designation of the bitmap by denial, there is an effect that file recovery control can be performed quickly and easily.

【図面の簡単な説明】[Brief description of drawings]

【図1】本発明の一実施例の構成図である。FIG. 1 is a configuration diagram of an embodiment of the present invention.

【図2】図1のビットマップおよびファイル領域の構成
を示す図である。
FIG. 2 is a diagram showing a configuration of a bitmap and a file area in FIG.

【図3】図1のトランザクションアクセス情報の構成図
である。
FIG. 3 is a configuration diagram of transaction access information of FIG. 1.

【図4】図1のレコード更新部の処理のフロー図であ
る。
FIG. 4 is a flowchart of processing of a record update unit in FIG.

【図5】図1のレコード検索部の処理のフロー図であ
る。
5 is a flow chart of processing of a record search unit in FIG.

【図6】図1のトランザクション是認処理部の処理のフ
ロー図である。
6 is a flow chart of processing of a transaction approval processing unit in FIG. 1. FIG.

【符号の説明】[Explanation of symbols]

1 主記憶域 2 外部記憶域 3 レコード検索部 4 レコード更新部 5 トランザクション是認処理部 6 トランザクション否認処理部 11 トランザクションアクセス情報 12,21 ビットマップ 22 ファイル領域 31 レコード検索入力 41 レコード更新入力 42 トランザクション是認入力 43 トランザクション否認入力 111 ファイル識別子 112 第1レコード識別子 112 第2レコード識別子 221 第1イメージ 222 第2イメージ B0,B1,〜B80 ビット R0,R1,〜R80 レコード 1 main storage area 2 external storage area 3 record search section 4 record update section 5 transaction approval processing section 6 transaction denial processing section 11 transaction access information 12, 21 bitmap 22 file area 31 record search input 41 record update input 42 transaction approval input 43 Transaction denial input 111 File identifier 112 First record identifier 112 Second record identifier 221 First image 222 Second image B0, B1, ~ B80 bit R0, R1, ~ R80 record

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】 主記憶装置と外部記憶装置のファイルと
の間でトランザクションの処理単位にファイル更新のデ
ータを転送する電子計算機システムのファイル回復制御
方式において、それぞれのレコードに二つのイメージを
有し、一方のイメージは更新前のイメージを他方のイメ
ージは更新後のイメージを同時に保持するファイルと、
このファイルのレコードのそれぞれに対応するビットの
値により何れのイメージが最新の是認されたイメージで
あるかを示す主記憶装置に設けられたビットマップと、
トランザクションが処理中に更新したファイルとレコー
ドとの識別情報を登録する主記憶装置に設けられたトラ
ンザクションのアクセス情報と、前記ビットマップを参
照してレコードの最新のイメージを検索して出力する検
索手段と、レコードの更新時に前記ビットマップのビッ
トが最新の是認されたイメージでないことを示すイメー
ジを書換えてレコードを更新し、前記アクセス情報にア
クセスしたレコードの識別子を登録する更新手段と、ト
ランザクションのレコード更新処理の是認によりそのト
ランザクションがアクセスしたレコードに対応する前記
ビットマップのビットの値を反転する是認処理手段と、
トランザクションがアクセスしたファイルに対応するア
クセス情報を破棄して対応するビットマップを変更しな
い否認処理手段とを有することを特徴とするファイル回
復制御方式。
1. A file recovery control method of a computer system for transferring file update data in transaction processing units between a main storage device and a file of an external storage device, wherein each record has two images. , One file holds the image before update and the other image holds the image after update at the same time,
A bitmap provided in main storage which indicates which image is the most recently approved image by the value of the bit corresponding to each of the records in this file,
Retrieval means for retrieving and outputting the latest image of the record by referring to the access information of the transaction, which is provided in the main storage device for registering the identification information of the file and the record updated during the transaction of the transaction, and the bitmap. And a updating means for updating the record by rewriting the image indicating that the bit of the bitmap is not the latest approved image at the time of updating the record, and registering the identifier of the record that accessed the access information, and the transaction record Approval processing means for inverting the value of the bit of the bitmap corresponding to the record accessed by the transaction by approval of the update processing,
A file recovery control method comprising: a denial processing unit that discards access information corresponding to a file accessed by a transaction and does not change a corresponding bitmap.
JP3248586A 1991-09-27 1991-09-27 File recovery control system Pending JPH0589050A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP3248586A JPH0589050A (en) 1991-09-27 1991-09-27 File recovery control system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP3248586A JPH0589050A (en) 1991-09-27 1991-09-27 File recovery control system

Publications (1)

Publication Number Publication Date
JPH0589050A true JPH0589050A (en) 1993-04-09

Family

ID=17180327

Family Applications (1)

Application Number Title Priority Date Filing Date
JP3248586A Pending JPH0589050A (en) 1991-09-27 1991-09-27 File recovery control system

Country Status (1)

Country Link
JP (1) JPH0589050A (en)

Similar Documents

Publication Publication Date Title
JP2001344142A (en) Multiprogram processor and file roll-back method used for it
JPH0589050A (en) File recovery control system
JP3636773B2 (en) Information processing device for database check
JPH0816881B2 (en) Database update method
JPH11353215A (en) Journal-after-update collecting process system
JP2828354B2 (en) Database management device
JP3279247B2 (en) Database management apparatus and method, and recording medium recording this method
JP2690700B2 (en) Database file recovery method
JP3460265B2 (en) Data transfer method between computers
JP3022011B2 (en) Data backup system
JP2658265B2 (en) Disaster recovery method
JPH10340215A (en) Data backup system
JP2980610B2 (en) Transaction management device
JP2000148548A (en) Unnecessary record deleting device
JP3006527B2 (en) Client / server type database system
JPH0823840B2 (en) Method and apparatus for updating database
JP2641399B2 (en) File management device
JPH0744426A (en) File management method for file system
JP2933011B2 (en) Exclusive file control system
JPH05250243A (en) Data processing system for extended storage device
JPH05108444A (en) Journal extraction system
JPH04139545A (en) Data base updating processing system
JPH0259837A (en) Data recovery processing system
JPH067373B2 (en) Data transfer method
JPH0554079A (en) Information processor

Legal Events

Date Code Title Description
LAPS Cancellation because of no payment of annual fees