JPH03102545A - Recovery system for data base - Google Patents

Recovery system for data base

Info

Publication number
JPH03102545A
JPH03102545A JP1241551A JP24155189A JPH03102545A JP H03102545 A JPH03102545 A JP H03102545A JP 1241551 A JP1241551 A JP 1241551A JP 24155189 A JP24155189 A JP 24155189A JP H03102545 A JPH03102545 A JP H03102545A
Authority
JP
Japan
Prior art keywords
transaction log
physical page
database
page
transaction
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
JP1241551A
Other languages
Japanese (ja)
Inventor
Fumihiko Kozakura
文彦 小櫻
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.)
Fujitsu Ltd
Original Assignee
Fujitsu 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 Fujitsu Ltd filed Critical Fujitsu Ltd
Priority to JP1241551A priority Critical patent/JPH03102545A/en
Publication of JPH03102545A publication Critical patent/JPH03102545A/en
Pending legal-status Critical Current

Links

Abstract

PURPOSE:To easily execute the recovery of a data base at high speed by returning and restoring page management information and a physical page under commit operation from a transaction log to the old physical page while referring the transaction log when a fault is generated. CONSTITUTION:Corresponding to system down, a recovery processing is activated and all the physical pages are restored while being matched with the old physical pages. A saved transaction log 1 is retrieved and the physical page under the commit operation is taken out as the transaction log 1. Then, the physical page is matched with the old physical page while referring the transaction log 1.

Description

【発明の詳細な説明】 〔概要〕 データベースのリカバリを行うリカバリ方式に関し、 チェソクポイントなしにデータベースのリカバリを高速
かつ手軽に行うことを目的とし、データベースの更新な
どを排他的に行うトランザクション毎に、変更されたペ
ージ情報およびトランザクションの状態(コ柔ソト操作
中など)をトランザクショログとしでセーブしてデータ
ベースの更新などを行い、いずれかの時点で障害が発生
した場合に、上記トラザクションログを参照してページ
管理情報を旧物理ページに戻すと共に、更にトランザク
ションログからコミント操作中の物理ページを探して旧
物理ページに戻して復元するように構戒する。
[Detailed Description of the Invention] [Summary] Regarding a recovery method for recovering a database, the purpose is to perform database recovery quickly and easily without checking points, and for each transaction that exclusively performs database updates, etc. , the changed page information and transaction status (such as during a soft operation) are saved as a transaction log to update the database, and if a failure occurs at any point, the above transaction log can be saved. In addition to referencing the page management information and returning it to the old physical page, it also searches the transaction log for the physical page that is being operated on and takes precautions to return it to the old physical page and restore it.

〔産業上の利用分野〕[Industrial application field]

本発明は、データベースのリカバリを行うリカバリ方式
に関するものである。データベースシステムが普及し、
システl1ダウン時にリカバリすることが望まれている
The present invention relates to a recovery method for recovering a database. Database systems became popular,
It is desired to recover when the system I1 goes down.

〔従来の技術と発明が解決しようとする課題〕従来、デ
ータベースがシステムダウンしたときにリカバリするた
めに、更新などした情報のログをセーブし、このログが
増えすぎる前に適宜チェノクポインI・を設げてデータ
ベースの状態をセーブする。そして、何らかの原因によ
ってシステムダウンしたときに、チェノクポイント時点
のデータヘースの状態と、ログとをもどにデータベース
の状態を復元してリカバリするようにしていた。
[Problems to be solved by conventional technology and invention] Conventionally, in order to recover when a database system goes down, a log of updated information is saved, and a Chenok point I is set appropriately before the log increases too much. to save the database state. When the system goes down for some reason, recovery is done by restoring the database state based on the database state at the time of the checkpoint and the log.

このため、ログ情報が増えすぎる前に適宜にチェソクポ
イントを設けてデータベースの状態をセーブしておかな
いと、リカバリし得ないという問題があった。
For this reason, there is a problem in that recovery cannot be achieved unless the database state is saved by appropriately setting checkpoints before the log information increases too much.

本発明は、チェソクポイントなしにデータベースのリカ
バリを高速かつ手軽に行うことを目的としている。
An object of the present invention is to perform database recovery quickly and easily without using checkpoints.

操作中のものを取り出してこれを参照して物理ページを
旧物理ページに戻し、復元するようにしている。
The system takes out the one being operated on and refers to it to return the physical page to the old physical page and restore it.

従って、トランザクション毎にトランザクションログ1
をセーブずることにより、データベースの障害発生時に
このトランザクションログ1を参照して全ての物理ペー
ジを旧物理ページに合わせて容易に復元することが可能
となる。
Therefore, transaction log 1 for each transaction
By saving the transaction log 1, when a database failure occurs, it is possible to refer to this transaction log 1 and easily restore all physical pages to match the old physical pages.

〔実施例〕〔Example〕

次に、第■図および第2図を用いて本発明のl実施例の
構戒および動作を順次訂細に説明する。
Next, the structure and operation of the first embodiment of the present invention will be explained in detail with reference to FIGS.

第1図において、1・ランリ′クションログ1は、デー
タヘースの更新などを排他的に行う1・ランザクション
毎に、変更されたページ情報(例えば更新、作或、消去
の識別、ページ番弓なと)および1ヘランザクションの
状態(例えばフミノI−操作中フフど)を外部記憶装置
(例えば磁気ディスク装置など)乙,二セーブしノごも
のである。
In Fig. 1, the 1-run transaction log 1 records changed page information (for example, identification of update, creation, or deletion, page number, etc.) for each 1-transaction that exclusively updates the data header. ) and the status of the first transaction (for example, Fumino I - operation in progress) are saved in an external storage device (for example, a magnetic disk device, etc.).

リカバリ処J1! 2 tel、0ないし[相]の処理
からなり、〔課題を解決する手段〕 第1図を参照して課題を解決する手段を説明する。
Recovery place J1! [Means for Solving the Problem] The means for solving the problem will be explained with reference to FIG. 1.

第1図において、1一ランザクションログ1ば、データ
ヘースの更新などを排他的に行う1・ランザクション毎
に、変更されたページ情報およびI・ランザクションの
状態(:Iミノト操作中など)をセーブするものである
In Figure 1, the 1-transaction log 1 records the changed page information and the status of the transaction (e.g., during operation) for each 1-transaction that exclusively updates the data header, etc. It is something to save.

リカバリ処理2ぱ、[・ランザクションログ1を参照し
てデータベースをリカバリするものである。
Recovery processing 2 refers to the transaction log 1 and recovers the database.

〔作用〕[Effect]

本発明は、第1図に示すように、トランザクション@′
に、変更されたページ情報および1・ランザクションの
状態(コミソI−操作中など)を1・ランザクションロ
グ1としてセーブし、障害発生時に、リカバリ処理2が
この1・ランリ′クションログ1を参照してページ管p
llj情報を1日物理ページに戻すと共に、更乙こ1・
ランザクンヨンログ1からコミットトランザクションロ
グ1を参照してデータベースのページ管理情報などを復
元するものである(第2図参照)。
The present invention, as shown in FIG.
The changed page information and the status of 1.transaction (commisso I - in progress, etc.) are saved as 1.transaction log 1, and when a failure occurs, recovery processing 2 saves this 1.transaction log 1. See page tube p
In addition to returning the llj information to the physical page for 1 day,
The commit transaction log 1 is referred to from the transaction log 1 to restore page management information of the database (see FIG. 2).

次に、第1図に示す順序に従い、第2図を参照して本発
明の1実施例の構或の動作を詳細に説明する。
Next, the structure and operation of one embodiment of the present invention will be described in detail in accordance with the order shown in FIG. 1 and with reference to FIG.

第1図において、0は、ユーザからの更新を受け付け、
ハソファ上に記憶する。
In FIG. 1, 0 accepts updates from the user;
Memorize it on the sofa.

@は、ハソファ上に記憶した情報を外部記憶装置上のデ
ータヘースに更新するに先立ち、バソファ」二に記憶し
た変更したページ情報、および必要に応じてトランザク
ションの状態(コ稟ノト操作中など)をトランザクショ
ンログlとして外部記憶装置にセーブする。
Before updating the information stored on the bus sofa to the data directory on the external storage device, @ will update the changed page information stored on the bus sofa and the transaction status (such as during a command operation) as necessary. Save it to an external storage device as a transaction log l.

■は′、データベースの更新を開始する。■Start updating the database.

■は、データヘースの更新中などに何らかの原因によっ
てシステムダウンが発生ずる。
In case (2), the system goes down for some reason, such as while updating the data directory.

■は,、■でシステムダウンしたことに対応して、シス
テムの角立ら上げを行い、本実施例に係るリカバリ処理
2を起動し、[相]ないし[相]の処理を行う。
In (2), in response to the system failure in (2), the system is started up, the recovery process 2 according to the present embodiment is started, and the [phase] to [phase] processes are performed.

[相]は、すべての物理ページを旧物理ページに合わせ
る。これは、セーブしておいたトランザクションログl
のページ情報が例えば第2図(イ)ダウン時のページ管
理情報であった場合、新物理ページと旧物理ページとが
異なる下線を引いた部分についてすべて旧物理ページに
合わせ、第2図(ロ)下線を引いた部分に示すように復
元する。
[Phase] aligns all physical pages to the old physical page. This is the saved transaction log
For example, if the page information in Figure 2 (A) is the page management information at the time of downtime, all the underlined parts where the new physical page and the old physical page are different are adjusted to match the old physical page, and the page information in Figure 2 (B) is changed. ) Restore as shown in the underlined section.

Oは、コミット中のトランザクションログlを取り出す
。これは、セーブしておいたトランザクションログlを
検索してコミノト操作中(コ貴ソト命令を受け取り、コ
ミットの決定を出すまでの間)のものを、例えば第2図
(ハ)トランザクションログ(コξソト操作中)1とし
て取り出す。
O takes out the transaction log l that is being committed. This is done by searching the saved transaction log l and searching for the transaction log during the commit operation (from receiving the command to issuing the commit decision), for example, as shown in Figure 2 (c). (During ξ sort operation) Extract as 1.

[相]は、■で取り出したトランザクシゴンログ1を参
照しながら物理ページを旧物理ページに合わせる。これ
ば、第2図(ハ)トランザクションログ(コ多ソト操作
中)を参照し、例えば■に示すように[相]でリカバリ
(l》シた後の新物理ページ(一旧物理ページ)、と、
トランザクションログ(コミント操作中)の新物理ペー
ジとが等しい物理ペーランザクションログ1としてセー
ブし、障害が発生したときにこれを参照してデータベー
スのページ管理情報などを復元する構或を採用している
ため、データベースをリカバリする際に従来のチェソク
ポイントを設ける必要がなく、高速かつ簡単にリカバリ
することが可能となる。
[Phase] Adjusts the physical page to the old physical page while referring to the transaction log 1 retrieved in step (■). In this case, referring to the transaction log (during multiple operations) in Figure 2 (c), for example, as shown in ■, the new physical page (old physical page) after recovery (l) in [phase], and,
A new physical page in the transaction log (comint operation) is saved as physical transaction log 1, and when a failure occurs, this is referenced to restore database page management information, etc. Therefore, when recovering a database, there is no need to set up conventional checkpoints, and recovery can be performed quickly and easily.

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

第1図は本発明の1実施例構戒・動作説明図、第2図は
本発明の具体例説明図を示す。 図中、1ばトランザクションログ、2はリカバリ処理を
表す。
FIG. 1 is a diagram illustrating the structure and operation of an embodiment of the present invention, and FIG. 2 is a diagram illustrating a specific example of the present invention. In the figure, 1 represents a transaction log, and 2 represents a recovery process.

Claims (1)

【特許請求の範囲】 データベースのリカバリを行うリカバリ方式において、 データベースの更新などを排他的に行うトランザクショ
ン毎に、変更されたページ情報およびトランザクション
の状態(コミット操作中など)をトランザクショログ(
1)としてセーブしてデータベースの更新などを行い、 いずれかの時点で障害が発生した場合に、上記トラザク
ションログ(1)を参照してページ管理情報を旧物理ペ
ージに戻すと共に、更にトランザクションログ(1)か
らコミット操作中の物理ページを探して旧物理ページに
戻して復元するように構成したことを特徴とするデータ
ベースにおけるリカバリ方式。
[Claims] In a recovery method for recovering a database, for each transaction that exclusively updates the database, changed page information and transaction status (commit operation, etc.) are recorded in a transaction log (
1) and update the database, etc. If a failure occurs at any point, refer to the transaction log (1) above and return the page management information to the old physical page, and also update the transaction log. A recovery method for a database characterized in that it is configured to search for a physical page that is undergoing a commit operation from (1) and restore it by returning it to an old physical page.
JP1241551A 1989-09-18 1989-09-18 Recovery system for data base Pending JPH03102545A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP1241551A JPH03102545A (en) 1989-09-18 1989-09-18 Recovery system for data base

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP1241551A JPH03102545A (en) 1989-09-18 1989-09-18 Recovery system for data base

Publications (1)

Publication Number Publication Date
JPH03102545A true JPH03102545A (en) 1991-04-26

Family

ID=17076038

Family Applications (1)

Application Number Title Priority Date Filing Date
JP1241551A Pending JPH03102545A (en) 1989-09-18 1989-09-18 Recovery system for data base

Country Status (1)

Country Link
JP (1) JPH03102545A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008207885A (en) * 2007-02-23 2008-09-11 Omron Corp Paper double-feeding detector and paper double-feeding detection method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2008207885A (en) * 2007-02-23 2008-09-11 Omron Corp Paper double-feeding detector and paper double-feeding detection method

Similar Documents

Publication Publication Date Title
EP0402542B1 (en) Method of removing uncommitted changes to stored data by a database management system
CN109542682B (en) Data backup method, device, equipment and storage medium
WO2001090954A2 (en) A system and method for transaction-selective reconstruction of database objects
JPH08504528A (en) Optimization method of memory space in database
JPH11134235A (en) Method for supporting recovery from fault of external storage device
JPH03102545A (en) Recovery system for data base
JPH033046A (en) Log record control system
JPH07160563A (en) On-line backup system
JPH0962555A (en) File recovery method
JP3290182B2 (en) Data set backup method and apparatus in shared environment
JP2870308B2 (en) Database management system
JPS63262737A (en) Data base updating and recording processing method
JPH0991182A (en) Method and device for managing data base
JP2972439B2 (en) Portable terminal backup method
JPS61151754A (en) Data base recovery processing system
JPH04252342A (en) Data archive controller for information processing system
Kumar et al. Recovery in Oracle
JPH03224040A (en) File saving system and saving restoration system
JPH0962554A (en) Quiescent point save generation system
JPH06250905A (en) Collective recovery system of plural volumes
JP3253321B2 (en) Synchronization confirmation processing method for database access
KR980007158A (en) A method for recovering the T (T) -tree index structure in a distributed main memory database (DBMS)
Shin et al. An efficient log-based crash recovery scheme for nested transactions
JPH03191443A (en) Rapid recovery system for data base
JPH0418647A (en) Method and mechanism for recovering preserved binary data