JPH0350648A - Fault restoration method for data base - Google Patents

Fault restoration method for data base

Info

Publication number
JPH0350648A
JPH0350648A JP1184695A JP18469589A JPH0350648A JP H0350648 A JPH0350648 A JP H0350648A JP 1184695 A JP1184695 A JP 1184695A JP 18469589 A JP18469589 A JP 18469589A JP H0350648 A JPH0350648 A JP H0350648A
Authority
JP
Japan
Prior art keywords
database
journal
history information
area
file
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
JP1184695A
Other languages
Japanese (ja)
Inventor
Teizaburo Kanai
金居 貞三郎
Takashi Sumiyoshi
住吉 孝史
Yoshiharu Konno
今野 芳春
Mamoru Ichikawa
守 市川
Takatoshi Iwamoto
岩本 孝寿
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 JP1184695A priority Critical patent/JPH0350648A/en
Publication of JPH0350648A publication Critical patent/JPH0350648A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PURPOSE:To shorten time required for a restoration processing at the time of a fault in a data base by extracting data base update journal from a journal file and sorting them in the order of physical addresses on the storage medium of the data base. CONSTITUTION:It is assumed that the fault occurs in an area B20-B after the processing of a transaction 3(200-3). At that time, the data base update journal on the area B20-B is integrated and sorted so as to generate an integration journal file 50. Namely, the data base update journals on the area B are extracted from respective magnetic tapes 30-a and 30-b and are sorted in the order of the physical addresses on the storage medium storing the area B of data to be updated. The order of the physical addresses of update data in the area B is b1, b3 and b2 and the update journals as against them are sorted in the order. Then, the content of a backup file B40-B in the area B is copied in a standby volume 70 at the time of the fault in the data base. Then, the area B is restored on the volume 70 at last.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は、データベースシステムにおけるデータベース
の障害回復方法に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a database failure recovery method in a database system.

〔従来の技術〕[Conventional technology]

データベースシステムにおいては、データベースを格納
する磁気ディスク等の媒体のハードウェア障害、ソフト
ウェアの誤りによるデータベースの内容の論理的な破壊
等のデータベース障害に対して、当該データベースの内
容を回復する必要がある。このため、従来は以下の方法
により、データベースの障害回復を行っていた。すなわ
ち、システム稼動中にデータベースが更新された場合に
データベース更新履歴情報をジャーナルファイルに記録
するとともに、定期的にデータベースの内容を磁気テー
プ等のバックアップファイルに複写しておく、そして、
データベース障害時には、障害が発生した領域(媒体障
害の場合は別媒体上に新たに割当てた領域)にバックア
ップファイルの内容を複写した後、上記バックアップフ
ァイル作成以降に記録された当該データベースの更新履
歴情報をジャーナルファイルから順次読み、以前に行わ
れた順に従い更新することによりデータベースを回復す
る(たとえば大野豊編著、パオンライン・システムのソ
フトウェア″′、産業図書、 1977148頁から1
49頁参照)。
In a database system, it is necessary to recover the contents of a database in case of a database failure such as a hardware failure of a medium such as a magnetic disk storing the database or logical destruction of the database contents due to a software error. For this reason, database failure recovery has conventionally been performed using the following method. That is, when the database is updated while the system is running, database update history information is recorded in a journal file, and the contents of the database are periodically copied to a backup file such as a magnetic tape.
In the event of a database failure, after copying the contents of the backup file to the area where the failure occurred (in the case of a media failure, to a newly allocated area on another medium), the update history information of the database recorded since the backup file was created is The database is recovered by sequentially reading the journal files and updating them in the order in which they were previously performed (for example, Yutaka Ohno (ed.), Software for the Pa-Online System'', Sangyo Tosho, 1977148-1).
(See page 49).

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

上記従来技術は、以下に述べる理由により、データベー
スの障害回復処理に長時間を要する問題点を有していた
The above conventional technology has a problem in that database failure recovery processing requires a long time for the reasons described below.

(1)ジャーナルファイル中のデータベース更新履歴情
報を、システム稼動中の通常時に記録した順に読み出し
、処理する。このとき、トランザクション毎に処理完了
/キャンセルを示す履歴情報の有無により当該トランザ
クションの完了有無を判別し、完了トランザクションの
更新結果のみがデータベースに反映されるように回復す
る必要がある。このため、必要なデータベース更新履歴
情報が複数巻の磁気テープ等の媒体に#積されている場
合にも時間的な順に逐次処理する必要があり、上記人力
処理に長時間を要する。
(1) Read and process the database update history information in the journal file in the order in which it was recorded during normal system operation. At this time, it is necessary to determine whether or not each transaction is completed based on the presence or absence of history information indicating processing completion/cancellation for each transaction, and to recover so that only the update results of completed transactions are reflected in the database. Therefore, even when necessary database update history information is stored on multiple volumes of media such as magnetic tapes, it is necessary to process the information sequentially in chronological order, and the above-mentioned manual processing takes a long time.

(2)システム稼動中の通常処理時に更新された順にデ
ータベースを回復するため、データベースへのアクセス
がランダムアクセスになる。また、データベースの同じ
部分が繰返し更新されている場合、当該部分の更新履歴
情報をジャーナルファイルから読み出す度に当該部分を
データベースから読み出し、更新後の内容を書き戻す必
要がある。したがって、データベースへのアクセスが長
時間になる。
(2) Since the database is restored in the order in which it was updated during normal processing during system operation, access to the database becomes random. Further, if the same part of the database is repeatedly updated, each time the update history information of the part is read from the journal file, it is necessary to read the part from the database and write back the updated contents. Therefore, accessing the database takes a long time.

本発明は上記事情に鑑みてなされたものであり。The present invention has been made in view of the above circumstances.

その目的とするところは、データベース障害時の回復処
理時間を大幅に短縮するデータベースの障害回復方法を
提供することにある。
The purpose is to provide a database failure recovery method that significantly shortens the recovery processing time in the event of a database failure.

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

本発明の上記目的は、以下の(1)〜(2)により達成
される。
The above objects of the present invention are achieved by the following (1) and (2).

(1)データベースの回復に必要なデータベース更新履
歴情報をジャーナルファイルから抽出し、データベース
の格納媒体上の物理アドレス順にソートする。なお、デ
ータベース更新履歴情報をジャーナルファイルから抽出
する際、履歴情報を蓄積している磁気テープ等の媒体を
複数のグループに分け、各グループを並行してデータベ
ース更新履歴情報を抽出する。このとき、グループ毎に
履歴情報が複数のグループにまたがって格納されている
トランザクションについて当該トランザクションの完了
有無を記憶し、他グループから抽出したデータベース更
新履歴情報が完了トランザクションの履歴情報か否かを
判別して、必要なデータベース更新履歴情報のみを抽出
する。
(1) Database update history information necessary for database recovery is extracted from the journal file and sorted in order of physical addresses on the database storage medium. Note that when extracting database update history information from a journal file, a medium such as a magnetic tape that stores history information is divided into a plurality of groups, and database update history information is extracted from each group in parallel. At this time, for each group, for transactions whose history information is stored across multiple groups, whether or not the transaction is completed is stored, and it is determined whether the database update history information extracted from other groups is the history information of a completed transaction. to extract only the necessary database update history information.

(2)データベースの回復対象領域を当該領域の物理ア
ドレス順にソートされた上記データベース更新履歴情報
を用いて、該データベースのバックアップファイルをも
とに物理アドレス順に回復する。
(2) Using the database update history information sorted in the order of the physical addresses of the areas of the database to be recovered, the areas are recovered in the order of the physical addresses based on the backup file of the database.

〔作用〕[Effect]

上記手段の作用を以下に述べる。 The operation of the above means will be described below.

(1)データベース更新M歴情報を抽出・ソートする際
、ジャーナルファイルを逐次的に処理しなくてもよく、
ジャーナルファイルの媒体である磁気テープを複数巻並
行して処理できる。したがって、ジャーナルファイルか
らデータベース更新履歴情報を読む時間を大幅に短縮す
ることができる。
(1) When extracting and sorting database update M history information, there is no need to process journal files sequentially.
Multiple volumes of magnetic tape, which is the medium for journal files, can be processed in parallel. Therefore, the time required to read database update history information from the journal file can be significantly reduced.

(2)データベース更新履歴情報がデータベースの格納
媒体上の物理アドレス順にソートされているため、デー
タベースの各ページの内容をデータベース更新履歴情報
を用いて回復する際、各ページを物理アドレス順にアク
セスする。このため、各ページへのアクセス時間が短縮
される。
(2) Since the database update history information is sorted in the order of the physical addresses on the database storage medium, when the contents of each page of the database are recovered using the database update history information, each page is accessed in the order of the physical addresses. Therefore, the time required to access each page is shortened.

また、同一ページが複数回更新されている場合、従来な
らば複数回アクセスが必要であったが、更新履歴情報の
ソートにより1回のアクセスで処理することができる。
Furthermore, if the same page has been updated multiple times, this would conventionally require multiple accesses, but by sorting the update history information, the process can be done with a single access.

これらにより、データベースへのアクセス時間を大幅に
短縮することができる。さらに、データベースの各ペー
ジを物理アドレス順に処理するため、物理的に近接した
ページを連続して処理する可能性が高い。
These allow the time required to access the database to be significantly reduced. Furthermore, since each page of the database is processed in order of physical address, there is a high possibility that pages that are physically close to each other will be processed consecutively.

したがって、複数ページの一括人出力により、さらにア
クセス時間を短縮することができる。
Therefore, the access time can be further shortened by outputting multiple pages at once.

(実施例〕 以下、本発明の実施例を図面を引用しなから説明する。(Example〕 Embodiments of the present invention will be described below with reference to the drawings.

第1図は第一の実施例の動作の概要を示す図であり、第
2図は本実施例の構成を示す図である。
FIG. 1 is a diagram showing an overview of the operation of the first embodiment, and FIG. 2 is a diagram showing the configuration of the present embodiment.

以下、第1図および第2図を用いて本実施例の動作の概
要を述べる。
An overview of the operation of this embodiment will be described below with reference to FIGS. 1 and 2.

データベースシステム100は、ハードウェアやソフト
ウェアの各種障害に備え、種々の履歴情報を記録してい
る。特に、オンラインシステム稼動中のトランザクショ
ン処理に関する履歴情報は、ジャーナルとして磁気ディ
スクや磁気テープ等に設けられたジャーナルファイル3
0に処理順に記録される。ジャーナルファイル30には
、データベース20の障害時にデータベースを回復する
ためのデータベース更新ジャーナルも含まれている。
The database system 100 records various historical information in preparation for various hardware and software failures. In particular, historical information regarding transaction processing during online system operation is stored in a journal file 3 provided on a magnetic disk, magnetic tape, etc.
0 in the order of processing. The journal file 30 also includes a database update journal for recovering the database in the event of a database 20 failure.

第1図において、ジャーナルファイルの格納媒体は磁気
テープ30−aと30−bからなり、トランザクション
l (200−1)のジャーナルは磁気テープ30−a
に、トランザクション2 (200−2)およびトラン
ザクション3 (200−3)のジャーナルは磁気テー
プ30−bに記録されている。トランザクション1,2
および3はその順に処理要求が発生し、処理されている
。そして、トランザクション1はデータベースの領域A
(20−A)のデータa1をal’に、データベースの
領域H(20−B)のデータbzをb1′に更新してい
る。同様に、トランザクション2は領域Aのデータa2
および領域Bのデータb2を各々をazおよびb2′ 
 に更新し、トランザクション3は領域Bのデータb3
をba’に更新している。これらの更新処理に関するデ
ータベース更新ジャーナルは、更新処理の順に磁気テー
プ30−aおよび30−bに記録されている。一方、デ
ータベース20に対しては、定期的に夜間等のオンライ
ン処理を行っていない時間帯にそれらのバックアップフ
ァイル4oを作成しておく、第1図においては、領域A
 (20−A)のバックアップファイルA(40−A)
および領域B (20−8)のバックアップファイルB
 (40−B)を、オンライン処理開始前に作成してい
る(処理120)、次に、本発明の特徴であるデータベ
ース障害時の回復処理について説明する。第1図におい
て、トランザクション3 (200−3)の処理終了後
に、領域B (20−8)に障害が発生している。この
とき、最初に領域B (20−B)に関するデータベー
ス更新ジャーナルを集積・ソートし、集積ジャーナルフ
ァイル50を作成する(処理130)、すなわち、磁気
テープ30−aおよび30−bの各々から領域已に関す
るデータベース更新ジャーナルを抽出し、当該更新対象
データの領域Bを格納する記憶媒体上の物理アドレス順
にソートする。第1図においては、領域Bの更新データ
の物理アドレス順がす、、ba、b、であり、これらに
対する更新ジャーナルがこの順にソートされている0次
に、データベース障害時の予備用ボリューム70に領域
BのバックアップファイルB (40−B)の内容を複
写する(バックアップリストア・・・処理140)、最
後に、領域Bの集積ジャーナルファイル50を先頭から
順に読み、データベース更新ジャーナルを用いて予備用
ボリューム70上に領域Bを回復する(データベース回
復・・・処理150)。
In FIG. 1, the journal file storage medium consists of magnetic tapes 30-a and 30-b, and the journal of transaction l (200-1) is stored on magnetic tape 30-a.
The journals of transaction 2 (200-2) and transaction 3 (200-3) are recorded on magnetic tape 30-b. Transaction 1, 2
and 3, processing requests are generated and processed in that order. Transaction 1 is in database area A.
Data a1 in (20-A) is updated to al', and data bz in database area H (20-B) is updated to b1'. Similarly, transaction 2 is data a2 in area A.
and data b2 of area B are respectively az and b2'
transaction 3 updates data b3 of area B.
is updated to ba'. Database update journals related to these update processes are recorded on the magnetic tapes 30-a and 30-b in the order of update processes. On the other hand, for the database 20, those backup files 4o are created periodically during times when online processing is not being performed, such as at night.
(20-A) backup file A (40-A)
and backup file B of area B (20-8)
(40-B) is created before the start of online processing (process 120).Next, the recovery process in the event of a database failure, which is a feature of the present invention, will be explained. In FIG. 1, a failure occurs in area B (20-8) after the processing of transaction 3 (200-3) is completed. At this time, first, database update journals related to area B (20-B) are accumulated and sorted, and an accumulated journal file 50 is created (processing 130). The database update journals related to the update target data are extracted and sorted in the order of the physical addresses on the storage medium storing the area B of the update target data. In FIG. 1, the physical address order of update data in area B is , ba, b, and the update journals for these are sorted in this order. Copy the contents of backup file B (40-B) in area B (backup restore...process 140).Finally, read the accumulated journal files 50 in area B sequentially from the beginning and use the database update journal to create a backup file. Area B is recovered on the volume 70 (database recovery process 150).

このとき、集積ジャーナルファイル50中のデータベー
ス更新ジャーナルは更新対象データの物理アト、レス類
にソートされているので、予備用ボリューム70に対す
る処理は、物理アドレス順の処理となる。
At this time, since the database update journals in the accumulated journal file 50 are sorted according to the physical addresses and responses of the data to be updated, the processing for the spare volume 70 is performed in the order of the physical addresses.

次に、本実施例の構成を説明する。第2図は本実施例に
おけるシステムの全体構成を示す図であり、CPtJ/
メモリ(主記憶装置あるいは仮想記憶装置、以下単にメ
モリと記す)10に、磁気ディスク等に格納されたデー
タベース20.ジャーナルファイル30、バックアップ
ファイル40、データベース集積ジャーナルファイル5
0、ジャーナルソート用ワークファイル60、およびデ
ータベース障害時の予備用ボリューム70が接続されて
いる、データベース20は、通常は磁気ディスク等のD
ASD (直接アクセス記憶装りに格納され、ボリュー
ムあるいはデータセット等を単位とする複数の領域から
構成される。ジャーナルファイル30は、障害によるシ
ステム停止時のシステム回復処理に必要なジャーナル、
データベースの障害回復に用いるジャーナル、業務処理
内容を記録するためのジャーナル、各種業務処理を行う
ユーザプログラムで用いるジャーナル、等を含んでいる
。ジャーナルファイル30の媒体としては、通常磁気デ
ィスク等のDASD、あるいは磁気テープを用いる。ジ
ャーナルは、その量がトランザクションの処理量に比例
するため1通常ジャーナルファイル用として複数のボリ
ュームを必要とする。また、DASDの場合には、デー
タベース更新ジャーナル等の少なくとも数日程度の期間
保存が必要なジャーナルについては磁気テープにアンロ
ードする必要がある。以下、ジャーナルファイル30の
媒体は磁気テープとし、各磁気テープには各々を識別す
るためオンライン処理開始時からの一貫番号であるジャ
ーナル順序番号が付与されているとする。また、バック
アップファイル40は、データベースの障害に備え、ボ
リュームやデータセット等の単位でデータベースのバッ
クアップコピーを格納するファイルであり、媒体として
通常は磁気テープを用いる。
Next, the configuration of this embodiment will be explained. FIG. 2 is a diagram showing the overall configuration of the system in this embodiment, and shows the CPtJ/
A database 20 stored on a magnetic disk or the like is stored in a memory (main storage or virtual storage, hereinafter simply referred to as memory) 10. Journal file 30, backup file 40, database accumulation journal file 5
0, a work file for journal sorting 60, and a spare volume 70 in case of a database failure are connected to the database 20, which is usually a hard drive such as a magnetic disk.
ASD (stored in a direct access storage device, consisting of multiple areas in units of volumes, data sets, etc.) The journal file 30 is a journal file 30 that stores journals necessary for system recovery processing when the system stops due to a failure.
It includes journals used for database failure recovery, journals for recording the contents of business processes, journals used by user programs that perform various business processes, etc. The medium for the journal file 30 is usually a DASD such as a magnetic disk, or a magnetic tape. Since the amount of journal is proportional to the amount of transaction processing, multiple volumes are usually required for one journal file. Furthermore, in the case of DASD, journals that need to be stored for at least several days, such as database update journals, must be unloaded onto magnetic tape. Hereinafter, it is assumed that the medium of the journal file 30 is a magnetic tape, and that each magnetic tape is given a journal sequence number, which is a consistent number from the start of online processing, to identify each magnetic tape. Further, the backup file 40 is a file that stores a backup copy of the database in units of volumes, data sets, etc. in case of a database failure, and usually uses a magnetic tape as the medium.

次に、システムの動作を、通常時動作、トランザクショ
ン障害時動作、システム障害時動作、バックアップ作成
時動作、データベース障害時動作に分けて説明する。
Next, the operation of the system will be explained by dividing it into normal operation, operation at transaction failure, operation at system failure, operation at backup creation, and operation at database failure.

(1)通常時動作 通常時のトランザクション処理において、トランザクシ
ョンの実行開始から終了までの本発明に係わる処理は以
ドのとおりである。
(1) Normal operation In normal transaction processing, the processing according to the present invention from the start to the end of transaction execution is as follows.

(a)データベース更新 1−ランザクジョン処理において、データベース20を
更新する場合、データベースシステム100は更新に先
立ってデータベース更新ジャーナルをジャーナルファイ
ル30に書込む、さらに、データベースシステム100
は、データベースの更新、メツセージの入出力、トラン
ザクションの完了等の事象が発生した場合に、それらに
関するジャーナルをジャーナルファイル30に書込む。
(a) Database update 1 - When updating the database 20 in the runzaktion process, the database system 100 writes a database update journal to the journal file 30 prior to the update;
writes journals related to events such as database updates, message input/output, and transaction completion to the journal file 30 when such events occur.

各ジャーナルレコードは、ジャーナルの種別、ジャーナ
ルレコードの通番、ジャーナル書込み日時、当該トラン
ザクションの通番、当該トランザクションの最初のジャ
ーナルのレコード番号等の各ジャーナルに共通する管理
情報の他に、ジャーナルの種別毎に固有の情報からなる
。データベース更新ジャーナルの場合、上記の固有部分
はデータベースの領域名称、更新部分のアドレス情報、
更新前情報、更新後情報等からなる0本実施例に関連す
るジャーナルには、データベース更新ジャーナルの他に
、後述のトランザクションの完了/キャンセルを示すジ
ャーナルがある。
Each journal record contains management information common to each journal, such as the journal type, journal record serial number, journal write date and time, serial number of the transaction, and record number of the first journal of the transaction, as well as information for each journal type. Consists of unique information. In the case of a database update journal, the above unique parts include the database area name, address information of the updated part,
Journals related to this embodiment, including pre-update information, post-update information, etc., include a database update journal as well as a journal indicating transaction completion/cancellation, which will be described later.

(b)トランザクション完了処理 トランザクションが正常に終了した場合、トランザクシ
ョン完了ジャーナルをジャーナルファイル30に書込む
、トランザクション完了ジャーナルは、固有部分はなく
、ジャーナルの種別を示す部分がトランザクション完了
ジャーナルであることを示す値になっている。
(b) Transaction completion processing When a transaction ends normally, a transaction completion journal is written to the journal file 30.The transaction completion journal has no unique part, and the part indicating the type of journal indicates that it is a transaction completion journal. value.

(2)トランザクション障害時動作 部分的な障害によりトランザクションの処理結果を取り
消す場合、以下の手順で処理を行う。
(2) Operation at the time of transaction failure When canceling the transaction processing result due to a partial failure, the following procedure is performed.

(a)データベースの戻し処理 データベースの該トランザクションが更新した部分を該
トランザクションに関するジャーナルを用いて更新前の
内容に回復する。
(a) Restoring the database The portion of the database updated by the transaction is restored to its original content using the journal related to the transaction.

(b)トランザクションキャンセルジャーナル書込み 該トランザクションのキャンセル処理完了を示すジャー
ナルをジャーナルファイル30に書込む、トランザクシ
ョンキャンセルジャーナルは、トランザクション完了ジ
ャーナル同様固有部分はなく、ジャーナルの種別を示す
部分がトランザクションキャンセルジャーナルであるこ
とを示す値になっている。
(b) Writing a transaction cancellation journal A journal indicating the completion of cancellation processing of the transaction is written to the journal file 30.A transaction cancellation journal, like a transaction completion journal, does not have a unique part, but a part indicating the type of journal is a transaction cancellation journal. The value indicates that

(3)システム障害時動作 システム障害時の回復処理のうち本発明に係わるのは、
システム障害により処理を中断されたトランザクション
の回復処理である0本処理において、これらの中断トラ
ンザクションに対し、上述のトランザクション障害時動
作同様、データベースの戻し処理およびトランザクショ
ンキャンセルジャーナル書込みを行う。
(3) Operation in the event of system failure Among the recovery processes in the event of system failure, the following is related to the present invention:
In zero processing, which is recovery processing for transactions whose processing has been interrupted due to a system failure, database return processing and transaction cancellation journal writing are performed for these interrupted transactions, similar to the transaction failure operation described above.

(4)バックアップ作成時動作 データベース20の障害に備え、定期的にデータベース
のコピーをバックアップファイル40に作成する。バッ
クアップファイルを作成する時間帯は、夜間等のオンラ
インシステム停止中、あるいはオンライン処理による更
新がない時間帯とする。したがって、オンライン処理中
にバックアップを作成する場合には、バックアップ作成
完了までデータベースの当該領域のトランザクションに
よる更新を不可とする。データベースの容量が大きい場
合、−日で全データベースのバックアップをとれないた
め、ボリュームやデータセット等の単位でグループ化し
、複数日に分けて作成する。
(4) Operation when creating a backup In preparation for a failure of the database 20, a copy of the database is periodically created in the backup file 40. The time period for creating a backup file is when the online system is stopped, such as at night, or when there are no updates due to online processing. Therefore, when creating a backup during online processing, the relevant area of the database cannot be updated by transactions until the backup creation is completed. If the capacity of the database is large, it is not possible to back up the entire database in - days, so it is grouped by volume or data set, etc., and created on multiple days.

このため、データベースシステム100は、バックアッ
プ作成単位毎にジャーナルと対応付ける。
Therefore, the database system 100 associates each backup creation unit with a journal.

対応付けの方法として、本実施例では、バックアップ作
成日時およびバックアップ作成完了時に最後に記録した
ジャーナルレコードのレコード番号および当該レコード
が含まれる磁気テープのジャーナル順序番号を、バック
アップファイルの先頭に記録する。これにより、データ
ベースの障害回復処理に必要なジャーナルが記録されて
いる磁気テープの範囲(すなわち、バックアップ作成以
降)を、障害回復時に判別することができる。
As a method of association, in this embodiment, the date and time of backup creation, the record number of the last journal record recorded at the time of completion of backup creation, and the journal sequence number of the magnetic tape containing the record are recorded at the beginning of the backup file. This makes it possible to determine the range of the magnetic tape in which journals necessary for database failure recovery processing are recorded (that is, after backup creation) at the time of failure recovery.

(5)データベース障害時動作 データベース障害時の回復処理の概略フローを第3図に
示す、以下、領域Bに障害が発生したとして、第3図に
したがって説明する。
(5) Operation when a database failure occurs A schematic flow of recovery processing when a database failure occurs is shown in FIG. 3. Hereinafter, it will be explained with reference to FIG. 3 assuming that a failure has occurred in area B.

(a)ジャーナルの範囲の判定(ステップ301)デー
タベースシステム100は、バックアップの作成単位で
ある領域毎にバックアップ作成日時、バックアップ作成
完了時の最後のジャーナルレコード番号および当該レコ
ードが含まれる磁気テープのジャーナル順序番号をバッ
クアップファイルの先頭に記録し、ジャーナルと対応付
けている0本ステップでは、この対応付けにより領域B
の回復に必要なジャーナルの範囲を判定する。第3図で
は、番号1から6までの6巻の磁気テープが必要と判定
している。
(a) Determination of journal range (step 301) The database system 100 determines the date and time of backup creation, the last journal record number at the time of completion of backup creation, and the journal of the magnetic tape containing the record for each area that is the unit of backup creation. In step 0, where the sequence number is recorded at the beginning of the backup file and associated with the journal, this association allows area B to be
Determine the range of journals required for recovery. In FIG. 3, it is determined that six volumes of magnetic tape numbered 1 to 6 are required.

(b)ジャーナルの集積(ステップ302)ステップ3
01で判定した範囲のジャーナルから領域Bのジャーナ
ルを抽出する。このとき、複数の磁気テープ装置を用い
ることにより、抽出処理を高速化する0例えば、第3図
では6巻の磁気テープを30−1〜30−3および30
−4〜30−6の2つのグループに分けて各グループに
磁気テープ装[11台を割当て、各グループの磁気テー
プから並行してジャーナルを抽出し、データベース集積
ジャーナルファイル50に抽出したジャーナルを出力す
る。抽出処理の概要を第4図を用いて説明する。なお、
第4図では説明の都合上、データベース更新ジャーナル
は全てQBの更新に関するジャーナルとする。抽出処理
では、各トランザクション毎に領域Bのデータベース更
新ジャーナルをメモリ上で集積し、該トランザクション
が完了していればデータベース集積ジャーナルファイル
50に書込み、該トランザクションがキャンセルされて
いれば捨てる。第1のグループ30−1〜30−3では
、トランザクション4およびトランザクション5はトラ
ンザクション完了ジャーナル404−2,405−2が
あり、完了している。したがって、各々のデータベース
更新ジャーナル404−1,405−1は集積ジャーナ
ルファイル50に書込まれる。また、トランザクション
6はトランザクションキャンセルジャーナル406−2
があるので、そのデータベース更新ジャーナル406−
1は捨てられる。第2のグループ30−4〜30−6に
ついても同様である。グループの磁気テープ内でトラン
ザクション完了ジャーナルおよびトランザクションキャ
ンセルジャーナルのいずれも出現しないトランザクショ
ンについては、以下のとおりに処理する。
(b) Accumulation of journals (step 302) Step 3
The journal in area B is extracted from the journals in the range determined in step 01. At this time, by using a plurality of magnetic tape devices, the extraction process is speeded up.For example, in FIG.
Divide into two groups, 4 to 30-6, allocate 11 magnetic tape devices to each group, extract journals from the magnetic tapes of each group in parallel, and output the extracted journals to the database accumulation journal file 50. do. An outline of the extraction process will be explained using FIG. 4. In addition,
In FIG. 4, for convenience of explanation, all database update journals are journals related to QB updates. In the extraction process, database update journals of area B are accumulated on the memory for each transaction, and if the transaction is completed, they are written to the database accumulation journal file 50, and if the transaction is canceled, they are discarded. In the first group 30-1 to 30-3, transaction 4 and transaction 5 have transaction completion journals 404-2 and 405-2 and are completed. Therefore, each database update journal 404-1, 405-1 is written to the aggregate journal file 50. Also, transaction 6 is in the transaction cancellation journal 406-2
Since there is a database update journal 406-
1 is discarded. The same applies to the second groups 30-4 to 30-6. A transaction for which neither a transaction completion journal nor a transaction cancellation journal appears in the magnetic tape of a group is processed as follows.

■最後のグループ トランザクション10のデータベース更新ジャーナル4
10−1および410−2のように、最後のグループ(
この場合、第2のグループ)のデータベース更新ジャー
ナルは。
■Database update journal 4 of the last group transaction 10
10-1 and 410-2, the last group (
In this case, the database update journal of the second group) is.

トランザクション10が完了していないので、集積せず
に捨てる。
Since transaction 10 has not been completed, it is discarded without being accumulated.

■最後以外のグループ 最後以外のグループ(この場合、第1のグループ)のデ
ータベース更新ジャーナルは次のグループの処理結果に
より該トランザクションの完了/キャンセルを判定し、
上記と同様に処理する。このため、先頭以外のグループ
(この場合、第2のグループ)を処理するとき、ジャー
ナルが前のグループにまたがっているトランザクション
について、トランザクション管理リスト500に該当す
るトランザクションの完了/キャンセルを記憶しておく
6例えば 第2のグループの抽出処理において、トラン
ザクション7についてはデータベース更新ジャーナル4
07−2を集積ジャーナルファイル50に書込むととも
に、トランザクション管理リスト500に完了トランザ
クションであることを記録しておく。また、トランザク
ション8については、トランザクション管理リスト50
0にキャンセルトランザクションであることを記録して
おく、そして、第1のグループの最後に達した時点で、
トランザクション管理リスト500を参照して、トラン
ザクション7のデータベース更新ジャーナル407−1
は集積ジャーナルファイル50に書込み、トランザクシ
ョン8のデータベース更新ジャーナル408−1は捨て
る。
■ Groups other than the last The database update journal of the group other than the last (in this case, the first group) determines the completion/cancellation of the transaction based on the processing results of the next group,
Process as above. Therefore, when processing a group other than the first group (in this case, the second group), for transactions whose journals span the previous group, the completion/cancellation of the corresponding transaction is stored in the transaction management list 500. 6 For example, in the second group extraction process, for transaction 7, database update journal 4
07-2 is written to the accumulated journal file 50, and the transaction is recorded as a completed transaction in the transaction management list 500. Also, regarding transaction 8, transaction management list 50
0 to indicate that it is a canceled transaction, and when the end of the first group is reached,
With reference to the transaction management list 500, the database update journal 407-1 of transaction 7
is written to the accumulated journal file 50, and the database update journal 408-1 of transaction 8 is discarded.

なお1、各トランザクションのジャーナルが前のグルー
プにまたがっているかどうかは、各ジャーナルレコード
中に記録されている当該トランザクションの最初のジャ
ーナルのレコード番号により判定することができる。す
なわち、当該トランザクションの最初のジャーナルのレ
コード番号が、当該グループ(この場合、第2のグルー
プ)の先頭のジャーナルのレコード番号よりも小さい場
合は前のグループ(この場合、第1のグループ)にまた
がっており、そうでない場合はまたがっていない。
Note that whether or not the journal of each transaction straddles the previous group can be determined based on the record number of the first journal of the transaction recorded in each journal record. In other words, if the record number of the first journal in the transaction is smaller than the record number of the first journal in the group (in this case, the second group), the transaction straddles the previous group (in this case, the first group). If not, they are not straddled.

(C)ジャーナルのソート(ステップ303)ステップ
302において集積した領域Bのデータベース更新ジャ
ーナルを、更新データの物理アドレスおよびジャーナル
書込み日時を第一および第二のキーとし、昇順にソート
する。すなわち、更新データの物理アドレスの昇順にソ
ートし、物理アドレスが同じ場合はさらにジャーナル書
込み日時の昇順にソートする。そして、ソートしたジャ
ーナルをデータベース集積ジャーナルファイル50に書
き出す、ソート方法としていくつかの方法があるが、本
実施例ではジャーナルのソートに適したポリフェーズマ
ージソートを採用し、ジャーナルソート用ワークファイ
ルとして磁気テープ60−1.60−2゜・・・・・・
、60−nを用いる。以下、ジャーナルソートについて
、第5図を用いて簡単に説明する。
(C) Sorting journals (step 303) The database update journals in area B accumulated in step 302 are sorted in ascending order using the physical address of the update data and the journal writing date and time as first and second keys. That is, the updated data is sorted in ascending order of the physical address, and if the physical addresses are the same, it is further sorted in ascending order of the journal write date and time. There are several sorting methods for writing out the sorted journals to the database accumulation journal file 50, but in this embodiment, polyphase merge sorting, which is suitable for sorting journals, is adopted, and a magnetic field is used as the work file for journal sorting. Tape 60-1.60-2°...
, 60-n is used. Journal sorting will be briefly explained below using FIG. 5.

本ステップでは、200MBの集積ジャーナルを4系列
の磁気テープ60−1〜60−4を用いて、ソートする
。第5図において、各段階の数字の列は、各磁気テープ
中のソートされたグループの個数を表わす、最初に、集
積したジャーナル(200MB)を1M8強ずつメモリ
上でソートし、193個のグループに分け、第1のテー
プに81個、第2のテープに68個、第3のテープに4
4個配置する。第4のテープはなしとする。第1段階で
は第1〜3のテープを人力、第4のテープを出力として
、人力テープ中のソートされたグループをマージする。
In this step, the 200 MB accumulated journals are sorted using four series of magnetic tapes 60-1 to 60-4. In FIG. 5, the number columns at each stage represent the number of sorted groups on each magnetic tape.First, the accumulated journals (200MB) were sorted in memory in units of just over 1M8, resulting in 193 groups. 81 pieces on the first tape, 68 pieces on the second tape, 4 pieces on the third tape.
Place 4 pieces. There is no fourth tape. In the first stage, the first to third tapes are manually operated, the fourth tape is output, and the sorted groups in the manually operated tapes are merged.

このように、各段階では空の磁気テープを出力として他
の磁気テープのジャーナルをソートしなからマージして
いく、そして、どれか1つの人力テープが空になった時
点で出力テープを空になったテープに切り替え、次の段
階に移る。1系列にマージし終えた時点でソートが完了
する。
In this way, at each stage, an empty magnetic tape is used as the output, and the journals of other magnetic tapes are sorted and merged, and when any one manual tape becomes empty, the output tape is empty. Switch to the new tape and move on to the next step. Sorting is completed when merging into one series is completed.

第5図の場合には、8段階でソートが完了する。In the case of FIG. 5, sorting is completed in eight stages.

(d)バックアップのりストア(ステップ304)予備
用ボリューム70に領域BのバックアップファイルB 
(40−B)の内容を複写する。
(d) Backup paste store (step 304) Backup file B of area B in the spare volume 70
Copy the contents of (40-B).

なお、第3図においては本ステップをジャーナルのソー
ト(ステップ303)の後としたが、ジャーナルの集積
(ステップ302)およびソート(ステップ303)と
並行してジャーナルの範囲の判定(ステップ301)に
引き続いて行ってもよい。
In Fig. 3, this step is performed after journal sorting (step 303), but in parallel with journal accumulation (step 302) and sorting (step 303), journal range determination (step 301) is performed. You may continue.

(e)データベース回復(ステップ3o5)ステップ3
03で作成したデータベース集積ジャーナルファイル5
0からデータベース更新ジャーナルを先頭から順に読み
出し、更新結果を予備用ボリューム70に反映させ、領
域Bを回復する。同一データに対するデータベース更新
ジャーナル(更新対象データの物理アドレスが同じジャ
ーナル)は、ジャーナル書込み日時の昇順にソートもk
でいるので、メモリ上で順次更新結果を更新対象データ
に反映させていき、該当するジャーナルがなくなった時
点で予備用ボリューム70に書込めばよい、なお、ジャ
ーナルレコード中の更新後情報を予備用ボリューム70
に書込む際、当該更新部分の内容をジャーナルレコード
中の更新前情報と比較することにより、ジャーナルの内
容の正当性をチエツクすることができる。更新前情報と
の比較によるチエツクの実行有無は、データベース回復
処理のオプションとして与えられる。
(e) Database recovery (step 3o5) Step 3
Database accumulation journal file 5 created in 03
0, the database update journal is read in order from the beginning, the update results are reflected in the spare volume 70, and area B is recovered. Database update journals for the same data (journals with the same physical address of the data to be updated) can also be sorted in ascending order of journal write date and time.
Therefore, the updated information in the journal record can be reflected in the data to be updated sequentially in memory, and then written to the spare volume 70 when the corresponding journal is no longer available. volume 70
When writing to a journal, the validity of the contents of the journal can be checked by comparing the contents of the updated portion with the pre-update information in the journal record. Whether or not to perform a check based on comparison with pre-update information is given as an option for database recovery processing.

以上、本実施例によればデータベース障害時の回復時間
を大幅に短縮することができる。なお、実施例ではデー
タベース障害発生後にジャーナルの集積およびソートを
行ったが、これらの処理は通常時に予め行ってもよい。
As described above, according to this embodiment, the recovery time in the event of a database failure can be significantly shortened. In the embodiment, journals were accumulated and sorted after a database failure occurred, but these processes may be performed in advance during normal times.

すなわち、重要で障害時に高速な回復が要求されるデー
タについては、当該領域のデータベース更新ジャーナル
を通常時に予め集積・ソートすることにより、障害時の
回復時間を一層短縮することができる。
That is, for data that is important and requires rapid recovery in the event of a failure, the recovery time in the event of a failure can be further shortened by collecting and sorting the database update journals of the area in advance during normal times.

また、実施Wtバックアップのりストア後にデータベー
ス回復処理を行ったが、バックアップファイルから直接
データベース回復処理を実行することができる。すなわ
ち、本実施例ではジャーナルが更新データの物理アドレ
ス順にソートされているため、バックアップファイル4
0の内容を先頭から順に読み、更新がなかった部分はそ
のまま予備用ボリューム70に複写し、更新があった部
分はジャーナルにより更新後の内容を予備用ボリューム
70に書込むことが可能である。
Furthermore, although the database recovery process was performed after the backup was stored, the database recovery process can be executed directly from the backup file. In other words, in this embodiment, since the journals are sorted in the order of the physical addresses of the updated data, the backup file 4
It is possible to read the contents of 0 in order from the beginning, copy the portions that have not been updated to the spare volume 70 as they are, and write the updated contents of the portions that have been updated to the spare volume 70 using a journal.

さらに、本実施例では同一データに関するデータベース
更新ジャーナルに対し、データベース回復ステップ(ス
テップ3o5)で順次更新データに反映させたが、ジャ
ーナルソート(ステップ303)の際に最終のジャーナ
ルのみを残し、残りのジャーナルを捨てるようにしても
よい。
Furthermore, in this embodiment, the database update journals related to the same data are reflected in the update data sequentially in the database recovery step (step 3o5), but when journal sorting (step 303), only the last journal is left and the remaining journals are You can also throw away your journal.

以下、具体的な例について本実施例の効果を見積もる。Hereinafter, the effects of this embodiment will be estimated using specific examples.

(a)前提条件 (i)ジャーナル墓 1日の倉ソジャーナル量を30GB (ギガバイト)と
する。そして、データベース更新ジャーナルをその1/
3の10GBとする。
(a) Preconditions (i) Journal grave The amount of journals per day is 30 GB (gigabytes). Then, update the database update journal as part 1/
3, 10GB.

(n)データベースの規模 データベース全体の容量を100GBとし、バックアッ
プ作成および障害回復の単位となる各領域のサイズをI
GBとする。
(n) Database size The capacity of the entire database is 100 GB, and the size of each area that is the unit of backup creation and failure recovery is I.
GB.

(止)データベース更新斌 一日当りのデータベース更新の合計件数を107件とす
る。なお、アクセスパターンはランダムかつ一様とする
(Stopped) The total number of database updates per day will be 107. Note that the access pattern is random and uniform.

(扮)バックアップ作成方法 データベースを2グループに分け、毎日各グループのバ
ックアップを交互に作成する。
(Costume) Backup creation method Divide the database into two groups and create backups of each group alternately every day.

(v)磁気テープの性能 ジャーナルやバックアップを格納する磁気テープの1巻
当りの容量を200MB (メガバイト)とする、また
、各処理における実効的なデータ転送量を2MB/秒と
する。
(v) Performance of magnetic tape The capacity of each magnetic tape for storing journals and backups shall be 200 MB (megabytes), and the effective amount of data transferred in each process shall be 2 MB/sec.

(vi )データベースアクセス性能 ネンダムアクセスの場合、25ミリ秒/回とする、また
、順アクセス処理の場合の実効的なデータ転送量を2M
B/秒とする。
(vi) Database access performance In the case of Nendum access, the effective data transfer amount is 25 ms/time, and in the case of sequential access processing, the effective data transfer amount is 2M
B/sec.

(vM)データベースの障害回復手順 ■従来方法 第6図(a)に示すように、障害が発生した領域に対し
、第1ステツプで障害当日分のジャーナル集積、障害前
日分のジャーナル集積およびバックアップのりストアを
行い、第2ステツプでジャーナルによるデータベース回
復を行う。
(vM) Database failure recovery procedure ■ Conventional method As shown in Figure 6 (a), the first step is to accumulate journals for the day of the failure, accumulate journals for the day before the failure, and perform backup operations in the area where the failure occurred. The data is stored, and the database is recovered using the journal in the second step.

0本実施例の方法 第6図(b)に示すように、第1ステツプでジャーナル
集積、第2ステツプでジャーナルソート、第3ステツプ
でバックアップのりストアおよびジャーナルによるデー
タベース回復を行う、第1ステツプでは。
0 Method of this Embodiment As shown in FIG. 6(b), the first step is to accumulate journals, the second step is to sort journals, and the third step is to perform backup storage and database recovery using journals. .

ジャーナルファイルとして4系列の磁気テープを入力と
する。また、第2ステツプでは上述のとおり、4系列の
磁気テープを用い)ポリフェーズマージソートにより集
積したジャーナルをソートする。
Four series of magnetic tapes are input as journal files. In the second step, as described above, the accumulated journals are sorted by polyphase merge sort (using four series of magnetic tapes).

(b)効果見積り 従来方法および本実施例の方法の各々について、データ
ベースの障害回復時間を求める。
(b) Effect estimation The database failure recovery time is determined for each of the conventional method and the method of this embodiment.

(1)従来方法 ■第1ステップ ・前日分のジャーナル集積時間は、 30GB÷2MB/秒=250分 (故に、当日分は最大250分) ・バックアップリストアの時間は、 IGB÷2MB/秒=500秒 以上により、第1ステツプは250分。(1) Conventional method ■First step ・The journal collection time for the previous day is 30GB ÷ 2MB/sec = 250 minutes (Therefore, the maximum time for that day is 250 minutes) ・Backup restore time is IGB÷2MB/sec=500 seconds With the above, the first step is 250 minutes.

■第2ステップ ・データベースの各領域の一日当りのデータベース更新
の合計件数は10”件。
■Second step: The total number of database updates per day for each area of the database is 10”.

1件当り人力と出力で2回のアクセス が必要なことおよび最大で2日分の更 新の回復が必要なことより、 25ミリ秒x2x2xlo’ =167分。Two accesses per item using human power and output and up to 2 days worth of updates. From the need for new recovery, 25 milliseconds x 2 x 2 x lo' = 167 minutes.

■■■ノ、従来方法の場合には、データベースの障害領
域の回復に417分を要する。
■■■■ In the case of the conventional method, it takes 417 minutes to recover the failed area of the database.

(…)本実施例の方法 ■第1ステップ 300BX2−r4+2MB/秒=125分■第2ステ
ップ ・ソートの各段階でのデータ転送の合計量は、556M
Bになる。集積ジャー ナルへの人出力各1回(200MHx 2)と合わせ。
(...) Method of this embodiment ■First step 300BX2-r4+2MB/sec = 125 minutes■Second step Total amount of data transferred at each stage of sorting is 556M
Become B. Combined with one human output each to the accumulation journal (200MH x 2).

956MB÷2MB/秒=8分 ■第3ステップ ・バックアップリストア時間を少し大きく見積り、1o
分とする。
956MB ÷ 2MB/sec = 8 minutes ■ 3rd step: Estimate the backup restore time a little larger, 1o
minutes.

■■■より、回復に143分を要する。From ■■■, it takes 143 minutes to recover.

以上のとおり1本例ではデータベースの障害領域の回復
時間をほぼ1/3に大きく短縮することができる。
As described above, in this example, the recovery time for a failed area of the database can be greatly reduced to approximately 1/3.

次に、第二の実施例について説明する1本実施例と第一
の実施例の相違点は、第一の実施例では集積・ソートし
たデータベース更新ジャーナルを用いて障害データベー
スを回復したが1本実施例では集積・ソートしたデータ
ベース更新ジャーナルを用いて古いバックアップファイ
ルから新たなバックアップファイルを作成する点である
。以下。
Next, we will explain the second embodiment.The difference between this embodiment and the first embodiment is that in the first embodiment, the failed database is recovered using the accumulated and sorted database update journals, but only one In the embodiment, a new backup file is created from an old backup file using the accumulated and sorted database update journals. below.

第7図、第8図を用い、本実施例を説明する。This embodiment will be explained using FIGS. 7 and 8.

第7図は第二の実施例におけるシステムの全体構成を示
す図であり、CPtJ/メモリ11に、磁気ディスク等
に格納されたデータベース21、ジャーナルファイル°
31、旧バックアップファイル41、新バックアップフ
ァイル42、データベース集積ジャーナルファイル51
、およびジャーナルソート用ワークファイル61が接続
されている。
FIG. 7 is a diagram showing the overall configuration of the system in the second embodiment, in which the CPtJ/memory 11 includes a database 21 and a journal file stored in a magnetic disk or the like.
31, old backup file 41, new backup file 42, database accumulation journal file 51
, and a journal sort work file 61 are connected.

これらの内容は、第一の実施例で説明したとおりである
These contents are as explained in the first embodiment.

次に、システムの動作を説明する。システム動作のうち
5通常時動作、トランザクション障害時動作、システム
障害時動作、およびデータベース障害時動作については
第一の実施例と同様に行う。
Next, the operation of the system will be explained. Of the system operations, five normal operations, transaction failure operations, system failure operations, and database failure operations are performed in the same manner as in the first embodiment.

以下、バックアップ作成時動作について説明する。The operation during backup creation will be explained below.

本実施例にK、いては、上述のとおり、前回作成したバ
ックアップファイルに集積・ソートしたデータベース更
新ジャーナルの内容を反映させることにより、新しいバ
ックアップファイルを作成する。
In this embodiment, as described above, a new backup file is created by reflecting the contents of the accumulated and sorted database update journals in the previously created backup file.

なお、データベースの容量が大きい場合にボリュームや
データセット等の単位でグループ化して複数日に分けて
作成すること、ジャーナルとの対応付けのためにバック
アップ作成単位毎にバックアップ作成日時とバックアッ
プ作成完了時に最後に記録したジャーナルレコードのレ
コード番号および当該レコードが含まれる磁気テープの
ジャーナル順序番号を、バックアップファイルの先頭に
記録することは、第一の実施例と同様である。
In addition, if the capacity of the database is large, it may be necessary to group it by volume or data set, etc., and create it over multiple days.In order to correspond with the journal, the date and time of backup creation and the time and date of backup creation for each backup creation unit can be recorded. As in the first embodiment, the record number of the last recorded journal record and the journal sequence number of the magnetic tape containing the record are recorded at the beginning of the backup file.

バックアップ作成処理の概略フローを第8図に示す、以
下、第8図に従って説明する。なお、以下においては、
データベースの一つの領域のバックアップファイルを作
成する場合について説明する。
A schematic flow of the backup creation process is shown in FIG. 8, and will be described below with reference to FIG. In addition, in the following,
The case of creating a backup file of one area of a database will be explained.

(a)ジャーナルの範囲の判定(ステップ311)第一
の実施例同様、本実施例ではシステムはバックアップの
作成単位である領域毎にバックアップ作成日時とバック
アップ作成完了時に最後に記録したジャーナルレコード
のレコード番号および当該レコードが含まれる磁気テー
プのジャーナル順序番号をバックアップファイルの先頭
に記録し、ジャーナルと対応付けている。
(a) Determination of journal range (step 311) As in the first embodiment, in this embodiment, the system records the backup creation date and time and the last journal record recorded at the time of backup creation completion for each area that is the unit of backup creation. The number and the journal sequence number of the magnetic tape containing the record are recorded at the beginning of the backup file and are associated with the journal.

本ステップでは、この対応付けにより旧バックアップフ
ァイル41から新バックアップファイル42を作成する
のに必要なジャーナルの範囲を判定する。
In this step, the range of journals required to create the new backup file 42 from the old backup file 41 is determined based on this association.

(b)ジャーナルの集M(ステップ312)ステップ3
11で判定した範囲のジャーナルからデータベースのジ
ャーナルを抽出する。抽出処理は、第一の実施例と同様
の方法で行う。
(b) Journal Collection M (Step 312) Step 3
The database journals are extracted from the journals in the range determined in step 11. The extraction process is performed in the same manner as in the first embodiment.

(C)ジャーナルのソート(ステップ313)ステップ
312において集積したデータベース更新ジャーナルを
、更新データの物理アドレスおよびジャーナル日時を第
一および第二のキーとし、ソートする。そして、ソート
したジャーナルをデータベース集積ジャーナルファイル
51に書−八、す、第一の実施例と同様、ソートはポリ
フェーズマージソートを採用し、ジャーナルソート用ワ
ークファイルとして磁気テープ61を用いる。
(C) Sorting journals (step 313) The database update journals accumulated in step 312 are sorted using the physical address of the update data and the journal date and time as first and second keys. Then, the sorted journals are written to the database accumulation journal file 51. As in the first embodiment, polyphase merge sort is used for sorting, and magnetic tape 61 is used as a work file for journal sorting.

(d)新バックアップファイルの作成(ステップ314
) 旧バックアップファイル41およびステップ313で作
成したデータベース集積ジャーナルファイル51は、と
もにデータベースの媒体上の物理アドレスの順にデータ
が格納されている。
(d) Creating a new backup file (step 314)
) The old backup file 41 and the database accumulation journal file 51 created in step 313 both have data stored in the order of the physical addresses on the database medium.

よって、以下の■〜■の手順により、旧バックアップフ
ァイル41およびデータベース集積ジャーナルファイル
51から新バックアップファイル42を作成する。
Therefore, a new backup file 42 is created from the old backup file 41 and the database accumulation journal file 51 according to the following steps (1) to (2).

■新バックアップファイルの先頭に本ステップ実行開始
日時および本ステップ実行開始時の最後のジャーナルレ
コード番号を記録し、ジャーナルと対応付ける。
■Record the start date and time of this step execution and the last journal record number at the start of this step execution at the beginning of the new backup file, and associate it with the journal.

■データベース集積ジャーナルファイル51からデータ
ベース更新ジャーナルを順に読むλ ■上記■とともに、旧バックアップファイルから各ペー
ジの内容を順に読む、そして、該ページに対するデータ
ベース更新ジャーナルがないページはそのまま新バック
アップファイル42に書込み、そうでないページはデー
タベース更新ジャーナルを用いて更新結果を反映した内
容を新バックアップファイル42に書込む。
■Read the database update journals in order from the database accumulation journal file 51 λ ■In addition to the above ■, read the contents of each page in order from the old backup file, and write pages for which there is no database update journal as they are to the new backup file 42. , for other pages, contents reflecting the update results are written to the new backup file 42 using the database update journal.

■上記の■■を、旧バックアップファイル41およびデ
ータベース集積ジャーナルファイル51の最後まで繰り
返す。
■Repeat the above ■■ until the end of the old backup file 41 and database accumulation journal file 51.

以上、本実施例によれば、ジャーナルを用いて旧バック
アップファイルから新バックアップファイルを作成する
のに要する時間を大幅に短縮することができる。また1
本実施例においては、バックアップ作成時、オンライン
処理で使用しているデータベースを使用しない。したが
って、オンライン処理中に、データベースを閉塞するこ
となくバックアップファイルを作成することができる。
As described above, according to this embodiment, the time required to create a new backup file from an old backup file using a journal can be significantly reduced. Also 1
In this embodiment, the database used in online processing is not used when creating a backup. Therefore, a backup file can be created during online processing without blocking the database.

なお、バラ4アツプ作成時に複数の領域のバツクアップ
を作成する場合1次の2方法のいずれかを用いて行う。
Note that when creating a backup of a plurality of areas when creating a rose 4-up, one of the following two methods is used.

■データベース更新ジャーナルを集積する際、バックア
ップ作成領域のジャーナルを一緒に一つのデータベース
集積ジャーナルファイルに集積する。そして、ジャーナ
ルをソートする時に、ソートの第一のキーである物理ア
ドレスの最上位に領域番号を含める。さらに。
■When accumulating database update journals, the journals in the backup creation area are also accumulated into one database accumulation journal file. Then, when sorting the journals, the area number is included at the top of the physical address, which is the first key for sorting. moreover.

バックアップ作成時、領域の番号順に新バックアップフ
ァイルを作成する。
When creating a backup, new backup files are created in the order of area numbers.

■バックアップ作成領域毎にデータベース集積ジャーナ
ルファイルを設け、データベース更新ジャーナルを集積
する際、領域毎にジャーナルを分けて集積する。そして
、領域毎にジャーナルをソートし、新バックアップファ
イルを作成する。
- Create a database accumulation journal file for each backup creation area, and when accumulating database update journals, separate and accumulate journals for each area. Then, the journals are sorted by area and a new backup file is created.

次に、第三の実施例について説明する0本実施例と第一
の実施例の相違点は、本実施例ではオンライン処理中に
データベース更新を禁止することなく、該データベース
のバックアップファイルを作成する点である。以下、第
9図、第10図、第11図および第12図を用いて、本
実施例を説明する。
Next, the third embodiment will be explained. The difference between this embodiment and the first embodiment is that in this embodiment, a backup file of the database is created without prohibiting database updates during online processing. It is a point. This embodiment will be described below with reference to FIGS. 9, 10, 11, and 12.

第10図は第三の実施例におけるシステムの全体構成を
示す図であり、CPU/メモリ15に、磁気ディスク等
に格納されたデータベース25、ジャーナルファイル3
5、バックアップファイル45、データベース集積ジャ
ーナルファイル55、ジャーナルソート用ワークファイ
ル65、およびデータベース障害時の予備用ボリューム
75が接続されている。
FIG. 10 is a diagram showing the overall configuration of the system in the third embodiment, in which the CPU/memory 15 includes a database 25 and a journal file 3 stored in a magnetic disk or the like.
5, a backup file 45, a database accumulation journal file 55, a journal sorting work file 65, and a backup volume 75 in case of database failure are connected.

次に、システムの動作を説明する。最初に、第9図を用
いて本実施例におけるシステムの動作の概要を第一の実
施例との相違点を中心に述べる。
Next, the operation of the system will be explained. First, an overview of the operation of the system in this embodiment will be described with reference to FIG. 9, focusing on the differences from the first embodiment.

第一の実施例と同様に、本実施例においても、データベ
ースシステム105は、オンラインシステム稼動中のト
ランザクション処理に関する履歴情報をジャーナルとし
て磁気テープや磁気ディスク等に設けたジャーナルファ
イル35に記録している。ジャーナルファイル35には
、データベース71 25の障害時にデータベースを回復するためのデータベ
ース更新ジャーナルも含まれている。一方。
As in the first embodiment, in this embodiment as well, the database system 105 records historical information regarding transaction processing during online system operation as a journal in a journal file 35 provided on a magnetic tape, magnetic disk, or the like. . Journal file 35 also includes a database update journal for database recovery in the event of database 71 25 failure. on the other hand.

データベース25に対しては、定期的にそれらのバック
アップファイル45を作成しておく、前述のとおり、本
実施例においては、オンライン処理中にデータベース更
新を禁止することなく、該データベースのバックアップ
ファイルを作成する。
The backup files 45 of the database 25 are created periodically. As mentioned above, in this embodiment, the backup files of the database are created without prohibiting database updates during online processing. do.

第9図においては、バックアップファイル45を作成(
処理125)中に、トランザクション1およびトランザ
クション2がデータベースを更新している0本実施例に
おいてデータベース25に障害が発生した場合、第一の
実施例同様、■データベース更新ジャーナルの集積・ソ
ート(処理135)、■バックアップのりストア(処理
145)、■データベース更新ジャーナルによるデータ
ベースの回復(処理155)の手順により、データベー
ス障害回復処理を行う、ただし、本実施例においては、
第9図のトランザクション1のようなキャンセルされた
トランザクションの更新結果がバックアップ囚ヘイル4
5に反映されている可能性がある。したがって、キャン
セルトランザクションのデータベース更新ジャーナルを
用いて、該トランザクションの更新結果を取り消す必要
がある。このため、データベース更新ジャーナルを集積
・ソート(処理135)する際、第一の実施例と同様に
完了トランザクションのデータベース更新ジャーナルを
集積・ソートするとともに、バックアップファイル作成
時に実行中であったキャンセルトランザクションの管理
リスト510を作成し、当該キャンセルトランザクショ
ンのデータベース更新ジャーナルも一緒に集積・ソート
する。そして、データベース更新ジャーナルを用いてデ
ータベースを回復する(処理155)際、完了トランザ
クションの更新結果を反映させるとともに、キャンセル
トランザクションの更新結果を取り消す。
In FIG. 9, the backup file 45 is created (
If a failure occurs in the database 25 in this embodiment when transaction 1 and transaction 2 are updating the database during process 125), as in the first embodiment, ■ Collecting and sorting database update journals (process 135) ), ■Backup paste storage (processing 145), ■Database recovery using database update journal (processing 155). However, in this embodiment, the database failure recovery process is performed.
The update results of canceled transactions such as transaction 1 in Figure 9 are backed up by Hale 4.
This may be reflected in 5. Therefore, it is necessary to cancel the update results of the transaction using the database update journal of the cancel transaction. Therefore, when collecting and sorting database update journals (process 135), the database update journals of completed transactions are collected and sorted as in the first embodiment, and also the database update journals of completed transactions are collected and sorted (processing 135). A management list 510 is created, and the database update journal of the canceled transaction is also collected and sorted. Then, when the database is restored using the database update journal (process 155), the update results of the completed transaction are reflected, and the update results of the canceled transaction are canceled.

次に、システムの各動作について説明する。システム動
作のうち、通常時動作、トランザクション障害時動作、
およびシステム障害時動作については第一の実施例であ
る。以下、バックアップ作成時動作およびデータベース
障害時動作について説明する。
Next, each operation of the system will be explained. Among system operations, normal operation, transaction failure operation,
And the operation at the time of system failure is the first embodiment. The operation when creating a backup and the operation when a database failure occurs will be explained below.

(1)バックアップ作成時動作 データベース25の障害に備え、定期的にデータベース
のコピーをバックアップファイル45に作成する。デー
タベースの容量が大きい場合に、ボリュームやデータセ
ット等の単位でグループ化して複数日に分けて作成する
こと、およびバックアップ作成単位毎にジャーナルと対
応付けることは第一の実施例と同様である。ただし、本
実施例では対応付けのための情報が追加される。バック
アップ作成時の処理フローを第11図に示す。
(1) Operation when creating a backup In preparation for a failure of the database 25, a copy of the database is periodically created in the backup file 45. When the capacity of the database is large, it is the same as in the first embodiment that the database is grouped in units of volumes, data sets, etc. and created over multiple days, and that each backup creation unit is associated with a journal. However, in this embodiment, information for association is added. FIG. 11 shows the processing flow when creating a backup.

(a)バックアップ開始情報の記録(ステップ341)
バックアップファイル作成開始時1咋成に先だって、ジ
ャーナルとの対応付けのために以下の(1)(…)を行
う。
(a) Recording backup start information (step 341)
Before starting backup file creation, the following (1) (...) is performed to establish correspondence with the journal.

(i)バックアップファイル45の先頭に、下記の項目
を記録する。
(i) Record the following items at the beginning of the backup file 45.

■バックアップファイル作成開始日時 ■バックアップファイル作成開始時に実行中の塩本ラン
ザクジョンの最初のジャーナルのジャーナルレコード番
号および当該レコードが含まれる磁気テープの通番であ
るジャーナル順序番号 ■バックアップファイル作成開始時にデータベースの実
更新が未処理のデータベース更新ジャーナル中の最初の
ジャーナルのジャーナルレコード番号および当該レコー
ドが含まれる磁気テープの通番であるジャーナル順序番
号 ■オンライン処理中にデータベースを更新しなからのバ
ックアップ作成であることを示すフラグ (1i)ジャーナルファイル35に、バックアップファ
イル作成開始を示すジャーナルレコード(バックアップ
作成領域の名称を含む)を書込む。
■Date and time when backup file creation started ■Journal record number of the first journal of the Shiomoto Runzaktion being executed when backup file creation started and journal sequence number which is the serial number of the magnetic tape that contains the record ■Data base execution time when backup file creation started The journal record number of the first journal in the database update journal for which updates have not yet been processed and the journal sequence number, which is the serial number of the magnetic tape that contains the record ■Indicates that the backup was created without updating the database during online processing. A flag (1i) indicating the start of backup file creation is written in the journal file 35 (including the name of the backup creation area).

(b)データベースのコピー(ステップ342)ステッ
プ341開始時に実行中であったトランザクションがす
べて終了した後、データベース2人のバックアップ作成
領域の内容をバックアップファイル45にコピーする。
(b) Copying the database (step 342) After all the transactions being executed at the start of step 341 are completed, the contents of the backup creation areas of the two databases are copied to the backup file 45.

(c)バックアップ終了情報の記録(ステップ343)
ステップ342終r後、ジャーナルファイル35にバッ
クアップファイル作成終了を示すジャーナルレコード(
バックアップ作成領域の名称を含む)を書込む。
(c) Recording backup end information (step 343)
After the completion of step 342, a journal record (
(including the name of the backup creation area).

(2)データベース障害時動作 データベース障害時の回復処理の概略フローを第12図
に示す。
(2) Operation in the event of database failure A schematic flowchart of recovery processing in the event of database failure is shown in FIG.

(a)ジャーナルの範囲の判定(ステップ351)第一
の実施例と同様に、バックアップファイル作成時にバッ
クアップファイル45の先頭に記録した情報に基づき、
データベース25の障害領域の回復に必要なジャーナル
の範囲を判定する。必要な範囲は以下のとおり。
(a) Determination of journal range (step 351) Similar to the first embodiment, based on the information recorded at the beginning of the backup file 45 when creating the backup file,
The range of journals required to recover the failed area of the database 25 is determined. The required range is as follows.

(i)キャンセルトランザクションのジャーナル バックアップファイル作成開始時に実行中の全トランザ
クションの最初のジャーナルかもバックアップファイル
作成終!まで。
(i) Journal of canceled transaction This may be the first journal of all transactions being executed at the start of backup file creation.Backup file creation is complete! to.

なお、後材は後述のステップ352でデータベース更新
ジャーナルを抽出する際、ジャーナルファイル35中の
バックアップファイル作成終了ジャーナルにより判定す
る。
The successor material is determined based on the backup file creation completion journal in the journal file 35 when extracting the database update journal in step 352, which will be described later.

(i)完了トランザクションのジャーナルバックアップ
ファイル作成開始時にデータベースの実更新が未処理の
データベース更新ジャーナル中の最初のジャーナル以降
(i) After the first journal among the database update journals for which actual database updates are unprocessed at the time of starting the creation of a journal backup file for completed transactions.

(b)ジャーナルの集積(ステップ352)ステップ3
51で判定した範囲のジャーナルからデータベース25
の障害領域のデータベース更新ジャーナルを抽出する。
(b) Accumulation of journals (step 352) Step 3
Database 25 from the range of journals determined in step 51
Extract the database update journal of the failed area.

前述のとおり、本実施例においては、完了トランザクシ
ョンのデータベース更新ジャーナルとともに、キャンセ
ルトランザクションのデータベース更新ジャーナルを一
緒にデータベース集積ジャーナルファイル55に集積す
る。ジャーナル集積は、キャンセルトランザクションの
ジャーナルを集積すること以外は、第一の実施例と同様
の方法で行う、−6、なお、キャンセルトランザクショ
ンのデ−タベース更新ジャーナルを集積する際、これら
のキャンセルトランザクション(バックアップファイル
作成開始から終Yまでの期間実行されたトランザクショ
ン)の管理リスト510を作成する。
As described above, in this embodiment, database update journals for canceled transactions are accumulated in the database accumulation journal file 55 together with database update journals for completed transactions. Journal accumulation is performed in the same manner as in the first embodiment, except for accumulating journals of canceled transactions. A management list 510 of transactions executed during the period from the start of backup file creation to the end Y is created.

(c)ジャーナルのソート(ステップ353)ステップ
352において作成したデータベース集積ジャーナルフ
ァイル55を、更新データの物理アドレスおよびジャー
ナル書込み日時を第一および第二のキーとして昇順にソ
ートし、ソートしたジャーナルをデータベース集積ジャ
ーナルファイル55に書き出す、ソートは第一の実施例
同様ポリフエーズマージンートを採用し、ジャーナルソ
ート用ワークファイルとして磁気テープ65−1.65
−2.・・・・・・、65−kを用いる。
(c) Sorting journals (step 353) Sort the database accumulated journal files 55 created in step 352 in ascending order using the physical address of updated data and journal writing date and time as first and second keys, and sort the journals into the database. Writing to the accumulated journal file 55, sorting uses a polyphase margin as in the first embodiment, and a magnetic tape 65-1.65 is used as a work file for journal sorting.
-2. ..., 65-k is used.

(d)バックアップのりストア(ステップ354)予備
用ボリューム75にデータベースのバックアップファイ
ル45の内容を複写する。なお、第9.釉へ図において
は本ステップをジャーナルのソート(ステップ353)
の後としたが、ジャーナルの集積(ステップ352)お
よびソート(ステップ353)と並行してジャーナルの
範囲の判定(ステップ351)に引き続いて行ってもよ
い。
(d) Backup storage (step 354) Copy the contents of the database backup file 45 to the spare volume 75. In addition, No. 9. In the figure to glaze, this step is sorted by journal (step 353)
Although the process is described above, it may be performed in parallel with the journal accumulation (step 352) and sorting (step 353), and subsequent to the journal range determination (step 351).

(e)データベース回復(ステップ355)ステップ3
53で作成したデータベース集積ジャーナルファイル5
5を各々先頭から順に読み、読み出したデータベース更
新ジャーナルを用いてデータベースを回復する。すなわ
ち、バックアップファイル45の内容をリストアした予
備用ボリューム75上のデータに対し、キャンセルトラ
ンザクションの更新結果を取り消し、完了トランザクシ
ョンの更新結果を反映させる。
(e) Database recovery (step 355) Step 3
Database accumulation journal file 5 created in 53
5 in order from the beginning and recover the database using the read database update journal. That is, the update result of the canceled transaction is canceled and the update result of the completed transaction is reflected on the data on the spare volume 75 in which the contents of the backup file 45 have been restored.

トランザクションの完了/キャンセルの判定は、キャン
セルトランザクション管理リスト510を参照して行う
、すなわち、当該トランザクションが’n@されていれ
ばキャンセルトランザクション、登録されていなければ
完了トランザクシ緑である。なお、同一部分に関するデ
ータベース更新ジャーナルが複数存在する場合、ジャー
ナル書込み時間の昇順に以下のように処理する゛。
Completion/cancellation of a transaction is determined by referring to the canceled transaction management list 510. That is, if the transaction is 'n@', it is a canceled transaction, and if it is not registered, it is a completed transaction (green). If there are multiple database update journals for the same part, they are processed as follows in ascending order of journal writing time.

(i)キャンセルトランザクションのジャーナル 回復対象データを更新前の内容に回復する。(i) Journal of canceled transactions Restore the data to be recovered to the contents before the update.

ただし、1つのトランザクションで当該データに対する
ジャーナルが複数存在する場合は、最初なジャーナルの
みを用いる。
However, if multiple journals exist for the data in one transaction, only the first journal is used.

(it)完了トランザクションのジャーナル回復対象デ
ータを更新後の内容にする。
(it) Make the journal recovery target data of the completed transaction the updated contents.

以上、本実施例によれば、オンライン処理中にデータベ
ースを更新しなから、バックアップファイルを作成した
場合にも、データベース障害時の回復時間を大幅に短縮
することができる。なお、本実施例では同一データに関
するデータベース更新ジャーナルが複数存在する場合に
、データベース回復ステップ(ステップ355)で順次
更新データに反映させたが、ジャーナルソート(ステッ
プ353)の際に最終のジャーナルのみを残し、残りの
ジャーナルを捨てるようにしてもよい。
As described above, according to this embodiment, even if a backup file is created without updating the database during online processing, the recovery time in the event of a database failure can be significantly shortened. In this embodiment, when there are multiple database update journals related to the same data, they are reflected in the updated data sequentially in the database recovery step (step 355), but only the last journal is reflected in the journal sort (step 353). You can leave the rest of your journal behind and throw it away.

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

本発明によれば、ジャーナルファイルからデータベース
更新ジャーナルを抽出し、その際ジャーナルを格納する
複数の媒体を並行して処理し、抽出したデータベース更
新ジャーナルをデータベースの格納媒体上の物理アドレ
ス順にソートすることにより、データベース障害時の回
復処理に要する時間を大幅に短縮することができる。
According to the present invention, a database update journal is extracted from a journal file, a plurality of media storing the journals are processed in parallel, and the extracted database update journals are sorted in the order of the physical addresses on the database storage media. This can significantly reduce the time required for recovery processing in the event of a database failure.

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

第1図は本発明の第一の実施例の動作の概要を説明する
図であり、第2図は第一の実施例のシステムの全体構成
図、第3図は第1の実施例におけるデータベース障害時
の回復処理の概略フロー図、第4図はジャーナルの抽出
方法を説明する図、第5図はジャーナルのソート方法を
説明する図、第6図は、データベース障害回復処理の内
訳を示す図である。第7図は第二の実施例におけるシス
テムの全体構成図、第8図は第二の実施例におけるデー
タベース障害時の回復処理の概略フローである、第9図
は第三の実施例の動作の概要を説明する図、第10図は
システムの全体構成図、第11図はバックアップ作成処
理の概略フロー図、第12図はデータベース障害時の回
復処理の概略フロー図である。 10.11.15・・・CPU/メモリ、20,21゜
25・・・データベース、30,31.35・・・ジャ
ーナルファイル、40,41,42,45・・・バック
アップファイル、50,51.55・・・データベース
集積ジャーナルファイル、60,61.65・・・ジャ
ーナルソート用ワークファイル、70.75・・・予備
用ボリューム、100,105・・・データベースシス
テム、500・・・トランザクション管理リスト、51
0・・・キャンセルトランザクション管理リスト。 第 図 第 6 ス C久ン 3ン;1゜粟プ[〉ノミ (11) 大)4也イア+i の方〉1ミ循 困 21 ケ=グ付−人    42竹ノでヮTんフ゛71
イル31  鶴−1ル吉イル  ft  rz盲シーr
ルフ、4ル3 防 42析バづ7フJ’7v4ル 第 1θ 図 テコ バリTf、Iフ′hうル 狛 I2 回
FIG. 1 is a diagram explaining the outline of the operation of the first embodiment of the present invention, FIG. 2 is an overall configuration diagram of the system of the first embodiment, and FIG. 3 is a diagram of the database in the first embodiment. A schematic flowchart of the recovery process in the event of a failure, Figure 4 is a diagram explaining the journal extraction method, Figure 5 is a diagram explaining the journal sorting method, and Figure 6 is a diagram showing the details of the database failure recovery process. It is. Fig. 7 is an overall configuration diagram of the system in the second embodiment, Fig. 8 is a schematic flow of recovery processing in the event of a database failure in the second embodiment, and Fig. 9 is a diagram of the operation of the third embodiment. FIG. 10 is a schematic diagram of the overall system configuration, FIG. 11 is a schematic flow diagram of backup creation processing, and FIG. 12 is a schematic flow diagram of recovery processing in the event of a database failure. 10.11.15...CPU/memory, 20,21゜25...Database, 30,31.35...Journal file, 40,41,42,45...Backup file, 50,51. 55...Database accumulation journal file, 60,61.65...Work file for journal sorting, 70.75...Spare volume, 100,105...Database system, 500...Transaction management list, 51
0: Cancellation transaction management list. Figure 6: Sc long 3; 1゜millet [〉flea (11) large) 4〉ear + i〉〉1゜circle 21 ke=gu - person 42 bamboo ヮヮ゛゛71
Ile 31 Tsuru-1 Rukichi Ile ft rz blind sea r
Rufu, 4ru 3 Defense 42 Analysis Buzz 7f J'7v4ru 1st Theta Figure leverage Tf, Ifu'h Uru Koma I 2 times

Claims (1)

【特許請求の範囲】 1、データベースと、該データベースのバックアップフ
ァイルと、データベース回復のためのデータベース更新
履歴情報を含むトランザクション処理の履歴情報を格納
するジャーナルファイルとを備えたデータベースシステ
ムにおいて、ジャーナルファイルから上記データベース
更新履歴情報をデータベースの回復単位となる領域毎に
抽出するとともに、データベースの格納媒体上の物理ア
ドレス順にソートし、 データベースの回復対象領域を、当該領域のデータベー
スの物理アドレス順にソートされた上記データベース更
新履歴情報を用いて、上記バックアップファイルから物
理アドレス順に回復する、データベースの障害回復方法
。 2、データベースと、該データベースのバックアップフ
ァイルと、データベース回復のためのデータベース更新
履歴情報を含むトランザクション処理の履歴情報を格納
するジャーナルファイルとを備えたデータベースシステ
ムにおいて、ジャーナルファイルから上記データベース
更新履歴情報をデータベースの回復単位となる領域毎に
抽出するとともに、データベースの格納媒体上の物理ア
ドレス順にソートし、 ソートした上記データベース更新履歴情報を用いて上記
バックアップファイルから新たなバックアップファイル
を作成するデータベースの障害回復方法。 3、ジャーナルファイルからデータベース更新履歴情報
をデータベースの回復単位となる領域毎に抽出する際、 ジャーナルファイルの格納媒体をグループに分け、各グ
ループから並行してデータベース更新履歴情報を抽出し
、 その際、グループ毎に履歴情報が複数のグループにまた
がつて格納されているトランザクションについて当該ト
ランザクションの完了有無を記憶し、他グループから抽
出したデータベース更新履歴情報が完了トランザクショ
ンの履歴情報か否かを判別して、必要なデータベース更
新履歴情報のみを抽出する、 特許請求の範囲第1項または第2項のデータベースの障
害回復方法。 4、回復対象領域をデータベース更新履歴情報を用いて
バックアップファイルから回復する際、バックアップフ
ァイルから主記憶装置に読み込んだ上記領域の各ページ
の内容を上記更新履歴情報を用いてメモリ上で回復した
後に、回復後の上記領域を配置する媒体に書き込む、 特許請求の範囲第1項または第3項のデータベースの障
害回復方法。 5、ソートした上記データベース更新履歴情報を用いて
上記バックアップファイルから新たなバックアップファ
イルを作成する際、 バックアップファイルから主記憶装置に読み込んだ上記
領域の各ページの内容を上記更新履歴情報を用いてメモ
リ上で回復した後、新たなバックアップファイルの格納
媒体に書き込む、特許請求の範囲第2項または第3項の
データベースの障害回復方法。 6、データベース更新処理を行わない期間に該データベ
ースのバックアップファイルを作成し、ジャーナルファ
イルからデータベースの処理対象領域のデータベース更
新履歴情報を抽出・ソートする際、バックアップファイ
ルを作成した後に完了したトランザクションのデータベ
ース更新履歴情報のみを抽出する、 特許請求の範囲第3項のデータベースの障害回復方法。 7、データベース更新処理と並行して該データベースの
バックアップファイルを作成し、その際、データベース
の回復単位となる領域毎に該領域のバックアップファイ
ルの作成開始から終了までの履歴情報の範囲を識別し、 ジャーナルファイルからデータベースの処理対象領域の
データベース更新履歴情報を抽出・ソートする際、バッ
クアップファイル作成時に実行中かつその後完了しなか
つたトランザクションのデータベース更新履歴情報、お
よびバックアップファイル作成開始以降にデータベース
を媒体上で更新した完了トランザクションのデータベー
ス更新履歴情報を抽出し、 完了しなかつたトランザクションの更新結果がバックア
ップファイルに反映されている場合に、当該トランザク
ションのデータベース更新履歴情報を用いて更新前の内
容に回復し、 完了トランザクションのデータベース更新履歴情報を用
いて更新後の内容に回復する、 特許請求の範囲第3項のデータベースの障害回復方法。 8、ジャーナルファイルからデータベース更新履歴情報
をデータベースの回復単位となる領域毎に抽出する際、 データベースの同一部分に関するデータベース更新履歴
情報のうち該部分の最終の内容を含むデータベース更新
履歴情報のみを抽出する、特許請求の範囲第3項のデー
タベースの障害回復方法。
[Claims] 1. In a database system comprising a database, a backup file of the database, and a journal file storing transaction processing history information including database update history information for database recovery, The above database update history information is extracted for each area that is the unit of database recovery, and is sorted in the order of the physical addresses on the database storage medium, and the areas to be recovered of the database are extracted as described above, sorted in the order of the physical addresses of the database in the area. A database failure recovery method that uses database update history information to recover from the backup file in the order of physical addresses. 2. In a database system equipped with a database, a backup file of the database, and a journal file that stores transaction processing history information including database update history information for database recovery, the database update history information is retrieved from the journal file. Database failure recovery that extracts each area that is the recovery unit of the database, sorts it in the order of physical addresses on the database storage medium, and creates a new backup file from the backup file using the sorted database update history information. Method. 3. When extracting database update history information from journal files for each area that is the unit of database recovery, divide the journal file storage medium into groups and extract database update history information from each group in parallel. For transactions whose history information is stored across multiple groups for each group, whether or not that transaction has been completed is stored, and it is determined whether the database update history information extracted from other groups is the history information of a completed transaction. The database failure recovery method according to claim 1 or 2, wherein only necessary database update history information is extracted. 4. When recovering the area to be recovered from the backup file using the database update history information, after the contents of each page of the above area read into the main storage from the backup file are recovered in memory using the update history information. The database failure recovery method according to claim 1 or 3, further comprising: writing on a medium on which the recovered area is placed. 5. When creating a new backup file from the backup file using the sorted database update history information, the contents of each page in the area read from the backup file into the main storage are stored in the memory using the update history information. 4. A database failure recovery method according to claim 2 or 3, wherein after the above recovery, a new backup file is written to a storage medium. 6. When creating a backup file of the database during a period when database update processing is not performed, and extracting and sorting the database update history information of the database processing target area from the journal file, the database of transactions completed after the backup file was created. A database failure recovery method according to claim 3, which extracts only update history information. 7. Create a backup file of the database in parallel with the database update process, and at this time, identify the range of history information from the start to the end of creation of the backup file for each area for each area that is the unit of database recovery; When extracting and sorting the database update history information of the database processing target area from the journal file, the database update history information of transactions that were being executed at the time of backup file creation but did not complete after that, and the database update history information of the transactions that were executed at the time of backup file creation but were not completed after that, and the database on the media after backup file creation started. Extracts the database update history information of completed transactions that were updated in , The database failure recovery method according to claim 3, wherein the database update history information of completed transactions is used to recover the updated contents. 8. When extracting database update history information from the journal file for each area that is the unit of database recovery, extract only the database update history information that includes the last content of that part from among the database update history information regarding the same part of the database. , a database failure recovery method according to claim 3.
JP1184695A 1989-07-19 1989-07-19 Fault restoration method for data base Pending JPH0350648A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1184695A JPH0350648A (en) 1989-07-19 1989-07-19 Fault restoration method for data base

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1184695A JPH0350648A (en) 1989-07-19 1989-07-19 Fault restoration method for data base

Publications (1)

Publication Number Publication Date
JPH0350648A true JPH0350648A (en) 1991-03-05

Family

ID=16157761

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1184695A Pending JPH0350648A (en) 1989-07-19 1989-07-19 Fault restoration method for data base

Country Status (1)

Country Link
JP (1) JPH0350648A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0721071A (en) * 1993-07-06 1995-01-24 Nec Corp Data base restoration system

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0721071A (en) * 1993-07-06 1995-01-24 Nec Corp Data base restoration system

Similar Documents

Publication Publication Date Title
US7036043B2 (en) Data management with virtual recovery mapping and backward moves
US6898688B2 (en) Data management appliance
EP1461700B1 (en) Appliance for management of data replication
US5561795A (en) Method and apparatus for audit trail logging and data base recovery
US7222133B1 (en) Method for reducing database recovery time
US20030131253A1 (en) Data management appliance
JP3410899B2 (en) How to recover a multivolume data set
US20030074600A1 (en) Data backup/recovery system
KR920001374A (en) Method and device for managing status identifier for effective recovery
JPS62297950A (en) Journaling of data system
US5740434A (en) System for maintenance of database integrity
US10922186B1 (en) Method and system for implementing current, consistent, and complete backups by rolling a change log backwards
US7620785B1 (en) Using roll-forward and roll-backward logs to restore a data volume
JPH0350648A (en) Fault restoration method for data base
JPS62224843A (en) Database medium content maintaining system
US20060004846A1 (en) Low-overhead relational database backup and restore operations
JP2001229063A (en) Data managing system
Srinivasan et al. Recoverable file system for microprocessor systems
JP2708610B2 (en) Database log management processing method
JPH08314784A (en) File management device
JPH04184641A (en) Data base restoring system
CN111949447B (en) Data processing method and data processing system
JPH04155548A (en) Log management and recovery processing system
JPS63262737A (en) Data base updating and recording processing method
KR20070069295A (en) An implementation method of fat file system which the journaling is applied method