JP2002318717A - Database system - Google Patents

Database system

Info

Publication number
JP2002318717A
JP2002318717A JP2001120875A JP2001120875A JP2002318717A JP 2002318717 A JP2002318717 A JP 2002318717A JP 2001120875 A JP2001120875 A JP 2001120875A JP 2001120875 A JP2001120875 A JP 2001120875A JP 2002318717 A JP2002318717 A JP 2002318717A
Authority
JP
Japan
Prior art keywords
database
backup
file
version
page
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2001120875A
Other languages
Japanese (ja)
Inventor
Hiroshi Takegawa
弘志 竹川
Kazushige Asada
一繁 浅田
Tetsuya Ikeda
哲也 池田
Takuya Hiraoka
卓也 平岡
Junichi Yamagata
純一 山形
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.)
Ricoh Co Ltd
Original Assignee
Ricoh Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP2001120875A priority Critical patent/JP2002318717A/en
Publication of JP2002318717A publication Critical patent/JP2002318717A/en
Pending legal-status Critical Current

Links

Abstract

PROBLEM TO BE SOLVED: To provide a database system, with which backup is enabled through a simple work process and the work quantity of a system manager can be reduced, in the database system for performing multiversion system simultaneous transaction execution control. SOLUTION: While a backup start/end instructing means 20 instructs backup start/end, even when a plurality of transactions update the latest versions, a database managing system 70 guarantees the consistency of files comprising a database as a backup object so that a base page system, logic log system or full page system can be backed up by a file backup means 10 not through the database managing system 70.

Description

【発明の詳細な説明】DETAILED DESCRIPTION OF THE INVENTION

【0001】[0001]

【発明の属する技術分野】本発明は、データベース管理
システムを介さないファイルバックアップ手段でファイ
ルのバックアップを行うデータベースシステムに関す
る。
[0001] 1. Field of the Invention [0002] The present invention relates to a database system for backing up files by file backup means not via a database management system.

【0002】[0002]

【従来の技術】データベース管理システムでは、あるト
ランザクションのある操作内容を取り消したり、再実行
するための情報として、従来から、トランザクションの
操作ごとに、その操作を取り消すための情報と、再実行
するための情報を組にして、記憶することが行われてき
た。この記憶内容のことをログと呼ぶ。
2. Description of the Related Art In a database management system, as information for canceling or re-executing a certain operation content of a certain transaction, conventionally, for each transaction operation, information for canceling the operation and information for re-execution have been used. The information has been stored as a set. This stored content is called a log.

【0003】記憶する情報の種類によって、ログは以下
のように分類される。
[0003] Logs are classified as follows according to the type of information to be stored.

【0004】論理ログ(logical log) どのような操作を行ったか、その操作を取り消すために
はどのような操作を行うかを記録する。例えば、「表A
の行識別子が10の行を削除」と「表Aに行識別子が1
0で、列の値としてa,b,cを持つ行を挿入」を組にして
記録する。
A logical log records what operation has been performed and what operation should be performed to cancel the operation. For example, "Table A
Delete row with row identifier 10 "and" Table A has row identifier 1
0, insert a row with a, b, c as column values ".

【0005】物理ログ(physical log) ファイル中のページに対する更新前と更新後のイメージ
を記録する。論理ログと比較して、記録する情報量は膨
大になるが、操作の実行、再実行は単にページの操作に
なるため、単純である。
A physical log records images before and after updating pages in a file. Compared with the logical log, the amount of information to be recorded is enormous, but the execution and re-execution of the operation are simple because the operation is simply a page operation.

【0006】論理・物理の折衷ログ(physiological lo
g) 表や索引を構成するレコードファイルやB木ファイルな
ど、論理的なファイルに対して、どのような操作を行っ
たか、その操作を取り消すためにどのような操作を行う
かを記録する。必要に応じて、ページに対する操作の内
容を記録する。記録する情報量は、論理ログと物理ログ
の中間になる。論理ログと比較して、ページに対してロ
グに記録された操作を適用すべきかを判断しやすい。
[0006] The logical and physical log (physiological lo
g) Record what operations have been performed on logical files such as record files and B-tree files that make up tables and indexes, and what operations should be performed to cancel the operations. Record the content of the operation on the page as necessary. The amount of information to be recorded is between the logical log and the physical log. Compared to the logical log, it is easier to determine whether the operation recorded in the log should be applied to the page.

【0007】媒体障害からの復旧は、ある時点で確保さ
れている一貫性のあるデータベースから、これらのログ
により、その時点以降の操作を再実行(REDO)、または取
り消す(UNDO)することにより行う。媒体障害から復旧す
るとき、バックアップした一貫性のあるデータベースを
戻してから、バックアップしてから障害が発生する直前
まで行われた操作を、ログを読み出しながらREDO-UNDO
して、復旧する。
Recovery from a medium failure is performed by re-executing (REDO) or canceling (UNDO) operations after that point on the basis of these logs from a consistent database secured at a certain point in time. . When recovering from a media failure, return the consistent database that was backed up, and then perform the operations performed from the time when the backup was performed until just before the failure occurred, by reading the log and using
And recover.

【0008】ログの記録は、WAL(Write Ahead Loggi
ng)プロトコルにしたがう必要がある。すなわち、デー
タベースに対する更新操作のバッファリング内容をディ
スクへ書き込むときは、必ず、その操作のログはディス
クに書き込まれていなければならない。
[0008] The log is recorded in WAL (Write Ahead Loggi
ng) It is necessary to follow the protocol. That is, when writing the buffering content of the update operation to the database to the disk, the log of the operation must be written to the disk.

【0009】システム障害も同様に回復可能であるが、
システムの運用中にチェックポイント処理を行うことに
より、復旧時間を短縮することができる。
Although a system failure can be similarly recovered,
Performing the checkpoint processing during the operation of the system can reduce the recovery time.

【0010】チェックポイント処理は以下の手順で行
う。
The checkpoint process is performed in the following procedure.

【0011】1.トランザクションの実行、および、新
たなトランザクションの受付を一時停止する。 2.バッファリングされているデータベースの更新内容
のうち、まだディスクに書き出されていないものをすべ
て書き出すことにより、データベースを構成するファイ
ルの一貫性をこの時点で保証する。 3.あるトランザクションがチェックポイント処理後に
最初にページを更新するごとに、その更新前のページイ
メージを物理ログへ記録する。この物理ログへの記録内
容を破棄する。 4.トランザクションの実行、および、新たなトランザ
クションの受付を再開する。
1. Suspend the execution of a transaction and the acceptance of a new transaction. 2. By writing out all buffered database updates that have not yet been written to disk, the consistency of the files that make up the database is guaranteed at this point. 3. Each time a transaction updates a page for the first time after checkpoint processing, the page image before the update is recorded in the physical log. Discard the contents recorded in this physical log. 4. Execution of the transaction and reception of a new transaction are resumed.

【0012】チェックポイント処理中には、書き出す必
要のあるバッファリングされているデータベースの更新
内容をすべてディスクへ書き出さなければならないの
で、場合によってはかなり長時間、トランザクションの
実行および受付を停止しなければならない。この時間を
短縮するために、以下のようなファジーチェックポイン
ト処理が考案されている。
During checkpoint processing, all buffered database updates that need to be written out must be written out to disk, and in some cases the execution and acceptance of transactions must be stopped for a very long time. No. To reduce this time, the following fuzzy checkpoint processing has been devised.

【0013】1.トランザクションの実行、および、新
たなトランザクションの受付を一時停止する。 2.バッファリングされているデータベースの更新内容
で、まだディスクに書き出されていないもののうち、直
前のファジーチェックポイント処理時のときも書き出さ
れていなかったものをすべて書き出す。 3.バッファリングされているデータベースの更新内容
で、まだディスクに書き出されていないものを、覚えて
おく。これは、次のファジーチェックポイント処理の
2.で使用する。 4.物理ログから2つ前のファジーチェックポイント処
理が終了してから、直前のファジーチェックポイント処
理を開始するまでに記録した内容をすべて破棄する。 5.トランザクションの実行、および、新たなトランザ
クションの受付を再開する。
1. Suspend the execution of a transaction and the acceptance of a new transaction. 2. Writes out all buffered database updates that have not been written out to disk yet that were not written out during the previous fuzzy checkpoint process. 3. Remember any buffered database updates that have not yet been written to disk. This is the next fuzzy checkpoint processing. Used in. 4. All contents recorded from the end of the fuzzy checkpoint process two steps before the physical log to the start of the immediately preceding fuzzy checkpoint process are discarded. 5. Execution of the transaction and reception of a new transaction are resumed.

【0014】ファジーチェックポイントでは、書き出す
必要のあるバッファリングされているデータベースの更
新内容のうち、直前のファジーチェックポイントでも書
き出されていなかったもののみ、ディスクに書き出すの
で、普通のチェックポイント処理に比べて、処理時間が
短縮される可能性が高い。
In the fuzzy checkpoint, only the updated contents of the buffered database that need to be written out and have not been written out in the immediately preceding fuzzy checkpoint are written out to the disk. In comparison, the processing time is more likely to be reduced.

【0015】普通のチェックポイント処理を行っている
場合、システム障害からの回復は、以下のようにして行
う。 1.直前のチェックポイント処理後に更新されたページ
に対して、物理ログに記録されている更新前のページイ
メージを書き戻すことにより、チェックポイント処理終
了時のデータベースの状態に戻す。 2.直前のチェックポイント処理時に実行されていたト
ランザクションのチェックポイント処理後の操作をログ
を読み出しながら再実行する。 3.障害発生時に終了していないトランザクションをロ
グを読み出しながら取り消す。
When a normal checkpoint process is performed, recovery from a system failure is performed as follows. 1. By writing back the page image before update recorded in the physical log to the page updated after the immediately preceding checkpoint processing, the state of the database at the end of the checkpoint processing is returned. 2. The operation after the checkpoint processing of the transaction executed at the time of the immediately preceding checkpoint processing is re-executed while reading the log. 3. Cancel transactions that have not been completed at the time of failure while reading the log.

【0016】ファジーチェックポイント処理を行ってい
る場合、2つ前のチェックポイント処理の開始する前ま
でに更新されたデータベースの内容は確実にディスクに
書き出されているが、それ以降の内容は保証されない。
そのため、普通のチェックポイント処理の場合は、最初
に直前のチェックポイント処理終了直後の状態に戻す
が、ファジーチェックポイント処理の場合は、2つ前の
チェックポイント処理終了直後の状態に戻す。
When the fuzzy checkpoint processing is performed, the contents of the database updated before the start of the two previous checkpoint processings are surely written to the disk, but the contents after that are guaranteed. Not done.
Therefore, in the case of normal checkpoint processing, the state is first returned to the state immediately after the immediately preceding checkpoint processing, but in the case of fuzzy checkpoint processing, the state is returned to the state immediately after the end of the previous two checkpoint processing.

【0017】チェックポイント処理は、データベースの
バックアップと比較して短時間に行えるので、システム
の運用中にかなりの頻度で定期的に行うことができる。
そのため、バックアップ内容からの回復処理と比較し
て、REDO-UNDOする操作の量が少なくなるので、復旧時
間が短くなる。
Since the checkpoint process can be performed in a shorter time as compared with the backup of the database, the checkpoint process can be periodically performed at a considerable frequency during the operation of the system.
Therefore, compared to the recovery processing from the backup contents, the number of operations to redo-undo is reduced, and the recovery time is shortened.

【0018】データベースのバックアップの方法として
は、更に、マルチバージョン方式のトランザクション同
時実行制御を行うデータベースシステムにおける、デー
タベース管理システムを介さないファイルバックアップ
手段による方法が提案されている。
As a method of backing up a database, a method has been proposed in which a file backup means does not pass through a database management system in a database system which performs multi-version transaction simultaneous execution control.

【0019】[0019]

【発明が解決しようとする課題】本発明は、上記の如く
のファイルバックアップの方法のうち、マルチバージョ
ン方式のトランザクション同時実行制御を行うデータベ
ースシステムにおける、データベース管理システムを介
さないファイルバックアップ手段による方法の問題点に
着目している。
SUMMARY OF THE INVENTION The present invention relates to a method for backing up a file by means of a file backup means which does not pass through a database management system in a database system for controlling the simultaneous execution of transactions in a multi-version system. It focuses on the problems.

【0020】即ち、この方法においては、バックアップ
されるベースページ、バージョンページ、バージョンマ
ップ領域を格納されるファイルには、バックアップを開
始時に実行中のトランザクションが更新した内容が含ま
れる可能性がある。バックアップされた内容をそのまま
戻しただけで、一貫性のあるデータベースに復旧するに
は、復旧されたデータベースを参照するトランザクショ
ンが、バックアップ開始時に実行中のトランザクション
が更新した最新の版を無視できなければならない。その
ため、1.最新の版を同時に更新可能なトランザクショ
ンを1つに限定する必要がある。ある最新の版をあるト
ランザクションが更新し、そのトランザクションが終了
する前に、他のトランザクションがその版を更新可能に
すると、バックアップ開始時に実行中のトランザクショ
ンが更新した最新の版を無視し、バックアップ開始時に
終了しているトランザクションの更新内容まで無視する
ことになり、データベースの一貫性が失われる。2.バ
ックアップ開始時に実行中のトランザクションが更新し
た最新の版を無視するには、バックアップされる内容に
以下のa.b.いずれかの情報が含まれている必要があ
る。 a.最新の版ごとに、それぞれを更新し、実行中のトラ
ンザクションを表すトランザクション識別子(トランザ
クションIDとも呼ぶ。トランザクションごとに一意、
かつ永続的な値である) b.バックアップ開始時に実行中のトランザクションご
とに、それぞれのトランザクション識別子と、最新の版
ごとに、それぞれを最後に更新したトランザクションの
トランザクション識別子
That is, in this method, the file storing the base page, version page, and version map area to be backed up may contain the contents updated by the transaction being executed when the backup is started. To recover a consistent database simply by restoring what was backed up, transactions that reference the recovered database must be able to ignore the latest version updated by the transaction in progress at the start of the backup. No. Therefore, 1. It is necessary to limit the number of transactions that can update the latest version simultaneously to one. If a transaction updates the latest version and another transaction allows the version to be updated before the transaction ends, the current transaction will ignore the updated version at the start of the backup and start the backup. In some cases, updates to transactions that have been completed are ignored, resulting in inconsistent database. 2. To ignore the latest version updated by the transaction being executed at the start of the backup, the following a. b. Any information must be included. a. For each latest version, each is updated and a transaction identifier (also referred to as a transaction ID) representing the transaction being executed.
And a permanent value) b. The transaction identifier of each transaction being executed at the start of the backup, and the transaction identifier of the last updated transaction for each latest version

【0021】上記において、a.は、トランザクション
が終了するごとに、そのトランザクションが更新したす
べての版のそれぞれについて、記憶されているトランザ
クション識別子を抹消する必要があり、管理面のコスト
が大きい。また、b.は、a.の管理面のコストを小さ
くする代わりに、記憶領域面のコストが大きくなる。
In the above, a. Needs to delete the stored transaction identifier for each version updated by the transaction every time the transaction ends, which is expensive in terms of management. B. Is a. Instead of reducing the management cost, the storage area cost increases.

【0022】本発明はこのような問題点に鑑みてなされ
たもので、マルチバージョン方式のトランザクション同
時実行制御を行うデータベースシステムであって、単純
な作業工程でバックアップを行うことができ、システム
管理者の作業量を減らすことができるデータベースシス
テムを提供することを目的としている。
The present invention has been made in view of such a problem, and is a database system for performing multi-version type transaction simultaneous execution control, which can perform backup in a simple work process, and An object of the present invention is to provide a database system that can reduce the amount of work.

【0023】[0023]

【課題を解決するための手段】上記の目的を達成する本
発明は、データベースを構成するファイルに直接アクセ
スしてバックアップすることを可能としたものである。
According to the present invention, which achieves the above object, it is possible to directly access and back up files constituting a database.

【0024】即ち、請求項1の発明は、マルチバージョ
ン方式のトランザクション同時実行制御を行うデータベ
ースシステムであって、複写元更新方式によって新しい
バージョンを生成するものにおいて、バックアップ開始
と終了を指示される間、複数のトランザクションが最新
のバージョンを更新していても、データベース管理シス
テムがバックアップ対象であるデータベースを構成する
ファイルの一貫性を保証することによって、データベー
ス管理システムを介さないファイルバックアップ手段に
より、ベースページ方式のバックアップを可能としたこ
とを特徴とするデータベースシステムである。
That is, a first aspect of the present invention is a database system for performing a transaction concurrent execution control of a multi-version system, which generates a new version by a copy source update system. Even if multiple transactions are updating the latest version, the database management system guarantees the consistency of the files that make up the database being backed up, so that the file can be backed up without using the database management system. This is a database system characterized in that it is possible to perform backup in a system.

【0025】請求項2の発明は、マルチバージョン方式
のトランザクション同時実行制御を行うデータベースシ
ステムであって、複写先更新方式によって新しいバージ
ョンを生成するものにおいて、バックアップ開始と終了
を指示される間、複数のトランザクションが最新のバー
ジョンを更新していても、データベース管理システムが
バックアップ対象であるデータベースを構成するファイ
ルの一貫性を保証することによって、データベース管理
システムを介さないファイルバックアップ手段により、
ベースページ方式のバックアップを可能としたことを特
徴とするデータベースシステムである。
According to a second aspect of the present invention, there is provided a database system for performing concurrent execution control of a multi-version system, wherein a new version is generated by a copy destination update system. Even if the transaction of the latest version is updated, the database management system guarantees the consistency of the files constituting the database to be backed up.
This is a database system characterized by being capable of base page backup.

【0026】請求項3の発明は、マルチバージョン方式
のトランザクション同時実行制御を行うデータベースシ
ステムであって、複写先更新方式によって新しいバージ
ョンを生成するものにおいて、バックアップ開始と終了
を指示される間、複数のトランザクションが最新のバー
ジョンを更新していても、データベース管理システムが
バックアップ対象であるデータベースを構成するファイ
ルの一貫性を保証することによって、データベース管理
システムを介さないファイルバックアップ手段により、
論理ログ方式のバックアップを可能としたことを特徴と
するデータベースシステムである。
According to a third aspect of the present invention, there is provided a database system for performing a transaction concurrent execution control of a multi-version system, wherein a new version is generated by a copy destination update system. Even if the transaction of the latest version is updated, the database management system guarantees the consistency of the files constituting the database to be backed up.
This is a database system characterized in that logical log backup is possible.

【0027】そして、請求項4の発明は、マルチバージ
ョン方式のトランザクション同時実行制御を行うデータ
ベースシステムであって、複写先更新方式によって新し
いバージョンを生成するものにおいて、バックアップ開
始と終了を指示される間、複数のトランザクションが最
新のバージョンを更新していても、データベース管理シ
ステムがバックアップ対象であるデータベースを構成す
るファイルの一貫性を保証することによって、データベ
ース管理システムを介さないファイルバックアップ手段
により、全ファイル方式のバックアップを可能としたこ
とを特徴とするデータベースシステムである。
According to a fourth aspect of the present invention, there is provided a database system for performing concurrent execution control of a multi-version system, wherein a new version is generated by a copy destination update system. Even if multiple transactions update the latest version, the database management system guarantees the consistency of the files that make up the database being backed up. This is a database system characterized in that it is possible to perform backup in a system.

【0028】[0028]

【実施例】以下、この発明の実施例を詳細に説明する。
始めに実施形態のソフトウエアとハードウエアについて
説明する。
Embodiments of the present invention will be described below in detail.
First, software and hardware of the embodiment will be described.

【0029】図1は、本発明にしたがったデータベース
システムのソフトウェアの構成図である。次のような機
能を有する手段で構成されている。
FIG. 1 is a configuration diagram of software of a database system according to the present invention. It is constituted by means having the following functions.

【0030】ファイルバックアップ手段10 データベースを構成するファイル50を、データベース
管理システム70を介さずに直接アクセスし、そのバッ
クアップを取る。
File backup means 10 The file 50 constituting the database is directly accessed without going through the database management system 70, and the file is backed up.

【0031】バックアップ開始、終了指示手段20 バックアップの開始または終了をデータベース管理シス
テム70に対して指示する。
Backup start / end instructing means 20 Instructs the database management system 70 to start or end the backup.

【0032】問合せ入出力手段30 問合せ要求を受け付け、その結果を出力する。Inquiry input / output means 30 accepts an inquiry request and outputs the result.

【0033】問合せ実行手段71 問合せ入出力手段30からの問合せを、データベースフ
ァイルアクセス手段72を使って実行し、その結果を返
す。また、バックアップ開始、終了指示手段20からの
指示を実行する。また、問合せの内容に応じたログを、
ログファイルアクセス手段75を使って記録する。
Query executing means 71 The query from the query input / output means 30 is executed using the database file access means 72, and the result is returned. In addition, an instruction from the backup start / end instruction means 20 is executed. In addition, logs according to the content of the query,
It is recorded using the log file access means 75.

【0034】トランザクション制御手段74 問合せ入出力手段30からの要求に応じて、トランザク
ションを開始、終了する。アボートするトランザクショ
ンについては、そのトランザクションが行ったすべての
操作を、ログファイルアクセス手段75を使って取り消
す。また、マルチバージョン方式によりトランザクショ
ンの同時実行制御を行う。
The transaction control means 74 starts and ends a transaction in response to a request from the inquiry input / output means 30. For the transaction to be aborted, all the operations performed by the transaction are canceled using the log file access means 75. In addition, simultaneous execution control of transactions is performed by a multiversion method.

【0035】チェックポイント制御手段73 定期的にチェックポイント処理を行う。Checkpoint control means 73 Performs checkpoint processing periodically.

【0036】データベースファイルアクセス手段72 データベースを構成するファイル50を操作するための
インタフェースを提供し、ディスクへの入出力をバッフ
ァリングする。バッファリングされた内容のディスクへ
の書き出しは、WALプロトコルにしたがうように、ロ
グファイルアクセス手段75と協調して行われる。
Database file access means 72 Provides an interface for operating the files 50 constituting the database, and buffers input / output to / from a disk. Writing of the buffered contents to the disk is performed in cooperation with the log file access unit 75 in accordance with the WAL protocol.

【0037】データベースファイル50 データベース中のデータオブジェクトを記憶する。The database file 50 stores data objects in the database.

【0038】ログファイルアクセス手段75 ログファイル60を操作するためのインタフェースを提
供し、ディスクへの入出力をバッファリングする。
Log file access means 75 Provides an interface for operating the log file 60, and buffers input / output to / from the disk.

【0039】ログファイル60 トランザクションで行われた操作を再実行および取り消
すために必要な情報を記憶する。トランザクションの開
始、終了したことや、チェックポイント処理を行ったこ
とも記憶する。
The log file 60 stores information necessary for re-executing and canceling the operation performed in the transaction. The start and end of the transaction and the fact that the checkpoint process has been performed are also stored.

【0040】次に、図2は、データベース処理のために
構成されたコンピュータシステムのハードウェアを表す
図である。次のような装置で構成されている。
FIG. 2 is a diagram showing hardware of a computer system configured for database processing. It is composed of the following devices.

【0041】端末100 システムの利用者がサーバー200で実行されている図
1の点線部分であるデータベース管理システム70への
問合せ要求を入力したり、問合せ結果を出力したりする
ために利用する計算機であり、サーバー200上のハー
ドディスク210に記録されているデータベースファイ
ル50を問い合わせて、その内容をテープドライブ14
0へ書き込んだりするために利用する計算機でもある。
A computer used by a user of the terminal 100 system to input a query request to the database management system 70, which is a portion indicated by a dotted line in FIG. 1, and output a query result. Yes, the database file 50 recorded on the hard disk 210 on the server 200 is queried, and the contents are
It is also a computer used to write to 0.

【0042】一般に、端末100には問合せ要求を入力
するためのキーボード150及びマウス160などのポ
インティングデバイスや、問合せ結果を表示するための
ディスプレイ170が装備される。また、端末100は
CPU120、メモリ130、ハードディスク110を
備え、ソフトウェアによるプログラムが実行可能であ
る。端末100では、図1の問い合わせ入出力手段3
0、バックアップ開始、終了指示手段20、ファイルバ
ックアップ手段10がプログラムとして実行される。テ
ープドライブ140を備える場合、バックアップファイ
ル40を記録できる。
In general, the terminal 100 is provided with a pointing device such as a keyboard 150 and a mouse 160 for inputting an inquiry request, and a display 170 for displaying an inquiry result. The terminal 100 includes a CPU 120, a memory 130, and a hard disk 110, and is capable of executing a software program. In the terminal 100, the inquiry input / output unit 3 of FIG.
0, backup start / end instruction means 20 and file backup means 10 are executed as programs. When the tape drive 140 is provided, the backup file 40 can be recorded.

【0043】サーバー200 端末100から入力された問合せ要求に応じた問合せ処
理を行い、その結果を端末100に返すための計算機で
あり、端末100からのバックアップ対象であるファイ
ルの取得要求に応じて、ファイルの内容を端末100に
返したり、端末100からのバックアップ対象のあるフ
ァイルのテープへの書き込み要求に応じて、ファイルの
内容をテープドライブ140へ書き込んだりするために
利用する計算機でもある。
Server 200 A computer for performing an inquiry process in response to an inquiry request input from the terminal 100 and returning the result to the terminal 100. In response to a request from the terminal 100 to obtain a file to be backed up, It is also a computer used to return the contents of the file to the terminal 100 or to write the contents of the file to the tape drive 140 in response to a request from the terminal 100 to write a file to be backed up to a tape.

【0044】端末100とサーバー200は、後述する
通信ネットワーク300で接続される。サーバー200
はCPU220、メモリ230、ハードディスク210
を備え、ソフトウェアによるプログラムが実行可能であ
る。サーバー200では、図1の点線部のデータベース
管理システム70を構成する問合せ実行手段71、デー
タベースファイルアクセス手段72、トランザクション
制御手段74がプログラムとして実行される。データベ
ースファイル50は、ハードディスク210に記録され
る。テープドライブ240を備える場合、バックアップ
ファイル40を記録できる。バックアップ内容を記録す
るためのテープドライブを備える場合もある。
The terminal 100 and the server 200 are connected by a communication network 300 described later. Server 200
Is a CPU 220, a memory 230, a hard disk 210
And a software program is executable. In the server 200, a query execution unit 71, a database file access unit 72, and a transaction control unit 74 constituting the database management system 70 indicated by a dotted line in FIG. 1 are executed as programs. The database file 50 is recorded on the hard disk 210. When the tape drive 240 is provided, the backup file 40 can be recorded. In some cases, a tape drive for recording backup contents is provided.

【0045】通信ネットワーク300 端末100及びサーバー200をつなぐ伝送路である。
一般に、ケーブルで実現され、通信プロトコルにはTC
P/IPが使われる。ただし、端末100とサーバー2
00との通信プロトコルが一致すれば、ケーブルを使用
しない無線LANや放送波を使ったネットワークでも構
わない。
Communication network 300 is a transmission line connecting terminal 100 and server 200.
Generally, it is realized by cable, and the communication protocol is TC
P / IP is used. However, the terminal 100 and the server 2
As long as the communication protocol with 00 is the same, a wireless LAN without using a cable or a network using broadcast waves may be used.

【0046】本発明では、マルチバージョン同時実行制
御方式におけるバージョンの最小構成単位をデータベー
スを構成するファイル中のページとするとき、データベ
ースは図3に示したように以下の領域、即ち、ベースペ
ージ領域、バージョンページ領域、バージョンマップ領
域、論理ログ領域から構成されるとみなす。それぞれの
領域は、複数のファイルから構成される。もし、最小構
成単位がページでなくても、それがファイル以下のなん
らかの単位であれば、以下の記述中のページをそれで置
き換えることにより対応できる。
In the present invention, when the minimum configuration unit of the version in the multi-version simultaneous execution control system is a page in a file constituting the database, the database has the following area as shown in FIG. , A version page area, a version map area, and a logical log area. Each area is composed of a plurality of files. Even if the minimum constituent unit is not a page, if it is any unit below the file, it can be dealt with by replacing the page in the following description with it.

【0047】ベースページ領域には、複写元更新方式に
よって新しいバージョンを生成するとき、ページの最新
のバージョンが、複写先更新方式によって新しいバージ
ョンを生成するとき、ページの最古のバージョンが、そ
れぞれ記憶される。
In the base page area, the latest version of the page is stored when a new version is generated by the copy source update method, and the oldest version of the page is stored when the new version is generated by the copy destination update method. Is done.

【0048】バージョンページ領域には、複写元更新方
式によって新しいバージョンを生成するとき、あるペー
ジの古いバージョン、つまり、書き込みを行うページの
更新前のページイメージが、複写先更新方式によって新
しいバージョンを生成するとき、あるページの新しいバ
ージョン、つまり、書き込みを行うページの更新後のペ
ージイメージが、それぞれ記憶される。
In the version page area, when a new version is generated by the copy source update method, the old version of a certain page, that is, the page image before the update of the page to be written, is generated by the copy destination update method. Then, a new version of a certain page, that is, an updated page image of a page to be written is stored.

【0049】バージョンマップ領域には、ページの識別
子と、ベースページ、バージョンページ領域中のそのペ
ージの複数のバージョンの対応関係を記憶する。バージ
ョンごとにそれぞれの格納位置などの使用するマルチバ
ージョン同時実行制御方式が要求する情報を記憶する。
The version map area stores a page identifier, a base page, and the correspondence between a plurality of versions of the page in the version page area. The information required by the multi-version simultaneous execution control system to be used, such as the storage location for each version, is stored.

【0050】論理ログ領域には、データベースに対する
操作を取り消したり、再実行するための情報である論理
ログを記録する。論理ログには記録した順序をあらわす
情報も記録するので、記録した順や逆順に論理ログを読
み出すことができる。
The logical log area records a logical log as information for canceling or re-executing an operation on the database. Since information indicating the recording order is also recorded in the logical log, the logical log can be read in the recording order or in the reverse order.

【0051】あるトランザクションがあるページの最新
バージョンを更新するとき、以下の条件のいずれかを満
たせば、データベースファイルアクセス手段72は、最
新バージョンをバージョンページ領域に複写する。
When a transaction updates the latest version of a certain page, the database file access means 72 copies the latest version to the version page area if any of the following conditions is satisfied.

【0052】1.生成されてから、このバージョンは一
度も更新されていない。 2.現在実行中のトランザクションのうち、このバージ
ョンを更新したものは存在しない。 3.このバージョンについて、直前のチェックポイント
処理が終了してから、初めての更新になる。
1. This version has never been updated since it was created. 2. No currently running transaction has updated this version. 3. This version is the first update since the previous checkpoint process is completed.

【0053】最新バージョンを複写すると、複写元更新
方式の場合、複写元のバージョンが更新され、新しい最
新のバージョンとなる。逆に、複写先更新方式の場合、
複写先のバージョンが更新され、新しい最新のバージョ
ンとなる。このとき、条件3.を満たすのであれば、元
の最新のバージョンは、障害からの復旧時に、あるペー
ジを直前のチェックポイント時点の状態に回復するため
の物理ログとして使用できる。
When the latest version is copied, in the case of the copy source update method, the version of the copy source is updated to become a new latest version. Conversely, in the case of the copy destination update method,
The copy destination version is updated to the new latest version. At this time, condition 3. If so, the original latest version can be used as a physical log to recover a page to its state at the time of the last checkpoint when recovering from a failure.

【0054】論理ログ領域には、データベースに対する
操作の取り消し、再実行に関する情報のほかに、以下の
操作を行ったことをバックアップと復旧のために論理ロ
グとして記録する。 ・チェックポイント処理の開始 ・チェックポイント処理の終了 ・バックアップの開始 ・バックアップの終了 ・同期の開始 ・同期の終了
In the logical log area, in addition to information on cancellation and re-execution of operations on the database, the fact that the following operations have been performed is recorded as a logical log for backup and recovery.・ Start of checkpoint processing ・ End of checkpoint processing ・ Start of backup ・ End of backup ・ Start of synchronization ・ End of synchronization

【0055】ここで、同期とは、複写先更新方式の場合
に、現在のトランザクション、または将来開始されるト
ランザクションから参照されることのないバージョン
を、バージョンページ領域から破棄し、あるページに関
するバージョンページ領域中の参照され得る最も古いバ
ージョンを、そのページのベースページ領域中の参照さ
れることのない最も古いバージョンに上書きすることで
ある。当然、それに応じて、バージョンマップ領域もペ
ージのベースページおよびバージョンページ領域の新し
い対応関係にあわせて更新される。例えば、図3におい
て、ページ1には4つのバージョンがあり、格納位置a
とxのバージョンは参照されることがないときに同期す
ると、参照され得る最も古いバージョンである格納位置
yのバージョンで、格納位置aのバージョンを上書き
し、格納位置xとyのバージョンを破棄する。
Here, in the case of the copy destination update method, synchronization means that a version that is not referred to by a current transaction or a transaction started in the future is discarded from a version page area, and a version page relating to a certain page is discarded. The overwrite of the oldest version that can be referenced in the area with the oldest unreferenced version in the base page area of the page. Naturally, the version map area is accordingly updated according to the new correspondence between the base page of the page and the version page area. For example, in FIG. 3, page 1 has four versions and the storage location a
And the versions of x and x are synchronized when they are not referenced, the version of storage location a is overwritten with the version of storage location y, which is the oldest version that can be referenced, and the versions of storage locations x and y are discarded. .

【0056】バックアップは、上記の領域のうち、どの
領域に所属するファイルをバックアップするかによって
異なり、以下の、第1.ベース方式、第2.論理ログ方
式、第3.全ファイル方式のように行われる。
The backup differs depending on which area of the above-mentioned area belongs to which file is to be backed up. Base system, second. 2. logical log method, It works like a full file system.

【0057】第1.ベースページ方式 ベースページ領域のすべてのファイルをバックアップす
る方式である。ベースページ領域には、複写元更新方式
の場合、ページの最新のバージョンが、複写先更新方式
の場合、ページの最古のバージョンが、それぞれ記憶さ
れるので、この方式でバックアップされるのは、複写元
更新方式の場合はデータベースのバックアップ時点に存
在する最新のバージョンで、複写先更新方式の場合は最
古のバージョンである。
First. Base page method This method backs up all files in the base page area. In the base page area, the latest version of the page is stored in the case of the copy source update method, and the oldest version of the page is stored in the case of the copy destination update method. In the case of the copy source update method, it is the latest version existing at the time of backup of the database, and in the case of the copy destination update method, it is the oldest version.

【0058】バックアップは以下の1〜3の手順で行
う。
The backup is performed in the following steps 1 to 3.

【0059】1.バックアップ開始、終了指示手段20
は、データベース管理システム70へバックアップの開
始を指示する。指示を受けたデータベース管理システム
70内部の問合せ実行手段71は、以下の処理を行う。
尚、この処理は、複写元更新方式と複写先更新方式で異
なっている。
1. Backup start / end instruction means 20
Instructs the database management system 70 to start backup. The query execution means 71 in the database management system 70 receiving the instruction performs the following processing.
This process is different between the copy source update method and the copy destination update method.

【0060】先ず、複写元更新方式によって、新しいバ
ージョンを生成するデータベース管理システム70の場
合について説明する。a〜cの処理を行う。
First, the case of the database management system 70 for generating a new version by the copy source update method will be described. The processing of a to c is performed.

【0061】a.ログファイルアクセス手段75に対し
て、バックアップを開始することを表す論理ログを論理
ログ領域に記録させる。
A. The log file access means 75 is caused to record a logical log indicating the start of backup in the logical log area.

【0062】b.データベースファイルアクセス手段7
2に対して、ベースページ領域のデータベースファイル
の更新内容のうち、ディスクへ未書き込みのものの書き
込みを指示する。
B. Database file access means 7
2 instructs writing of the updated contents of the database file in the base page area that have not been written to the disk.

【0063】c.バックアップ中に更新を行うトランザ
クションにより、ベースページ領域を構成するファイル
が更新されても、バックアップされる内容の一貫性を保
証するために、データベースファイルアクセス手段72
に対して、以下のイ、ロ、ハのいずれかか、または併用
した処理を行うように指示する。
C. Even if a file that makes up the base page area is updated by a transaction that updates during backup, the database file access unit 72 ensures that the contents to be backed up are consistent.
Is instructed to perform one of the following a, b, and c, or a combined process.

【0064】イ.更新されたバッファリング内容のディ
スクへの書き込みを禁止する。図4で、ページ1につい
て、ベースページ領域中のファイル格納位置aのバージ
ョンを更新するとき、まず、バージョンページ領域のフ
ァイル格納位置xにそのバージョンを複写してから、ベ
ースページ領域を更新する。バージョンページおよびバ
ージョンマップ領域の更新内容は、ディスクに書き込ま
れるかもしれないが、ベースページ領域の更新はバッフ
ァ上のみで、ディスクには書き込まない。
A. Prohibits writing of updated buffering contents to disk. In FIG. 4, when updating the version of the page 1 at the file storage location a in the base page area, the version is first copied to the file storage location x of the version page area, and then the base page area is updated. Updates to the version page and version map area may be written to disk, while updates to the base page area are only on the buffer and not written to disk.

【0065】ロ.更新されたバッファリング内容を、更
新されたファイルが複写されていなければ、まず、複写
し、それから、複写元はそのままで、複写先へ書き込
む。図5で、ページ1について、ベースページ領域中の
ファイル格納位置aのバージョンを更新するとき、ま
ず、バージョンページ領域のファイル格納位置xにその
バージョンを複写してから、ベースページ領域を更新す
る。ベースページ、バージョンページおよびバージョン
マップ領域の更新内容は、ディスクに書き込まれるかも
しれないが、ベースページ領域については、更新された
ファイルを複写してから、複写先のファイルに書き込
む。
B. If the updated file has not been copied, the updated buffering contents are copied first, and then written to the copy destination without changing the copy source. In FIG. 5, when updating the version of the page 1 at the file storage location a in the base page area, the version is first copied to the file storage location x of the version page area, and then the base page area is updated. The updated contents of the base page, the version page, and the version map area may be written to the disk. However, for the base page area, the updated file is copied and then written to the copy destination file.

【0066】ハ.更新されたバッファリング内容は、更
新されたファイルに書き込まずに、一時ファイルが生成
されていなければ、生成し、その一時ファイルに書き込
む。図6で、ページ1について、ベースページ領域中の
ファイル格納位置aのバージョンを更新するとき、ま
ず、バージョンページ領域のファイル格納位置xにその
バージョンを複写してから、ベースページ領域を更新す
る。ベースページ、バージョンページおよびバージョン
マップ領域の更新内容は、ディスクに書き込まれるかも
しれないが、ベースページ領域については、一時ファイ
ルを生成してから、そのファイルに書き込む。
C. The updated buffering content is not written to the updated file, and if a temporary file has not been generated, it is generated and written to the temporary file. In FIG. 6, when updating the version of the page 1 at the file storage location a in the base page area, the version is first copied to the file storage location x of the version page area, and then the base page area is updated. The updated contents of the base page, the version page, and the version map area may be written to the disk. However, for the base page area, a temporary file is generated and then written to the file.

【0067】複写先更新方式によって、新しいバージョ
ンを生成するデータベース管理システムの場合は、次の
a〜dのように行う。
In the case of a database management system that generates a new version according to the copy destination update method, the following operations are performed.

【0068】a.トランザクション制御手段74に対し
て、前述の同期の開始を停止するように指示する。
A. It instructs the transaction control means 74 to stop the start of the synchronization.

【0069】b.前述の同期を実行中であれば、その終
了を待つ。もしくは、バックアップをあきらめる。
B. If the above-mentioned synchronization is being executed, the process waits for the end. Or give up the backup.

【0070】c.ログファイルアクセス手段75に対し
て、バックアップを開始することを表す論理ログを論理
ログ領域に記録させる。
C. The log file access means 75 is caused to record a logical log indicating the start of backup in the logical log area.

【0071】d.データベースファイルアクセス手段7
2に対して、ベースページ領域のデータベースファイル
の更新内容のうち、ディスクへ未書き込みのものの書き
込みを指示する。
D. Database file access means 7
2 instructs writing of the updated contents of the database file in the base page area that have not been written to the disk.

【0072】これらの処理によって、バックアップする
ベースページ領域のデータベースファイルには、バック
アップ開始時に未書き込みの更新内容がディスクに反映
され、バックアップが終了するまで、その更新を禁止す
るので、バックアップ内容の一貫性が保証される。
By these processes, the unwritten update contents are reflected on the disk at the start of the backup in the database file of the base page area to be backed up, and the update is prohibited until the backup is completed. Is guaranteed.

【0073】このような1.の処理に続いて次の2.お
よび3.の処理を行う。
In the case of 1. Following the processing of 2. And 3. Is performed.

【0074】2.ファイルバックアップ手段10は、ベ
ースページ領域を構成するすべてのファイルを、テープ
などの不揮発性媒体へ複写する。
2. The file backup means 10 copies all files constituting the base page area to a non-volatile medium such as a tape.

【0075】3.バックアップ開始、終了指示手段20
は、データベース管理システム70へバックアップの終
了を指示する。指示を受けたデータベース管理システム
70内部の問合せ実行手段71は、以下の処理を行う。
この処理は、複写元更新方式と複写先更新方式で異な
る。
3. Backup start / end instruction means 20
Instructs the database management system 70 to end the backup. The query execution means 71 in the database management system 70 receiving the instruction performs the following processing.
This process differs between the copy source update method and the copy destination update method.

【0076】複写元更新方式の場合、次のa〜bの処理
を行う。 a.ログファイルアクセス手段75に対して、バックア
ップが終了したことを表す論理ログを論理ログ領域に記
録させる。 b.データベースファイルアクセス手段72に対して、
以下のイ、ロ、ハ処理を指示する。
In the case of the copy source update method, the following processes a and b are performed. a. The log file access unit 75 records a logical log indicating that the backup has been completed in the logical log area. b. For the database file access means 72,
The following a, b, and c processes are instructed.

【0077】イ.更新されたバッファリング内容のディ
スクへの書き込みを禁止していれば、解禁する。 ロ.更新されたバッファリング内容を、複写先のファイ
ルに書き込んでいれば、複写元のファイルを破棄する
か、複写先のファイルを複写元のファイルへ上書きす
る。 ハ.更新されたバッファリング内容を、一時ファイルに
書き込んでいれば、一時ファイルの内容を、実際に書き
込むべきファイルに書き込む。
B. If writing of the updated buffering contents to the disk is prohibited, the ban is released. B. If the updated buffering contents have been written to the copy destination file, the copy source file is discarded, or the copy destination file is overwritten on the copy source file. C. If the updated buffering contents have been written to a temporary file, the contents of the temporary file are written to a file to be actually written.

【0078】複写先更新方式の場合、次のa〜cの処理
を行う。 a.ログファイルアクセス手段75に対して、バックア
ップが終了したことを表す論理ログを論理ログ領域に記
録させる。 b.トランザクション制御手段74に対して、停止して
いた同期の開始を再開するように指示する。 c.バックアップ中に受け付けたが、開始されていない
同期を開始する。
In the case of the copy destination update method, the following processes a to c are performed. a. The log file access unit 75 records a logical log indicating that the backup has been completed in the logical log area. b. It instructs the transaction control means 74 to restart the stopped synchronization. c. Initiate a synchronization that was received during the backup but was not started.

【0079】第2.論理ログ方式 ベースページ領域と論理ログ領域のすべてのファイルを
バックアップする方式である。前述のように、論理ログ
領域には、トランザクションのデータベースに対する操
作を取り消したり、再実行するための情報が記憶されて
いるので、ベースページ領域に記憶されている情報を加
えれば、この方式でバックアップされるのは、複写元更
新方式の場合はデータベースのバックアップ時点に存在
する最新のバージョンで、複写先更新方式の場合は、最
古のバージョンとそのバージョンに対してバックアップ
直前までに実行されたトランザクションの内容になる。
そのため、複写元更新方式の場合は、この方式を使用す
る意味はない。
Second. Logical log method This method backs up all files in the base page area and logical log area. As described above, the logical log area stores information for canceling and re-executing a transaction's operation on the database. If information stored in the base page area is added, backup is performed in this manner. In the case of the copy source update method, the latest version that exists at the time of backup of the database is used, and in the case of the copy destination update method, the oldest version and the transaction executed immediately before the backup for that version It becomes contents of.
Therefore, in the case of the copy source update method, there is no point in using this method.

【0080】バックアップは以下の1〜3の手順で行
う。
The backup is performed according to the following steps 1 to 3.

【0081】1.バックアップ開始、終了指示手段20
は、データベース管理システム70へバックアップの開
始を指示する。指示を受けたデータベース管理システム
70内部の問合せ実行手段71は、以下のa〜fの処理
を行う。
1. Backup start / end instruction means 20
Instructs the database management system 70 to start backup. The query execution means 71 in the database management system 70 that has received the instruction performs the following processes a to f.

【0082】a.トランザクション制御手段74に対し
て、同期の開始を停止するように指示する。 b.同期を実行中であれば、その終了を待つ。もしく
は、バックアップをあきらめる。 c.ログファイルアクセス手段75に対して、バックア
ップを開始することを表す論理ログを論理ログ領域に記
録させる。 d.データベースファイルアクセス手段72に対して、
ベースページのデータベースファイルの更新内容のう
ち、ディスクへ未書き込みのものの書き込みを指示す
る。 e.ログファイルアクセス手段75に対して、論理ログ
領域のログファイルの更新内容のうち、ディスクへ未書
き込みのものの書き込みを指示する。 f.バックアップ中に更新を行うトランザクションによ
り、論理ログ領域を構成するファイルが更新されても、
バックアップされる内容の一貫性を保証するために、ロ
グファイルアクセス手段75に対して、ベースページ方
式の複写元更新方式のベースページ領域に関する処理と
同様に、以下のイ.ロ.ハ.のいずれかか、または併用
した処理を行うように指示する。
A. It instructs the transaction control means 74 to stop the start of synchronization. b. If synchronization is in progress, wait for its termination. Or give up the backup. c. The log file access means 75 is caused to record a logical log indicating the start of backup in the logical log area. d. For the database file access means 72,
Instructs writing of the updated contents of the database file of the base page that have not been written to the disk. e. It instructs the log file access unit 75 to write the updated contents of the log file in the logical log area that have not been written to the disk. f. Even if the files that make up the logical log area are updated by a transaction that updates during backup,
In order to assure the consistency of the contents to be backed up, the following a. B. C. Is instructed to perform any one of the processes described above.

【0083】イ.更新されたバッファリング内容のディ
スクへの書き込みを禁止する。 ロ.更新されたバッファリング内容を、更新されたファ
イルが複写されていなければ、まず、複写し、それか
ら、複写元はそのままで、複写先へ書き込む。 ハ.更新されたバッファリング内容は、更新されたファ
イルに書き込まずに、一時ファイルが生成されていれ
ば、生成し、その一時ファイルに書き込む。
B. Prohibits writing of updated buffering contents to disk. B. If the updated file has not been copied, the updated buffering contents are copied first, and then written to the copy destination without changing the copy source. C. The updated buffering content is not written in the updated file, but is generated and written to the temporary file if a temporary file has been generated.

【0084】これらの処理によって、バックアップする
ベースページ領域のデータベースファイルと、論理ログ
領域のログファイルには、バックアップ開始時に未書き
込みの更新内容がディスクに反映され、その内容を失う
ような更新を禁止するので、バックアップ内容の一貫性
が保証される。
With these processes, the unwritten update contents are reflected on the disk at the start of the backup in the database file of the base page area to be backed up and the log file of the logical log area, and updates that lose the contents are prohibited. Therefore, the consistency of the backup contents is guaranteed.

【0085】2.ファイルバックアップ手段10は、ベ
ースページ、論理ログ領域を構成するすべてのファイル
を、テープなどの不揮発性媒体へ複写する。
2. The file backup means 10 copies all files constituting the base page and the logical log area to a non-volatile medium such as a tape.

【0086】3.バックアップ開始、終了指示手段20
は、データベース管理システム70へバックアップの終
了を指示する。指示を受けたデータベース管理システム
70内部の問合せ実行手段71は、以下のa〜dの処理
を行う。
3. Backup start / end instruction means 20
Instructs the database management system 70 to end the backup. The query execution means 71 in the database management system 70 receiving the instruction performs the following processes a to d.

【0087】a.ログファイルアクセス手段75に対し
て、バックアップが終了したことを表す論理ログを論理
ログ領域に記録させる。 b.ログファイルアクセス手段に対して、以下のイ.
ロ.ハ.の処理を指示する。 イ.更新されたバッファリング内容のディスクへの書き
込みを禁止していれば、解禁する。 ロ.更新されたバッファリング内容を、複写先のファイ
ルに書き込んでいれば、複写元のファイルを破棄する
か、複写先のファイルを複写元のファイルへ上書きす
る。 ハ.更新されたバッファリング内容を、一時ファイルに
書き込んでいれば、一時ファイルの内容を、実際に書き
込むべきファイルに書き込む。 c.トランザクション制御手段74に対して、停止して
いた同期の開始を再開するように指示する。 d.バックアップ中に受け付けたが、開始されていない
同期を開始する。
A. The log file access unit 75 records a logical log indicating that the backup has been completed in the logical log area. b. The following a.
B. C. Is instructed. I. If writing of the updated buffering contents to the disk is prohibited, the ban is released. B. If the updated buffering contents have been written to the copy destination file, the copy source file is discarded, or the copy destination file is overwritten on the copy source file. C. If the updated buffering contents have been written to a temporary file, the contents of the temporary file are written to a file to be actually written. c. It instructs the transaction control means 74 to restart the stopped synchronization. d. Initiate a synchronization that was received during the backup but was not started.

【0088】第3.全ファイル方式 ベースページ、バージョンページ、バージョンマップ、
論理ログ領域のすべてのファイルをバックアップする方
式である。バージョンページとバージョンマップ領域に
は、ベースページに記憶されているバージョンから、複
写元更新方式の場合は古いバージョン、複写先更新方式
の場合は新しいバージョンを得るための情報が格納され
ているので、この方式でバックアップされるのは、複写
元更新方式の場合はデータベースのバックアップ時点に
存在する最新のバージョンで、複写先更新方式の場合
は、最古のバージョンと、普通のチェックポイント処理
を行っているときは、バックアップ開始時の直前のチェ
ックポイント、ファジーチェックポイント処理を行って
いるときは、バックアップ開始時から2つ前のチェック
ポイント処理終了時の最新のバージョンになる。そのた
め、論理ログ方式と同様に、複写元更新方式の場合は、
この方式を使用する意味はない。
Third. All file system base page, version page, version map,
This method backs up all files in the logical log area. The version page and the version map area store information for obtaining an old version in the case of the copy source update method and a new version in the case of the copy destination update method from the version stored in the base page. This method backs up the latest version that exists at the time of backup of the database in the case of the copy source update method, and performs the normal checkpoint processing with the oldest version in the case of the copy destination update method. If the checkpoint processing immediately before the start of the backup and the fuzzy checkpoint processing are performed, the latest version at the end of the checkpoint processing two times before the start of the backup. Therefore, like the logical log method, in the case of the copy source update method,
There is no point in using this method.

【0089】バックアップは以下の1〜3の手順で行
う。
The backup is performed in the following steps 1 to 3.

【0090】1.バックアップ開始、終了指示手段20
は、データベース管理システム70へバックアップの開
始を指示する。指示を受けたデータベース管理システム
70内部の問合せ実行手段71は、以下のa〜jの処理
を行う。
1. Backup start / end instruction means 20
Instructs the database management system 70 to start backup. The query execution means 71 in the database management system 70 that has received the instruction performs the following processes a to j.

【0091】a.トランザクション制御手段74に対し
て、同期の開始を停止するように指示する。 b.チェックポイント制御手段73に対して、チェック
ポイント処理の開始を停止するように指示する。 c.同期を実行中であれば、その終了を待つ。もしく
は、バックアップをあきらめる。 d.チェックポイント処理が実行中であれば、その終了
を待つ。もしくは、バックアップをあきらめる。 e.ログファイルアクセス手段75に対して、バックア
ップを開始することを表す論理ログを論理ログ領域に記
録させる。 f.データベースファイルアクセス手段72に対して、
ベースページ、バージョンページおよびバージョンマッ
プ領域のデータベースファイルの更新内容のうち、ディ
スクへ未書き込みのものの書き込みを指示する。 g.ログファイルアクセス手段75に対して、論理ログ
領域のログファイルの更新内容のうち、ディスクへ未書
き込みのものの書き込みを指示する。 h.バックアップ中に更新を行うトランザクションによ
り、バージョンページ領域を構成するファイルが更新さ
れても、バックアップされる内容の一貫性を保証するた
めに、バージョンページ領域でバックアップ開始時に使
用中の領域がバックアップ中に未使用になっても、再利
用しないように指示する。バックアップされるバージョ
ンマップ領域には、バックアップ開始時のあるページの
複数のバージョンの対応関係を記憶している。再利用さ
れると、あるページのバージョンとして、異なるページ
のバージョンが対応しているように見えたり、バージョ
ンが生成された順序がおかしく見えたりして、バックア
ップ内容の一貫性が失われる可能性がある。 i.バックアップ中に更新を行うトランザクションによ
り、バージョンマップ領域を構成するファイルが更新さ
れても、バックアップされる内容の一貫性を保証するた
めに、データベースファイルアクセス手段に対して、ベ
ースページ方式の複写元更新方式のベースページ領域に
関する処理と同様に、以下のイ.ロ.ハ.のいずれか
か、または併用した処理を行うように指示する。
A. It instructs the transaction control means 74 to stop the start of synchronization. b. It instructs the checkpoint control means 73 to stop the start of the checkpoint processing. c. If synchronization is in progress, wait for its termination. Or give up the backup. d. If the checkpoint process is being executed, the process waits for the end. Or give up the backup. e. The log file access means 75 is caused to record a logical log indicating the start of backup in the logical log area. f. For the database file access means 72,
It instructs writing of the updated contents of the database file in the base page, the version page, and the version map area that are not written to the disk. g. It instructs the log file access unit 75 to write the updated contents of the log file in the logical log area that have not been written to the disk. h. Even if the files that make up the version page area are updated by a transaction that updates during the backup, the area used at the start of the backup in the version page area is Instructs not to reuse even if unused. In the version map area to be backed up, the correspondence between a plurality of versions of a certain page at the start of the backup is stored. When reused, backup versions may appear to correspond to different page versions or the order in which the versions were generated may be inconsistent, resulting in inconsistent backup content. is there. i. Even if the files that make up the version map area are updated by a transaction that updates during backup, the base file copy source update must be performed on the database file access means in order to guarantee the consistency of the contents to be backed up Similar to the processing for the base page area of the method, the following a. B. C. Is instructed to perform any one of the processes described above.

【0092】イ.更新されたバッファリング内容のディ
スクへの書き込みを禁止する。 ロ.更新されたバッファリング内容を、更新されたファ
イルが複写されていなければ、まず、複写し、それか
ら、複写元はそのままで、複写先へ書き込む。 ハ.更新されたバッファリング内容は、更新されたファ
イルに書き込まずに、一時ファイルが生成されていれ
ば、生成し、その一時ファイルに書き込む。
B. Prohibits writing of updated buffering contents to disk. B. If the updated file has not been copied, the updated buffering contents are copied first, and then written to the copy destination without changing the copy source. C. The updated buffering content is not written in the updated file, but is generated and written to the temporary file if a temporary file has been generated.

【0093】j.バックアップ中に更新を行うトランザ
クションにより、論理ログ領域を構成するファイルが更
新されても、バックアップされる内容の一貫性を保証す
るために、ログファイルアクセス手段75に対して、
i.と同様の指示を行う。
J. Even if a file that makes up the logical log area is updated by a transaction that updates during the backup, the log file access unit 75 must be
i. The same instruction is performed.

【0094】これらの処理によって、バックアップする
ベースページ、バージョンページおよびバージョンマッ
プ領域のデータベースファイルと、論理ログ領域のログ
ファイルには、バックアップ開始時に未書き込みの更新
内容がディスクに反映され、その内容を失うような更新
を禁止するので、バックアップ内容の一貫性が保証され
る。
By these processes, the unwritten update contents are reflected on the disk in the base page, version page and version map area database file to be backed up, and the log file in the logical log area at the start of the backup, and the contents are stored in the disk. Prohibiting losing updates ensures the integrity of the backup content.

【0095】2.ファイルバックアップ手段20は、ベ
ースページ、バージョンページ、バージョンマップ、論
理ログ領域を構成するすべてのファイルを、テープなど
の不揮発性媒体へ複写する。
2. The file backup means 20 copies all files constituting the base page, version page, version map, and logical log area to a non-volatile medium such as a tape.

【0096】3.バックアップ開始、終了指示手段20
は、データベース管理システム70へバックアップの終
了を指示する。指示を受けたデータベース管理システム
70内部の問合せ実行手段71は、以下のa〜fの処理
を行う。
3. Backup start / end instruction means 20
Instructs the database management system 70 to end the backup. The query execution means 71 in the database management system 70 receiving the instruction performs the following processes a to f.

【0097】a.ログファイルアクセス手段75に対し
て、バックアップが終了したことを表す論理ログを論理
ログ領域に記録させる。 b.データベースファイルアクセス手段72に対して、
以下のイ.ロ.ハ.の処理を指示する。
A. The log file access unit 75 records a logical log indicating that the backup has been completed in the logical log area. b. For the database file access means 72,
The following a. B. C. Is instructed.

【0098】イ.更新されたバッファリング内容のディ
スクへの書き込みを禁止していれば、解禁する。 ロ.更新されたバッファリング内容を、複写先のファイ
ルに書き込んでいれば、複写元のファイルを破棄する
か、複写先のファイルを複写元のファイルへ上書きす
る。 ハ.更新されたバッファリング内容を、一時ファイルに
書き込んでいれば、一時ファイルの内容を、実際に書き
込むべきファイルに書き込む。
B. If writing of the updated buffering contents to the disk is prohibited, the ban is released. B. If the updated buffering contents have been written to the copy destination file, the copy source file is discarded or the copy destination file is overwritten on the copy source file. C. If the updated buffering contents have been written to a temporary file, the contents of the temporary file are written to a file to be actually written.

【0099】c.ログファイルアクセス手段75に対し
て、b.と同様の指示を行う。 d.トランザクション制御手段74に対して、停止して
いた同期の開始を再開するように指示する。 e.チェックポイント制御手段73に対して、チェック
ポイント処理の開始を再開するように指示する。 f.バックアップ中に受け付けたが、開始されていない
同期を開始する。
C. For the log file access means 75, b. The same instruction is performed. d. It instructs the transaction control means 74 to restart the stopped synchronization. e. Instruct the checkpoint control means 73 to restart the start of the checkpoint process. f. Initiate a synchronization that was accepted during backup but not started.

【0100】[0100]

【発明の効果】本発明では、同時実行制御にマルチバー
ジョン方式を使うデータベース管理プログラムを使うデ
ータベースシステムにおいて、複数のトランザクション
が最新のバージョンを更新しながら、データベースのバ
ックアップを、データベース管理プログラム専用のバッ
クアッププログラムでなく、データベースを構成するフ
ァイルに直接アクセスして、バックアップすることを可
能にする。その結果、データベースシステムが、一般の
利用者が複数のトランザクションを実行しているよう
な、通常運用状態であっても、単純な作業工程でバック
アップを行うことができ、システム管理者の作業量を減
らすことができる。
According to the present invention, in a database system using a database management program that uses a multi-version method for simultaneous execution control, a database backup is performed while a plurality of transactions update the latest version, and a backup dedicated to the database management program is performed. Allows you to directly access and back up the files that make up the database, not programs. As a result, the database system can perform backup with a simple work process even in a normal operation state in which a general user is executing multiple transactions, reducing the workload of the system administrator. Can be reduced.

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

【図1】本発明を実施したデータベースシステムのソフ
トウエア構成図である。
FIG. 1 is a software configuration diagram of a database system embodying the present invention.

【図2】同じくデータベースシステムのハードウエア構
成図である。
FIG. 2 is a hardware configuration diagram of the database system.

【図3】バージョンの最小構成単位のページの概念図で
あり、複写先更新方式における同期を説明する図であ
る。
FIG. 3 is a conceptual diagram of a page of a minimum configuration unit of a version, and is a diagram illustrating synchronization in a copy destination update method.

【図4】バージョンの最小構成単位のページの概念図で
あり、本発明のベースページ方式におけるバックアップ
処理を説明する図である。
FIG. 4 is a conceptual diagram of a page of a minimum configuration unit of a version, and is a diagram illustrating a backup process in a base page method according to the present invention.

【図5】同じく、本発明のベースページ方式におけるバ
ックアップ処理を説明する図である。
FIG. 5 is a diagram for explaining a backup process in the base page method of the present invention.

【図6】同じく、本発明のベースページ方式におけるバ
ックアップ処理を説明する図である。
FIG. 6 is a diagram illustrating a backup process in the base page method according to the present invention.

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

10;ファイルバックアップ手段 20;バックアップ開始、終了指示手段 30;問合せ入出力手段 40;バックアップファイル 50;データベースファイル 60;ログファイル 70;データベース管理システム 71;問合せ実行手段 72;データベースファイルアクセス手段 73;チェックポイント制御手段 74;トランザクション制御手段 75;ログファイルアクセス手段 100;端末 200;サーバー 300;通信ネットワーク 10; file backup means 20; backup start / end instructing means 30; query input / output means 40; backup file 50; database file 60; log file 70; database management system 71; query execution means 72; Point control means 74; transaction control means 75; log file access means 100; terminal 200; server 300;

───────────────────────────────────────────────────── フロントページの続き (72)発明者 池田 哲也 東京都大田区中馬込1丁目3番6号 株式 会社リコー内 (72)発明者 平岡 卓也 東京都大田区中馬込1丁目3番6号 株式 会社リコー内 (72)発明者 山形 純一 東京都大田区中馬込1丁目3番6号 株式 会社リコー内 Fターム(参考) 5B082 DE06 GA14 GB07  ──────────────────────────────────────────────────続 き Continued on the front page (72) Inventor Tetsuya Ikeda 1-3-6 Nakamagome, Ota-ku, Tokyo Stock inside Ricoh Company (72) Inventor Takuya Hiraoka 1-3-6 Nakamagome, Ota-ku, Tokyo Stock Ricoh Company (72) Inventor Junichi Yamagata 1-3-6 Nakamagome, Ota-ku, Tokyo F-term in Ricoh Company (reference) 5B082 DE06 GA14 GB07

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】 マルチバージョン方式のトランザクショ
ン同時実行制御を行うデータベースシステムであって、
複写元更新方式によって新しいバージョンを生成するも
のにおいて、 バックアップ開始と終了を指示される間、複数のトラン
ザクションが最新のバージョンを更新していても、デー
タベース管理システムがバックアップ対象であるデータ
ベースを構成するファイルの一貫性を保証することによ
って、データベース管理システムを介さないファイルバ
ックアップ手段により、ベースページ方式のバックアッ
プを可能としたことを特徴とするデータベースシステ
ム。
1. A database system for performing multi-version type transaction simultaneous execution control,
A file that constitutes a database to be backed up by the database management system even if multiple transactions are updating the latest version while the backup start and end are instructed in a new version created by the copy source update method A database system characterized in that base page backup can be performed by a file backup means that does not go through a database management system by guaranteeing the consistency of a database.
【請求項2】 マルチバージョン方式のトランザクショ
ン同時実行制御を行うデータベースシステムであって、
複写先更新方式によって新しいバージョンを生成するも
のにおいて、 バックアップ開始と終了を指示される間、複数のトラン
ザクションが最新のバージョンを更新していても、デー
タベース管理システムがバックアップ対象であるデータ
ベースを構成するファイルの一貫性を保証することによ
って、データベース管理システムを介さないファイルバ
ックアップ手段により、ベースページ方式のバックアッ
プを可能としたことを特徴とするデータベースシステ
ム。
2. A database system for performing multi-version type transaction simultaneous execution control,
A file that constitutes a database to be backed up by the database management system, even if multiple transactions have updated the latest version while the backup start and end are instructed in a new version created by the copy destination update method A database system characterized in that a base page backup can be performed by a file backup means that does not go through a database management system by guaranteeing the consistency of the database.
【請求項3】 マルチバージョン方式のトランザクショ
ン同時実行制御を行うデータベースシステムであって、
複写先更新方式によって新しいバージョンを生成するも
のにおいて、 バックアップ開始と終了を指示される間、複数のトラン
ザクションが最新のバージョンを更新していても、デー
タベース管理システムがバックアップ対象であるデータ
ベースを構成するファイルの一貫性を保証することによ
って、データベース管理システムを介さないファイルバ
ックアップ手段により、論理ログ方式のバックアップを
可能としたことを特徴とするデータベースシステム。
3. A database system for performing multi-version type transaction simultaneous execution control,
A file that constitutes a database to be backed up by the database management system, even if multiple transactions have updated the latest version while the backup start and end are instructed in a new version created by the copy destination update method A database system wherein logical log backup can be performed by a file backup means that does not go through a database management system by guaranteeing the consistency of the database management system.
【請求項4】 マルチバージョン方式のトランザクショ
ン同時実行制御を行うデータベースシステムであって、
複写先更新方式によって新しいバージョンを生成するも
のにおいて、 バックアップ開始と終了を指示される間、複数のトラン
ザクションが最新のバージョンを更新していても、デー
タベース管理システムがバックアップ対象であるデータ
ベースを構成するファイルの一貫性を保証することによ
って、データベース管理システムを介さないファイルバ
ックアップ手段により、全ファイル方式のバックアップ
を可能としたことを特徴とするデータベースシステム。
4. A database system for performing multi-version type transaction simultaneous execution control,
A file that constitutes a database to be backed up by the database management system, even if multiple transactions have updated the latest version while the backup start and end are instructed in a new version created by the copy destination update method A database system characterized in that backup of all file systems is enabled by file backup means that does not go through a database management system by guaranteeing the consistency of the file system.
JP2001120875A 2001-04-19 2001-04-19 Database system Pending JP2002318717A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2001120875A JP2002318717A (en) 2001-04-19 2001-04-19 Database system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2001120875A JP2002318717A (en) 2001-04-19 2001-04-19 Database system

Publications (1)

Publication Number Publication Date
JP2002318717A true JP2002318717A (en) 2002-10-31

Family

ID=18970847

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2001120875A Pending JP2002318717A (en) 2001-04-19 2001-04-19 Database system

Country Status (1)

Country Link
JP (1) JP2002318717A (en)

Cited By (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007524173A (en) * 2004-02-25 2007-08-23 マイクロソフト コーポレーション Database data recovery system and method
JP2009020914A (en) * 2008-10-14 2009-01-29 Fujitsu Ltd Storage controller, storage control program, storage control method
JP2009252149A (en) * 2008-04-10 2009-10-29 Nippon Telegr & Teleph Corp <Ntt> Database replication method, and database management system, and program
US8001344B2 (en) 2006-06-16 2011-08-16 Fujitsu Limited Storage control apparatus, storage control program, and storage control method
JP2012053660A (en) * 2010-09-01 2012-03-15 Nippon Telegr & Teleph Corp <Ntt> Backup server and operation method of the same
JP2014241059A (en) * 2013-06-12 2014-12-25 富士ゼロックス株式会社 Online backup control system and program
WO2016157492A1 (en) * 2015-04-02 2016-10-06 株式会社日立製作所 Shared resource update device and shared resource update method
KR102139087B1 (en) * 2019-09-19 2020-07-29 주식회사 티맥스티베로 Method, server, and computer readable medium for index recovery using index redo log
US11372883B2 (en) 2016-10-12 2022-06-28 Fujitsu Limited Apparatus for calculating size of processing unit, method for calculating size of processing unit, and non-transitory computer-readable storage medium for storing program

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2007524173A (en) * 2004-02-25 2007-08-23 マイクロソフト コーポレーション Database data recovery system and method
JP4638905B2 (en) * 2004-02-25 2011-02-23 マイクロソフト コーポレーション Database data recovery system and method
US8001344B2 (en) 2006-06-16 2011-08-16 Fujitsu Limited Storage control apparatus, storage control program, and storage control method
JP2009252149A (en) * 2008-04-10 2009-10-29 Nippon Telegr & Teleph Corp <Ntt> Database replication method, and database management system, and program
JP2009020914A (en) * 2008-10-14 2009-01-29 Fujitsu Ltd Storage controller, storage control program, storage control method
JP2012053660A (en) * 2010-09-01 2012-03-15 Nippon Telegr & Teleph Corp <Ntt> Backup server and operation method of the same
JP2014241059A (en) * 2013-06-12 2014-12-25 富士ゼロックス株式会社 Online backup control system and program
WO2016157492A1 (en) * 2015-04-02 2016-10-06 株式会社日立製作所 Shared resource update device and shared resource update method
JPWO2016157492A1 (en) * 2015-04-02 2017-11-24 株式会社日立製作所 Shared resource update device and shared resource update method
US10838949B2 (en) 2015-04-02 2020-11-17 Hitachi, Ltd. Shared resource update apparatus and shared resource update method
US11372883B2 (en) 2016-10-12 2022-06-28 Fujitsu Limited Apparatus for calculating size of processing unit, method for calculating size of processing unit, and non-transitory computer-readable storage medium for storing program
KR102139087B1 (en) * 2019-09-19 2020-07-29 주식회사 티맥스티베로 Method, server, and computer readable medium for index recovery using index redo log

Similar Documents

Publication Publication Date Title
US7472139B2 (en) Database recovery method applying update journal and database log
US7107294B2 (en) Method and apparatus for interrupting updates to a database to provide read-only access
US6324548B1 (en) Database backup and recovery using separate history files for database backup and audit backup
US6061769A (en) Data set backup in a shared environment
JP2505112B2 (en) Transaction management method
US8255371B2 (en) Methods and apparatuses for data protection
US4868744A (en) Method for restarting a long-running, fault-tolerant operation in a transaction-oriented data base system without burdening the system log
US7325110B2 (en) Method for acquiring snapshot
US5561795A (en) Method and apparatus for audit trail logging and data base recovery
US20050273474A1 (en) Method and system for data processing with data replication for the same
US8015155B2 (en) Non-disruptive backup copy in a database online reorganization environment
CN109542682B (en) Data backup method, device, equipment and storage medium
JP2003280964A (en) Method for acquiring snapshot, storage system and disk device
JPH0823841B2 (en) Data processing system and method
US20070130228A1 (en) Filesystem snapshot enhancement to improve system performance
EP1952283A2 (en) Apparatus and method for creating a real time database replica
JPH05197598A (en) Method and apparatus for processing transaction
JP4046893B2 (en) Database copying apparatus, database copying method, and computer-readable recording medium recording a database copying program
US7194486B2 (en) Method and system for data processing with data replication for the same
JP2002318717A (en) Database system
JP2003162438A (en) Database management system
JP2003223350A (en) Data base system
JPH10289217A (en) Log stream management system
JP4127461B2 (en) Backup system and method in disk shared file system
JPH10289141A (en) Method for managing log stream of multi-system environment