JPH02105950A - Recovery system for data base - Google Patents

Recovery system for data base

Info

Publication number
JPH02105950A
JPH02105950A JP63257149A JP25714988A JPH02105950A JP H02105950 A JPH02105950 A JP H02105950A JP 63257149 A JP63257149 A JP 63257149A JP 25714988 A JP25714988 A JP 25714988A JP H02105950 A JPH02105950 A JP H02105950A
Authority
JP
Japan
Prior art keywords
journal
database
input
pool
page
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
JP63257149A
Other languages
Japanese (ja)
Inventor
Takatoshi Iwamoto
岩本 孝寿
Hideo Munechika
宗近 日出夫
Kazuhiro Hara
和宏 原
Ichiro Yokoyama
一郎 横山
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 Software Engineering Co Ltd
Hitachi Ltd
Original Assignee
Hitachi Software Engineering Co Ltd
Hitachi 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 Software Engineering Co Ltd, Hitachi Ltd filed Critical Hitachi Software Engineering Co Ltd
Priority to JP63257149A priority Critical patent/JPH02105950A/en
Publication of JPH02105950A publication Critical patent/JPH02105950A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To shorten the recovery time of a data base by providing a journal selecting means which reads a journal regarding the same data base page out of a loop continuously in time-series order. CONSTITUTION:The journal regarding the same data base page is taken out of the pool by the journal selecting means 9 continuously in the time-series order. The journal regarding the same data base page is sent to an input/output buffer 3 in the time-series order (successively from the head) to make a recovery regarding the data base page, so the data base is never misrecovered. Further, input/output operation of the data base input/output buffer 3 is performed only once for each page. Consequently, the number of times of the input and output of data base pages is decreased to shorten the recovery time.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、データベースシステムにおけるデータベース
の回復方式に係り、特に、物理媒体障害時やシステム停
止時に、その後のデータベースを回復する際に1.仮想
メモリ上の領域の占有量を抑えながら、データベースの
ページの入出力回数を削減するのに好適なデータベース
の回復方式に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a database recovery method in a database system, and in particular, the following steps are taken when recovering a database after a physical media failure or system shutdown. The present invention relates to a database recovery method suitable for reducing the number of database page inputs and outputs while suppressing the amount of space occupied on virtual memory.

〔従来の技術〕[Conventional technology]

一般に、f−タペースシステムにおいて、データベース
の更新を大量に行なうトランザクション処理中に、物理
媒体障害やシステムが停止すると。
Generally, in an f-tapace system, a physical media failure or system shutdown occurs during transaction processing that involves updating a large number of databases.

その後のデータベースの回復の際に扱うジャーナル量は
膨大なものとなる。
The amount of journals to be handled during subsequent database recovery will be enormous.

この種のデータベース回復方式として、従来。Conventional as this kind of database recovery method.

例えば特開昭61−151754号公報に記載の方式が
ある。この方式では、ジャーナルの1件1件に対して、
該当するページをデータベースからバッファに入力し、
ジャーナルを1件ずつかぶせた後データベースへ出力し
ている。
For example, there is a method described in Japanese Unexamined Patent Publication No. 151754/1983. In this method, for each journal entry,
Enter the appropriate page from the database into the buffer,
After each journal is covered one by one, it is output to the database.

〔発明が解決しようとする課題〕[Problem to be solved by the invention]

上記の従来方式では、データベースのページの入出力回
数がジャーナル量に比例して増加するため、上記のよう
に取扱うジャーナル量が多くなると、入出力回数の増加
に伴ない入出力エラーの発生する率も高くなり、性能お
よび信頼性の両面で問題があった。また、このように入
出力回数が増大すると、データベースの回復時間が長く
なり。
In the conventional method described above, the number of input/outputs for database pages increases in proportion to the amount of journals, so if the number of journals handled increases as described above, the rate of input/output errors will increase as the number of input/outputs increases. This caused problems in terms of both performance and reliability. Additionally, this increased number of I/Os increases database recovery time.

その間オンライントランザクションの実行ができなくな
る等の問題があった。
During this time, there were problems such as the inability to execute online transactions.

しかし、上記従来技術では、このような、入出力回数増
加に伴なう入出力エラー発生率増加やデータベース回復
時間の増加の問題については、な忙も考慮されていない
However, the above-mentioned conventional technology does not take into consideration the problems of an increase in the incidence of input/output errors and an increase in database recovery time due to an increase in the number of input/outputs.

従って、本発明の目的は、上記従来技術の問題点を解消
して、仮想メモリの占有量を抑えながら。
Therefore, an object of the present invention is to solve the problems of the prior art described above, while suppressing the amount of virtual memory occupied.

データベースの回復時のデータベースページの入出力回
数を削減することによれ、データベースの回復時間を短
縮すると共に、入出力エラー発生率を低減することによ
りデータベース回復の信頼性を向上したデータベースの
回復方式を提供すること忙あδ。
A database recovery method that shortens database recovery time by reducing the number of inputs and outputs of database pages during database recovery, and improves the reliability of database recovery by reducing the incidence of input/output errors. Busy to provide.

〔課題を解決するための手段〕[Means to solve the problem]

上記目的を達成するため1本発明のデータベースの回復
方式は、ジャーナルファイルからジャーナルを取り出す
手段と、データベースのページの入出力手段(入出力バ
ッファ)と、入出カッ(ツファに入力したデータベース
のページをジャーナルにより回復する手段とに加え、特
徴として、ジャーナルファイルから取り出されたジャー
ナルを格納する仮想メモリ上のプール(ジャーナルブー
ル)と1回復処理のため、同一のデータベースページ鎖
関するジャーナルを前記プールから時系列順に連続して
取り出すジャーナル選択手段とを設ける。
In order to achieve the above objects, the database recovery method of the present invention includes a means for extracting a journal from a journal file, a means for inputting and outputting database pages (input/output buffer), and an input/output buffer (input/output buffer) for retrieving a journal from a journal file. In addition to the means for recovery using journals, there is also a pool (journal Boolean) in virtual memory that stores journals retrieved from journal files, and 1. For recovery processing, journals related to the same database page chain are retrieved from the pool. A journal selection means for successively extracting journals in series order is provided.

また、現在回復中のデータベースページとローのデータ
ベースページに関するジャーナ/L/&!、引続いて回
復処理のため入出力、(ツファに直接、送られるが、異
なるデータベースページに関するジャーナルは、一旦、
ヅヤーナルブールに格納されるよ5に構成される。
Also, journals regarding database pages currently being recovered and raw database pages /L/&! , followed by I/O for recovery processing (directly to ZFA), but once the journals for different database pages are
It is stored in the dual Boolean and is configured in 5 formats.

また、この場合、格納しようとするジャーナル忙対する
空き領域(未使用領域)がジャーナルプール白和ないと
きには、該ジャーナルプールの先頭領域に格納されてい
るジャーナルおよびこれとそれによって生じたプールの
空き領域が一個所にまとまるようにジャーナルの詰め替
えを行ない。
In this case, if there is no free area (unused area) for the journal to be stored in the journal pool, the journal stored in the leading area of the journal pool and the free area of the pool created by it. Repack the journal so that everything is in one place.

その結果生成された(まとめられた)空き領域(終端領
域)に格納しようとしていたジャーナルを格納する構成
とされる。
The structure is such that the journal that was intended to be stored is stored in the free area (terminal area) that is generated (collected) as a result.

〔作用〕[Effect]

上記構成に基づく作用を説明する。 The effect based on the above configuration will be explained.

前記のジャーナル選択手段を設け?、:こと圧より。Provide the journal selection method mentioned above? , : From pressure.

同一のデータベースページに関するジャーナルは。Journals about the same database page.

プールから時系列順に(先頭から順番忙)連続し゛て入
出力バッファに送られて、当該データベースページ忙関
する回復が行なわれるので、データベースを誤回復する
おそれはない。また、データベースの入出力バッファへ
の入出力は、同一ページについて1回だけで済むので、
データベースページの入出力回数が削減でき1回復時間
を短縮することかで鎗る。
Since the data is continuously sent from the pool to the input/output buffer in chronological order (starting from the beginning) and recovery related to the database page is performed, there is no risk of erroneously recovering the database. In addition, input/output to the database input/output buffer only needs to be performed once for the same page.
This can be achieved by reducing the number of database page input/outputs and shortening the recovery time.

プールへのジャーナルの格納は、現在回復中ノデータベ
ースベージと異なるデータベースページに関するジャー
ナル釦ついて行なわれる。このジャーナルは、プールの
空き領域へ格納されるが、格納すべきジャーナルの収容
できる十分な広さの空き領域がないと伴には、プールの
先頭領域にあるジャーナルおよびこのジャーナルと同一
のデータベースページを持つすべてのジャーナルによる
回復処理が1時系列順に行なわれる。その結果。
Journals are stored in the pool in response to journal buttons related to database pages different from the database page currently being recovered. This journal is stored in the free area of the pool, but if there is not enough free space to accommodate the journal to be stored, the journal in the top area of the pool and the same database page as this journal will be stored. The recovery process for all journals that have the data is performed in chronological order. the result.

プールに空き領域ができるが、これらの空き領域は一個
所に(プールの後端に)まとまるようにジャーナルの詰
め替えが行なわれる(ジャーナルはプールの先頭から途
中に空きが生じないように圧縮される)。そして、この
プール後端の空き領域に、新たにジャーナルファイルか
らのジャーナルを格納する。このよう圧して、プール内
に格納されているジャーナルは、時系列順が保証される
ので、データベースを誤回復することがない。
Free space is created in the pool, but the journal is refilled so that these free spaces are gathered in one place (at the end of the pool) (the journal is compressed so that there is no space between the beginning of the pool and the middle) ). Then, a new journal from the journal file is stored in the free area at the rear end of this pool. In this manner, the chronological order of the journals stored in the pool is guaranteed, so that there is no possibility of erroneous recovery of the database.

〔実施例〕〔Example〕

以下、本発明の実施例を1図面忙よって詳細に説明する
Hereinafter, embodiments of the present invention will be described in detail with reference to one drawing.

第1図は1本実施例のデータベース回復機構の構成図で
、1はジャーナル、2はジャーナルブール、3は入出力
バツファ、4はジャーナルlを収納するジャーナルファ
イル、5はデータベース。
FIG. 1 is a block diagram of the database recovery mechanism of this embodiment, in which 1 is a journal, 2 is a journal boolean, 3 is an input/output buffer, 4 is a journal file that stores journal l, and 5 is a database.

6はデータベースページ、8はジャーナルファイル4か
らジャーナル1を取り出すジャーナル取り出し機構、9
はジャーナル選択機構、10はデータベースページ回復
機構、11はデータベースページ入出力機構、12はジ
ャーナル取り邑し機構8ないしデータベースページ入出
力機構を統括制御するデータベース回復機構である。ジ
ャーナル選択機構9は、ジャーナル取り出し機構8で取
り出しt−ジャーナルをジャーナルブール2または(デ
ータベースページ回復機構10を介して)入出力バツフ
ァ3に選択的に送ったり、ジャーナルプール2の所要ジ
ャーナルページを選択的に取り出して人出カバツファ3
に送ったりする制御を行なうことができる。データベー
スページ入出力機構11は、データベース5から回復対
象のページを入出力バッ7ア3に送り、また1回復され
たページを入出力バッファ3からデータベース5に転送
する制御を行なうことができる。
6 is a database page, 8 is a journal retrieval mechanism for retrieving journal 1 from journal file 4, 9
1 is a journal selection mechanism, 10 is a database page recovery mechanism, 11 is a database page input/output mechanism, and 12 is a database recovery mechanism that centrally controls the journal handling mechanism 8 or the database page input/output mechanism. The journal selection mechanism 9 selectively sends the retrieved t-journal to the journal boolean 2 or the input/output buffer 3 (via the database page recovery mechanism 10) by the journal extraction mechanism 8, or selects a required journal page in the journal pool 2. Take out the crowd and cover it 3
It is possible to perform control such as sending to The database page input/output mechanism 11 can control the sending of pages to be recovered from the database 5 to the input/output buffer 7 and the transfer of one recovered page from the input/output buffer 3 to the database 5.

つぎに、本発明の実施例の更に詳細な構成および動作を
、第2図(a)〜(g)および第3図により説明する。
Next, the more detailed structure and operation of the embodiment of the present invention will be explained with reference to FIGS. 2(a) to (g) and FIG. 3.

第2図(a)〜(g)は1本実施例の種々の能様の動作
を説明するための図、第3図は1本実施例の動作を示す
フローチャートである。
FIGS. 2(a) to 2(g) are diagrams for explaining the operations of various functions in this embodiment, and FIG. 3 is a flowchart showing the operations of this embodiment.

第2図(a)〜(glにおいて、第1図と同一構成の部
分には同一符号を付し、説明を省略する。なお、7は、
6と同様なデータベースページである。
In FIGS. 2(a) to (gl), parts having the same configuration as those in FIG.
This is a database page similar to 6.

(1)第2図(alに示すように、データベース5の回
復において、ジャーナルファイル4から1件目のジャー
ナル1を入力した場合(第3図のステップ301 、3
02 、303 ) 、データベース5から当該入力ジ
ャーナルIK該当するデータベースページ6を入出力バ
ッファ3に入力Gしだ後(ステップ304)、入力ジャ
ーナル1を入出力バッファ3に入力されているデータベ
ースページ6にかぶせる。
(1) As shown in FIG. 2 (al), when the first journal 1 is input from journal file 4 during recovery of database 5 (steps 301 and 3 in FIG.
02, 303), inputs the input journal IK corresponding database page 6 from the database 5 to the input/output buffer 3 (step 304), and then inputs the input journal 1 to the database page 6 input to the input/output buffer 3. Cover.

(2)第2図fblに示すように、ジャーナルファイル
4からの次の入力ジャーナルlが現在回復中のデータベ
ースページ6と同じデータベースページに関するジャー
ナルの場合(ステップ301〜303゜305 、30
6 ”) 、入力ジャーナル1を入出力バッファ3に入
力されているデータベースページ6にかぶせる( 30
7 )。
(2) As shown in FIG. 2 fbl, if the next input journal l from the journal file 4 is a journal related to the same database page as the database page 6 currently being recovered (steps 301 to 303, 305, 30
6”), overlay input journal 1 over database page 6 input to input/output buffer 3 (30
7).

(3)第2図(clに示すように、ジャーナルファイル
4からの次の入力ジャーナルlが現在回復中のデータベ
ースページ6と異なるデータベースページに関するジャ
ーナルで(ステップ301〜303305 、306 
)、かつジャーナルブール2の終端忙当該入力ジャーナ
ル1を格納するだけの十分な空きがある場合(ステップ
308)、当該入夫ジャーナル1をジャーナルブール2
に格納する(ステップ312)。
(3) As shown in FIG. 2 (cl), the next input journal l from journal file 4 is a journal relating to a database page different from the database page 6 currently being recovered (steps 301 to 303305, 306
), and there is enough free space to store the input journal 1 at the end of journal Boolean 2 (step 308), the input journal 1 is stored in journal Boolean 2.
(step 312).

+4]JR2図(dlに示すように、ジャーナルファイ
ル4からの入力ジャーナル1が現在回復中のデータベー
スページ6と14なるデータベースページに関するジ’
r −+ A/ (ス−y−ツブ301〜3(’)3 
、305 。
+4] JR2 diagram (as shown in dl, the input journal 1 from journal file 4 contains database pages 6 and 14 that are currently being recovered).
r −+ A/ (su-y-tsubu 301~3(')3
, 305.

306)で、かつジャーナルプールの終端忙当該入力ジ
ャーナル1を格納するだけの十分な空きがな((ステッ
プ309 ) 、かつジャーナルブール2内の空き領域
の総和が当該入力ジャーナル1の大きさよりも大きく、
かつジャーナルプール2の使用率(格納されているジャ
ーナルの大きさの総和/ジャーナルプールの大ぎさ)が
1/2以下の場合(ステップ310)、ジャーナルブー
ル2内に格納されているジャーナルの詰め替えを行ない
(ステップ311)、第2図(C)に示すように、ジャ
ーナルプール2の終端にまとまった空き領域aを作成し
た後、当該入力ジャーナル1をジャーナルプール2に格
納する(ステップ312)。
306), and there is not enough free space to store the input journal 1 at the end of the journal pool ((step 309), and the total free space in the journal Boolean 2 is larger than the size of the input journal 1). ,
And if the usage rate of journal pool 2 (total size of stored journals/size of journal pool) is less than 1/2 (step 310), refill the journals stored in journal boolean 2. After creating a free space a at the end of the journal pool 2 as shown in FIG. 2(C) (step 311), the input journal 1 is stored in the journal pool 2 (step 312).

(5)  第2図(e) K示すよう釦、ジャーナルフ
ァイル4からの次の入力ジャーナル1が現在回復中の7
’−pベースページ6と異するデータベースページに関
するジャーナル(ステップ301〜303.305゜3
06)で、かつジャーナルプール2の終端に当該入力ジ
ャーナル1を格納するだけの十分な空きがない場合で(
ステップ308)、ジャーナルブール2内の空ぎ領域a
の総和が当該入力ジャーナル1の大きさよりも小さいか
またはジャーナルプール2の使用率が1/2を超える場
合(ステップ309または310)、入力ジャーナル1
を保留状態にしくステップ313)、第2図(f)に示
すように、ジャーナルブール2内に格納されているジャ
ーナルのうち先頭のジャーナルを取り出す(ステップ3
14)。
(5) As shown in Figure 2(e), click button 7 to indicate that the next input journal 1 from journal file 4 is currently being recovered.
'-p Journal for database pages different from base page 6 (steps 301 to 303, 305°3
06) and there is not enough free space at the end of journal pool 2 to store the input journal 1 (
Step 308), free area a in journal Boolean 2
is smaller than the size of the input journal 1 or the usage rate of the journal pool 2 exceeds 1/2 (step 309 or 310), the input journal 1
As shown in FIG. 2(f), the first journal among the journals stored in the journal Boolean 2 is taken out (step 313).
14).

入出力バツファ3に入力されている現在回復中のデータ
ベースページ6をデータベース5に出力Pした後(ステ
ップ315)、ジャーナルプール2から取り出したジャ
ーナルに該当するデータベースページ7をデータベース
5から入出力バッファ3に入力Gしくステップ316)
、当該ジャーナル(ジャーナルプール2から取り出した
先頭ジャーナル)を入出力バッファ3に入力されている
データベースページ7にかぶせる(ステップ317 )
。現在回復中のデータベースページ7と同じデータベー
スページ忙関するジャーナルをジャーナルプールからす
べて取り出しくステップ318 、319 ) 。
After outputting the database page 6 currently being recovered that has been input to the input/output buffer 3 to the database 5 (step 315), the database page 7 corresponding to the journal taken out from the journal pool 2 is transferred from the database 5 to the input/output buffer 3. (Step 316)
, the relevant journal (the first journal taken out from journal pool 2) is placed over database page 7 input to input/output buffer 3 (step 317).
. Steps 318, 319) in which all journals related to the same database page 7 that is currently being recovered are retrieved from the journal pool.

入出力バッファ3に入力されているデータベースページ
7にかぶせる(ステップ317 )。同一ぺ一ジに関す
るジャーナルがなくなれば、ジャーナルブール中のジャ
ーナル処理フラグをオフする(ステップ320 )。ジ
ャーナルブール2内の空き領域aの総和が保留状態にし
ておいた入力ジャーナルlの大きさよりも大きく、かつ
ジャーナルプール2の使用率が1/2以下になるまでジ
ャーナルプール2からのジャーナルの取り出し処理を繰
り返す。第2図(d)&C示すように、ジャーナルブー
ル2内の空き領域aの総和が保留状態にしておいた入力
ジャーナル1の大きさよりも大きく、かつジャーナルプ
ール2の使用率が172以下になった場合、ジャーナル
ブール2内に格納されているジャーナルの詰め替えを行
ない、第2図(C)に示すようVC,ジャーナルプール
の終端Kまとまった空き領域aを作成した後、保留状態
にしておいた当該入力ジャーナル1をジャーナルプール
2に格納する。
It is placed over the database page 7 input to the input/output buffer 3 (step 317). If there are no journals related to the same page, the journal processing flag in the journal boolean is turned off (step 320). The process of extracting journals from journal pool 2 is continued until the total free space a in journal boolean 2 is larger than the size of input journal l kept in the pending state, and the usage rate of journal pool 2 is 1/2 or less. repeat. As shown in Figure 2 (d) & C, the total amount of free space a in journal Boolean 2 is larger than the size of input journal 1, which has been put on hold, and the usage rate of journal pool 2 has become 172 or less. In this case, after refilling the journal stored in the journal Boolean 2 and creating a large amount of free space a at the end of the VC and journal pool as shown in Figure 2 (C), the corresponding Store input journal 1 in journal pool 2.

(6)第2図(g)に示すように、ジャーナルファイル
4のジャーナルがなくなった場合(ステップ302)。
(6) As shown in FIG. 2(g), when there is no journal in journal file 4 (step 302).

ジャーナルプール2に残っているジャーナルを同じデー
タベースページに関するジャーナル毎にすべて取り出し
て入出力バッファ3に入力Gされているデータベースペ
ージ6にかぶせる。データベースページが切り替った場
合は、現在回復中のデータベースページ6をデータベー
ス5に出力Pした後、ジャーナルプール2から取り出l
、たジャーナル如該当するデータベースページ7をデー
タベース5から入出力バッファ3iC入カGし、当該ジ
ャーナルを入出力バッファ3に入力されているデータベ
ースページ7にかぶせる。ジャーナルプールに残ってい
たジャーナルの取り出しが終了シタら(ステップ321
)、入出力バッファ3に入力されているデータベースペ
ージ7 ik f−タペース5に出力Pする(ステップ
322 、323 )。
All the journals remaining in the journal pool 2 are taken out for each journal related to the same database page and are placed over the database page 6 input to the input/output buffer 3. When the database page is switched, the database page 6 currently being recovered is output to the database 5 and then taken out from the journal pool 2.
, inputs the corresponding database page 7 from the database 5 into the input/output buffer 3iC, and overlays the database page 7 input into the input/output buffer 3 with the journal. The extraction of the journal remaining in the journal pool is completed (step 321).
), the database page 7 inputted in the input/output buffer 3 is outputted to the database page 5 (steps 322 and 323).

本実施例によれば、データベースのページの入出力バツ
ファをバッファリングする方式に比べ仮想メモリの占有
量削減の効果がある。また1本実施例によれば、ジャー
ナル1件毎にデータベースのページの入出力を行なう方
式に比ベデータベースに対するデータベースページの入
出力回数を削減することができるのでデータベース回復
時間の短縮の効果がある。
According to this embodiment, compared to a method of buffering input/output buffers of database pages, the amount of virtual memory occupied can be reduced. Furthermore, according to this embodiment, the number of times database pages are input/output to the database can be reduced compared to a method in which database pages are input/output for each journal, thereby reducing database recovery time. .

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

以上詳しく述べたように、本発明のデータベースの回復
方式によれば、同じデータベースページに関する複数の
ジャーナルを1回のデータベースページの入出力で処理
できるので、データベース回復時間の短縮の効果がある
。また、ジャーナルプールを用いてジャーナルをバッフ
ァリングするため、データベースのページの入出力バッ
ファを複数面持つ方式に比べ仮想メモリの占有量削減の
効果がある。更に、同一のデータベースページに対する
いくつかのジャーナルによる回復は、時系列置に連続し
て行なわれるので、入出力回数が削減サレると共に、入
出力エラーの発生率を低減し。
As described above in detail, according to the database recovery method of the present invention, a plurality of journals related to the same database page can be processed by one database page input/output, thereby reducing the database recovery time. Furthermore, since the journal is buffered using a journal pool, it has the effect of reducing the amount of virtual memory occupied compared to a method that has multiple input/output buffers for database pages. Furthermore, since the recovery of the same database page by several journals is performed successively in chronological order, the number of input/outputs is reduced and the incidence of input/output errors is reduced.

データベース回復の信頼性を向上する効果がある。This has the effect of improving the reliability of database recovery.

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

第1図は本発明の一実施例のデータベース回復機構の構
成図、第2図(a)〜(g)は本発明の実施例の動作を
説明するための図、第3図は本発明の実施例の動作を示
すフローチャートである。 1・・・・・・ジャーナル、2・・・・・・ジャーナル
ブール。 3・・・・・・入出力バッファ、4・・・・・・ジャー
ナルファイル、5・・・・・・データベース、6,7・
・・・・・データベースページ、8・・・・・・ジャー
ナル取り出し機構、9・・・・・・ジャーナル選択機構
、10・・・・・・データベースページ回復機構、11
・・・・・・データベースページ入出力機構、12・・
・・・・データベース回復機構。 第2図 (b) (C) 第2図 (d) (e) (f) 第2図
FIG. 1 is a block diagram of a database recovery mechanism according to an embodiment of the present invention, FIGS. 2(a) to (g) are diagrams for explaining the operation of the embodiment of the present invention, and FIG. 3 is a flowchart showing the operation of the embodiment. 1...Journal, 2...Journal Boolean. 3...I/O buffer, 4...Journal file, 5...Database, 6,7...
...Database page, 8...Journal retrieval mechanism, 9...Journal selection mechanism, 10...Database page recovery mechanism, 11
...Database page input/output mechanism, 12...
...Database recovery mechanism. Figure 2 (b) (C) Figure 2 (d) (e) (f) Figure 2

Claims (1)

【特許請求の範囲】 1、データベースの更新履歴であるジャーナルを格納し
ているジャーナルファイルと、前記ジャーナルファイル
からジャーナルを取り出す手段と、前記データベースの
ページの入出力手段と、入出力バッファに入力したデー
タベースのページをジャーナルにより回復する手段とを
有するデータベースの回復方式において、前記ジャーナ
ルを取り出す手段により取り出されたジャーナルを格納
する仮想メモリ上のプールと、前記回復する手段による
回復処理のため、同一のデータベースページに関するジ
ャーナルを前記プールから時系列順に連続して取り出す
ジャーナル選択手段とを備えたことを特徴とするデータ
ベースの回復方式。 2、前記回復する手段により回復中のデータベースペー
ジと同一のデータベースページに関するジャーナルは、
前記ジャーナルファイルから直接前記入出力バッファに
送られて連続する回復処理が行なわれ、前記回復する手
段により回復中のデータベースページと異なるデータベ
ースページに関するジャーナルは、一旦前記プールに格
納されるように構成したことを特徴とする請求項1記載
のデータベースの回復方式。 3、格納すべきジャーナルに対する空き領域がプールに
存在しないときは、前記プールの先頭領域に格納されて
いるジャーナルおよび該格納されているジャーナルと同
一のデータベースページをもつジャーナルによる回復処
理を連続して行ない、それによつて生じたプールの空き
領域が一個所にまとまるようにジャーナルの詰め替えを
行ない、それによつて生成された空き領域に前記格納す
べきジャーナルを格納するように構成したことを特徴と
する請求項1または2記載のデータベースの回復方式。
[Claims] 1. A journal file storing a journal that is an update history of a database, means for retrieving the journal from the journal file, input/output means for the pages of the database, and information input to the input/output buffer. In a database recovery method that includes means for recovering database pages using a journal, a pool on a virtual memory for storing the journal retrieved by the journal retrieving means and a pool for recovery processing by the restoring means are identical. A database recovery method, comprising: journal selection means for successively extracting journals related to database pages from the pool in chronological order. 2. Journals related to the same database page as the database page being recovered by the recovery means:
The journal is sent directly from the journal file to the input/output buffer for continuous recovery processing, and journals related to database pages different from the database page being recovered by the recovery means are temporarily stored in the pool. 2. The database recovery method according to claim 1. 3. If there is no free space in the pool for the journal to be stored, the recovery process is performed consecutively using the journal stored in the top area of the pool and the journal that has the same database page as the stored journal. The method is characterized in that the journals are repacked so that the resulting free space in the pool is gathered in one place, and the journal to be stored is stored in the free space created thereby. The database recovery method according to claim 1 or 2.
JP63257149A 1988-10-14 1988-10-14 Recovery system for data base Pending JPH02105950A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63257149A JPH02105950A (en) 1988-10-14 1988-10-14 Recovery system for data base

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63257149A JPH02105950A (en) 1988-10-14 1988-10-14 Recovery system for data base

Publications (1)

Publication Number Publication Date
JPH02105950A true JPH02105950A (en) 1990-04-18

Family

ID=17302393

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63257149A Pending JPH02105950A (en) 1988-10-14 1988-10-14 Recovery system for data base

Country Status (1)

Country Link
JP (1) JPH02105950A (en)

Similar Documents

Publication Publication Date Title
EP0349463B1 (en) Method of simultaneously entering data into overlapped windows
JPH02105950A (en) Recovery system for data base
JPH0719311B2 (en) Data processing device
JPH0795267B2 (en) How to reuse software specifications
JPH0752450B2 (en) Dictionary data retrieval device
JP2598935B2 (en) Writing method to text memory
JP2748525B2 (en) Data transfer device
JP2923952B2 (en) Merge processing method
JP2960417B2 (en) Data recovery method
JPH0415832A (en) Fault processing system
JP2949760B2 (en) Image data expansion method
JP2830239B2 (en) Input display control device
JPH0221326A (en) Data sorting system
JP3047400B2 (en) Data processing device
JPH0259837A (en) Data recovery processing system
JPS58134361A (en) Release system for reverse time display of graphic processor
JPH0649262B2 (en) Numerical control device
JPH05114044A (en) Character reader
JPS62123534A (en) Input and output control system for electronic journal
JPS62182966A (en) Kanji input unit
JPH0384674A (en) Cad device
JPH0461373B2 (en)
JPH04165436A (en) File control system
JPS5842512B2 (en) Form processing device
JPH038075A (en) Document storing system