JPH01293452A - Data base fault recovering system - Google Patents

Data base fault recovering system

Info

Publication number
JPH01293452A
JPH01293452A JP63124700A JP12470088A JPH01293452A JP H01293452 A JPH01293452 A JP H01293452A JP 63124700 A JP63124700 A JP 63124700A JP 12470088 A JP12470088 A JP 12470088A JP H01293452 A JPH01293452 A JP H01293452A
Authority
JP
Japan
Prior art keywords
database
area
data
update history
reorganization
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.)
Granted
Application number
JP63124700A
Other languages
Japanese (ja)
Other versions
JP2748402B2 (en
Inventor
Kazuaki Tanaka
和明 田中
Teizaburo Kanai
金居 貞三郎
Takashi Sumiyoshi
住吉 孝史
Akiji Yamamoto
山本 章治
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Hitachi Ltd
Original Assignee
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 Ltd filed Critical Hitachi Ltd
Priority to JP63124700A priority Critical patent/JP2748402B2/en
Publication of JPH01293452A publication Critical patent/JPH01293452A/en
Application granted granted Critical
Publication of JP2748402B2 publication Critical patent/JP2748402B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

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

Abstract

PURPOSE:To promptly restore a fault by discriminating an updated history data to be used for data base restoration based on an identifier to preserve a sequence relation in time at every time point, selecting the reflecting method of the updated history data to the copied data, and executing a fault restoring processing. CONSTITUTION:An area table to have collected control information for one area of the data base stored in an area table file 110 has a backup completing time 203, re-editing starting time 206, and a re-editing completing time 207 by an identifier 210 at the backup starting time point. When the data base fault is restored, updated history data 402 to be used for the data base restoration are discriminated based on the identifier to preserve the sequence relation in time at each time point at every area to be an object, the reflecting method of the updated history data 402 to the copied data is selected, and the fault restoring processing is executed. Thus, a load to a data base system service manager can be decreased, and the fault can be promptly restored.

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明はデータベース障害回復方式に関し、特にデータ
ベースの複写データと更新履歴データとに基づき、デー
タベースの障害回復作業を行うデータベースシステムに
おいて、上記回復作業の自動化と高性能化を実現可能と
するデータベース障害回復方式に関する。
DETAILED DESCRIPTION OF THE INVENTION [Field of Industrial Application] The present invention relates to a database failure recovery method, and particularly to a database system that performs database failure recovery work based on database copy data and update history data. This paper relates to a database failure recovery method that enables automation and high performance.

〔従来の技術〕[Conventional technology]

データベースは、一般に、幾つかの論理的な領域から構
成され、磁気ディスクに代表される外部記憶媒体に格納
されている。上記各領域は複数の媒体に格納されたり、
ある媒体に複数の領域が格納されたりする。この媒体が
何等かの原因で使用不能になった場合、その媒体に含ま
れる全領域について、障害が発生する直前の状態に回復
する必要がある。データベースシステムでは、データベ
ースの複写データに、データベースの更新履歴データを
重ね書きする回復方式が一般的である。
A database is generally composed of several logical areas and is stored in an external storage medium, typically a magnetic disk. Each of the above areas may be stored on multiple media,
Multiple areas may be stored on a certain medium. If this medium becomes unusable for some reason, it is necessary to restore all areas included in the medium to the state immediately before the failure occurred. In database systems, a common recovery method is to overwrite database copy data with database update history data.

そこで、従来のデータベースシステムでは、領域単位あ
るいはデータベース単位に複写データを取得する手段や
、データベースサービス中に取得された更新履歴データ
を、更新時刻間隔や領域単位に編集する手段を利用者に
提供し、データベース障害回復に必要な複写データや更
新履歴データを利用者に用意させていた。
Therefore, conventional database systems provide users with a means to obtain copy data in units of areas or databases, and a means to edit update history data obtained during database services by update time interval or area. , users were required to prepare copy data and update history data necessary for database failure recovery.

このような方式に関するものとして、例えば、C,J、
Date著“An  Introduction to
 DatabaseS ystems”(Addiso
n Wesley、1983年)を挙げることができる
Regarding such methods, for example, C, J,
“An Introduction to
Database Systems” (Addiso
Wesley, 1983).

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

データベースシステムの運用において、データベース容
量の拡張やデータの格納状態の整理・整頓あるいはデー
タベースの定義の一部変更等のため、領域単位に、その
領域へのアクセスを禁止状態にしてデータベースの再編
成(「再構成」を含む)を実施することがある。
When operating a database system, in order to expand the database capacity, organize and organize the data storage state, or partially change the database definition, it is necessary to reorganize the database by prohibiting access to that area ( (including “reconfiguration”).

以下、説明のため、再編成を実施した領域を絆称してX
、他の領域を同様にYとする。また、障害が発生した媒
体内のXをX′、YをY′と記す。
For the sake of explanation, the area where the reorganization was carried out will be referred to as the bond below.
, other areas are similarly designated as Y. In addition, X in the medium where the failure has occurred will be denoted as X', and Y will be denoted as Y'.

再編成をした領域Xを含む媒体に障害が発生した場合、
再編成前に取得していた複写データに、再編成後のデー
タベースの状態に基づく更新履歴データを重ね書きする
と、データベースの内容を破壊してしまう。そこで、上
記従来技術では、(1)再編成後に、データベースサー
ビスを中断してデータベース全領域の複合データを再取
得する。データベース障害時には、再編成後の複写デー
タと更新B暦データとで回復する(2)再編成後、Xだ
けの複写データを取得し終るまで、Xへのデータベース
サービスを再開しない。障害回復時には、まず、 Y′
を複写データと更新履歴データとを用いて再編成終了時
刻の状態に回復する。その後、X′に対する再編成後の
複写データと、 X’、Y’の更新履歴データを用いて
回復する (3)障害回復時には、まず、 Y′だけの複写データ
と更新履歴データとを用いて、 Y′を再編成終了時刻
の状態に回復する。その後、 X′に対する再編成後を
再度実施した後、X’、Y’の更新履歴データを用いて
回復する 等の回復操作が行われていた。
If a failure occurs in the medium containing the reorganized area X,
If update history data based on the state of the database after reorganization is overwritten on the copy data obtained before reorganization, the contents of the database will be destroyed. Therefore, in the above-mentioned conventional technology, (1) after reorganization, the database service is interrupted and the composite data of the entire database area is reacquired. In the event of a database failure, recovery is achieved using the reorganized copy data and the updated B calendar data. (2) After the reorganization, the database service for X is not restarted until the copy data of only X has been acquired. When recovering from a failure, first, Y′
is restored to the state at the reorganization end time using the copy data and update history data. After that, recovery is performed using the copy data after reorganization for X' and the update history data of X' and Y'. , Y' is restored to the state at the reorganization end time. Thereafter, recovery operations were performed, such as performing post-reorganization on X' again, and then recovering using the update history data of X' and Y'.

このように、従来技術では、障害を検知した媒体とそれ
に含まれる領域を特定し、回復に必要な複写データ、更
新履歴データおよびその反映方法とを選択するのは、デ
ータベースシステムの運用管理者の役割であり、 (1)再編成後の複写データ取得のためのデータベース
サービスの中断 (2)複写データの選択や更新履歴データの編集のため
の回復時間の長大化 (3)障害回復に使用する複写データや更新履歴データ
の誤用や回復手順の人的操作誤りによる回復時間の遅れ 等の問題があった。
In this way, in the conventional technology, it is up to the database system administrator to identify the medium on which a failure has been detected and the area it contains, and to select the copy data, update history data, and how to reflect them necessary for recovery. (1) Interruption of database service to obtain copy data after reorganization (2) Increased recovery time due to selection of copy data and editing of update history data (3) Used for failure recovery There were problems such as delays in recovery time due to misuse of copy data and update history data and human errors in recovery procedures.

本発明は上記事情に鑑みてなされたもので、その目的と
するところは、従来のデータベース障害回復方式におけ
る上述の如き問題を解消し、データベースシステム運用
管理者の負担を軽減するとともに高速な障害回復を可能
とする、データベース障害回復方式を提供することにあ
る。
The present invention has been made in view of the above circumstances, and its purpose is to solve the above-mentioned problems in conventional database failure recovery methods, reduce the burden on database system operations managers, and enable high-speed failure recovery. The objective is to provide a database failure recovery method that enables.

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

本発明の上述の目的は、データベースの複写データと更
新履歴データとに基づき、その障害回復を行うデータベ
ースシステムにおいて、前記データベースを構成する領
域単位に、該領域の管理データとして、当該領域の複写
データを取得した開始・終了時点の時間的順序関係を保
存する識別子と、当該領域の再編成または再構成の内容
とその開始・終了時点の時間的順序関係を保存する識別
子を記憶する手段を設けて、データベース障害回復時に
その対象となる領域毎に、前記各時点の時間的順序関係
を保存する識別子に基づいてデータベース回復に使用す
る更新履歴データを識別し、該更新履歴データの前記複
写データへの反映方法を選択して障害回復処理を実行す
ることを特徴とする、データベース障害回復方式によっ
て達成される。
The above-mentioned object of the present invention is to provide a database system that performs failure recovery based on copy data and update history data of a database, in which copy data of each area constituting the database is used as management data of the area. means for storing an identifier that saves the temporal order relationship at the start and end points of acquisition, and an identifier that saves the content of the reorganization or reconfiguration of the area and the time order relationship at the start and end points. , for each target area during database failure recovery, update history data to be used for database recovery is identified based on the identifier that saves the temporal order relationship at each point in time, and the update history data is transferred to the copy data. This is achieved by a database failure recovery method characterized by selecting a reflection method and executing failure recovery processing.

〔作用〕[Effect]

本発明に係るデータベース障害回復方式においては、デ
ータベースを構成する領域毎に、領域の管理データとし
て、下記(11)に示すデータを記憶し、これを用いて
、下記(12)〜(14)の如き処理を行うことにより
、不適切な更新履歴データの反映により、不当な内容の
データベースに回復されることを防止するものである。
In the database failure recovery method according to the present invention, the data shown in (11) below is stored as area management data for each area constituting the database, and this is used to perform the following (12) to (14). By performing such processing, it is possible to prevent the database from being restored with inappropriate contents due to reflection of inappropriate update history data.

(11)その領域に対する次の情報を恒久的に記憶して
おける場所を、外部記憶装置内に用意しておく。
(11) Prepare a location in the external storage device where the next information for that area can be permanently stored.

にバックアップ開始時刻 ■二バックアップ終了時刻 ■:再編成内容 ■:再編成開始時刻 ■:再編成終了時刻 なお、ここで、「時刻Jなる語は、各時点の時間的順序
性を保存する識別子の意味で用いており、時刻に限定さ
れるものではない。
Backup start time■2 Backup end time■:Reorganization details■:Reorganization start time■:Reorganization end timeNote that the word ``time J'' is an identifier that preserves the temporal order of each point in time. It is used in this sense and is not limited to time.

(12)バックアップ時、その開始・終了時刻を(11
)で確保した■劃に設定する。また、上記■。
(12) When backing up, set the start and end times to (11
). Also, ■ above.

IV、Vは初期状態にする。IV and V are set to the initial state.

(13)再編成時、その再編成を再度実行するのに必要
な情報と、開始・終了時刻を(11)で確保したIII
、rV、Vに設定する。
(13) At the time of reorganization, the information necessary to re-execute the reorganization and the start and end times are secured in (11) III.
, rV, set to V.

(14)データベース障害時における回復動作の概要は
、第1図のフローチャートに示す通りである。以下、こ
れについて、簡単に説明する。
(14) The outline of the recovery operation in the event of a database failure is as shown in the flowchart of FIG. This will be briefly explained below.

回復対象の領域を特定しくステップ1)、その領域管理
データを読込む(ステップ2)。バックアップ後に再編
集が実施されたが否かにより、ステップ3以下、下記(
a)(b)いずれが一方の処理が、回復対象の全領域に
対して実施される(ステップ7)。
Identify the area to be recovered (step 1), and read the area management data (step 2). Depending on whether re-editing was performed after the backup, step 3 and following steps (
One of the processes a) and (b) is performed on all areas to be recovered (step 7).

(a)バックアップ取得後、再編成が未実施、すなわち
、上記m、rv、yが初期状態ならば、(ア)回復対象
の領域名をデータベースシステム運用者に知らせて、複
写データおよび更新履歴データをアクセス可能な状態に
なるよう操作させる(ステップ4)。
(a) If reorganization has not been performed after backup has been taken, that is, if the above m, rv, and y are in their initial states, (a) Inform the database system operator of the area name to be recovered, and copy data and update history data. is operated so that it becomes accessible (step 4).

(イ)上記IからHの間の更新時刻を持つ更新履歴デー
タについて、更新履歴データ中の更新前後情報に基づき
、複写データに未反映なもののみ、複写データに重ね書
きする(ステップ5)。
(a) For update history data having update times between I and H, only those that have not been reflected in the copy data are overwritten on the copy data based on the before and after update information in the update history data (step 5).

(つ)上記■以降の更新時刻を持つ更新履歴データを、
(ア)で得た複写データに重ね書きする(ステップ6)
(1) Update history data with an update time after ■ above,
Overwrite the copy data obtained in (a) (Step 6)
.

(b)バックアップ取得後、再編成が実施済、すなわち
、上記I11.rV、Vが初期状態でないならば、 (ア)(a)の(ア)と同じ(ステップ8)。
(b) After backup acquisition, reorganization has been performed, that is, the above I11. If rV and V are not in the initial state, (a) Same as (a) in (a) (step 8).

(イ)上記■から■の間の更新時刻を持つ更新履歴デー
タについて、その更新前後情報に基づき複写データに未
反映なもののみ複写データに重ね書きする(ステップ9
)。
(b) For update history data with update times between ■ and ■ above, only those that have not been reflected in the copy data are overwritten on the copy data based on the before and after update information (Step 9
).

(つ)上記■に基づき、データベースの再編成を実施す
る(ステップ10)。
(1) Reorganize the database based on the above item (1) (step 10).

(1)上記■以降の更新時刻を持つ更新履歴デ−夕を、
(つ)で得た複写データに重ね書きする(ステップ11
)。
(1) Update history data with update time after ■ above,
Overwrite the copy data obtained in (step 11)
).

また、特許請求の範囲第2項に記載した発明においては
、上述の構成・作用に加えて、下記の如き構成・作用を
有する。すなわち、 (21)前記(13)において、再編成内容■として、
同時に再編成される領域名を設定する。
Further, the invention described in claim 2 has the following configuration and operation in addition to the above-mentioned configuration and operation. That is, (21) In (13) above, as reorganization content ■,
Set the area name that will be reorganized at the same time.

(22)前記(14)(b)(イ)および(つ)におい
て、障害回復対象の領域のみならず、 (11)で設定
した同時に再編成される必要のある全領域を対象に回復
処理や再編成処理を実施する。
(22) In (14) (b) (a) and (i) above, recovery processing is performed not only for the area targeted for failure recovery but also for all areas that need to be reorganized at the same time as set in (11). Perform reorganization processing.

また、特許請求の範囲第3項に記載した発明においては
、上述の構成・作用に加えて、下記の如き構成・作用を
有する。すなわち、 (31)バックアップ時、その開始時刻を複写データ内
に埋込む。
Further, the invention described in claim 3 has the following configuration and operation in addition to the above-mentioned configuration and operation. That is, (31) At the time of backup, the start time is embedded in the copy data.

(32)前記(14)(a)(ア)でアクセス可能にな
った複写データ中のバックアップ開始時刻が、前記(1
1)Iのバックアップ開始時刻と同時刻であることを確
認する。
(32) If the backup start time in the copy data made accessible in (14) (a) (a) is
1) Confirm that the time is the same as the backup start time of I.

更に、特許請求の範囲第3項に記載した発明においては
、上述の構成・作用に加えて、下記の如き構成・作用を
有する。すなわち。
Furthermore, the invention set forth in claim 3 has the following configuration and operation in addition to the configuration and operation described above. Namely.

(41)予め、複写データや更新履歴データを格納する
媒体対応に、媒体管理データとして、次の情報を恒久的
に記憶しておける場所を、磁気ディスク等の外部記憶装
置内に用意しておく。
(41) Prepare in advance a location in an external storage device such as a magnetic disk where the following information can be permanently stored as media management data for the media used to store copy data and update history data. .

■:媒体名 ■二使用・未使用情報 ■:接続情報 (42)前記(11)に加え、次の情報を格納する場所
を用意しておく。
■: Media name ■2 Used/unused information ■: Connection information (42) In addition to the above (11), prepare a location to store the following information.

■:複写データ格納媒体名 X:複写データ格納媒体の接続情報 XI:更新履歴データ格納媒体名 Xll:更新履歴データ格納媒体の接続情報(43)複
写データや更新履歴データの格納時、(41)から未使
用の媒体名を求めて、接続情報がオフライン状態ならば
、それを自動的にアクセス可能な状態にする。
■: Copy data storage medium name X: Copy data storage medium connection information XI: Update history data storage medium name Xll: Update history data storage medium connection information (43) When storing copy data or update history data, (41) If the connection information is offline, the name of an unused medium is found, and if the connection information is offline, it is automatically made accessible.

(44)データベース障害回復時、(42)から複写デ
ータや更新履歴データが格納されている媒体名を求め、
それらの接続情報に基づいて該当媒体を自動的にアクセ
ス可能な状態にする。
(44) When recovering from a database failure, find the name of the medium on which copy data and update history data are stored from (42),
The corresponding medium is automatically made accessible based on the connection information.

〔実施例〕〔Example〕

以下、本発明の実施例を図面に基づいて詳細に説明する
。なお、以下に説明する実施例は、前述の特許請求の範
囲第1項および第2項に対応する実施例である。
Embodiments of the present invention will be described in detail below with reference to the drawings. Note that the embodiments described below are embodiments corresponding to claims 1 and 2 described above.

第2図は本発明の第一の実施例であるデータベースシス
テムの全体構成を示す図である。図において、101は
プロセッサ、102は主記憶装置を示し、108は複写
データファイル、109は更新履歴データファイル、1
10は領域テーブルファイル、Illはデータベース定
義ファイル、112はデータベース、113はコンソー
ルを示している。また、上記主記憶装置1.02内には
、バックアップ処理プログラム103.再編成処理プロ
グラム1o4.データベース管理システム1o5.デー
タベース初期化プログラム106.データベース障害回
復プログラム107が格納されている。
FIG. 2 is a diagram showing the overall configuration of a database system that is a first embodiment of the present invention. In the figure, 101 is a processor, 102 is a main storage device, 108 is a copy data file, 109 is an update history data file, 1
10 is an area table file, Ill is a database definition file, 112 is a database, and 113 is a console. Also, in the main storage device 1.02, a backup processing program 103. Reorganization processing program 1o4. Database management system 1o5. Database initialization program 106. A database failure recovery program 107 is stored.

上記領域テーブルファイル110に格納される、あるデ
ータベースの1領域に対する管理情報を集めた領域テー
ブルの構成を第3図に示す。図中、201は領域を特定
するための領域識別子、202はバックアップ開始時点
の識別子(以下、「時刻」)、203はバックアップ終
了時刻、204は再編成の回数、205は再編成の内容
を示す情報であり、これにより再編成を実行できるもの
とする。また、当該領域と他の領域とが同時に再編成の
対象として処理される場合には、相手の領域識別子を含
むものとする。206は再編成の開始時刻、207は再
編成の終了時刻である。205.206.207は、2
04の再編成回数粗分、存在する。
FIG. 3 shows the configuration of an area table that is stored in the area table file 110 and is a collection of management information for one area of a certain database. In the figure, 201 is an area identifier for specifying an area, 202 is an identifier at the backup start point (hereinafter referred to as "time"), 203 is the backup end time, 204 is the number of reorganizations, and 205 is the content of the reorganization. This information allows reorganization to be executed. Furthermore, if the relevant area and another area are processed as reorganization targets at the same time, the area identifier of the other area shall be included. 206 is the start time of reorganization, and 207 is the end time of reorganization. 205.206.207 is 2
Approximate number of times of reorganization of 04 exists.

更新履歴データファイル109に格納される。更新履歴
データ情報の構成を第4図に示す。図中、401はデー
タベース更新時刻、402は更新履歴データであり、従
来と同様、更新前・後のデータベースの内容を含むもの
とする。また、更新履歴データは、更新履歴データファ
イル109内で、データベース更新時刻順に取出せるよ
うに配置されて4いるものとする。
It is stored in the update history data file 109. FIG. 4 shows the structure of update history data information. In the figure, 401 is the database update time, and 402 is update history data, which includes the contents of the database before and after the update, as in the past. It is also assumed that the update history data is arranged in the update history data file 109 so that it can be taken out in the order of database update time.

前記データベース初期化プログラム106は、従来は、
データベース112の初期設定を行うプロゲラであった
。本実施例においては、これに加えてデータベースを構
成する全領域に対する領域テーブルを登録するための領
域テーブルファイル110の初期化を行う。この処理概
要を、第5図に基づいて説明する。
Conventionally, the database initialization program 106 includes:
It was a progera that initialized the database 112. In this embodiment, in addition to this, the area table file 110 for registering area tables for all areas constituting the database is initialized. The outline of this process will be explained based on FIG.

データベース初期化プログラム106は、初期化するデ
ータベースの定義情報を、第2図のデータベース定義フ
ァイル111から読込み、当該データベースの初期化を
行う(ステップ501.502)。その後、当該データ
ベースを構成する各領域に対する初期化された領域テー
ブルを、第2図の領域テーブルファイル110に格納す
る(ステップ503)。
The database initialization program 106 reads the definition information of the database to be initialized from the database definition file 111 shown in FIG. 2, and initializes the database (steps 501 and 502). Thereafter, the initialized area table for each area constituting the database is stored in the area table file 110 in FIG. 2 (step 503).

前記バックアップ処理プログラム103は、従来は、デ
ータベースの複写データを取得するためのプログラムで
あった。本実施例においては、これに加えて、バックア
ップを行った領域の領域テーブルに、バックアップの開
始・終了時刻を設定する処理を行う。この処理概要を、
第6図に基づいて説明する。
The backup processing program 103 has conventionally been a program for acquiring copy data of a database. In this embodiment, in addition to this, processing is performed to set backup start and end times in the area table of the area that has been backed up. An overview of this process is
This will be explained based on FIG.

第2図に示すバックアップ処理プログラム103は、デ
ータベース内の対象とする領域の複写データの取得開始
時刻を取得した後(ステップ601)、前記データベー
ス112から複写データを取得する(ステップ602)
。その後、複写データの取得終了時刻を取得後(ステッ
プ603)、ステップ604で、複写データを、第2図
の複写データファイル108に書込む。
The backup processing program 103 shown in FIG. 2 obtains the copy data acquisition start time of the target area in the database (step 601), and then obtains the copy data from the database 112 (step 602).
. Thereafter, after obtaining the copy data acquisition end time (step 603), the copy data is written to the copy data file 108 in FIG. 2 in step 604.

次に、複写データを取得した領域に対する領域テーブル
を、第2図の領域テーブルファイル110から読込む(
ステップ605)。領域テーブル内のバックアップ開始
時刻として、上記ステップ601で得た値を、バックア
ップ終了時刻として、上記ステップ603で得た値を設
定する(ステップ606)。
Next, the area table for the area where the copy data has been acquired is read from the area table file 110 in FIG.
Step 605). The value obtained in step 601 is set as the backup start time in the area table, and the value obtained in step 603 is set as the backup end time (step 606).

領域テーブル内の再編成情報である、第3図に示した再
編成回数204.再編成内容205.再編成開始時刻2
06.再編成終了時刻207を初期化した後(ステップ
607)、領域テーブルを領域テーブルファイル110
に書込む(ステップ608)。
The number of reorganizations 204 shown in FIG. 3, which is reorganization information in the area table. Reorganization details 205. Reorganization start time 2
06. After initializing the reorganization end time 207 (step 607), the area table is saved in the area table file 110.
(step 608).

バックアップ処理の他の実施例として、複数のデータベ
ース領域をバックアップ対象とする場合の処理概要を、
第7図に基づいて説明する。
As another example of backup processing, the processing overview when multiple database areas are to be backed up is as follows.
This will be explained based on FIG.

ステップ701では、バックアップ対象の全領域の領域
テーブルを、領域テーブルファイル110から読込む。
In step 701, the area table of all areas to be backed up is read from the area table file 110.

次に、バックアップの開始時刻を求める(ステップ70
2)。2回目以降のステップ702の処理では、前回の
ステップ704で求めた終了時刻を、今回の開始時刻と
しても良い。前記データベース112のバックアップ対
象の1領域の複写データを取得した後(ステップ703
)、終了時刻を求め(ステップ704)、前記複写デー
タファイル108に書込む(ステップ705)。次に、
当該領域に対する領域テーブル中のバックアップ開始時
刻201として、ステップ702で得た時刻を、また、
バックアップ終了時刻202として、ステップ704で
得た時刻を設定後(ステップ706) 、再編成情報で
ある領域テーブル中の再編成回数204.再編成内容2
05゜再編成開始時刻206.再編成終了時刻207を
初期化する(ステップ707)、バックアップ対象の全
領域についてバックアップが完了したか否かを判定しく
ステップ708)、完了していなければ、次の領域につ
いてステップ702以降の処理を実施し、完了していれ
ば、バックアップの対象となった全領域の領域テーブル
を領域テーブルファイル110に書込む(ステップ70
9)。
Next, find the backup start time (step 70).
2). In the process of step 702 from the second time onward, the end time obtained in the previous step 704 may be used as the current start time. After obtaining the copy data of one area to be backed up in the database 112 (step 703
), find the end time (step 704), and write it to the copy data file 108 (step 705). next,
The time obtained in step 702 is used as the backup start time 201 in the area table for the area, and
After setting the time obtained in step 704 as the backup end time 202 (step 706), the reorganization count 204 in the area table, which is reorganization information, is set. Reorganization details 2
05° Reorganization start time 206. Initialize the reorganization end time 207 (step 707), determine whether the backup has been completed for all areas to be backed up (step 708), and if not, perform the processing from step 702 onward for the next area. If completed, the area table of all areas targeted for backup is written to the area table file 110 (step 70).
9).

前記再編成処理プログラム104は、従来は、データベ
ースの領域の容量を拡大したり、データの格納状態の整
理・整頓あるいはデータベース定義の一部変更に伴なう
データベースの再構築等を行うプログラムであった。本
実施例においては、これに加えて、再編成の対象となっ
た領域に対応する領域テーブルに、再編成に関する情報
を設定する処理を行う。この処理概要を、第8図に基づ
いて説明する。
The reorganization processing program 104 has conventionally been a program that expands the capacity of the database area, organizes and organizes the data storage state, or reconstructs the database due to a partial change in the database definition. Ta. In this embodiment, in addition to this, processing is performed to set information regarding reorganization in the area table corresponding to the area targeted for reorganization. The outline of this process will be explained based on FIG.

再編成処理プログラム104は、再編成の開始時刻を求
めた後(ステップ801)、再編成処理プログラムが起
動された再編成目的に応じた、データベ−スの再編成処
理を行う(ステップ802)。次に、再編成終了時刻を
求める(ステップ803)。再編成対象の全領域に対す
る領域テーブルを領域テーブルファイル110から読込
み(ステップ804)、各領域テーブル内の再編成情報
である、再編成回数をカウントアツプする(ステップ8
05)。更に、今回実施した再編成と同じ動作を再度行
うに必要な情報を集めた、再編成の内容を示す情報を設
定する(ステップ806)とともに、再編成開始時刻と
して上記ステップ801で求めた値を、再編成終了時刻
として、上記ステップ803で求めた値を設定する(ス
テップ807)。
After determining the start time of reorganization (step 801), the reorganization processing program 104 performs database reorganization processing according to the reorganization purpose for which the reorganization processing program was started (step 802). Next, the reorganization end time is determined (step 803). The area tables for all areas to be reorganized are read from the area table file 110 (step 804), and the number of reorganizations, which is reorganization information in each area table, is counted up (step 8).
05). Furthermore, information indicating the contents of the reorganization, which collects the information necessary to perform the same operation as the reorganization performed this time, is set (step 806), and the value obtained in step 801 is set as the reorganization start time. , the value obtained in step 803 above is set as the reorganization end time (step 807).

その後、全領域について、再編成情報の設定が完了した
か否かを判定しくステップ808)、完了していなけれ
ば、ステップ805以降を実施する。完了していれば、
全領域テーブルを、領域テーブルファイル110に格納
する(ステップ809)。
Thereafter, it is determined whether or not the setting of reorganization information has been completed for all areas (step 808); if not, steps 805 and subsequent steps are performed. If completed,
The entire area table is stored in the area table file 110 (step 809).

なお、本実施例においては、再編成を実施する領域は、
再編成プログラムの起動前に、前記データベース管理シ
ステム105に対して、オペレータコマンド等の利用者
の操作指示手段によって、その領域へのデータベースア
クセス不可とする閉塞状態が確立されていることを前提
としている。
Note that in this embodiment, the area to be reorganized is
It is assumed that, before starting the reorganization program, a blockage state has been established in the database management system 105 in which access to the database to that area is prohibited by a user's operation instruction means such as an operator command. .

次に、再編成を実施する領域の閉塞を、再編成プログラ
ムの実行中に、再編成プログラムから、第2図に示した
データベース管理システム105に通知する機能を有す
る場合の実施例を第9図に基づいて説明する。
Next, FIG. 9 shows an embodiment in which the reorganization program has a function of notifying the database management system 105 shown in FIG. 2 of blockage of an area to be reorganized during execution of the reorganization program. The explanation will be based on.

ステップ901では、1回の再編成の対象となる領域に
ついて、その領域の閉塞をデータベース管理システムに
求める。このとき、1回の再編成処理が、複数の領域を
一括して行う必要がある場合には、それら全領域の閉塞
を求めるものとする。
In step 901, the database management system is asked to block an area that is subject to one reorganization. At this time, if it is necessary to perform one reorganization process on a plurality of areas at once, blockage of all these areas is required.

次に、再編成開始時刻を求め(ステップ902)、再編
成処理を実施する(ステップ903)。再編成終了時刻
を求めた後(ステップ904) 、閉塞していた領域の
解除を、データベース管理システム105に求める(ス
テップ905)。
Next, the reorganization start time is determined (step 902), and reorganization processing is performed (step 903). After determining the reorganization end time (step 904), the database management system 105 is requested to release the blocked area (step 905).

その後、第8図に示したステップ804〜805に相当
する再編成対象領域の領域テーブルに、当該再編成情報
を設定する(ステップ906)。当該再編成処理プログ
ラムの起動目的に合った全領域の再編成が実施された否
かを判定しくステップ907)、未実施のものがあれば
ステップ901以降を実施し、すべて実施済みなら、当
該処理を終了する。
Thereafter, the reorganization information is set in the area table of the reorganization target area corresponding to steps 804 to 805 shown in FIG. 8 (step 906). It is determined whether or not all areas have been reorganized in accordance with the startup purpose of the reorganization processing program (Step 907). If there are any areas that have not been reorganized, steps 901 and subsequent steps are performed; if all have been performed, the relevant processing is performed. end.

以下、上述の如く構成された本実施例の動作を説明する
The operation of this embodiment configured as described above will be explained below.

第10図はデータベース障害回復の動作を示すフローチ
ャートである。前記データベース管理システム105は
、データベースアクセス時に、データベースの障害を検
知する(ステップ1001)と、障害が発生した媒体に
含まれる全領域識別子を、前記データベース定義ファイ
ル111内のデータベース定義から特定しくステップ1
002)だ後、ステップ1003で、前記データベース
障害回復プログラム107を起動する。なお、データベ
ース障害の発生やその回復の終了時に、コンソール等を
介して利用者に通知する点は、従来と同様である。
FIG. 10 is a flowchart showing the operation of database failure recovery. When the database management system 105 detects a database failure during database access (step 1001), the database management system 105 specifies all area identifiers included in the medium in which the failure has occurred from the database definition in the database definition file 111.
002), the database failure recovery program 107 is started in step 1003. Note that, as in the past, the system notifies the user via the console or the like when a database failure occurs or when the recovery is completed.

上記データベース障害回復プログラム107の処理概要
を第11図に基づいて説明する。
An overview of the processing of the database failure recovery program 107 will be explained based on FIG. 11.

データベース障害回復プログラム107は、起動される
と、データベース障害の発生した領域の領域テーブルを
、領域テーブルファイル110から読込む(ステップ1
101)。回復対象の領域識別子を、前記コンソール1
13に表示して、データベースシステムの運用管理者に
知らせる。その後、複写データと更新履歴データとが、
データベース管理システムからアクセスできるようにに
なるまで待つ(ステップ1102)、ステップ1103
では、当該領域テーブル内の再編成回数が初期値か否か
を判定し、初期値でなければステップ1108以降を実
施する。
When started, the database failure recovery program 107 reads the area table of the area where the database failure has occurred from the area table file 110 (step 1).
101). The area identifier to be recovered is sent to the console 1.
13 to notify the database system operations manager. After that, the copy data and update history data are
Wait until it can be accessed from the database management system (step 1102), step 1103
Then, it is determined whether the number of reorganizations in the area table is the initial value, and if it is not the initial value, steps 1108 and subsequent steps are executed.

また、初期値であれば、前記更新履歴データファイル1
09から、第4図401に示すデータベース更新時刻が
、バックアップ開始時刻以降の更新履歴データを読込む
(ステップ1104)。該当データが存在するか否かを
判定しくステップ1105)、存在しなければステップ
1107以降を実施し、存在すれば当該更新履歴データ
を複写データに反映させた後(ステップ1106)、ス
テップ1104以降を実施する。
In addition, if it is the initial value, the update history data file 1
09, the database update time shown in FIG. 4 401 reads update history data after the backup start time (step 1104). It is determined whether or not the corresponding data exists (step 1105), and if it does not exist, steps 1107 and subsequent steps are performed. If the data exists, the update history data is reflected in the copy data (step 1106), and then steps 1104 and subsequent steps are performed. implement.

ステップ1107では、データベース障害自動回復対象
の領域が他に存在するか否かを癲定し、存在しなければ
処理を終了し、存在すればステップ1101以降を実施
する。
In step 1107, it is determined whether or not another area subject to automatic database failure recovery exists. If not, the process ends; if it exists, steps 1101 and subsequent steps are executed.

一方、ステップ1108では、カウンタIに1を設定後
、第I番目の再編成開始時刻までの更新履歴データを読
込む(ステップ1109)、ステップ1110では該当
データが存在するか否かを判定し、存在しなければステ
ップ1112以降を実施し、存在すれば当該更新履歴デ
ータを複写データに反映させた後(ステップ1111)
、ステップ1109以降を実施する。
On the other hand, in step 1108, after setting the counter I to 1, update history data up to the I-th reorganization start time is read (step 1109), and in step 1110, it is determined whether or not the corresponding data exists, If it does not exist, execute steps 1112 onwards; if it does exist, reflect the update history data in the copy data (step 1111)
, execute steps 1109 and subsequent steps.

ステップ1112では、第3図に205で示した第I番
目の再編成内容に基づき、再編成を行う。
In step 1112, reorganization is performed based on the I-th reorganization contents shown at 205 in FIG.

次に、第1+1番目の再編成が実施されているか否かを
判定しくステップ1113)、実施されていれば上記力
ウンタエに1を加算後(ステップ1117)、ステップ
1119以降を実施する。再編成が実施されていなけれ
ば、第I番目の再編成終了時刻以降の更新履歴データを
読込む(ステップ1114)。該当データが存在するか
否かを判定しくステップ1115)、存在しなければス
テップ1117以降を実施し、存在すれば当該更新履歴
データを複写データに反映させた後(ステップ1116
)、ステップ1114以降を実施する。
Next, it is determined whether or not the 1st+1st reorganization has been carried out (step 1113), and if it has been carried out, 1 is added to the force untae (step 1117), and then steps 1119 and subsequent steps are carried out. If reorganization has not been performed, update history data after the I-th reorganization end time is read (step 1114). It is determined whether or not the corresponding data exists (step 1115). If the data does not exist, steps 1117 and subsequent steps are performed. If the data exists, the update history data is reflected in the copy data (step 1116).
), steps 1114 and subsequent steps are performed.

上記各ステップ1106,1111,1116における
更新履歴データの複写データへの反映処理内容を、第1
2図に基づいて説明する。
The contents of the process of reflecting the update history data to the copy data in each of the above steps 1106, 1111, and 1116 are described in the first step.
This will be explained based on FIG.

ステップ1201では、第4図に示した更新履歴データ
の更新時刻401が、第3図に202.203で示した
バックアップの開始・終了時刻の間であるか否かを判定
し、バックアップ中でなければステップ1204以降を
実施する。バックアップ中であれば、複写データと更新
前データとが一致しているか否かを判定しくステップ1
202)、不一致ならば更新後に複写データが取られて
いるため、その更新B暦データを無視する。一致してい
れば複写データに更新履歴データを重ね書きする(ステ
ップ1203)。
In step 1201, it is determined whether the update time 401 of the update history data shown in FIG. 4 is between the backup start and end times shown at 202 and 203 in FIG. For example, step 1204 and subsequent steps are executed. If a backup is in progress, check whether the copied data and the pre-update data match or not in step 1.
202), if there is a mismatch, the updated B calendar data is ignored because the copied data has been taken after the update. If they match, the update history data is overwritten on the copy data (step 1203).

ステップ1204では、ステップ1202におけると同
様に、複写データと更新摩データとが一致しているか否
かを判定し、不一致ならば不適当な更新履歴データが含
まれていたとして、エラー処理を行い(ステップ120
5)、処理を終了する。一致していなければ、ステップ
1203以降を実施する。
In step 1204, as in step 1202, it is determined whether the copy data and the update data match or not. If they do not match, it is assumed that inappropriate update history data is included, and error processing is performed ( Step 120
5) End the process. If they do not match, step 1203 and subsequent steps are executed.

第11図に示した実施例においては、データベース障害
自動回復処理の中で実行される再編成処理が回復対象の
領域毎に行える場合を示したが、以下、自動回復処理で
実行される再編成処理が、例えば、インデックス領域と
データ領域に代表されるように、複数の領域を同時に対
象とする場合の実施例を第13図、第14図に基づいて
説明する。
In the embodiment shown in FIG. 11, a case has been shown in which the reorganization processing executed during the database failure automatic recovery processing can be performed for each area to be recovered. An embodiment in which the processing targets a plurality of areas at the same time, such as an index area and a data area, will be described with reference to FIGS. 13 and 14.

ステップ1301では、データベース障害の発生した領
域の領域テーブルを、領域テーブルファイルから読込む
。その領域識別子を第2図のコンソール113に表示し
て、データベースシステムの運用管理者に知らせる。そ
して、複写データと更新履歴データとがデータベース管
理システムからアクセスできるようになるまで待つ(ス
テップ1302)。
In step 1301, the area table of the area where the database failure has occurred is read from the area table file. The area identifier is displayed on the console 113 in FIG. 2 and notified to the database system operations manager. Then, it waits until the copy data and update history data can be accessed from the database management system (step 1302).

ステップ1303では、当該領域テーブル内の再編成回
数が初期値か否かを判定し、初期値でなければ再編成を
含む回復処理を行った(ステップ1308)後、ステッ
プ1307以降を実施する。初期値であればバックアッ
プ開始時刻以降の更新履歴データを読込む(ステップ1
304)、該当データが存在するか否かを判定しくステ
ップ1305)、存在すれば当該更新履歴データを複写
データに反映(ステップ1306)した後、ステップ1
304以降を実施する。存在しなければ、データベース
障害回復されていない他の領域が存在するか否かを判定
しくステップ1307)、存在すればステップ1304
以降を実施し、存在しなければ当該プログラムの処理を
終了する。
In step 1303, it is determined whether the number of reorganizations in the area table is the initial value, and if it is not the initial value, recovery processing including reorganization is performed (step 1308), and then steps 1307 and subsequent steps are performed. If it is the initial value, read the update history data after the backup start time (Step 1)
304), it is determined whether the corresponding data exists or not (Step 1305), and if it exists, the update history data is reflected in the copy data (Step 1306), and then Step 1
Execute steps 304 onwards. If it does not exist, it is determined whether there is another area that has not been recovered from the database failure (step 1307); if it exists, step 1304)
Perform the following steps, and if the program does not exist, terminate the processing of the program.

第13図のステップ1308の処理内容を、第14図に
基づいて説明する。
The processing contents of step 1308 in FIG. 13 will be explained based on FIG. 14.

ステップ1401では、カウンタIに1を設定後、領域
テーブル中の第1番目の再編成内容205から再編成を
同時に行う必要のある領域を特定した後(ステップ14
02)、領域テーブル内の第1番目の再編成開始時刻2
06までの更新履歴データを読込む(ステップ1403
)。該当データが存在するか否かを判定しくステップ1
404)、存在すれば当該更新B暦データを複写データ
に反映した後(ステップ1405)、ステップ1403
以降を実施する。存在しなければ、再編成を同時に行う
必要のある領域が他に存在するか否かを判定しくステッ
プ1406)、存在しなければステップ1410以降を
実施し、存在すれば当該領域の領域テーブルが既に読込
まれているか否かを判定する(ステップ1407)。読
込み済みであれば、ステップ1409以降を実施し、読
込まれていなければ当該領域テーブルを、前記領域テー
ブルファイル110から読込む(ステップ1408)。
In step 1401, after setting the counter I to 1, areas that need to be reorganized simultaneously are identified from the first reorganization content 205 in the area table (step 14
02), first reorganization start time 2 in area table
Read update history data up to 06 (step 1403
). Step 1: Determine whether the relevant data exists or not.
404), if it exists, the updated B calendar data is reflected in the copy data (step 1405), and then step 1403
Perform the following steps. If it does not exist, it is determined whether there is another area that needs to be reorganized at the same time (step 1406). If it does not exist, steps 1410 and subsequent steps are executed, and if it exists, the area table for the area is already set. It is determined whether or not it has been read (step 1407). If the area table has been read, steps 1409 and subsequent steps are executed, and if the area table has not been read, the area table is read from the area table file 110 (step 1408).

その後、当該領域の領域識別子をコンソール113に表
示後、複写データや更新履歴データがアクセス可能にな
るまで待つ(ステップ1409)。アクセス可能になっ
たら、ステップ1403以降を実施する。
Thereafter, after displaying the area identifier of the area on the console 113, the process waits until the copy data and update history data become accessible (step 1409). Once access is possible, steps 1403 and subsequent steps are performed.

ステップ1410では、第3図に示した第I番目の再編
成内容205に基づき再編成を行う。その後、領域テー
ブル内の再編成回数がI+1より小さいか否かを判定し
くステップ1411)、小さくなければカウンタエに1
を加算した後(ステップ1415)、ステップ1402
以降を実施する。小さければ、領域テーブル内の第I番
目の再編成終了時刻207以降の更新履歴データを読込
む(ステップ1412)、該当データが存在するか否か
を判定しくステップ1413)、存在すれば当該更新履
歴データを複写データに反映(ステップ1414)後、
ステップ1412以降を実施する。存在しなければ、処
理を終了する。
In step 1410, reorganization is performed based on the I-th reorganization content 205 shown in FIG. After that, it is determined whether the number of reorganizations in the area table is smaller than I+1 (step 1411), and if it is not, 1 is added to the counter.
After adding (step 1415), step 1402
Perform the following steps. If it is smaller, the update history data after the I-th reorganization end time 207 in the area table is read (step 1412), it is determined whether the corresponding data exists or not (step 1413), and if it exists, the update history data is read. After reflecting the data in the copy data (step 1414),
Step 1412 and subsequent steps are performed. If it does not exist, the process ends.

なお、第13図のステップ1306および第14図のス
テップ1405.1414の処理の詳細は、既に第12
図に示した。
Note that the details of the processing in step 1306 in FIG. 13 and steps 1405 and 1414 in FIG.
Shown in the figure.

次に、本発明の他の実施例を説明する。Next, another embodiment of the present invention will be described.

以下に説明する実施例は、特許請求の範囲第3項に対応
するものであり、システムの全体構成や領域テーブル、
更新履歴データの構成は、前出の第2図〜第4図に示し
たものと同様である。
The embodiment described below corresponds to claim 3, and includes the overall system configuration, area table,
The configuration of the update history data is similar to that shown in FIGS. 2 to 4 above.

本実施例においては、複写データファイル108の各領
域対応の複写データ内に、その複写データ開始時刻を設
定する場所を設けている。第15図にその具体的構成例
を示した。第15図は、データベース領域を更に分割し
た管理単位ページ群中、先頭のものの中に複写データ開
始時刻を設定する場所を設けた例である。なお、本発明
は、データベース領域の中の管理方法や複写データ開始
時刻の設定場所には依存するものではなく、データベー
ス障害回復時、該当複写データがいつ取得されたかが求
められれば良い。
In this embodiment, a place is provided in the copy data corresponding to each area of the copy data file 108 to set the copy data start time. FIG. 15 shows a specific example of the configuration. FIG. 15 is an example in which a place for setting the copy data start time is provided in the first page among a group of management unit pages obtained by further dividing the database area. Note that the present invention does not depend on the management method in the database area or the setting location of the copy data start time, but it is sufficient to determine when the relevant copy data was acquired at the time of database failure recovery.

また、第2図に示したデータベース初期化プログラム1
06.再編成処理プログラム104の処理内容は、それ
ぞれ、前出の第5図、第8図および第9図と同様である
In addition, the database initialization program 1 shown in FIG.
06. The processing contents of the reorganization processing program 104 are the same as those shown in FIGS. 5, 8, and 9, respectively.

まず、本実施例におけるバックアップ処理プログラム1
03の処理内容について、第16図に基づいて説明する
。本図に示す処理においては、前出の実施例における第
6図に示した処理に加えて、複写データに複写データの
取得開始時刻を埋込むための処理(ステップ1504)
が、複写データを、複写データファイルに書込む処理(
ステップ1505)の前に追加される。
First, backup processing program 1 in this embodiment
The processing contents of step 03 will be explained based on FIG. In the process shown in this figure, in addition to the process shown in FIG. 6 in the previous embodiment, a process for embedding the copy data acquisition start time in the copy data (step 1504)
is the process of writing the copy data to the copy data file (
is added before step 1505).

同様に、前出の実施例における第7図に示した処理に相
当する処理内容について、第17図に基づいて説明する
。本図に示す処理においては、第7図に示した処理に加
えて、複写データにバックアップ開始時刻を埋込むため
の処理(ステップ1605)が、複写データを、複写デ
ータファイルに書込む処理(ステップ1606)の前に
追加される。
Similarly, processing contents corresponding to the processing shown in FIG. 7 in the above-mentioned embodiment will be explained based on FIG. 17. In the process shown in this figure, in addition to the process shown in FIG. 1606).

次に、データベース障害回復方法について、特許請求の
範囲第1項および第2項に対応する前記実施例との対比
で説明する。
Next, a database failure recovery method will be explained in comparison with the above embodiments corresponding to claims 1 and 2.

第11図に示した、データベース障害回復プログラム1
07の処理に対応するについて、第18図に基づいて説
明する0本図に示す処理においては、第11図に示した
処理に加えて、ステップ1702で、複写データや更新
履歴データがアクセス可能になるまで待った後、アクセ
ス可能になった複写データ内のバックアップ開始時刻が
、当該領域に関する第3図の領域テーブル内のバックア
ップ開始時刻202と一致していることを判定しくステ
ップ1703)た後、一致していればステップ1705
以降を実施し不一致ならば、適正な複写データを要求す
るメツセージをコンソールに表示して、アクセス可能に
なるまで待ち(ステップ1704)、次に、再度、ステ
ップ1703以降を実施する処理を追加する。
Database failure recovery program 1 shown in Figure 11
07 will be explained based on FIG. 18. In the process shown in this figure, in addition to the process shown in FIG. 11, copy data and update history data are made accessible in step 1702. After waiting until 1703), it is determined that the backup start time in the copy data that has become accessible matches the backup start time 202 in the area table of FIG. 3 regarding the area. If yes, step 1705
If the following steps are performed and there is a mismatch, a message requesting proper copy data is displayed on the console, the process waits until access becomes possible (step 1704), and then processing is added to perform steps 1703 and subsequent steps again.

第18図に示すステップ1708.1713.1718
の詳細な処理内容は、先に第12図に示したと同様であ
る。
Steps 1708.1713.1718 shown in FIG.
The detailed processing contents are the same as shown in FIG. 12 above.

前記実施例における、第13図に相当する処理内容につ
いて、第19図に基づいて説明する。
The processing contents corresponding to FIG. 13 in the embodiment will be explained based on FIG. 19.

本図に示す処理においては、第13図に示した処理に加
えて、複写データや更新履歴データがアクセス可能にな
るまで待った後(ステップ1802)、アクセス可能に
なった複写データ内のバックアップ開始時刻が、当該領
域テーブルに関する第3図の領域テーブル内のバックア
ップ開始時刻202と一致していることを判定しくステ
ップ1803)、一致していればステップ1805以降
を実施し、不一致ならば、適正な複写データを要求する
メツセージをコンソールに表示して1次の複写データが
アクセス可能になるまで待ち(ステップ1804)、再
度、ステップ1803以降を実施する処理を追加する。
In the process shown in this figure, in addition to the process shown in FIG. 13, after waiting until the copy data and update history data become accessible (step 1802), the backup start time in the copy data that has become accessible is determined. It is determined that the backup start time 202 in the area table shown in FIG. A message requesting data is displayed on the console, the process waits until the primary copy data becomes accessible (step 1804), and the process of performing step 1803 and subsequent steps is added again.

前記実施例における、第14図に相当する処理内容につ
いて、第20図に基づいて説明する。
The processing contents corresponding to FIG. 14 in the embodiment will be explained based on FIG. 20.

本図に示す処理においては、第14図に示した処理に加
えて、複写データや更新履歴データがアクセス可能にな
るまで待った後(ステップ1909)、アクセス可能に
なった複写データ内のバックアップ開始時刻が、当該領
域テーブルに関する第3図の領域テーブル内のバックア
ップ開始時刻202と一致していることを判定しくステ
ップ1910)、一致していればステップ1903以降
を実施し、不一致ならば、適正な複写データを要求する
メツセージをコンソールに表示して、次の複写データが
アクセス可能になるまで待ち(ステップ1911)、再
度、ステップ1910以降を実施する処理を追加する。
In the process shown in this figure, in addition to the process shown in FIG. 14, after waiting until the copy data and update history data become accessible (step 1909), the backup start time in the copy data that has become accessible is It is determined that the backup start time 202 in the area table shown in FIG. A message requesting data is displayed on the console, the process waits until the next copy data becomes accessible (step 1911), and the process of performing step 1910 and subsequent steps is added again.

なお、第19図のステップ1808.第20図の1.9
05゜1916の詳細な処理内容は、既に第12図に示
した。
Note that step 1808 in FIG. 1.9 in Figure 20
The detailed processing contents of 05°1916 have already been shown in FIG.

次に、本発明の他の実施例を説明する。Next, another embodiment of the present invention will be described.

以下に説明する実施例は、特許請求の範囲第4項に対応
するものであり、システムの全体構成は第21図に示す
通りである。図において、2001はプロセッサ、20
02は主記憶装置を示し、2003はバックアップ処理
プログラム、2004は再編成処理プログラム、200
5はデータベース処理システム、2006はデータベー
ス初期化プログラム、 2007はデータベース障害回
復プログラム、また、2008は媒体管理ファイル、2
010は領域テーブルファイル、2011はデータベー
ス定義ファイル、2012はデータベース、2009は
複写データや更新履歴データを格納した媒体の保管装置
、2013はデータベース障害の発生やその自動回復中
、終了等を利用者に伝えるためのコンソールを示してい
る。
The embodiment described below corresponds to claim 4, and the overall system configuration is as shown in FIG. 21. In the figure, 2001 is a processor, 20
02 indicates a main storage device, 2003 a backup processing program, 2004 a reorganization processing program, 200
5 is a database processing system, 2006 is a database initialization program, 2007 is a database failure recovery program, and 2008 is a media management file;
010 is an area table file, 2011 is a database definition file, 2012 is a database, 2009 is a storage device for media that stores copy data and update history data, and 2013 is a message that informs the user of the occurrence of a database failure, its automatic recovery, termination, etc. Shows a console for communicating.

上記媒体保管装置2009内の更新履歴データ情報の構
成は、前述の実施例に示したと同様である。
The configuration of the update history data information in the medium storage device 2009 is the same as that shown in the previous embodiment.

また、上記媒体保管装置2009内の複写データは、上
述の実施例に示したと同様の、バックアップ開始時刻を
含むものとする。
Further, it is assumed that the copy data in the medium storage device 2009 includes a backup start time similar to that shown in the above embodiment.

上記領域テーブルファイル2010の構成を第22図に
示す。図中、2101は領域を特定するための領域識別
子、2102はバックアップ開始時刻、2103はバッ
クアップ終了時刻、2104は複写データが格納されて
いる媒体を特定するためのバックアップ媒体識別子、2
105はバックアップ媒体の接続情報、また、2106
は再編成回数、2107は再編成内容を示す情報であり
、これらにより再編成を実行できるものとする。なお、
当該領域と他の領域とが、同時に再編成の対象として処
理される場合には、相手のトイ識別子を含むものとする
The structure of the area table file 2010 is shown in FIG. 22. In the figure, 2101 is an area identifier for specifying an area, 2102 is a backup start time, 2103 is a backup end time, 2104 is a backup medium identifier for specifying a medium on which copy data is stored, 2
105 is backup medium connection information, and 2106
is the number of times of reorganization, and 2107 is information indicating the contents of reorganization, and it is assumed that the reorganization can be executed based on these. In addition,
When this area and another area are processed as reorganization targets at the same time, the other area's toy identifier shall be included.

2108は再編成の開始時刻、2109は再編成の終了
時刻、2110は更新履歴データが格納されている媒体
を特定するための更新履歴データ媒体識別子、2111
は更新履歴データ媒体の接続情報である。これらの情報
のうち、再編成内容2107.再編成の開始時刻210
8 、再編成の終了時刻2109は、再編成回数210
6の組だけ存在する。また、バックアップ媒体識別子2
104 、バックアップ媒体の接続情報2105はおよ
び更新履歴データ媒体識別子2110.更新履歴データ
媒体の接続情報2111の各組は、媒体の数だけ存在す
る。
2108 is a reorganization start time, 2109 is a reorganization end time, 2110 is an update history data medium identifier for identifying the medium in which update history data is stored, 2111
is the connection information of the update history data medium. Among these pieces of information, reorganization content 2107. Reorganization start time 210
8, the reorganization end time 2109 is the number of reorganizations 210
Only 6 pairs exist. Also, backup media identifier 2
104 , backup medium connection information 2105 and update history data medium identifier 2110 . Each set of connection information 2111 for update history data media exists as many as there are media.

なお、前記媒体の保管装置2009は、複写データや更
新履歴データを格納した媒体の保管装置で、言わば、自
動倉庫の如きものであり、通常は、直接その媒体内のデ
ータにアクセスできないオフライン状態で管理される。
Note that the media storage device 2009 is a storage device for media that stores copy data and update history data, and is like an automated warehouse, and is usually in an offline state where data on the media cannot be accessed directly. managed.

当該装置は、媒体を特定する情報と、それをアクセス可
能にすることを要求する信号とを受取ると、その媒体を
アクセス可能なオンライン状態にするものとする。
Upon receiving information identifying the medium and a signal requesting to make it accessible, the device shall bring the medium into an accessible online state.

また、媒体管理ファイル2008は、複写データや更新
履歴データを格納する媒体の管理情報ファイルであり、
その1媒体に対する媒体情報テーブルの構成例を、第2
3図に示す。図中、2201は媒体を特定するための媒
体識別子、2202は媒体の使用・未使用を示す情報、
2203は媒体が即アクセス可能な状態でCPUと接続
されているか否かを示す接続情報である。本実施例にお
いては、媒体が媒体保管装置2009にある場合には、
即アクセス不可の状態であるとして、通常の即アクセス
可能な外部記憶装置と区別している。
Further, the medium management file 2008 is a management information file for a medium that stores copy data and update history data.
The configuration example of the media information table for that one medium is shown in the second section.
Shown in Figure 3. In the figure, 2201 is a medium identifier for identifying the medium, 2202 is information indicating whether the medium is used or not,
Connection information 2203 indicates whether the medium is connected to the CPU in an immediately accessible state. In this embodiment, when the medium is in the medium storage device 2009,
It is distinguished from a normal external storage device that can be accessed immediately because it cannot be accessed immediately.

なお、データベース初期化プログラム2006 、再編
成処理プログラム2004はの処理内容は、前出の第5
図、第8図および第9図と同様である。
Note that the processing contents of the database initialization program 2006 and the reorganization processing program 2004 are as described in the fifth section above.
8 and 9.

また、バックアップ処理プログラム2003の、前述の
実施例における第16図に対応する処理内容について、
第24図に基づいて説明する。本実施例におけるバック
アップ処理プログラム2003の処理においては、第1
6図に示した処理に先立ち、保管装置2009内の、複
写データを格納する媒体をアクセス可能にする処理(ス
テップ2301)が実施される。第16図のステップ1
505に対応する処理2306は、複写データの書込み
先が、ステップ23o1でアクセス可能になった複写デ
ータの格納媒体となる。
Further, regarding the processing contents of the backup processing program 2003 corresponding to FIG. 16 in the above-mentioned embodiment,
This will be explained based on FIG. 24. In the processing of the backup processing program 2003 in this embodiment, the first
Prior to the process shown in FIG. 6, a process (step 2301) is performed to make the medium in the storage device 2009 that stores the copy data accessible. Step 1 in Figure 16
In process 2306 corresponding to step 505, the write destination of the copy data becomes the copy data storage medium that became accessible in step 23o1.

第16図のステップ1507に対応する処理23o8に
おいては、バックアップ開始・終了時刻に加えて、バッ
クアップ媒体に関する情報として、媒体識別子、接続情
報が設定される。同様に、第16図のステップ1508
に対応する処理23o9では、再編成に関する情報に加
えて、更新履歴データの格納媒体情報が初期化される。
In process 23o8 corresponding to step 1507 in FIG. 16, in addition to backup start and end times, a medium identifier and connection information are set as information regarding the backup medium. Similarly, step 1508 in FIG.
In process 23o9 corresponding to , in addition to information regarding reorganization, storage medium information for update history data is initialized.

更に、第16図に示した処理の終了後に、複写データ格
納媒体を保管装置2009に納める処理(ステップ23
11)が実施される。
Furthermore, after the process shown in FIG.
11) is implemented.

上記ステップ2301の詳細な処理内容を、第25図に
基づいて説明する。
The detailed processing contents of step 2301 will be explained based on FIG. 25.

ステップ2401では、第21図に示した媒体管理ファ
イル2008内から、未使用媒体の媒体情報テーブルを
読込み、ステップ2402で、第23図に示す媒体情報
テーブルの媒体使用情報22o2を使用状態にした後、
ステップ2403で、媒体管理ファイルに格納する。次
に、第21図の媒体保管装置内の当該媒体識別子に対応
する媒体を、アクセス可能状態にする(ステップ240
4)。
In step 2401, the medium information table of an unused medium is read from the medium management file 2008 shown in FIG. 21, and in step 2402, the medium usage information 22o2 of the medium information table shown in FIG. 23 is set to the used state. ,
In step 2403, it is stored in a media management file. Next, the medium corresponding to the medium identifier in the medium storage device of FIG. 21 is made accessible (step 240
4).

同様に、第17図に相当する処理について、第26図に
基づいて説明する。
Similarly, the process corresponding to FIG. 17 will be explained based on FIG. 26.

本図に示す処理においては、第17図に示した処理に加
えて、複写データの格納媒体をアクセス可能にする処理
(ステップ2502)が、当該バックアップ開始時刻を
求める前に追加される。また、当該領域の領域テーブル
設定時に、バックアップ開始・終了時刻に加えて、複写
データ媒体識別子を設定する(ステップ2508)、第
17図のステップ1606に対応する処理2507は、
複写データの書込み先が、ステップ2502でアクセス
可能になった複写データの格納媒体となる。また、第2
4図ステップ2308 。
In the process shown in this figure, in addition to the process shown in FIG. 17, a process for making the copy data storage medium accessible (step 2502) is added before determining the backup start time. Furthermore, when setting the area table for the area, a copy data medium identifier is set in addition to the backup start/end time (step 2508), a process 2507 corresponding to step 1606 in FIG.
The copy data write destination becomes the copy data storage medium that became accessible in step 2502. Also, the second
Figure 4 step 2308.

2309と同様に、ステップ2508.2509におい
て、領域テーブルの再設定を行う。
Similarly to 2309, in steps 2508 and 2509, the area table is reset.

更に、バックアップ対象領域について、すべてバックア
ップを取得したが否かを判定する前に。
Furthermore, before determining whether all the backup target areas have been backed up.

複写データの格納媒体を保管装置2009に納める処理
(ステップ2510)が実施される。
Processing (step 2510) of storing the copy data storage medium in the storage device 2009 is performed.

第26図のステップ2502の詳細な処理内容は、第2
5図と同様である。
The detailed processing content of step 2502 in FIG.
This is the same as Figure 5.

次に、データベースの障害回復方法について説明する。Next, a database failure recovery method will be explained.

第21図に示すデータベース管理システム2005が障
害を検知してからの処理内容は、前述の実施例に対する
第10図と同様である。なお、データベース・サービス
中に、データベース管理システム2005により、デー
タベースの更新履歴データを外部記憶装置に格納する処
理は、第27図に示す通りである。
The processing contents after the database management system 2005 detects a failure shown in FIG. 21 are the same as those shown in FIG. 10 for the above-described embodiment. Note that the process of storing database update history data in an external storage device by the database management system 2005 during database service is as shown in FIG.

ステップ2601では、データベース・サービス開始時
にアクセスされる領域の領域テーブルが、領域テーブル
ファイルから読込まれる。次に、ステップ2602では
、更新履歴データを格納する媒体が決まっていることを
判定し、決まっていればステップ2609以降を実施し
、決まっていなければ媒体情報テーブルが、媒体管理フ
ァイル2008から読込まれているか否かを判定する(
ステップ2603)。読込まれていればステップ260
5以降を実施し、読込まれていなければ、媒体管理ファ
イルから媒体情報テーブルを読込む(ステップ2604
)。
In step 2601, the area table of the area accessed when starting the database service is read from the area table file. Next, in step 2602, it is determined whether the medium in which the update history data is to be stored has been determined. If the medium has been determined, steps 2609 and subsequent steps are executed; if not, the medium information table is read from the medium management file 2008. (
Step 2603). If it is loaded, step 260
5 and subsequent steps, and if the media information table has not been read, the media information table is read from the media management file (step 2604).
).

ステップ2605では、第23図に示した媒体使用情報
2202が、未使用状態であることを示す媒体を選んで
、その媒体の媒体使用情報を使用状態とする(ステップ
2606)、次に、ステップ2607では、その媒体の
接続情報2203が、即アクセス可能状態であるか否か
を判定し、即アクセス可能状態であればステップ260
9以降を実施し、アクセス可能状態にする必要がある場
合には、第21図の媒体保管装置2009に信号を送り
、当該媒体をアクセス可能状態にする(ステップ260
8)。
In step 2605, a medium is selected whose medium usage information 2202 shown in FIG. Then, it is determined whether the connection information 2203 of the medium is in an immediately accessible state, and if it is in an immediately accessible state, step 260 is performed.
If steps 9 and subsequent steps are performed and it is necessary to make the medium accessible, a signal is sent to the medium storage device 2009 in FIG. 21 to make the medium accessible (step 260).
8).

ステップ2609では、更新履歴データが対象とする全
領域について、それらの領域テーブルの履歴データ媒体
識別子2110(第22図参照)とその接続情報211
1を媒体情報として設定する。但し、同一媒体が既に設
定されている場合には、設定しない。
In step 2609, the history data medium identifier 2110 (see FIG. 22) of the area table and its connection information 211 are checked for all areas covered by the update history data.
Set 1 as the medium information. However, if the same medium has already been set, do not set it.

次に、データベース障害回復プログラム2007の処理
概要を、第28図に基づいて説明する。
Next, an overview of the processing of the database failure recovery program 2007 will be explained based on FIG. 28.

本プログラムは、起動されると、データベース障害の発
生した領域の領域テーブルを、領域テーブルファイルか
ら読込む(ステップ2701)。次に、回復対象の領域
に対する複写データの格納された全媒体を、領域テーブ
ル内のバックアップ媒体識別子2104から求め、その
接続情報に基づき、当該媒体をアクセス可能状態にする
(ステップ2702)。
When this program is started, it reads the area table of the area where the database failure has occurred from the area table file (step 2701). Next, all the media storing the copy data for the area to be recovered are determined from the backup medium identifier 2104 in the area table, and the media are made accessible based on the connection information (step 2702).

次に、ステップ2703で、複写データ内に埋込まれた
バックアップ開始時刻と、領域テーブル内のバックアッ
プ開始時刻が一致しているか否かを検証し、一致してい
ればステップ2704以降を実施する。また、不一致な
らば、ステップ2720でエラー処理をして、当該処理
を終了する。
Next, in step 2703, it is verified whether the backup start time embedded in the copy data matches the backup start time in the area table, and if they match, steps 2704 and subsequent steps are executed. If there is a mismatch, error processing is performed in step 2720, and the processing is ended.

ステップ2704では、当該領域テーブル内の再編成回
数が初期値か否かを判定し、初期値でなければステップ
2709以降を実施する。初期値ならば、更新履歴デー
タを格納した全媒体を、領域テーブル内の更新履歴媒体
識別子2110から求め、その接続情報2111に基づ
き、当該媒体をアクセス可能にする(ステップ2705
)、次に、バックアップ開始時刻以降の更新時刻を持つ
更新履歴データを読込む(ステップ2706)。該当デ
ータが存在するか否かを判定しくステップ2707)、
存在しなければステップ2719以降を実施し、存在す
れば当該更新履歴データを複写データに反映させた後(
ステップ2708)、ステップ2706に戻る。
In step 2704, it is determined whether the number of reorganizations in the area table is the initial value, and if it is not the initial value, steps 2709 and subsequent steps are executed. If it is the initial value, all media storing update history data are found from the update history medium identifier 2110 in the area table, and the medium is made accessible based on the connection information 2111 (step 2705
), then update history data having an update time after the backup start time is read (step 2706). Step 2707) to determine whether or not the corresponding data exists;
If it does not exist, execute step 2719 and subsequent steps, and if it does exist, after reflecting the update history data in the copy data (
Step 2708), return to step 2706.

ステップ2719では、データベース障害自動回復対象
の領域が他に存在するか否かを判定し、存在しなければ
処理を終了し、存在する場合には、ステップ2701に
戻る。
In step 2719, it is determined whether or not another area subject to automatic database failure recovery exists. If not, the process ends; if it exists, the process returns to step 2701.

一方、ステップ2709では、カウンタエに1を設定後
、第1番目の再編成開始時刻までの更新履歴データを読
込む(ステップ2710)。該当データが存在するか否
かを判定しくステップ2711)、存在しなければステ
ップ2713以降を実施し、存在する場合には、当該更
新履歴データを複写データに反映させた後(ステップ2
712)、ステップ2710に戻る。ステップ2713
では、第22図に2107で示した第I番目の再編成内
容に基づき、再編成を行う。
On the other hand, in step 2709, after setting the counter to 1, update history data up to the first reorganization start time is read (step 2710). It is determined whether or not the corresponding data exists (step 2711), and if it does not exist, steps 2713 and subsequent steps are performed. If the data exists, the update history data is reflected in the copy data (step 2711).
712), return to step 2710. Step 2713
Now, reorganization is performed based on the I-th reorganization contents shown at 2107 in FIG.

次に、第1+1番目の再編成が実施されているか否かを
判定しくステップ2714) 、実施されていればカウ
ンタエに1を加算した後(ステップ2715)、ステッ
プ2710に戻る。再編成が実施されていなければ、第
I番目の再編成終了時刻以降の更新履歴データを読込み
(ステップ2716)、該当データが存在するか否かを
判定しくステップ2717)、存在しなければステップ
2719以降を実施し、存在する場合には、当該更新履
歴データを複写データに反映させた後(ステップ271
B)、ステップ2716に戻る。
Next, it is determined whether or not the 1st+1st reorganization has been carried out (step 2714). If it has been carried out, 1 is added to the counter (step 2715), and then the process returns to step 2710. If reorganization has not been carried out, the update history data after the I-th reorganization end time is read (step 2716), and it is determined whether the corresponding data exists (step 2717); if not, step 2719). After performing the following steps, and if the update history data exists, the update history data is reflected in the copy data (step 271).
B), return to step 2716.

第28図のステップ2708,2712,2718にお
ける更新履歴データの複写データへの反映処理内容は、
先に第12図に示したと同様である。
The contents of the process of reflecting the update history data to the copy data in steps 2708, 2712, and 2718 in FIG. 28 are as follows.
This is the same as shown in FIG. 12 above.

上述の、第28図に示した実施例は、データベース障害
自動回復処理の中で実行される再編成処理が、回復対象
の領域毎に行える場合について示した。自動回復処理で
実行される再編成処理が、例えば、インデックス領域と
データ領域に代表されるように複数の領域を同時に対象
とする場合の実施例を、第29図、第30図に基づいて
説明する。
The above-described embodiment shown in FIG. 28 shows a case where the reorganization process executed during the automatic database failure recovery process can be performed for each area to be recovered. An example in which the reorganization process executed in the automatic recovery process targets multiple areas at the same time, such as an index area and a data area, will be described based on FIGS. 29 and 30. do.

ステップ2801では、データベース障害の発生した領
域の領域テーブルを、領域テーブルファイルから読込む
。次に、回復対象の領域に対する複写データの格納され
ている全媒体を、領域テーブル内のバックアップ媒体識
別子2104から求め、その接続情報に基づき、当該媒
体をアクセス可能状態にする(ステップ2802)、次
に、複写データ内に埋込まれたバックアップ開始時刻と
領域テーブル内のバックアップ開始時刻とが一致してい
ることを検証しくステップ2803) 、一致していれ
ばステップ2804以降を実施する。また、一致してい
なければエラー処理をして(ステップ2810)、当該
処理を終了する。
In step 2801, the area table of the area where the database failure has occurred is read from the area table file. Next, all the media on which copy data for the area to be recovered is stored are determined from the backup media identifier 2104 in the area table, and the media is made accessible based on the connection information (step 2802). Next, it is verified that the backup start time embedded in the copy data and the backup start time in the area table match (step 2803), and if they match, steps 2804 and subsequent steps are performed. If they do not match, error processing is performed (step 2810), and the processing ends.

ステップ2804では当該領域テーブル内の再編成回数
が初期値か否かを判定し、初期値でなければ再編成を含
む回復処理を行った後(ステップ2811)、ステップ
2809以降を実施する。初期値であれば更新履歴デー
タを格納した全媒体を領域テーブル内の更新履歴媒体識
別子2110から求め、その接続情報2111に基づき
、当該媒体をアクセス可能にする(ステップ2805)
。次に、バックアップ開始時刻以降の更新履歴データを
読込み(ステップ2806)、該当データが存在するか
否かを判定(ステップ2807)する。存在すれば当該
更新履歴データを複写データに反映させた後(ステップ
2808)、ステップ2806に戻る。また、存在しな
ければ、データベース障害回復されていない他の領域が
存在するか否かを判定しくステップ2809)、存在す
ればステップ2801に戻り、存在しなければ本プログ
ラムの処理を終了する。
In step 2804, it is determined whether the number of reorganizations in the area table is the initial value, and if it is not the initial value, recovery processing including reorganization is performed (step 2811), and then steps 2809 and subsequent steps are performed. If it is the initial value, all media storing update history data are found from the update history medium identifier 2110 in the area table, and the medium is made accessible based on the connection information 2111 (step 2805).
. Next, update history data after the backup start time is read (step 2806), and it is determined whether the corresponding data exists (step 2807). If the update history data exists, the update history data is reflected in the copy data (step 2808), and then the process returns to step 2806. If the database does not exist, it is determined whether there is another area that has not been recovered from the database failure (step 2809); if it exists, the process returns to step 2801; if it does not exist, the processing of this program ends.

第29図に示したステップ2811の処理内容を、第3
0図に基づいて説明する。
The processing contents of step 2811 shown in FIG.
This will be explained based on Figure 0.

ステップ2901では、カウンタ■に1を設定した後、
第22図に示した領域テーブル中の、第I番目の再編成
内容2107から、再編成を同時に行う必要のある領域
を特定した後(ステップ2902)、上記ステップ28
05と同様に、更新履歴データ格納媒体をアクセス可能
状態にする(ステップ2903.)。
In step 2901, after setting the counter ■ to 1,
After identifying the areas that need to be reorganized at the same time from the I-th reorganization content 2107 in the area table shown in FIG. 22 (step 2902), step 28
Similarly to Step 2905, the update history data storage medium is made accessible (step 2903).

次に、第22図に示した領域テーブル内の、第1番目の
再編成開始時刻までの更新履歴データを読込み(ステッ
プ2904)、該当データが存在するか否かを判定しく
ステップ2905)、存在する場合には、当該更新履歴
データを複写データに反映させた後(ステップ2906
)、ステップ2904に戻る。存在しない場合には、再
編成を同時に行う必要のある領域が他に存在するか否か
を判定しくステップ2907)、存在すれば当該領域の
領域テーブルが既に読込まれているか否かを判定する(
ステップ2908)。読込み済みならステップ2910
以降を実施し、読込まれていなければ、当該領域テーブ
ルを領域テーブルファイル2010から読込む(ステッ
プ2909)。
Next, the update history data up to the first reorganization start time in the area table shown in FIG. 22 is read (step 2904), and it is determined whether or not the corresponding data exists. If so, after reflecting the update history data in the copy data (step 2906
), the process returns to step 2904. If it does not exist, it is determined whether there is another area that needs to be reorganized at the same time (step 2907); if it exists, it is determined whether the area table for the area has already been read (step 2907).
Step 2908). If it has been loaded, step 2910
The following steps are performed, and if the area table has not been read, the area table is read from the area table file 2010 (step 2909).

次に、ステップ2802と同様に、複写データ格納媒体
をアクセス可能状態にする(ステップ2910)。
Next, similarly to step 2802, the copy data storage medium is made accessible (step 2910).

その後、ステップ2803と同様に、複写データの適正
さを検証しくステップ2911)、適正ならばステップ
2903に戻り、不適であればエラー処理を行った後(
ステップ2912)、当該処理を終了する。
After that, similarly to step 2803, the appropriateness of the copy data is verified (step 2911), and if it is appropriate, the process returns to step 2903; if it is inappropriate, error processing is performed (
Step 2912), the process ends.

ステップ2913では、第22図に示した第I番目の再
編成内容2107に基づき再編成を行う。その後、領域
テーブル内の再編成回数がI+1より小さいか否かを判
定しくステップ2914)、小さくなければ他に再編成
が実施されているので、カウンタエに1を加算した後(
ステップ291.8)、ステップ2902に戻る。また
、小さければ、領域テーブル内の第1番目の対編成終了
時刻2109以降の更新履歴データを読込む(ステップ
2915)。次に、該当データが存在するか否かを判定
しくステップ2916)、存在すれば当該更新履歴デー
タを複写データに反映させた後(ステップ2917)、
ステップ2915に戻る。存在しなければ、処理を終了
する。
In step 2913, reorganization is performed based on the I-th reorganization content 2107 shown in FIG. After that, it is determined whether the number of reorganizations in the area table is smaller than I+1 (step 2914), and if it is not, it means that another reorganization has been performed, so after adding 1 to the counter (
Step 291.8), return to step 2902. If it is smaller, update history data after the first pair formation end time 2109 in the area table is read (step 2915). Next, it is determined whether or not the corresponding data exists (Step 2916), and if it exists, the update history data is reflected in the copy data (Step 2917).
Return to step 2915. If it does not exist, the process ends.

なお、第29図のステップ2906.2917における
処理内容は、先に第12図に示したと同様である。
Note that the processing contents in steps 2906 and 2917 in FIG. 29 are the same as those shown in FIG. 12 above.

最後に、特許請求の範囲第4項に対応する実施例として
、更新履歴データを格納する媒体と、当該データを保管
する媒体保管装置とが異なる場合を示す。
Finally, as an example corresponding to claim 4, a case will be described in which the medium for storing update history data and the medium storage device for storing the data are different.

第31図に、全体構成図を示す。前述の各実施例と比較
して、更新履歴データ複写プログラム3008と、更新
履歴データファイル3010とが追加されている。
FIG. 31 shows an overall configuration diagram. Compared to each of the embodiments described above, an update history data copy program 3008 and an update history data file 3010 are added.

本実施例においては、第24図に示したようなデ−タベ
ース管理プログラムがデータベースサービス中に、更新
履歴データを直接媒体保管装置に格納することはせず、
通常は、従来と同様に、更新履歴データを、半導体ディ
スクや磁気ディスク等の記憶装置、すなわち、第31図
に示す更新履歴データファイル3010に格納する。当
該ファイルが満杯になったとき、あるいは、データベー
スシステム運用管理者の指示により、第31図に示す更
新履歴データ複写プログラム3008を起動して、更新
履歴データファイル3010から、媒体保管装置3o1
4に移す。
In this embodiment, the database management program shown in FIG. 24 does not directly store update history data in the media storage device during database service.
Normally, update history data is stored in a storage device such as a semiconductor disk or a magnetic disk, that is, an update history data file 3010 shown in FIG. 31, as in the past. When the file becomes full, or according to instructions from the database system operations manager, the update history data copying program 3008 shown in FIG.
Move to 4.

更新履歴データ複写プログラム3008の処理内容を、
第32図に基づいて説明する。
The processing contents of the update history data copy program 3008 are as follows:
This will be explained based on FIG. 32.

ステップ3101では、第31図に示した媒体管理ファ
イル3009内の媒体情報テーブルから、未使用状態の
媒体を求める。当該媒体情報テーブル内の媒体使用情報
を、使用状態にする(ステップ3102)。
In step 3101, an unused medium is determined from the medium information table in the medium management file 3009 shown in FIG. The medium usage information in the medium information table is set to a usage state (step 3102).

次に、媒体保管装置3014内の当該媒体をアクセス可
能な状態にしだ後(ステップ3103)、第31図に示
した更新履歴データファイル3010内の更新履歴デー
タを当該媒体に移す(ステップ3104)。その後、当
該媒体を、媒体保管装置に納め(ステップ3105)で
、処理を終了する。
Next, after making the medium in the medium storage device 3014 accessible (step 3103), the update history data in the update history data file 3010 shown in FIG. 31 is transferred to the medium (step 3104). Thereafter, the medium is stored in the medium storage device (step 3105), and the process ends.

第31図内の他のプログラムの処理内容は、前述の各実
施例と同様である。
The processing contents of other programs in FIG. 31 are the same as in each of the above-described embodiments.

上記実施例によれば、従来、データベース再編成後、複
写データを取り終るまでに、データベース障害が発生し
たときには、再編成の対象領域が否か、データベース更
新が再編成の前が後が等により、回復データや手段を使
い分ける必要があるというように1回復作業が複雑、が
っ、手間のがかるものになり、データベースの再編成後
、全データベース、あるいは、再編成を実施した領域の
複写データを取得後でないと、データベースサービスを
再開できなかったのが、再編成を含む回復作業を自動化
することで、再編成直後に、データベースサービスを再
開する運用が可能になるという効果がある。
According to the above embodiment, conventionally, when a database failure occurs after the database is reorganized and before copying data is completed, the problem occurs depending on whether the area to be reorganized is not available, whether the database update is before or after the reorganization, etc. 1 Recovery work becomes complicated and time-consuming as it is necessary to use different recovery data and methods. The database service could not be restarted until after the acquisition, but by automating the recovery work including reorganization, it becomes possible to restart the database service immediately after the reorganization.

なお、上記実施例においては、時間的順序関係を保存す
る識別子として、時刻を用いた例を示した。その具体的
内容は、年2月2日2時2分2秒、ミリ秒、マイクロ秒
、ナノ秒等絶対時刻を用いても良いし、任意の起点を基
準とする通算時間で表現しても良い。また、マルチプロ
セッサ構成をとる計算機システムにおいて、各プロセッ
サ毎に異なる時刻を持つ場合、各時刻の構成要素として
、各時刻間の補正情報を含んでも良い。
Note that in the above embodiment, an example is shown in which time is used as an identifier for preserving the temporal order relationship. The specific content may be expressed in absolute time such as 2:02:02 on February 2nd, milliseconds, microseconds, nanoseconds, or as a total time based on an arbitrary starting point. good. Further, in a computer system having a multiprocessor configuration, when each processor has a different time, correction information between each time may be included as a component of each time.

なお、上記時間的順序関係を保存する識別子として、デ
ータベースのサービス単位、すなわち、トランザクショ
ン単位に、処理の実行通算番号を与えるシステムにおい
ては、これを用いても良いことは言うまでもない。この
場合、複写データ取得の開始や、終了時点等を、その時
点以降に開始されるトランザクションに付加される実行
通算番号で代用しても良い。
It goes without saying that this may be used as an identifier for preserving the above-mentioned temporal order relationship in a system that assigns a processing execution total number to each database service, that is, each transaction. In this case, the start or end time of copy data acquisition may be substituted with an execution total number added to transactions started after that time.

また、本発明は上記各実施例に限定されるものではない
ことは、言うまでもない。
Furthermore, it goes without saying that the present invention is not limited to the above embodiments.

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

以上、詳細に説明した如く、本発明によれば、データベ
ースの複写データと更新履歴データとに基づいて、その
障害回復を行うデータベースシステムにおいて、前記デ
ータベースを構成する領域単位に、該領域の管理データ
として、当該領域の複写データを取得した開始・終了時
点の時間的順序関係を保存する識別子と、当該領域の再
編成または再構成の内容とその開始・終了時点の時間的
順序関係を保存する識別子を記憶する手段を設けて、デ
ータベース障害回復時に、その対象となる領域毎に、前
記各時点の時間的順序関係を保存する識別子に基づいて
データベース回復に使用する更新履歴データを識別し、
該更新履歴データの前記複写データへの反映方法を選択
して障害回復処理を実行するようにしたので、データベ
ースシステム運用管理者の負担を軽減するとともに、高
速な障害回復を可能とする、データベース障害回復方式
を実現できるという顕著な効果を奏するものである。
As described in detail above, according to the present invention, in a database system that performs failure recovery based on copy data and update history data of a database, management data of the area is stored in units of areas constituting the database. , an identifier that saves the chronological order relationship at the start and end points when copying data of the area was acquired, and an identifier that saves the contents of the reorganization or reconfiguration of the area and the chronological order relationship at the start and end points. and identifying update history data to be used for database recovery based on an identifier that preserves the temporal order relationship at each point in time for each target area during database failure recovery;
Since failure recovery processing is executed by selecting a method for reflecting the update history data in the copy data, it is possible to reduce the burden on the database system operation administrator and enable high-speed failure recovery. This has the remarkable effect of realizing a recovery method.

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

第1図は本発明の動作の概要を示す処理フローチャート
、第2図は第1の実施例の全体構成図、第3図は領域テ
ーブルの構成図、第4図は更新履歴データ情報の構成図
、第5図はデータベース初期化プログラムの処理フロー
チャート、第6図はバックアップ処理プログラムのフロ
ーチャート、第7図は複数領域を対象とするバックアッ
プ処理プログラムのフローチャート、第8図は再編成処
理プログラムのフローチャート、第9図は領域閉塞機能
を有する再編成処理プログラムのフローチャート、第1
0図はデータベース管理システムのデータベース障害検
知時の処理フローチャート、第11図はデータベース障
害回復プログラムの処理フローチャート、第12図は第
11図中の更新履歴データの複写データへの反映処理の
処理フローチャート、第13図は同時に複数の領域を対
象とする再編成を含むデータベース障害回復プログラム
の処理フローチャート、第14図は第13図中の再編成
を含む回復処理のフローチャート、第15図は第2の実
施例に用いられる複写データファイルの構成図、第16
図は第2の実施例に対応するバックアップ処理プログラ
ムのフローチャート、第17図は同複数領域を対象とす
るバックアップ処理プログラムのフローチャート、第1
8図は同データベース障害回復プログラムの処理フロー
チャート、第19図は同同時に複数の領域を対象とする
再編成を含むデータベース障害回復プログラムの処理フ
ローチャート、第20図は第19図中の再編成を含む回
復処理のフローチャート、第21図は第3の実施例の全
体構成図、第22図は第3の実施例に用いられる領域テ
ーブルの構成図、第23図は同媒体情報テーブルの構成
図、第24図は第3の実施例に対応するバックアップ処
理プログラムのフローチャート、第25図は第24図中
の媒体をアクセス可能にする処理のフローチャー1・、
第26図は同複数領域を対象とするバックアップ処理プ
ログラムのフローチャート、第27図は同データベース
更新履歴データの格納処理のフローチャート、第28図
は同データベース障害回復プログラムの処理フローチャ
ート、第29図は同同時に複数の領域を対象とする再編
成を含むデータベース障害回復プログラムの処理フロー
チャート、第30図は第29図中の再編成を含む回復処
理のフローチャート、第31図は第4の実施例の全体構
成図、第32図は更新履歴データ複写プログラムの処理
フローチャートである。 101.2001,3001 : CP U、102,
2002.3002 :主記憶装置、103,2003
,3003 :バックアップ処理プロゲラ11.104
,2004,3004 :再編成処理プログラム、10
5.2005,3005 :データベース管理システム
、106゜2006.3006 :データベース初期化
プログラム、1o7゜2007.3007 :データベ
ース障害回復プログラム、108:複写データファイル
、109,3010 :更新履歴データファイル、11
.0,2010,3011 :領域テーブルファイル、
 111,2011,3012 :データベース定義フ
ァイル、112,2012,3013 :データベース
、113゜2013.3015 : :l ン’/−/
L/、2008,3009 :媒体管理ファイル、20
09,3014 :媒体保管装置、3008 :更新履
歴データ複写プログラム。 特許出願人 株式会社 日立製作新 築   2   図 第   3   図 第   4   図 第   5   図 第   6   図 第   7   図 第   8   図 第  9   図 第   10   図 第   12   図 第16図 第17図 第   27   図 第   21   図 第   24   図 第   25 図 第   31   図 第   32  図
FIG. 1 is a processing flowchart outlining the operation of the present invention, FIG. 2 is an overall configuration diagram of the first embodiment, FIG. 3 is a configuration diagram of an area table, and FIG. 4 is a configuration diagram of update history data information. , FIG. 5 is a processing flowchart of a database initialization program, FIG. 6 is a flowchart of a backup processing program, FIG. 7 is a flowchart of a backup processing program that targets multiple areas, FIG. 8 is a flowchart of a reorganization processing program, FIG. 9 is a flowchart of a reorganization processing program having an area closing function.
0 is a processing flowchart of the database management system when a database failure is detected, FIG. 11 is a processing flowchart of the database failure recovery program, and FIG. 12 is a processing flowchart of the process of reflecting the update history data in the copy data in FIG. 11. Figure 13 is a processing flowchart of a database failure recovery program that includes reorganization that targets multiple areas at the same time, Figure 14 is a flowchart of recovery processing that includes reorganization in Figure 13, and Figure 15 is a second implementation. Configuration diagram of the copy data file used in the example, No. 16
The figure is a flowchart of a backup processing program corresponding to the second embodiment, and FIG. 17 is a flowchart of a backup processing program that targets the same plurality of areas.
Figure 8 is a processing flowchart of the database failure recovery program, Figure 19 is a processing flowchart of the database failure recovery program that includes reorganization that targets multiple areas at the same time, and Figure 20 includes the reorganization shown in Figure 19. A flowchart of the recovery process, FIG. 21 is an overall configuration diagram of the third embodiment, FIG. 22 is a configuration diagram of an area table used in the third embodiment, FIG. 23 is a configuration diagram of the same medium information table, and FIG. FIG. 24 is a flowchart of a backup processing program corresponding to the third embodiment, and FIG. 25 is a flowchart 1 of the process of making the medium in FIG. 24 accessible.
Fig. 26 is a flowchart of the backup processing program that targets the same multiple areas, Fig. 27 is a flowchart of the storage process of the database update history data, Fig. 28 is a processing flowchart of the database failure recovery program, and Fig. 29 is the same. A processing flowchart of a database failure recovery program including reorganization that targets multiple areas at the same time, FIG. 30 is a flowchart of the recovery processing including reorganization in FIG. 29, and FIG. 31 is the overall configuration of the fourth embodiment. 32 are processing flowcharts of the update history data copying program. 101.2001,3001: CPU, 102,
2002.3002: Main storage, 103, 2003
, 3003: Backup processing Progera 11.104
, 2004, 3004: Reorganization processing program, 10
5.2005,3005: Database management system, 106゜2006.3006: Database initialization program, 1o7゜2007.3007: Database failure recovery program, 108: Copy data file, 109,3010: Update history data file, 11
.. 0, 2010, 3011: area table file,
111,2011,3012: Database definition file, 112,2012,3013: Database, 113゜2013.3015: :l n'/-/
L/, 2008, 3009: Media management file, 20
09,3014: Media storage device, 3008: Update history data copy program. Patent applicant: Hitachi Seisaku Shinken Co., Ltd. 2 Figure 3 Figure 4 Figure 5 Figure 6 Figure 7 Figure 8 Figure 9 Figure 10 Figure 12 Figure 16 Figure 17 Figure 27 Figure 21 Figure 24 Figure 25 Figure 31 Figure 32

Claims (1)

【特許請求の範囲】 1、データベースの複写データと更新履歴データとに基
づき、その障害回復を行うデータベースシステムにおい
て、前記データベースを構成する領域単位に、該領域の
管理データとして、当該領域の複写データを取得した開
始・終了時点の時間的順序関係を保存する識別子と、当
該領域の再編成または再構成の内容とその開始・終了時
点の時間的順序関係を保存する識別子を記憶する手段を
設けて、データベース障害回復時に、その対象となる領
域毎に、前記各時点の時間的順序関係を保存する識別子
に基づいてデータベース回復に使用する更新履歴データ
を識別し、該更新履歴データの前記複写データへの反映
方法を選択して障害回復処理を実行することを特徴とす
るデータベース障害回復方式。 2、前記領域の管理データとして、再編成や再構成を同
時に行う必要のある領域名を記憶する手段を設けて、デ
ータベース障害回復時に、前記領域名に基づいて回復対
象の領域を認識することを特徴とする、特許請求の範囲
第1項記載のデータベース障害回復方式。 3、前記領域の管理データとして、当該領域の複写デー
タにその取得開始時点の時間的順序関係を保存する識別
子を埋込む手段を設けて、データベース障害回復時に、
使用する複写データの妥当性を検証することを特徴とす
る、特許請求の範囲第1項または第2項記載のデータベ
ース障害回復方式。 4、前記データベースの複写データや更新履歴データを
格納する媒体単位に、該媒体の管理データとして、当該
媒体名とその使用状況および接続情報を記憶する手段を
設けるとともに、前記領域の管理データとして、各領域
の複写データや更新履歴データの格納媒体名を記憶する
手段を設けて、データベース回復時に、前記両管理デー
タに基づいて媒体を割当てることを特徴とする、特許請
求の範囲第3項記載のデータベース障害回復方式。
[Claims] 1. In a database system that performs failure recovery based on copy data and update history data of a database, for each area constituting the database, copy data of the area is stored as management data of the area. means for storing an identifier that saves the temporal order relationship at the start and end points of acquisition, and an identifier that saves the content of the reorganization or reconfiguration of the area and the time order relationship at the start and end points. , at the time of database failure recovery, for each target area, identify update history data to be used for database recovery based on the identifier that saves the temporal order relationship at each point in time, and transfer the update history data to the copy data of the update history data. A database failure recovery method is characterized in that failure recovery processing is executed by selecting a reflection method. 2. A means is provided to store the name of an area that needs to be reorganized or reconfigured at the same time as management data of the area, and the area to be recovered is recognized based on the area name when recovering from a database failure. A database failure recovery method according to claim 1, characterized by: 3. Provide means for embedding an identifier that preserves the temporal order relationship at the time of acquisition start in the copy data of the area as management data of the area, and when recovering from a database failure,
A database failure recovery method according to claim 1 or 2, characterized in that the validity of the copy data to be used is verified. 4. For each medium storing copy data and update history data of the database, a means is provided for storing the medium name, its usage status, and connection information as management data of the medium, and as management data of the area, Claim 3, characterized in that means is provided for storing the storage medium name of the copy data and update history data of each area, and when the database is restored, the medium is allocated based on both of the management data. Database disaster recovery method.
JP63124700A 1988-05-20 1988-05-20 Database failure recovery method Expired - Fee Related JP2748402B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63124700A JP2748402B2 (en) 1988-05-20 1988-05-20 Database failure recovery method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63124700A JP2748402B2 (en) 1988-05-20 1988-05-20 Database failure recovery method

Publications (2)

Publication Number Publication Date
JPH01293452A true JPH01293452A (en) 1989-11-27
JP2748402B2 JP2748402B2 (en) 1998-05-06

Family

ID=14891930

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63124700A Expired - Fee Related JP2748402B2 (en) 1988-05-20 1988-05-20 Database failure recovery method

Country Status (1)

Country Link
JP (1) JP2748402B2 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04267444A (en) * 1991-02-22 1992-09-24 Nec Software Kansai Ltd Roll-back restoration system
JPH06342393A (en) * 1992-12-11 1994-12-13 Nec Corp File recovery system
KR20030063620A (en) * 2002-01-23 2003-07-31 주식회사 파이널데이터 Method for recovering a damaged database data and computer readable medium storing thereof

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04267444A (en) * 1991-02-22 1992-09-24 Nec Software Kansai Ltd Roll-back restoration system
JPH06342393A (en) * 1992-12-11 1994-12-13 Nec Corp File recovery system
KR20030063620A (en) * 2002-01-23 2003-07-31 주식회사 파이널데이터 Method for recovering a damaged database data and computer readable medium storing thereof

Also Published As

Publication number Publication date
JP2748402B2 (en) 1998-05-06

Similar Documents

Publication Publication Date Title
US5448718A (en) Method and system for time zero backup session security
US5465328A (en) Fault-tolerant transaction-oriented data processing
US5497483A (en) Method and system for track transfer control during concurrent copy operations in a data processing storage subsystem
US5241668A (en) Method and system for automated termination and resumption in a time zero backup copy process
US7200626B1 (en) System and method for verification of a quiesced database copy
US5720026A (en) Incremental backup system
EP0119806B1 (en) Asynchronous checkpointing method for error recovery
US7152080B2 (en) Method, apparatus, and computer readable medium for managing replication of back-up object
US5379398A (en) Method and system for concurrent access during backup copying of data
US6618794B1 (en) System for generating a point-in-time copy of data in a data storage system
JP4483342B2 (en) System recovery method
US5437026A (en) Removing uncommitted changes made to stored data by a database management system
KR100268187B1 (en) Method for recovering multi-volume data sets
JPS633341B2 (en)
US7185048B2 (en) Backup processing method
JPH08504529A (en) Backup execution system in database
CN100359479C (en) Storage services and systems
JPS63145552A (en) Community device for personal computer
CA2071346A1 (en) Method and means for time zero backup copy of data
US5745674A (en) Management of units of work on a computer system log
US20110225380A1 (en) Multiple backup processes
JP4074442B2 (en) Method, apparatus, system, program and storage medium for data backup
US20030074376A1 (en) File manager for storing several versions of a file
JPH01293452A (en) Data base fault recovering system
US6076095A (en) Method of one system of a multisystem environment taking over log entries owned by another system

Legal Events

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