JPH0820992B2 - Control journal output device - Google Patents

Control journal output device

Info

Publication number
JPH0820992B2
JPH0820992B2 JP59234523A JP23452384A JPH0820992B2 JP H0820992 B2 JPH0820992 B2 JP H0820992B2 JP 59234523 A JP59234523 A JP 59234523A JP 23452384 A JP23452384 A JP 23452384A JP H0820992 B2 JPH0820992 B2 JP H0820992B2
Authority
JP
Japan
Prior art keywords
transaction
record
journal
information record
database
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.)
Expired - Lifetime
Application number
JP59234523A
Other languages
Japanese (ja)
Other versions
JPS61114335A (en
Inventor
正章 川西
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.)
NEC Corp
Original Assignee
Nippon Electric 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 Nippon Electric Co Ltd filed Critical Nippon Electric Co Ltd
Priority to JP59234523A priority Critical patent/JPH0820992B2/en
Publication of JPS61114335A publication Critical patent/JPS61114335A/en
Publication of JPH0820992B2 publication Critical patent/JPH0820992B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Description

【発明の詳細な説明】 [産業上の利用分野] 本発明は、複数のタスクが複数のデータベースを共有
して処理を実行するデータ処理システムにおけるリカバ
リを行うための制御ジャーナル出力装置に関する。
The present invention relates to a control journal output device for performing recovery in a data processing system in which a plurality of tasks share a plurality of databases and execute processing.

[従来の技術] 従来、複数のタスクが複数のデータベースを共有して
処理するデータ処理システムでは、システムダウン後の
リカバリはトランザクションの実行が途中で打ち切られ
たためにトランザクション処理の途中まで更新された状
態となっているデータベースを、ジャーナルファイルに
蓄積されたデータベース更新前情報レコードを用いて書
き戻すことにより全ての未完了トランザクションに対し
てトランザクション開始前の状態までデータベースの修
復を行う。
[Prior Art] Conventionally, in a data processing system in which a plurality of tasks share and process a plurality of databases, the recovery after the system is down is updated halfway because transaction execution is aborted midway. By using the database pre-update information record accumulated in the journal file to write back the database, the database is restored to the state before the transaction is started for all incomplete transactions.

[発明が解決しようとする問題点] この従来のデータ処理システムでは、全ての未完了ト
ランザクションに対してリカバリされたことを確認する
ためには、全てのタスクについてトランザクション処理
中であったかあるいはトランザクション処理中でなかっ
たかをトランザクション実行状態情報として制御ファイ
ルに記録しておいて、システムダウン時に殿トランザク
ションが未完了だったかを特定できるようにする必要が
あった。しかしながら、ジャーナルファイルに加えて制
御ファイルを用いる方式はデータベースを復旧するため
の2種類の情報蓄積処理と2種類のファイルを設定しな
ければならず、データベース復旧処理の効率が悪いとい
う問題があった。
[Problems to be Solved by the Invention] In this conventional data processing system, in order to confirm that all incomplete transactions have been recovered, transaction processing is being performed for all tasks or transaction processing is being performed. It was necessary to record in the control file as transaction execution status information so that it was possible to identify whether the transaction was incomplete when the system went down. However, the method of using the control file in addition to the journal file has to set two types of information storage processing and two types of files to restore the database, and there is a problem that the efficiency of the database restoration processing is low. .

したがって、本発明の目的は、システムダウンによっ
て未完了となったトランザクションによって更新された
データベースの復元処理を適正にかつ効率良く実行する
こができるようにすることにある。
Therefore, an object of the present invention is to be able to properly and efficiently execute restoration processing of a database updated by a transaction that has become incomplete due to system down.

[問題点を解決するための手段] 本発明の制御ジャーナル出力装置は、トランザクショ
ンが実行中か否かを示す情報を、該トランザクション毎
に書き込むメモリ上のトランザクション実行状態管理表
と、前記トランザクションの開始時と終了時にトランザ
クション開始情報レコードとトランザクション終了情報
レコードとをジャーナルレコードとして出力し、該トラ
ンザクションがデータベース4を更新する際に該データ
ベースの更新前の内容と更新後の内容であるトランザク
ション更新前情報レコードとトランザクション更新後情
報レコードとをジャーナルレコードとして出力するとと
もに、任意の時点において前記トランザクション実行状
態管理表を活動点ジャーナルレコードとして出力するジ
ャーナル出力制御部2bと、システムダウン後の再立ち上
げ時に、該システムダウンの直前に出力されたジャーナ
ルレコードからそれ以前に出力されたジャーナルレコー
ドへ1レコードずつ読み出し、前記トランザクション更
新後情報レコードを読み出した場合には、該トランザク
ション更新後情報レコードに対応するトランザクション
更新前情報レコードを基にして前記データベース4を復
元し、前記トランザクション終了情報レコードを読み出
した場合には、以降、該トランザクション終了情報レコ
ードを出力したトランザクションに係る前記データベー
ス更新前情報レコード、前記データベース更新後情報レ
コード、および前記トランザクション開始情報レコード
を読み飛ばし、前記活動点ジャーナルレコードを読み出
した場合には、該活動点ジャーナルレコードを基にして
前記トランザクション実行状態管理表をメモリ上に復元
し、該トランザクション実行状態管理表においてトラン
ザクションが非実行中とされた場合には処理を終了し、
該トランザクション実行状態管理表において実行中とさ
れ、かつ該活動点ジャーナルレコードを読み出すまでに
前記トランザクション終了情報レコードが読み出されな
かったトランザクションについて、その時点から前記ト
ランザクション開始情報レコードを読み出すまでの間に
読み出される前記データベース更新前情報レコードと前
記データベース更新後情報レコードを基にして前記デー
タベース4を復元したのち、処理を終了し、すべてのジ
ャーナルレコードを読み出した時点で前記活動点ジャー
ナルレコードが読み出されなかった場合には、処理を終
了するリカバリ制御部2cとを備えたことを特徴とする。
[Means for Solving Problems] A control journal output device according to the present invention includes a transaction execution state management table on a memory in which information indicating whether a transaction is being executed is written for each transaction, and the start of the transaction. At the end and at the end, the transaction start information record and the transaction end information record are output as journal records, and when the transaction updates the database 4, the transaction pre-update information record that is the content before and after the update of the database And a post-transaction update information record as journal records, and a journal output control unit 2b that outputs the transaction execution state management table as an active point journal record at an arbitrary time, and a system down. When the system restarts, the journal record output immediately before the system down is read one by one from the journal records output before that, and when the transaction updated information record is read, the transaction updated information is read. When the database 4 is restored based on the transaction pre-update information record corresponding to the record and the transaction end information record is read out, the database pre-update information related to the transaction that has output the transaction end information record If the record, the post-database update information record, and the transaction start information record are skipped and the activity point journal record is read, the The transaction execution status management table restored to the memory, the transaction in the transaction execution state management table has finished process when the in a non-running,
For a transaction that is determined to be being executed in the transaction execution state management table and for which the transaction end information record has not been read by the time the activity point journal record is read, from that point until the transaction start information record is read. After the database 4 is restored based on the pre-database-update information record and the post-database-update information record that are read, the processing is terminated, and the active-point journal record is read when all the journal records are read. If it does not exist, a recovery control unit 2c for ending the process is provided.

[実施例] 本発明の実施例について図面を参照しながら説明す
る。
Embodiments Embodiments of the present invention will be described with reference to the drawings.

第1図は本発明による制御ジャーナル出力装置の一実
施例を示す図である。本実施例は応用プログラム1と、
ジャーナルファイル3と、データベース4と、データベ
ースアクセス制御部2a、ジャーナル出力制御部2bおよび
リカバリ制御部2cを含む制御ジャーナル出力装置とから
構成される。
FIG. 1 is a diagram showing an embodiment of a control journal output device according to the present invention. In this embodiment, the application program 1
It is composed of a journal file 3, a database 4, and a control journal output device including a database access control unit 2a, a journal output control unit 2b and a recovery control unit 2c.

メモリ上の図示しないトランザクション実行状態管理
表は、トランザクション毎に、該トランザクションが実
行中であれば1、実行中でなければ0を格納する。
The transaction execution state management table (not shown) on the memory stores 1 for each transaction and 0 if the transaction is being executed.

ジャーナル出力制御部2bは、トランザクション処理を
行う応用プログラム1が実行を開始すると、トランザク
ション開始情報レコードを、また、データベース4の更
新が行われるとデータベース更新前情報レコードとデー
タベース更新後情報レコードを、またトランザクション
処理を行う応用プログラム1の実行が終了するとトラン
ザクション終了情報レコードをジャーナルファイル3に
出力する。また、非同期にトランザクション実行状態管
理表を格納する活動点ジャーナルレコードをジャーナル
ファイル3へ出力する。
The journal output control unit 2b receives a transaction start information record when the application program 1 that performs transaction processing starts execution, and a database pre-update information record and a database post-update information record when the database 4 is updated. When the execution of the application program 1 that performs the transaction processing ends, the transaction end information record is output to the journal file 3. Further, the active point journal record storing the transaction execution state management table is asynchronously output to the journal file 3.

システムダウンが発生するとリカバリ制御部2cがジャ
ーナルファイル3に最後に出力されたジャーナルレコー
ドから逆読みを始めて、データベース更新前情報レコー
ドを用いてデータベース4を書き戻す。このリカバリ処
理において、活動点ジャーナルレコードを読み出した場
合には、トランザクション実行状態管理表を復元し、該
活動点ジャーナルレコード出力前にジャーナルファイル
3に出力されたトランザクション開始情報レコードおよ
びトランザクション終了情報レコードを読み出した場合
には、トランザクション実行状態管理表の内容を更新す
るとともに、この管理表を用いてすべての未完了トラン
ザクションによって更新されたデータベースを更新前の
状態に復旧したことを判定し、リカバリ処理を完了す
る。
When the system goes down, the recovery control unit 2c starts reverse reading from the last journal record output to the journal file 3 and writes back the database 4 using the pre-database update information record. In this recovery processing, when the active point journal record is read, the transaction execution state management table is restored, and the transaction start information record and the transaction end information record output to the journal file 3 before the active point journal record is output. When it is read, the contents of the transaction execution state management table are updated, and it is determined that the database updated by all uncompleted transactions has been restored to the state before update by using this management table, and the recovery processing is performed. Complete.

次に、本実施例におけるリカバリ処理の例を第2図の
タイムチャートを参照しながら説明する。
Next, an example of recovery processing in this embodiment will be described with reference to the time chart of FIG.

次に、本発明におけるリカバリ処理の例を第2図のタ
イムチャートを参照しながら説明する。
Next, an example of recovery processing in the present invention will be described with reference to the time chart of FIG.

ここでシステム内で実行中のジョブはRON10とRON11の
ジョブであり、それぞれのジョブRON10、RON11内には、
タスクT1とタスクT2、タスクT3とタスクT4のタスクが存
在し、時刻t3の時点でシステムダウンが発生したと仮定
する。システムダンン後に実行されるリカバリ制御は、
時刻t3の最終出力ジャーナルレコードから逆読みを開始
し、トランザクションTR2が未完了であるので、このト
ランザクションTR2のデータベース更新前情報レコード
を用いてデータベース4を書き戻す。逆読みの途中でタ
スクT1で実行されたトランザクションTR1のトランザク
ション終了情報レコードが検出されるので、以降のタス
クT1のデータベース更新前情報レコードとデータベース
更新後情報レコードはすべて読み飛ばされる。時刻t2の
時点で活動点ジャーナルレコードをジャーナルファイル
3から読み出してトランザクション実行状態管理表が復
元される。この管理表から時刻t2の時点ではシステム内
に2個のジョブ、すなわちRON10とRON11が存在するこ
と、およびタスクT3とタスクT4には未完了トランザクシ
ョンが存在しないことが判断される。ジャーナルファイ
ルの逆読みの途中でトランザクション終了情報レコード
が読み出されているトランザクションTR1については、
トランザクションは完結しておりデータベースを書き戻
す必要はない。このためトランザクションTR1とTR3のデ
ータベース更新前情報レコードとデータベース更新後情
報レコードはすべて読み飛ばし、トランザクションTR2
のデータベース更新前情報レコードでデータベース4を
書き戻しながら、時刻t1の時点のトランザクションTR2
のトランザクション開始情報レコードを読み出した時点
で、すべての未完了トランザクションについてリカバリ
処理が完了したことになる。
The jobs being executed in the system are RON10 and RON11 jobs.
It is assumed that there are tasks T1 and T2, tasks T3 and T4, and the system is down at time t3. Recovery control executed after system
Reverse reading is started from the final output journal record at time t3, and transaction TR2 is incomplete, so database 4 is written back using the database pre-update information record of this transaction TR2. Since the transaction end information record of the transaction TR1 executed in the task T1 is detected in the middle of the reverse reading, all the information records before the database update and the information records after the database update of the subsequent task T1 are skipped. At time t2, the active point journal record is read from the journal file 3 and the transaction execution state management table is restored. From this management table, at time t2, it is determined that there are two jobs in the system, that is, RON10 and RON11, and that there are no incomplete transactions in tasks T3 and T4. For transaction TR1 in which the transaction end information record is being read during the backward reading of the journal file,
The transaction is complete and there is no need to write the database back. For this reason, all the information records before the database update and the information records after the database update of transactions TR1 and TR3 are skipped, and transaction TR2
Transaction TR2 at time t1 while writing back database 4 with the information record before updating the database
When the transaction start information record of is read, the recovery processing is completed for all uncompleted transactions.

[発明の効果] 以上説明したように、本発明はシステム内の全タスク
のトランザクション実行状態を管理するトランザクショ
ン実行状態管理表を設けて、これを活動点ジャーナルレ
コードとしてジャーナルファイルに非同期に出力し、シ
ステムダウン後のリカバリ処理でジャーナルファイルの
逆読みを行いつつ未完了トランザクションのデータベー
ス更新前情報レコードによってデータベースを書き戻す
と同時に、前記活動点ジャーナルレコードからトランザ
クション実行状態管理表を復元し、該活動点ジャーナル
レコード出力前に出力されたトランザクション開始情報
レコードおよびトランザクション終了情報レコードを読
み出した場合には、トランザクション実行状態管理表の
内容を更新し、この管理表を用いてすべてのタスクで実
行されていた未完了トランザクションが復旧したことを
判定し、該未完了トランザクションのデータベース更新
前情報レコードによって更新されたデータベースが書き
戻されてリカバリが終了したことを判定するものである
ので、トランザクション実行状態管理表を制御ファイル
に出力していた従来の技術に比べてデータベースの復元
処理を適正にかつ効率良く実行することができる。
[Effects of the Invention] As described above, the present invention provides the transaction execution state management table for managing the transaction execution states of all tasks in the system, and asynchronously outputs this to the journal file as an active point journal record, In the recovery process after the system goes down, the database is written back by the pre-update information record of the incomplete transaction while performing the reverse reading of the journal file, and at the same time, the transaction execution state management table is restored from the active point journal record, and the active point is restored. When the transaction start information record and transaction end information record output before the journal record output is read, the contents of the transaction execution status management table are updated and this task is executed by all tasks. The transaction execution status is determined because it is determined that the unfinished transaction that has been restored has been recovered, and that the database updated by the database pre-update information record of the unfinished transaction has been written back and the recovery has ended. Compared with the conventional technique that outputs the management table to the control file, the database restoration process can be executed properly and efficiently.

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

第1図は本発明の制御ジャーナル出力装置の一実施例を
示す図、第2図は第1図におけるリカバリの例を示すタ
イムチャートである。 1…応用プログラム、2…制御ジャーナル出力装置、2a
…データベースアクセス制御部、2b…ジャーナル出力制
御部、2c…リカバリ制御部、3…ジャーナルファイル、
4…データベース。
FIG. 1 is a diagram showing an embodiment of the control journal output device of the present invention, and FIG. 2 is a time chart showing an example of recovery in FIG. 1 ... Application program, 2 ... Control journal output device, 2a
... database access control unit, 2b ... journal output control unit, 2c ... recovery control unit, 3 ... journal file,
4 ... Database.

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】トランザクションが実行中か否かを示す情
報を、該トランザクション毎に書き込むメモリ上のトラ
ンザクション実行状態管理表と、 前記トランザクションの開始時と終了時にトランザクシ
ョン開始情報レコードとトランザクション終了情報レコ
ードとをジャーナルレコードとして出力し、該トランザ
クションがデータベース4を更新する際に該データベー
スの更新前の内容と更新後の内容であるトランザクショ
ン更新前情報レコードとトランザクション更新後情報レ
コードとをジャーナルレコードとして出力するととも
に、任意の時点において前記トランザクション実行状態
管理表を活動点ジャーナルレコードとして出力するジャ
ーナル出力制御部2bと、 システムダウン後の再立ち上げ時に、該システムダウン
の直前に出力されたジャーナルレコードからそれ以前に
出力されたジャーナルレコードへ1レコードずつ読み出
し、 前記トランザクション更新後情報レコードを読み出した
場合には、該トランザクション更新後情報レコードに対
応するトランザクション更新前情報レコードを基にして
前記データベース4を復元し、 前記トランザクション終了情報レコードを読み出した場
合には、以降、該トランザクション終了情報レコードを
出力したトランザクションに係る前記データベース更新
前情報レコード、前記データベース更新後情報レコー
ド、および前記トランザクション開始情報レコードを読
み飛ばし、 前記活動点ジャーナルレコードを読み出した場合には、
該活動点ジャーナルレコードを基にして前記トランザク
ション実行状態管理表をメモリ上に復元し、該トランザ
クション実行状態管理表においてトランザクションが非
実行中とされた場合には処理を終了し、該トランザクシ
ョン実行状態管理表において実行中とされ、かつ該活動
点ジャーナルレコードを読み出すまでに前記トランザク
ション終了情報レコードが読み出されなかったトランザ
クションについて、その時点から前記トランザクション
開始情報レコードを読み出すまでの間に読み出される前
記データベース更新前情報レコードと前記データベース
更新後情報レコードを基にして前記データベース4を復
元したのち、処理を終了し、 すべてのジャーナルレコードを読み出した時点で前記活
動点ジャーナルレコードが読み出されなかった場合に
は、処理を終了するリカバリ制御部2cとを備えたことを
特徴とする制御ジャーナル出力装置2。
1. A transaction execution state management table on a memory for writing information indicating whether or not a transaction is being executed, a transaction start information record and a transaction end information record at the start and end of the transaction. Is output as a journal record, and when the transaction updates the database 4, the pre-update information record and the post-transaction update information record, which are the contents before and after the update of the database, are output as journal records. , A journal output control unit 2b that outputs the transaction execution state management table as an active point journal record at an arbitrary point, and at the time of restarting after a system down, it is output immediately before the system down When the transaction updated information record is read one by one from the journal record output to the previously output journal record, the transaction updated information record is read based on the transaction updated information record corresponding to the transaction updated information record. When the database 4 is restored and the transaction end information record is read, thereafter, the database pre-update information record, the database post-update information record, and the transaction start information relating to the transaction that output the transaction end information record. If you skip the record and read the activity point journal record,
The transaction execution state management table is restored in the memory based on the activity point journal record, and when the transaction is not in execution in the transaction execution state management table, the processing is terminated, and the transaction execution state management is executed. The database update that is read in the table and is read from the transaction start information record until that transaction end information record is not read by the time the activity point journal record is read. After the database 4 is restored based on the previous information record and the information record after the database update, the process is terminated, and the active point journal record is not read when all the journal records are read. The control journal output device 2 is provided with a recovery control unit 2c for ending the processing.
JP59234523A 1984-11-07 1984-11-07 Control journal output device Expired - Lifetime JPH0820992B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP59234523A JPH0820992B2 (en) 1984-11-07 1984-11-07 Control journal output device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP59234523A JPH0820992B2 (en) 1984-11-07 1984-11-07 Control journal output device

Publications (2)

Publication Number Publication Date
JPS61114335A JPS61114335A (en) 1986-06-02
JPH0820992B2 true JPH0820992B2 (en) 1996-03-04

Family

ID=16972358

Family Applications (1)

Application Number Title Priority Date Filing Date
JP59234523A Expired - Lifetime JPH0820992B2 (en) 1984-11-07 1984-11-07 Control journal output device

Country Status (1)

Country Link
JP (1) JPH0820992B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0728529U (en) * 1993-06-28 1995-05-30 孝子 中村 Night sanitary napkin with enhanced bleeding leakage prevention

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US4648031A (en) * 1982-06-21 1987-03-03 International Business Machines Corporation Method and apparatus for restarting a computing system

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
「bit別冊コンピュータ・サイエンス’81」共立出版(株)P.76〜94
「コンピュータ・システムの高信頼化」(社)情報処理学会P.303〜8,P.342〜51

Also Published As

Publication number Publication date
JPS61114335A (en) 1986-06-02

Similar Documents

Publication Publication Date Title
EP0236743B1 (en) Method for restarting a long-running, fault-tolerant operation in a transaction-oriented data base system
JPS6310252A (en) Management of log data
JPH07110784A (en) Method and device for storing additional form record
JP3135714B2 (en) Checkpoint restart method
JPH0820992B2 (en) Control journal output device
JP2762816B2 (en) Transaction execution trace information collection method
JP3082344B2 (en) Disk file control device and update method
JPH0816881B2 (en) Database update method
JPS5856142B2 (en) Online recovery control method
JP2610972B2 (en) Database data integrity method
JP2822869B2 (en) Library file management device
JPH01140353A (en) System for maintaining data in data base
JPH04184641A (en) Data base restoring system
JP6891533B2 (en) Database device
JPH0385650A (en) Disk volume restoration system
JP2631185B2 (en) Database backup method
JPH04361338A (en) Transaction log data succeeding system
JPH04250539A (en) Journal acquisition system
JP2568708B2 (en) How to update the double link queue
JPH04175830A (en) Rerun control system
JPH04209044A (en) Data base control system
JPH05241971A (en) Restoring method for data on memory
JP2600965B2 (en) Transaction performance information output method
JPS58163054A (en) Member replacing system of section data set
JPH0827752B2 (en) Resource status holding device