Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JPH07101399B2 - Database deadlock processing method - Google Patents
[go: Go Back, main page]

JPH07101399B2 - Database deadlock processing method - Google Patents

Database deadlock processing method

Info

Publication number
JPH07101399B2
JPH07101399B2 JP63331977A JP33197788A JPH07101399B2 JP H07101399 B2 JPH07101399 B2 JP H07101399B2 JP 63331977 A JP63331977 A JP 63331977A JP 33197788 A JP33197788 A JP 33197788A JP H07101399 B2 JPH07101399 B2 JP H07101399B2
Authority
JP
Japan
Prior art keywords
database
file
monitor
contents
program
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
JP63331977A
Other languages
Japanese (ja)
Other versions
JPH02178855A (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
NEC Corp
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 NEC Corp filed Critical NEC Corp
Priority to JP63331977A priority Critical patent/JPH07101399B2/en
Publication of JPH02178855A publication Critical patent/JPH02178855A/en
Publication of JPH07101399B2 publication Critical patent/JPH07101399B2/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Landscapes

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

Description

【発明の詳細な説明】 〔産業上の利用分野〕 本発明は遅延変更方式を採用したデータベースシステム
におけるデッドロック処理方式に関するものである。
The present invention relates to a deadlock processing method in a database system adopting a delay change method.

〔従来の技術〕[Conventional technology]

一部のデータベースシステムでは、デッドロックおよび
その他の障害に対する保全性および性能を保つために、
いわゆる遅延変更方式を採用している。ここで、遅延変
更方式とは、データベースに対する変更が生じても処理
が一段落するまではデータベースに更新結果を書き込ま
ないでジャーナルファイル等の一次ファイルに保留して
おき、適当なタイミングで一次ファイルの内容を一括し
てデータベースに書き込むものである。なお、このよう
に一次ファイルの内容をデータベースに反映することは
静止点の確立と呼ばれている。しかして、この方式によ
れば、デッドロック等が発生した場合に一次ファイルの
内容を単に捨て去ることにより、正常であることが確認
されている前回の静止点の状態まで容易に復旧すること
ができる利点がある。
In some database systems, to maintain integrity and performance against deadlocks and other failures,
A so-called delay change method is adopted. Here, the delayed change method means that even if a change is made to the database, the update result is not written to the database and is held in the primary file such as a journal file until the processing is completed, and the contents of the primary file are updated at an appropriate timing. Are collectively written in the database. Reflecting the contents of the primary file in the database in this way is called establishment of a stationary point. According to this method, when a deadlock or the like occurs, the contents of the primary file can be simply discarded, and the state of the previous quiesce point, which is confirmed to be normal, can be easily restored. There are advantages.

ところで、従来は上記の静止点の確立の処理(静止点確
立処理)を行わせる指令、およびデッドロック等が発生
したときの復旧の処理(リカバリ処理)を行わせる指令
は利用者プログラムで行っており、利用者プログラムの
機能の一部としてそれらのプログラミングも同時に行っ
ていた。
By the way, conventionally, a command for executing the above-mentioned processing for establishing a stationary point (stationary point establishing processing) and a command for performing recovery processing (recovery processing) when a deadlock or the like occurs are executed by a user program. And, as part of the function of the user program, they were also programming at the same time.

〔発明が解決しようとする課題〕[Problems to be Solved by the Invention]

上述したように従来のデータベースシステムは、デッド
ロック等が発生しても全ての処理が無駄になるわけでは
なく、前回の静止点まで後戻りするだけで済むため、充
分有効なものであったが、利用者プログラムのプログラ
ムロジックとしては本来必要とされない静止点確立処理
やリカバリ処理の指令を行うプログラムを構成しなけれ
ばならないため、プログラミングが繁雑となる欠点があ
った。
As described above, the conventional database system is sufficiently effective because all the processing is not wasted even if a deadlock or the like occurs, and it is sufficient to go back to the previous quiesce point. As the program logic of the user program, a program for issuing a command for stationary point establishment processing and recovery processing, which is not originally required, has to be constructed, so that there is a drawback that programming becomes complicated.

また、従来のデータベースシステムでリカバリできるの
はジャーナルファイル等の1次ファイルを備えたデーダ
ベースのみであり、メモリ,レポートファイル,ジャー
ナル無し順編成ファイル等のリカバリはデータベースシ
ステムに対するリカバリ処理の指令では不可能であっ
た。そのため、これらのリカバリを行うためには、利用
者プログラムでそれらの内容を予め退避させ、デッドロ
ック等が発生した後に回復を行う複雑な処理機能を作成
しなければならず、利用者プログラムの開発が一層困難
となる欠点があった。
Also, the conventional database system can only recover a database that has primary files such as journal files, and recovery of memory, report files, sequential files without journals, etc. is not possible by a recovery processing command to the database system. Met. Therefore, in order to recover these, the user program must save their contents in advance and create a complicated processing function to perform recovery after a deadlock occurs. There was a drawback that it became more difficult.

本発明は上記の点に鑑み提案されたものであり、その目
的とするところは、利用者プログラムでデッドロック等
の対策を全く意識する必要がないと共に、メモリ,レポ
ートファイル,ジャーナル無し順編成ファイル等につい
ても同様にリカバリを行うことのできるデータベースの
デッドロック処理方式を提供することにある。
The present invention has been proposed in view of the above points, and it is an object of the present invention that a user program need not be aware of measures such as deadlocks at all, and a memory, a report file, and a journalless sequential file. It is to provide a database deadlock processing method that can similarly perform recovery for the above.

〔課題を解決するための手段〕[Means for Solving the Problems]

本発明は上記の目的を達成するため、遅延更新方式を採
用したデータベースシステムにおけるデッドロック処理
方式において、 コンパイラに設けられた実行プログラムモニタ呼出し手
段埋込み手段によりオブジェクトプログラム中の入力ト
ランザクションファイル入力ステップに埋め込まれた実
行プログラムモニタ呼出し手段と、 前記オブジェクトプログラムの実行時に前記実行プログ
ラムモニタ呼出し手段により呼出され、バッファロック
リスト量およびジャーナルファイル残余量に基づいて静
止点確立の必要性を判断し、必要と判断したときにデー
タベースの静止点確立処理の要求をデータベースモニタ
に対して行うデータベース静止点自動確立手段と、 前記静止点確立処理と同時にメモリ,レポートファイ
ル,ジャーナル無し順編成のファイル等の内容を退避エ
リアに退避させると共に、デッドロック発生時に前記実
行プログラムモニタ呼出し手段により呼出され、前記デ
ータベースのロールバックの要求を前記データベースモ
ニタに対して行うと共に、メモリ,レポートファイル,
ジャーナル無し順編成ファイル等の内容を退避エリアの
内容に基づいて復旧させるリカバリ手段とを備えるよう
にしている。
In order to achieve the above object, the present invention embeds an execution program monitor calling means embedding means provided in a compiler into an input transaction file input step in an object program in a deadlock processing method in a database system adopting a delayed update method. Executed program monitor calling means and the executed program monitor calling means at the time of executing the object program, and determines the necessity of establishing a quiesce point based on the buffer lock list amount and the journal file remaining amount, and determines that it is necessary. Database quiesce point automatic establishment means for requesting the database quiesce point establishment processing to the database monitor at the same time, and memory, report file, journalless sequential organization simultaneously with the quiesce point establishment processing While evacuating the contents of the file such as the evacuation area, it is called by the execution program monitor call unit to deadlock the event, carries out a request for rollback of the database to the database monitor, memory, report file,
A recovery means for recovering the contents of the journalless sequential file and the like based on the contents of the save area is provided.

〔作用〕[Action]

本発明のデータベースのデッドロック処理方式にあって
は、コンパイラに設けられた実行プログラムモニタ呼出
し手段埋込み手段によりオブジェクトプログラム中の入
力トランザクションファイル入力ステップに埋め込まれ
た実行プログラムモニタ呼出し手段が、このオブジェク
トプログラムの実行時に実行プログラムモニタのデータ
ベース静止点自動確立手段を呼出し、呼出されたデータ
ベース静止点自動確立手段はバッファロックリスト量お
よびジャーナルファイル残余量に基づいて静止点確立の
必要性を判断し、必要と判断したときにデータベースの
静止点確立処理の要求をデータベースモニタに対して行
い、この静止点確立処理と同時に実行プログラムモニタ
のリカバリ手段がメモリ,レポートファイル,ジャーナ
ル無し順編成ファイル等の内容を退避エリアに退避させ
る。また、デッドロック発生時に前記実行プログラムモ
ニタ呼出し手段が前記リカバリ手段を再び呼出し、デー
タベースモニタに対してデータベースのロールバックの
要求を行うと共に、メモリ,レポートファイル,ジャー
ナル無し順編成ファイル等の内容を退避エリアの内容に
基づいて復旧させる。
In the database deadlock processing method of the present invention, the execution program monitor calling means embedded in the input transaction file input step in the object program by the execution program monitor calling means embedding means provided in the compiler is the object program. The database quiesce point automatic establishment means of the execution program monitor is called at the time of execution, and the called database quiesce point automatic establishment means judges the necessity of establishing the quiesce point based on the buffer lock list amount and the journal file remaining amount, and When the determination is made, a request for establishing the quiesce point of the database is issued to the database monitor, and at the same time as the quiesce point establishing process, the recovery means of the program monitor executes the memory, the report file, and the journalless sequential organization file. Retracting the contents such as Le to the save area. Also, when a deadlock occurs, the execution program monitor calling means calls the recovery means again, requests the database monitor to roll back the database, and saves the contents of the memory, the report file, the journalless sequential organization file, etc. Restore based on the contents of the area.

〔実施例〕〔Example〕

以下、本発明の実施例につき図面を参照して説明する。 Embodiments of the present invention will be described below with reference to the drawings.

第1図は本発明のデータベースのデッドロック処理方式
を適用したデータベースシステムの一実施例を示す構成
図である。第1図において、本実施例は、データベース
16,メモリ(図示せず),レポートファイル14,ジャーナ
ル無し順編成ファイル15等を実行の過程で使用するソー
スプログラム1と、ソースプログラム1を入力してオブ
ジェクトプログラム4を出力するコンパイラ2と、オブ
ジェクトプログラム4の実行にあたって処理を監視・制
御する実行プログラムモニタ8と、実行プログラムモニ
タ8が使用する退避エリア7と、データベース16に関す
る処理を監視・制御するデータベースモニタ13とから構
成されている。なお、ジャーナルファイル17は遅延更新
を実行するためにデータベース16に対する静止点以降の
更新結果を保持する一次ファイルである。
FIG. 1 is a block diagram showing an embodiment of a database system to which the database deadlock processing method of the present invention is applied. In FIG. 1, this embodiment is a database.
16, a memory (not shown), a report file 14, a journalless sequential file 15 and the like are used in the process of execution, a source program 1 is input, and a compiler 2 that outputs an object program 4 and an object The program 4 includes an execution program monitor 8 that monitors and controls processing when executing the program 4, a save area 7 used by the execution program monitor 8, and a database monitor 13 that monitors and controls processing related to the database 16. The journal file 17 is a primary file that holds the update result after the quiesce point for the database 16 in order to execute the delayed update.

一方、本発明の特徴点として、コンパイラ2には実行プ
ログラムモニタ呼出し手段埋込み手段3が、オブジェク
トプログラム4にはソースプログラム1に対応するオブ
ジェクトプログラム本体5の他に実行プログラムモニタ
呼出し手段6が、実行プログラムモニタ8にはリカバリ
手段を構成するジャーナル無し順編成ファイル自動ロー
ルバック手段9,レポートファイル自動ロールバック手段
10,メモリ自動退避/回復手段11およびデータベース静
止点自動確立手段12がそれぞれ設けられている。なお、
各手段の機能は次の通りである。
On the other hand, as a feature of the present invention, the compiler 2 executes the execution program monitor calling means embedding means 3, and the object program 4 executes the execution program monitor calling means 6 in addition to the object program body 5 corresponding to the source program 1. The program monitor 8 has a journalless sequential file automatic rollback means 9 and a report file automatic rollback means which constitute recovery means.
10, memory automatic save / restore means 11 and database quiesce point automatic establishing means 12 are respectively provided. In addition,
The function of each means is as follows.

実行プログラムモニタ呼出し手段埋込み手段3;ソースプ
ログラム1をコンパイルしてオブジェクトプログラム4
を生成する際に、実行プログラムモニタ呼出し手段6を
オブジェクトプログラム4中に埋め込む機能。
Execution program monitor calling means Embedding means 3; Source program 1 is compiled to obtain object program 4
A function of embedding the execution program monitor calling means 6 in the object program 4 when generating the.

実行プログラムモニタ呼出し手段6;オブジェクトプログ
ラム4の実行時に実行プログラムモニタ8のデータベー
ス静止点自動確立手段12を静止点確立処理のために適宜
呼出すと共に、デッドロック発生時に実行プログラムモ
ニタ8のジャーナル無し順編成ファイル自動ロールバッ
ク手段9,レポートファイル自動ロールバック手段10,メ
モリ自動退避/回復手段11を含むリカバリ手段をリカバ
リ処理のために呼出す機能。
Execution program monitor calling means 6; When the object program 4 is executed, the database quiesce point automatic establishing means 12 of the execution program monitor 8 is properly called for quiesce point establishing processing, and when a deadlock occurs, the journal-less sequential organization of the execution program monitor 8 is executed. A function for calling recovery means including a file automatic rollback means 9, a report file automatic rollback means 10, and a memory automatic save / recovery means 11 for recovery processing.

データベース静止点自動確立手段12;オブジェクトプロ
グラム4の実行時に実行プログラムモニタ呼出し手段6
により呼出された場合、バッファロックリスト量(デー
タベース16中の各バッファに対するロック状態を示すバ
ッファリストの量)およびジャーナルファイル残余量
(ジャーナルファイル17の残余量)等により静止点確立
の必要性を判断し、必要ならば静止点確立処理の要求を
データベースモニタ13に対して行う機能。
Database quiesce point automatic establishment means 12; Execution program monitor calling means 6 when the object program 4 is executed
When called by, the necessity of establishing a quiesce point is determined by the buffer lock list amount (the amount of the buffer list indicating the lock status for each buffer in the database 16) and the journal file remaining amount (remaining amount of the journal file 17). A function of requesting the stationary point establishment process to the database monitor 13 if necessary.

ジャーナル無し順編成ファイル自動ロールバック手段9;
データベース静止点自動確立手段12の静止点確立処理と
同時にジャーナル無し順編成ファイル15の内容(ファイ
ル位置指示子)を退避エリア7に退避させると共に、デ
ッドロック発生時に実行プログラムモニタ呼出し手段6
により呼出された場合、ジャーナル無し順編成ファイル
15の内容を退避エリア7の内容に基づいて復旧させる機
能。
Journalless sequential file automatic rollback means 9;
At the same time as the quiesce point establishing process of the database quiesce point automatic establishing means 12 is performed, the contents of the journalless sequential file 15 (file position indicator) is saved in the save area 7, and the execution program monitor calling means 6 is executed when a deadlock occurs.
Journalless sequential files when called by
Function to restore the contents of 15 based on the contents of the evacuation area 7.

レポートファイル自動ロールバック手段10;データベー
ス静止点自動確立手段12の静止点確立処理と同時レポー
トファイル14の内容(ファイル位置指示子)を退避エリ
ア7に退避させると共に、デッドロック発生時に実行プ
ログラムモニタ呼出し手段6により呼出された場合、レ
ポートファイル14の内容を退避エリア7の内容に基づい
て復旧させる機能。
Report file automatic rollback means 10; Restoration point establishment processing of the database quiesce point automatic establishment means 12 and the contents of the simultaneous report file 14 (file position indicator) are saved in the save area 7, and the execution program monitor is called when deadlock occurs. A function to restore the contents of the report file 14 based on the contents of the save area 7 when called by the means 6.

メモリ自動退避/回復手段11;データベース静止点自動
確立手段12の静止点確立処理と同時にメモリの内容を退
避エリア7に退避させると共に、デッドロック発生時に
実行プログラムモニタ呼出し手段6により呼出された場
合、メモリの内容を退避エリア7の内容に基づいて復旧
させる機能。
Memory automatic save / restore means 11; When the contents of the memory are saved in the save area 7 at the same time as the static point establishment processing of the database static point automatic establishing means 12, and when called by the execution program monitor calling means 6 when a deadlock occurs, A function to restore the contents of the memory based on the contents of the save area 7.

次に上記の実施例の動作について説明する。Next, the operation of the above embodiment will be described.

先ず、コンパイラ2は入力したソースプログラム1から
オブジェクトプログラム4を生成する際に、実行プログ
ラムモニタ呼出し手段埋込み手段3により、オブジェク
トプログラム4中に、ソースプログラム1をコード化し
たオブジェクト本体5の他に実行プログラムモニタ呼出
し手段6を埋め込む。
First, when the compiler 2 generates the object program 4 from the input source program 1, the compiler 2 executes the source program 1 in the object program 4 in addition to the coded object body 5 by the execution program monitor calling means embedding means 3. The program monitor calling means 6 is embedded.

第2図はオブジェクトプログラム4のオブジェクト本体
5の例を示したものであり、以下、第1図および第2図
に沿ってオブジェクトプログラム4の実行時の動作を説
明する。なお、この利用者プログラムは、入力トランザ
クションファイル18を入力とし、必要に応じてマスタフ
ァイルであるデータベース16(ジャーナルファイル17)
を更新し、結果として出力トランザクションファイルと
してのジャーナル無し順編成ファイル15に出力すると共
に、レポートファイル14を介して出力帳票19を出力する
プログラムの例である。
FIG. 2 shows an example of the object body 5 of the object program 4, and the operation at the time of execution of the object program 4 will be described below with reference to FIGS. 1 and 2. This user program takes the input transaction file 18 as an input, and if necessary, the database 16 (journal file 17) which is a master file.
Is an example of a program that updates the output and outputs the output form 19 to the journalless sequential file 15 as an output transaction file, and also outputs the output form 19 via the report file 14.

実行が開始されると、初期処理(ステップ51)の後、入
力ファイルの読込み(ステップ52)が行われる毎に実行
プログラムモニタ呼出し手段6により実行プログラムモ
ニタ8のデータベース静止点自動確立手段12が呼出され
る。呼出されたデータベース静止点自動確立手段12はバ
ッファロックリスト量およびジャーナルファイル残余量
等により静止点確立の必要性を判断し、必要ならば静止
点確立処理の要求をデータベースモニタ13に対して行
う。すなわち、バッファロックリスト量はデータベース
16のアクセス状況を示す尺度となり、一方、ジャーナル
ファイル残余量が少なくなった場合にはオーバーフロー
の可能性が発生するため早急に静止点確立が必要である
ことから、両者を総合的に判断することにより、現時点
における静止点確立の必要性を判断できる。また、静止
点確立処理が行われる場合は、これと同時に、実行プロ
グラムモニタ8のジャーナル無し順編成ファイル自動ロ
ールバック手段9,レポートファイル自動ロールバック手
段10,メモリ自動退避/回復手段11がそれぞれジャーナ
ル無し順編成ファイル15,レポートファイル14,メモリの
内容を退避エリア7に退避させ、これらについても静止
点を確立する。
When the execution is started, after the initial processing (step 51), every time the input file is read (step 52), the execution program monitor calling means 6 calls the database stationary point automatic establishing means 12 of the execution program monitor 8. To be done. The called database quiesce point automatic establishing means 12 judges the necessity of establishing the quiesce point based on the buffer lock list amount and the journal file remaining amount, and if necessary, requests the database monitor 13 for the quiesce point establishing process. That is, the buffer lock list amount is
16 It is a measure of the access status. On the other hand, when the remaining amount of the journal file becomes small, there is a possibility of overflow, so it is necessary to establish a quiesce point as soon as possible. This makes it possible to determine the necessity of establishing a stationary point at the present time. Further, when the stationary point establishing process is performed, at the same time, the journalless sequential file automatic rollback means 9, the report file automatic rollback means 10, and the memory automatic save / recovery means 11 of the execution program monitor 8 respectively journal. The contents of the none sequential file 15, the report file 14, and the memory are saved in the save area 7, and a quiescent point is established for these as well.

そして、静止点確立処理の終了後、あるいは静止点確立
処理の必要がないと判定された場合は特に処理を行うこ
となく次のステップに移行し、該当するトランザクショ
ン処理(ステップ54,…,55)を実行する。なお、ステッ
プ53で入力終了と判断された場合にはステップ56に移行
して終了処理を行う。
Then, after the stationary point establishing process is completed, or when it is determined that the stationary point establishing process is not required, the process proceeds to the next step without performing any particular process, and the corresponding transaction process (steps 54, ..., 55) To execute. If it is determined in step 53 that the input has been completed, the process proceeds to step 56 and the end process is performed.

しかして、ステップ54のトランザクション処理でデータ
ベース16に対する更新を行い、その後のステップ55のト
ランザクション処理でデータベース16に対して更新要求
を行った際にデッドロックが発生したとすると、実行プ
ログラムモニタ呼出し手段6により実行プログラムモニ
タ8が呼出され、データベース16はデータベースモニタ
13によってロールバックされ、ジャーナル無し順編成フ
ァイル15はジャーナル無し順編成ファイルの自動ロール
バック手段9により退避エリア7の内容に基づいてロー
ルバックされ、レポートファイル14はレポートファイル
自動ロールバック手段10により退避エリア7の内容に基
づいてロールバックされ、メモリはメモリ自動退避/回
復手段11により退避エリア7の内容に基づいて回復され
る。
If a deadlock occurs when the database 16 is updated in the transaction process of step 54 and an update request is issued to the database 16 in the subsequent transaction process of step 55, the execution program monitor calling means 6 is executed. The execution program monitor 8 is called by and the database 16 is the database monitor.
13 is rolled back, the journalless sequential file 15 is rolled back by the journalless sequential file automatic rollback means 9 based on the contents of the save area 7, and the report file 14 is saved by the report file automatic rollback means 10. The memory is rolled back based on the contents of the area 7, and the memory is restored by the automatic memory saving / recovering means 11 based on the contents of the saving area 7.

これらの処理によりデータベースシステムはステップ52
以前の状態に戻され、再度処理をやり直すことにより、
あたかもデッドロックが発生しなかったように処理が続
行できる。
With these processes, the database system is step 52.
By returning to the previous state and starting the process again,
Processing can continue as if a deadlock did not occur.

〔発明の効果〕〔The invention's effect〕

以上説明したように本発明のデータベースのデッドロッ
ク処理方式にあっては、コンパイラの実行プログラムモ
ニタ呼出し手段埋込み手段によりオブジェクトプログラ
ム中の入力トランザクションファイル入力ステップに埋
め込まれた実行プログラムモニタ呼出し手段が、そのオ
ブジェクトプログラム実行中の入力トランザクションフ
ァイル入力ステップでデータベース静止点自動確立手段
を呼出し、データベース静止点自動確立手段は、バッフ
ァロックリスト量およびジャーナルファイル残余量に基
づいて静止点確立の必要性を判断し、必要と判断したと
きにデータベースの静止点確立処理の要求をデータベー
スモニタに対して行う。これにより静止点確立処理が行
われると同時にリカバリ手段によってメモリ,レポート
ファイル,ジャーナル無し順編成ファイル等の内容が退
避エリアに退避される。そして、リカバリ手段がデッド
ロック発生時に呼出されると、データベースのロールバ
ックの要求をデータベースモニタに対して行うと共にメ
モリ,レポートファイル,ジャーナル無し順編成ファイ
ル等の内容を退避エリアの内容に基づいて復旧する。こ
のため、利用者プログラム(ソースプログラム)では全
くデッドロック等に対する処理を意識する必要がなくな
り、プログラミングが非常に容易となる効果がある。
As described above, in the database deadlock processing method of the present invention, the execution program monitor calling means embedded in the input transaction file input step in the object program by the execution program monitor calling means embedding means of the compiler is The database quiesce point automatic establishment means is called in the input transaction file input step during execution of the object program, and the database quiesce point automatic establishment means judges the necessity of establishment of the quiesce point based on the buffer lock list amount and the journal file remaining amount, When it is determined that it is necessary, the database monitor is requested to establish the stationary point of the database. As a result, the quiesce point establishing process is performed, and at the same time, the recovery means saves the contents of the memory, the report file, the journalless sequential file, and the like in the save area. When the recovery means is called when a deadlock occurs, a database rollback request is issued to the database monitor and the contents of memory, report file, journalless sequential file, etc. are restored based on the contents of the save area. To do. Therefore, the user program (source program) does not need to be aware of the processing for deadlock or the like at all, and there is an effect that programming becomes very easy.

また、従来のデータベースシステムではリカバリが行え
なかったメモリ,レポートファイル,ジャーナル無し順
編成ファイル等についてもデータベースと同様にリカバ
リが可能となるため、利用者プログラムで複雑な処理を
行わなくても、静止点における処理状態を再現できる効
果がある。
Also, memory, report files, journal-less sequential files, etc., which could not be recovered by the conventional database system, can be recovered in the same way as the database, so even if the user program does not perform complicated processing There is an effect that the processing state at the point can be reproduced.

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

第1図は本発明のデータベースのデッドロック処理方式
を適用したデータベースシステムの一実施例を示す構成
図および、 第2図はその動作説明図である。 図において、 1……ソースプログラム 2……コンパイラ 3……実行プログラムモニタ呼出し手段埋込み手段 4……オブジェクトプログラム 5……オブジェクト本体 6……実行プログラムモニタ呼出し手段 7……退避エリア 8……実行プログラムモニタ 9……ジャーナル無し順編成ファイル自動ロールバック
手段 10……レポートファイル自動ロールバック手段 11……メモリ自動退避/回復手段 12……データベース静止点自動確立手段 13……データベースモニタ 14……レポートファイル 15……ジャーナル無し順編成ファイル 16……データベース 17……ジャーナルファイル 18……入力トランザクションファイル 19……出力帳票
FIG. 1 is a configuration diagram showing an embodiment of a database system to which the database deadlock processing method of the present invention is applied, and FIG. 2 is an operation explanatory diagram thereof. In the figure, 1 ... Source program 2 ... Compiler 3 ... Execution program monitor calling means Embedding means 4 ... Object program 5 ... Object body 6 ... Execution program monitor calling means 7 ... Save area 8 ... Execution program Monitor 9 …… Sequential file without journal Automatic rollback means 10 …… Report file automatic rollback means 11 …… Memory automatic save / recovery means 12 …… Database static point automatic establishment means 13 …… Database monitor 14 …… Report file 15 …… Sequential file without journal 16 …… Database 17 …… Journal file 18 …… Input transaction file 19 …… Output form

Claims (1)

【特許請求の範囲】[Claims] 【請求項1】遅延更新方式を採用したデータベースシス
テムにおけるデッドロック処理方式において、 コンパイラに設けられた実行プログラムモニタ呼出し手
段埋込み手段によりオブジェクトプログラム中の入力ト
ランザクションファイル入力ステップに埋め込まれた実
行プログラムモニタ呼出し手段と、 前記オブジェクトプログラムの実行時に前記実行プログ
ラムモニタ呼出し手段により呼出され、バッファロック
リスト量およびジャーナルファイル残余量に基づいて静
止点確立の必要性を判断し、必要と判断したときにデー
タベースの静止点確立処理の要求をデータベースモニタ
に対して行うデータベース静止点自動確立手段と、 前記静止点確立処理と同時にメモリ,レポートファイ
ル,ジャーナル無し順編成ファイル等の内容を退避エリ
アに退避させると共に、デッドロック発生時に前記実行
プログラムモニタ呼出し手段により呼出され、前記デー
タベースのロールバックの要求を前記データベースモニ
タに対して行うと共に、メモリ,レポートファイル,ジ
ャーナル無し順編成ファイル等の内容を退避エリアの内
容に基づいて復旧させるリカバリ手段とを備えたことを
特徴とするデータベースのデッドロック処理方式。
1. A deadlock processing method in a database system adopting a delayed update method, wherein an execution program monitor calling means embedded in a compiler is used to execute an execution program monitor call embedded in an input transaction file input step in an object program. And a means for calling the execution program monitor calling means at the time of executing the object program, determining the necessity of establishing a quiesce point based on the buffer lock list amount and the journal file remaining amount, and quiescing the database when it is determined to be necessary. Database quiesce point automatic establishment means for making a request for point establishment processing to the database monitor, and at the same time with the quiesce point establishment processing, the contents of memory, report file, journalless sequential organization file, etc. are saved. The contents are saved to the rear and called by the execution program monitor calling means when a deadlock occurs, requesting rollback of the database to the database monitor, and contents of memory, report file, journalless sequential file, etc. A deadlock processing method for a database, comprising: a recovery means for recovering the data based on the contents of the save area.
JP63331977A 1988-12-29 1988-12-29 Database deadlock processing method Expired - Lifetime JPH07101399B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP63331977A JPH07101399B2 (en) 1988-12-29 1988-12-29 Database deadlock processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP63331977A JPH07101399B2 (en) 1988-12-29 1988-12-29 Database deadlock processing method

Publications (2)

Publication Number Publication Date
JPH02178855A JPH02178855A (en) 1990-07-11
JPH07101399B2 true JPH07101399B2 (en) 1995-11-01

Family

ID=18249765

Family Applications (1)

Application Number Title Priority Date Filing Date
JP63331977A Expired - Lifetime JPH07101399B2 (en) 1988-12-29 1988-12-29 Database deadlock processing method

Country Status (1)

Country Link
JP (1) JPH07101399B2 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04213150A (en) * 1990-12-06 1992-08-04 Nec Corp Rerun processing system for user's program
JP2797749B2 (en) * 1991-03-25 1998-09-17 日本電気株式会社 File destruction pre-check mechanism
JP3018549B2 (en) * 1991-03-25 2000-03-13 日本電気株式会社 File destruction prevention mechanism
WO2018015984A1 (en) * 2016-07-21 2018-01-25 Nec Corporation Communication apparaus, system, rollback method, and program

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
竹下亨著「電子計算機最新プログラミング〈総合決定版〉5版〈1968−2−10〉日本経営出版会PP.383−384「V.3.7チェックポイント/リスタート」

Also Published As

Publication number Publication date
JPH02178855A (en) 1990-07-11

Similar Documents

Publication Publication Date Title
CA1273434A (en) Method for restarting a long-running, fault-tolerant operation in a transaction-oriented data base system without burdening the system log
US5065311A (en) Distributed data base system of composite subsystem type, and method fault recovery for the system
EP0762302B1 (en) Single transaction technique for a journaling file system of a computer operating system
JP3052908B2 (en) Transaction program parallel execution method and transaction program parallel execution method
JPH06318165A (en) Method for making data available in transaction adaptive system in restart after trouble
JPH096636A (en) Checkpoint acquisition system
JPH07101399B2 (en) Database deadlock processing method
US6092084A (en) One system of a multisystem environment taking over log entries owned by another system
KR100365891B1 (en) Backup/recovery Apparatus and method for non-log processing of real-time main memory database system
JP3107094B2 (en) Method and apparatus for shortening shared buffer lock period
JP3729573B2 (en) Processing takeover method for parallel processing system
JPH01180651A (en) Commit synchronization control system for report file output
JPH0827753B2 (en) How to get checkpoint dump of online system
JPH07168730A (en) Checkpoint collection method
JPH0433127A (en) Check point control system
JP2623968B2 (en) Commit synchronization control method for journalless files
JPH0324648A (en) Simultaneous file access control system
JPH0991183A (en) Database recovery device
JP2569063B2 (en) Failure recovery method for complex subsystem type online system.
JPH0827751B2 (en) Transaction resource dynamic update method
JPH04105159A (en) Work substitute system
JP2609625B2 (en) Failure recovery method for complex subsystem type distributed database system
JPH0833859B2 (en) Multiple subsystem type online system
JPS6354638A (en) Deadlock releasing system
CA2153508C (en) A method of operating a computer system

Legal Events

Date Code Title Description
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20081101

Year of fee payment: 13

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20081101

Year of fee payment: 13

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20091101

Year of fee payment: 14

EXPY Cancellation because of completion of term
FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20091101

Year of fee payment: 14