JP2008234142A - Batch processing restoration method and system, and program - Google Patents
Batch processing restoration method and system, and program Download PDFInfo
- Publication number
- JP2008234142A JP2008234142A JP2007070642A JP2007070642A JP2008234142A JP 2008234142 A JP2008234142 A JP 2008234142A JP 2007070642 A JP2007070642 A JP 2007070642A JP 2007070642 A JP2007070642 A JP 2007070642A JP 2008234142 A JP2008234142 A JP 2008234142A
- Authority
- JP
- Japan
- Prior art keywords
- database
- processing
- file
- recovery
- update
- 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
Links
Images
Abstract
Description
本発明は、コンピュータシステムを用いた更新系バッチ処理において、データベースとシーケンシャルファイルとを1つの処理(プログラム)で連動させて更新する場合の処理異常終了発生時の再処理のためのデータ復元技術に係り、特に、大量更新のためデータベースのコミット(更新確定)を複数回実施するような処理において異常終了した場合における再処理の準備を、容易に、且つ、正確に実現させるのに好適な技術に関するものである。 The present invention relates to a data restoration technique for reprocessing when an abnormal end of processing occurs when updating a database and a sequential file linked in one process (program) in update batch processing using a computer system. In particular, the present invention relates to a technique suitable for easily and accurately realizing preparation for reprocessing in the case of abnormal termination in a process in which a database commit (update confirmation) is performed a plurality of times for mass update. Is.
バッチ処理では、入力ファイルに格納されているレコードを順次読込み、この読込んだレコードについて処理を行い更新ファイル(データベース)に順次格納するという処理過程をジョブ毎に行う。 In batch processing, a process of sequentially reading records stored in an input file, processing the read records, and sequentially storing them in an update file (database) is performed for each job.
このようなバッチ処理は、更新系バッチ処理プログラムに従って行われるが、ファイルレコードの更新処理途中で障害が発生すると、ファイルレコードの二重更新を防止するために、一旦、更新前の状態に全てのファイルレコードを戻し、再度、ファイルレコードの最初から更新処理をやり直すようになっている。 Such batch processing is performed according to the update system batch processing program. If a failure occurs during the update process of the file record, all the state before the update is temporarily set to prevent double update of the file record. The file record is returned, and the update process is started again from the beginning of the file record.
そのために、復旧時間が長くなると共に、データベース(更新ファイル)を更新前の状態に戻す際に種々のトラブルが発生するという問題がある。 Therefore, there are problems that the recovery time becomes long and various troubles occur when the database (update file) is returned to the state before the update.
このような問題を解決する従来技術として、例えば、特許文献1に記載の技術がある。この技術は、更新系バッチ処理プログラムの障害発生時における更新ファイルの復旧処理をなくして、バッチ処理再開を直ちに行い得るようにしたものである。 As a conventional technique for solving such a problem, for example, there is a technique described in Patent Document 1. This technique eliminates the update file recovery process when a failure occurs in the update batch processing program, so that the batch process can be resumed immediately.
具体的には、入力ファイルから順次レコードを読込んでこの読込みレコードについて処理を行い更新ファイルに順次格納する処理過程をジョブ毎に行うようにしたバッチ処理システムにおいて、ジョブ毎に処理済みのレコード数を記録する処理レコード記録手段と、所定ジョブの開始指令に応答して、処理レコード記録手段に記録されている当該ジョブ対応のレコード数を検索する手段と、この検索された処理レコード数が初期値“0”以外の数値を示しているとき、入力ファイル内の数値の次のレコードから処理を開始する手段とを設けたものである。 Specifically, in a batch processing system that reads a record sequentially from an input file, processes the read record, and sequentially stores it in an update file for each job, the number of records processed for each job is calculated. A processing record recording means for recording; a means for searching for the number of records corresponding to the job recorded in the processing record recording means in response to a start instruction for a predetermined job; and When a numerical value other than “0” is indicated, means for starting processing from the next record of the numerical value in the input file is provided.
また、他の従来技術では、入力ファイルから順次レコードを読み込んで、データベースを更新する処理において、処理が異常終了した場合、以下のように対処している。 In another conventional technique, in the process of reading records sequentially from the input file and updating the database, the following measures are taken when the process ends abnormally.
第1の従来技術では、入力ファイルから順次レコードを読み込んで、データベースを更新する処理では、処理が異常終了した場合、コミット(更新確定)を行う前の状態の時は、データベースのロールバック機能により、データベースを更新前の状態に自動回復する。この技術では、再処理時は、異常終了の原因を除去後、再度入力ファイルの先頭レコードからデータベース更新処理を実行させる。 In the first conventional technique, in the process of sequentially reading records from the input file and updating the database, if the process ends abnormally, the state before the commit (update confirmation) is performed by the database rollback function. Automatically restore the database to its pre-update state. In this technique, at the time of reprocessing, after the cause of abnormal termination is removed, database update processing is executed again from the first record of the input file.
第2の従来技術では、大量のデータをデータベースに更新する処理において、データベースのロールバック用のエリアが膨大にならないように、適切なレコード数分の処理が終了した段階でコミット(更新確定)を実施させる。この場合、更新処理が異常終了したときは、直前のコミット(更新確定)前までデータベースを自動回復させる。この技術では、再処理時は、異常終了の原因を除去後、最終コミット(更新確定)時点までの入力ファイルのレコードを読み飛ばし、最終コミット(更新確定)時点以降のレコードからデータベース更新処理を実行させる。これにより二重更新を防止させる。 In the second prior art, in the process of updating a large amount of data to the database, commit (update confirmation) is performed at the stage when the process for the appropriate number of records is completed so that the area for rollback of the database does not become enormous. Let it be implemented. In this case, when the update process ends abnormally, the database is automatically recovered until before the last commit (update confirmation). With this technology, at the time of reprocessing, after removing the cause of abnormal termination, the records of the input file up to the time of the last commit (update confirmation) are skipped, and the database update processing is executed from the records after the last commit (update confirmation) Let This prevents double updates.
第3の従来技術では、入力ファイルから順次レコードを読み込んで、出力ファイルであるシーケンシャルファイルを更新する処理において、処理が異常終了した場合、処理前に取得した出力ファイルのバックアップを基にファイルを回復させるか、もしくは、再処理実施時、更新したレコード件数分の入力レコードを読み飛ばすことで、二重更新を起こさせないようにする。 In the third conventional technique, in the process of sequentially reading records from the input file and updating the sequential file that is the output file, if the process ends abnormally, the file is recovered based on the backup of the output file obtained before the process. Or, when reprocessing is performed, double update is prevented from occurring by skipping the input records for the number of updated records.
しかし、データベースとシーケンシャルファイルを1つの処理(プログラム)で同時に更新を行い、且つ、大量更新のためデータベースのコミット(更新確定)を複数回実施するような処理を行うシステムにおいては、異常終了した場合、ロールバック後のデータベースと更新後のシーケンシャルファイルでは、処理済み時点が異なってしまうため、同期が取れていない。このような場合、上述の特許文献1の技術を含めむ従来技術では対処できない。 However, if the system and the sequential file are updated in one process (program) at the same time, and the system that performs the process of committing the database (update confirmation) multiple times for mass update, the process ends abnormally. The database after the rollback and the sequential file after the update are not synchronized because the processed time points are different. Such a case cannot be dealt with by the conventional technique including the technique of Patent Document 1 described above.
例えば、業務プログラムにて入力ファイから順次レコードを読み込み、レコード項目のチェック処理を行った後、チェック処理(データベースの更新判定)でOKとなったレコードをデータベースへ更新し、NGとなったレコードをエラー情報としてシーケンシャルファイルに出力するような処理において、大量のデータを入力させる場合、データベースのロールバック用エリアが膨大且つ、不足しないよう、適切なレコード数分処理した場合に、コミットさせる場合である。 For example, after reading records sequentially from the input file with a business program and performing a check process for record items, the record that was OK in the check process (database update determination) is updated to the database, and the record that is NG In the process of outputting to the sequential file as error information, when a large amount of data is input, when the appropriate number of records are processed so that the database rollback area is not too large and insufficient, the commit is performed. .
このような場合、異常終了後の再処理を行うためには、処理実行前のデータベースとシーケンシャルファイルのバックアップをそれぞれ取得しておき、異常終了時には、バックアップからデータベースとシーケンシャルファイルを処理実行前の状態に回復した後、再度1件目のレコードから処理を行う必要がある。 In such a case, in order to perform reprocessing after abnormal termination, a backup of the database and sequential file before execution of the process is acquired, and at the time of abnormal termination, the database and sequential file are processed from the backup before execution. After recovering, it is necessary to perform processing from the first record again.
これにより、再処理で途中の件数までは、1回目と同じ処理を繰り返さなければならないため、時間、および、労力に無駄が発生することになる。 As a result, the same processing as the first time must be repeated up to the number of cases in the middle of reprocessing, resulting in wasted time and labor.
解決しようとする問題点は、従来の技術では、データベースの更新を単一プログラムで複数回コミットし、且つ、シーケンシャルファイルを更新する処理を行うシステムにおいては、処理が途中で異常終了した場合、データベースはロールバック機能にて直前コミット時点まで自動回復するが、シーケンシャルファイルは異常終了時点となり、データベースとシーケンシャルファイルのデータが不整合となる点である。 The problem to be solved is that, in the conventional technique, in a system that performs processing of updating a sequential file with a single program and updating a sequential file, the database is Is automatically recovered to the point of the last commit with the rollback function, but the sequential file becomes the abnormal end point and the data in the database and the sequential file become inconsistent.
本発明の目的は、これら従来技術の課題を解決し、データベースのコミット時点と連動したシーケンシャルファイルの退避と処理異常時の回復を自動的に行うことで処理異常時の対処(再実行など)を簡易的および正確に実施することを可能とすることである。 The object of the present invention is to solve the problems of the prior art, and to deal with a processing error (such as re-execution) by automatically saving a sequential file linked with the commit time of the database and automatically recovering from the processing error. It is possible to carry out simply and accurately.
上記目的を達成するため、本発明においては、業務プログラム内でデータベースのコミット時点のシーケンシャルファイルを自動的にバックアップファイルに退避して、コミット後のデータベースと整合性のとれたシーケンシャルファイルの内容を確保しておき、処理異常終了時には、DBMS機能によるデータベースのロールバック処理による回復処理と共に、シーケンシャルファイルに対しても、バッチ処理の処理制御ツールのリカバリ処理機能により、バックアップファイルからのデータ自動回復を行う。このように、コミット時点でのシーケンシャルファイル自動バックアップと、従来技術であるバッチ処理の処理制御ツールのリカバリ機能にて行うシーケンシャルファイル回復とを組み合わることにより、単一プログラムで複数回コミットする場合のデータベースおよびシーケンシャルファイルを整合性のとれた状態とすることができる。 In order to achieve the above object, in the present invention, the sequential file at the time of committing the database is automatically saved in the backup file in the business program, and the contents of the sequential file consistent with the database after committing are secured. In addition, when processing ends abnormally, automatic recovery of data from backup files is performed for sequential files as well as recovery processing by database rollback processing using the DBMS function, using the recovery processing function of the processing control tool for batch processing. . In this way, by combining sequential file automatic backup at the time of commit and sequential file recovery performed by the recovery function of the batch processing process control tool, which is a conventional technology, when committing multiple times in a single program Databases and sequential files can be kept in a consistent state.
本発明によれば、データベースの更新を単一業務プログラムで複数回コミットし、且つ、シーケンシャルファイルを更新する処理を行うバッチ処理システムにおいて、例え、業務プログラムの処理が途中で異常終了した場合にも、シーケンシャルファイルを、ロールバックされたデータベースと整合性のとれた直近のコミット完了時点の内容に自動的に回復することができ、大量データの更新を行うときに処理異常終了が発生した場合にも、処理異常終了発生時にも、データベースのコミットとシーケンシャルファイルの更新の整合性を意識することなく、異常終了時の再実行を簡易に且つ正確に行うことが可能である。 According to the present invention, in a batch processing system that performs processing for updating a database multiple times with a single business program and updating a sequential file, for example, even when the processing of a business program ends abnormally. The sequential file can be automatically recovered to the content at the time of the most recent commit completion that is consistent with the rolled back database, and even if a processing abnormal termination occurs when updating a large amount of data Even when processing abnormal termination occurs, re-execution upon abnormal termination can be performed easily and accurately without being aware of the consistency between the commit of the database and the update of the sequential file.
以下、図を用いて本発明を実施するための最良の形態例を説明する。図1は、本発明に係るバッチ処理システムの構成例を示すブロック図であり、図2は、図1におけるバッチ処理システムの本発明に係る処理動作例を示すフローチャート、図3は、図1におけるバッチ処理システムによる更新処理異常終了時のデータベースの回復処理およびシーケンシャルファイルの回復処理動作例を示す説明図、図4は、図1におけるバッチ処理システムによる更新処理異常終了までのデータベースおよびシーケンシャルファイルの更新処理動作例を示す説明図、図5は、図1におけるバッチ処理システムによる更新処理異常終了時のデータベースの回復処理動作例を示す説明図、図6は、図1におけるバッチ処理システムによる更新処理異常終了時のシーケンシャルファイルの回復処理動作例を示す説明図である。 The best mode for carrying out the present invention will be described below with reference to the drawings. FIG. 1 is a block diagram showing a configuration example of a batch processing system according to the present invention, FIG. 2 is a flowchart showing an example of processing operation according to the present invention of the batch processing system in FIG. 1, and FIG. FIG. 4 is an explanatory diagram showing an example of database recovery processing and sequential file recovery processing when the update processing is abnormally terminated by the batch processing system. FIG. 4 is a diagram of updating the database and sequential file until the batch processing system in FIG. FIG. 5 is an explanatory diagram showing an example of processing operation, FIG. 5 is an explanatory diagram showing an example of database recovery processing operation at the time of abnormal termination of update processing by the batch processing system in FIG. 1, and FIG. It is explanatory drawing which shows the recovery processing operation example of the sequential file at the time of completion | finish.
図1におけるバッチ処理システムは、プログラムされたコンピュータ処理により、データベース50とシーケンシャルファイル(図中「出力ファイル」と記載)60とを1つの処理(プログラム)で連動させて更新すると共に、処理異常終了発生時の再処理のためのデータ復元を行うものであり、CPU(Central Processing Unit)や主メモリ、表示装置、入力装置、外部記憶装置等からなり、光ディスク駆動装置等を介してCD−ROM等の記憶媒体に記録されたプログラムやデータを外部記憶装置内にインストールした後、この外部記憶装置から主メモリに読み込みCPUで処理することにより、各処理部の機能を実行することで、特に、大量更新のためデータベース50のコミット(更新確定)を複数回実施するような処理において異常終了した場合における再処理の準備を、容易に、且つ、正確に行う。
The batch processing system in FIG. 1 updates the
図1において、バッチ処理システムは、業務プログラムにて、記憶装置に格納された入力ファイル30から順次レコードを読み込み、記憶装置に格納されたデータベース50とシーケンシャルファイル60の更新を行う処理を実行するものであり、プログラムを用いてコンピュータで実現する機能として、通常実行処理部10と異常終了処理部20が設けられている。
In FIG. 1, the batch processing system executes a process of sequentially reading records from an
通常実行処理部10は、入力ファイル読み込み部11、ファイル出力部12aとデータベース更新部12bからなるデータベース更新部12、コミット部13aと出力ファイルバックアップ部13bからなるデータベース更新確定部13、コミット件数情報記録部14からなり、入力ファイル30の読み込みと、データベース50への書き込み・更新、および、データベース50のコミット(確定更新)と、当該データベース50のコミット時のコミット件数情報の記録ならびにシーケンシャルファイル60の退避(バックアップ処理)を行う。
The normal
すなわち、入力ファイル読み込み部11は、プログラム機動指令に対応して入力ファイル30から当該ジョブ対応のレコードを順次に読み込みデータベース更新部12に渡す。
That is, the input
データベース更新部12は、入力ファイル読み込み部11から渡されたレコードに対して、データチェック処理機能によりデータ項目のチェックを行い、データ項目が正しければデータベース更新部12bにより、データ編集・加工を行った後にデータベース50への書き込み・更新を行う。
The
データチェック処理機能によるデータ項目のチェックで、データ項目に誤りがあることを検出した場合には、データベース更新部12は、ファイル出力部12aにより、エラー情報として当該レコードをシーケンシャルファイル60へ出力する。
When the data check by the data check processing function detects that there is an error in the data item, the
その際、外部パラメータであるコミット間隔パラメータ40から指定されたコミットカウンタ値と業務プログラムで記録しているレコードカウント値とが一致した場合、データベース更新確定部13が起動する。
At this time, if the commit counter value designated from the
データベース更新確定部13は、コミット部13aにより、データベース50に対するコミット(更新確定)を実施すると共に、出力ファイルバックアップ部13bにより、シーケンシャルファイル60のレコード内容をバックアップファイル(図中「出力ファイルバックアップ」と記載)70に複製して退避させる。これにより、データベース50のコミット(確定更新)時点のシーケンシャルファイル60の同期を行う。
The database
コミット件数情報記録部14は、データベース更新確定部13のコミット部13aおよび出力ファイルバックアップ部13bによる、データベース50に対するコミット(更新確定)とシーケンシャルファイル60のレコード内容のバックアップファイル70への退避処理毎に、当該処理情報を記憶装置に記録する。
The commit number
このように、本例のジョブ処理システムでは、データベース50のコミット時点のシーケンシャルファイル60のレコード内容を自動的にバックアップファイル70へ退避しておくことで、ロールバック後のデータベース50と整合性のとれたバックアップファイル70を確保している。
Thus, in the job processing system of this example, the record contents of the
そして、処理異常終了時には、異常終了処理部20におけるリカバリ処理部21による処理により、データベース50の回復処理と共に、確保したバックアップファイル70からシーケンシャルファイル60のレコード内容を回復する処理を行い、データベース50との同期をとる。
When the process ends abnormally, the
本例のリカバリ処理部21は、DBMS(Data Base Managing System)の既存の機能であるロールバック処理を行うロールバック部21aと、従来技術であるバッチ処理の処理制御ツールのリカバリ機能としてのリカバリ処理を行う出力ファイル戻し部21bを具備し、ロールバック部21aにより、データベース50に対するロールバック処理を行い、出力ファイル戻し部21bにより、出力ファイルバックアップ70を用いたシーケンシャルファイル60に対するリカバリ処理を行う。
The
これにより、データベース50の更新を複数回コミットする業務プログラムが異常終了した場合に、ロールバックされたデータベース50と整合性のとれたシーケンシャルファイル60を、直近のコミット完了時点のシーケンシャルファイル70と同じ内容で自動的に回復することができる。
As a result, when the business program that commits the update of the
このように、本例のバッチ処理システムでは、コミット時点でのシーケンシャルファイル自動バックアップとバッチ処理の処理制御ツールのリカバリ機能を組み合わることにより、単一プログラムで複数回コミットする場合のデータベース50およびシーケンシャルファイル60が整合性のとれた状態となる。
In this way, in the batch processing system of this example, by combining the sequential file automatic backup at the time of committing and the recovery function of the processing control tool for batch processing, the
以下、図2を用いて、通常実行処理部10による、データベース50とシーケンシャルファイル60の更新処理の詳細を説明する。
Hereinafter, the details of the update process of the
上述したように、ここでは、業務プログラムにて入力ファイル30のレコードを順次読み込み、データチェック処理にてデータ項目をチェックし、データ項目が正しければデータ編集・加工した後にデータベース50の更新を行い、データ項目に誤りがあれば、シーケンシャルファイル60にエラー情報としてレコードを出力する処理を行い、その際、外部パラメータで指定したコミットカウンタ値(コミット間隔パラメータ40)と業務プログラムで記録しているレコードカウント値が一致した場合、データベース50のコミット(確定更新)とシーケンシャルファイル60の退避を行い、データベース50のコミット(確定更新)時点のシーケンシャルファイル60の同期を行う例を用いる。
As described above, here, the records of the
処理の実行に当たり、最初に、データベース50のコミット実行判定の基となるコミットカウンタ値を読み込む(ステップS201)。
In executing the process, first, a commit counter value that is a basis for the commit execution determination of the
次に、入力ファイル30から1レコードを読み込み(ステップS202)、コミット判定値となる入力ファイル30のレコード入力件数をカウントするレコードカウンタ値に1を設定する(ステップS203)。
Next, one record is read from the input file 30 (step S202), and 1 is set to the record counter value for counting the number of record inputs of the
続いて、入力ファイル30のレコード読み込みが終了(EOF)となるまで繰り返す処理部分(ステップS204〜S214)について説明する。
Next, the processing part (steps S204 to S214) that is repeated until the record reading of the
まず、入力したレコードの項目チェックを行い、データベース50への更新判定を実施する(ステップS205)。 First, an item check is performed on the input record to determine whether to update the database 50 (step S205).
判定の結果、データベース50への更新対象レコードであれば、データ項目の編集・加工を行い、データベース50への仮書き込みを行い(ステップS206)、また、判定結果がデータベース50の更新対象外レコードであれば、入力レコードをシーケンシャルファイル60(出力ファイル)へ出力する(ステップS207)。
As a result of the determination, if the record is an update target record in the
次に、コミットカウンタ値とレコードカウンタ値を比較し(ステップS208)、カウンタ値が同じ場合、データベース50へのコミット(更新確定)を行う(ステップS209)と共に、シーケンシャルファイル60(出力ファイル)の全レコードをバックアップ用のシーケンシャルファイル(バックアップファイル70)へ出力する(ステップS210)。
Next, the commit counter value and the record counter value are compared (step S208). If the counter values are the same, commit (update confirmation) to the
そして、レコードカウンタ値を「0」とし(ステップS211)、入力ファイル30から次の1レコードを読み込み(ステップS212)、レコードカウンタ値に1を加算(ステップS213)した後、繰り返し部分の先頭(ステップS204)へ戻る。 Then, the record counter value is set to “0” (step S211), the next one record is read from the input file 30 (step S212), and 1 is added to the record counter value (step S213). Return to S204).
尚、ステップS208での比較において、カウンタ値が異なる場合、入力ファイル30から1レコードを読み込み(ステップS212)、レコードカウンタ値に1を加算(ステップS213)した後、繰り返し部分の先頭(ステップS204)へ戻る。 In the comparison in step S208, if the counter values are different, one record is read from the input file 30 (step S212), 1 is added to the record counter value (step S213), and the beginning of the repeated portion (step S204). Return to.
入力ファイル30が最終レコードの場合には、繰り返し部分(ステップS204〜214)の処理の終了後、コミット(更新確定)を実行し(ステップS215)、処理を終了させる。尚、ステップS209およびステップS215におけるコミット実行時には、コミット件数情報記録部14において、その際の、入力レコード件数等の情報を記憶装置に記録する。
If the
次に、図3〜図6を用いて、異常終了処理部20による、更新処理異常終了時のシーケンシャルファイル60の自動回復を行う業務処理の実行例を説明する。
Next, an execution example of business processing for automatically recovering the
本例の説明では、業務プログラムにて入力ファイル30のレコードを順次読み込み、入力ファイル30のレコード読み込みが45万件目で例外データ(データチェック処理でエラーとならないデータ)やデータベース50のエリア不足などにより処理が異常終了した場合の、回復したデータベース50に同期しているシーケンシャルファイル60の自動回復機能を例とする。
In the explanation of this example, the records of the
図4に示すように、入力ファイル30からのレコードの読み込みが10万件に達する度に、データベース50におけるコミット(更新確定)とシーケンシャルファイル60(出力ファイル)に対するバックアップファイル70(退避ファイル)への退避処理が実行され、入力ファイル30のレコード読み込みが45万件目で処理が異常終了した場合(ステップ301)、データベース30は、リカバリ処理部21のロールバック部21aにより、図5に示すように、DBMSのロールバック機能により最終コミット時点である40万件目処理終了時点まで自動的に回復する(ステップ302〜303)。
As shown in FIG. 4, every time the number of records read from the
シーケンスファイル60に関しては、データベース50の最終コミット時点である40万件目処理終了時点のバックアップファイル70が自動取得されており、リカバリ処理部21の出力ファイル戻し部21b、すなわち、バッチ処理の処理制御ツールのリカバリ機能により、図6に示すように、バックアップファイル70からシーケンシャルファイル60を自動的に回復する(ステップ305〜307)。
Regarding the
これにより、データベース50とシーケンシャルファイル60はきちんと同期が取れた状況になり、異常終了の原因を除去後、再処理を行う際には、最終コミット(更新確定)時点までの入力ファイルの件数を読み飛ばす従来技術により、無駄な入力処理も無くすことが可能となる。
As a result, the
以上、図1〜図6を用いて説明したように、本例では、業務プログラム内でデータベース50のコミット時点のシーケンシャルファイル60を自動的にバックアップファイル70に退避して、コミット後のデータベース50と整合性のとれたシーケンシャルファイル60の内容を確保しておき、処理異常終了時には、DBMS機能によるデータベース50のロールバック処理による回復処理と共に、シーケンシャルファイル60に対しても、バッチ処理の処理制御ツールのリカバリ処理機能により、バックアップファイル70からのデータ自動回復を行う。
As described above with reference to FIGS. 1 to 6, in this example, in the business program, the
このように、コミット時点でのシーケンシャルファイル60のバックアップファイル70への自動バックアップと、従来技術であるバッチ処理の処理制御ツールのリカバリ機能にて行うシーケンシャルファイル回復とを組み合わることにより、単一プログラムで複数回コミットする場合のデータベース50およびシーケンシャルファイル60を整合性のとれた状態とすることができる。
In this way, a single program is obtained by combining automatic backup of the
これにより、データベース50の更新を単一業務プログラムで複数回コミットし、且つ、シーケンシャルファイル60を更新する処理を行うバッチ処理システムにおいて、例え、業務プログラムの処理が途中で異常終了した場合にも、シーケンシャルファイル60を、ロールバックされたデータベース50と整合性のとれた直近のコミット完了時点の内容に自動的に回復することができる。
Thus, in a batch processing system that commits the update of the database 50 a plurality of times with a single business program and updates the
このように、データベース50のコミット時点と連動したシーケンシャルファイル60の退避と処理異常時の回復を自動的に行うことで、大量データの更新を行うときに処理異常終了が発生した場合にも、データベース50のコミットとシーケンシャルファイル60の更新の整合性を意識することなく、異常終了時の再実行を簡易に且つ正確に行うことが可能となる。
As described above, even when processing abnormal termination occurs when updating a large amount of data by automatically saving the
すなわち、大量データの更新を行うとき、処理が異常終了した段階でデータベース50のロールバックによる回復時点に合わせて、シーケンシャルファイル60も自動的に回復させることができ、再処理のための準備を効率よく行うことが可能となる。
That is, when a large amount of data is updated, the
尚、本発明は、図1〜図6を用いて説明した例に限定されるものではなく、その要旨を逸脱しない範囲において種々変更可能である。例えば、本例では、1つのコンピュータ装置内に、バッチ処理システムとデータベース・システム等を設けた構成としているが、バッチ処理システムとデータベース・システム等を、それぞれネットワークを介して接続された個別のコンピュータ装置に設けた構成としても良い。 In addition, this invention is not limited to the example demonstrated using FIGS. 1-6, In the range which does not deviate from the summary, various changes are possible. For example, in this example, a batch processing system and a database system are provided in one computer device, but the batch processing system and the database system are connected to each other via a network. It is good also as a structure provided in the apparatus.
また、本例のコンピュータ構成に関しても、キーボードや光ディスクの駆動装置の無いコンピュータ構成としても良い。また、本例では、光ディスクを記録媒体として用いているが、FD(Flexible Disk)等を記録媒体として用いることでも良い。また、プログラムのインストールに関しても、通信装置を介してネットワーク経由でプログラムをダウンロードしてインストールすることでも良い。 The computer configuration of this example may be a computer configuration without a keyboard or optical disk drive. In this example, an optical disk is used as a recording medium. However, an FD (Flexible Disk) or the like may be used as a recording medium. As for the program installation, the program may be downloaded and installed via a network via a communication device.
10:通常実行処理部、11:入力ファイル読み込み部、12:データベース更新部、12a:ファイ出力部、12b:データベース更新部、13:データベース更新確定部、13a:コミット部、13b:出力ファイルバックアップ部、14:コミット件数情報記憶部、20:異常終了処理部、21:リカバリ処理部、21a:ロールバック部、21b:出力ファイル戻し部、30:入力ファイル、40:コミット間隔パラメータ、50:データベース、60:シーケンシャルファイル(「出力ファイル」)、70:バックアップファイル(「出力ファイルバックアップ」)。 10: Normal execution processing unit, 11: Input file reading unit, 12: Database update unit, 12a: File output unit, 12b: Database update unit, 13: Database update confirmation unit, 13a: Commit unit, 13b: Output file backup unit , 14: commit number information storage unit, 20: abnormal end processing unit, 21: recovery processing unit, 21a: rollback unit, 21b: output file return unit, 30: input file, 40: commit interval parameter, 50: database, 60: Sequential file (“output file”), 70: Backup file (“output file backup”).
Claims (4)
上記データベースのコミット時点の上記シーケンシャルファイルのデータをバックアップ装置に格納する第1のステップと、
上記データベースの回復処理と共に、上記シーケンシャルファイルに対する上記バックアップ装置からのデータ回復を行う第2のステップと
を有することを特徴とするバッチ処理回復方法。 A method of performing recovery processing from abnormal termination of data update processing of a database and a sequential file in a batch processing system by a programmed computer,
A first step of storing data of the sequential file at the time of committing the database in a backup device;
And a second step of recovering data from the backup device for the sequential file together with the recovery processing of the database.
上記第2のステップは、
上記データベースの回復処理をDBMSのロールバック機能を用いて行い、
上記シーケンシャルファイルに対する上記バックアップ装置からのデータ回復をバッチ処理制御ツールのリカバリ機能を用いて行うことを特徴とするバッチ処理回復方法。 The batch processing recovery method according to claim 1,
The second step is
Perform the database recovery process using the rollback function of the DBMS,
A batch processing recovery method characterized in that data recovery from the backup device for the sequential file is performed using a recovery function of a batch processing control tool.
請求項1もしくは請求項2のいずれかに記載のバッチ処理回復方法における各ステップでの処理を実行する手段を具備したことを特徴とするバッチ処理システム。 A system for performing recovery processing from abnormal termination of data update processing of a database and a sequential file in a batch processing device by a programmed computer,
A batch processing system comprising means for executing processing at each step in the batch processing recovery method according to claim 1.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007070642A JP2008234142A (en) | 2007-03-19 | 2007-03-19 | Batch processing restoration method and system, and program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2007070642A JP2008234142A (en) | 2007-03-19 | 2007-03-19 | Batch processing restoration method and system, and program |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2008234142A true JP2008234142A (en) | 2008-10-02 |
Family
ID=39906860
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2007070642A Pending JP2008234142A (en) | 2007-03-19 | 2007-03-19 | Batch processing restoration method and system, and program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2008234142A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114625576A (en) * | 2022-05-17 | 2022-06-14 | 广州万协通信息技术有限公司 | Power failure prevention data processing method and device |
-
2007
- 2007-03-19 JP JP2007070642A patent/JP2008234142A/en active Pending
Cited By (2)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114625576A (en) * | 2022-05-17 | 2022-06-14 | 广州万协通信息技术有限公司 | Power failure prevention data processing method and device |
CN114625576B (en) * | 2022-05-17 | 2022-10-18 | 广州万协通信息技术有限公司 | Power failure prevention data processing method and device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US9218377B2 (en) | Failure recovery and error correction techniques for data loading in information warehouses | |
US8015430B1 (en) | Using asset dependencies to identify the recovery set and optionally automate and/or optimize the recovery | |
JP2008009809A (en) | Database synchronous processing program | |
JPH04139544A (en) | Data restoring method | |
JPH11134235A (en) | Method for supporting recovery from fault of external storage device | |
CN101196839A (en) | Data renovation and synchronization process of double-flash read-only memory | |
CN115145697A (en) | Database transaction processing method and device and electronic equipment | |
CN109359093B (en) | Rule file updating method and system | |
JP2008234142A (en) | Batch processing restoration method and system, and program | |
CN110543485A (en) | Block chain reservation filing method based on snapshot | |
JP2003280963A (en) | Document management system, restoration method, program for performing restoration, and recording medium with program recorded thereon | |
CN113704277A (en) | Database-based breakpoint continuous transmission method and related device | |
JP2016115223A (en) | Database management system, database management method, and program | |
JP3613077B2 (en) | Database recovery method and program recording medium | |
JPH09274581A (en) | Data backup method | |
CN113448978B (en) | Method and device for guaranteeing data consistency in same-name image file replacement operation | |
JP2008217367A (en) | Fault restoration method and system for batch processing | |
JP6891533B2 (en) | Database device | |
JPH05143422A (en) | Updated journal managing system | |
JP2000315190A (en) | Job recovery system | |
JPH01214947A (en) | Data preserving system | |
JPH04175830A (en) | Rerun control system | |
JPH01140353A (en) | System for maintaining data in data base | |
CN115454725A (en) | Database backup method and device, electronic equipment and storage medium | |
JP3189804B2 (en) | Data backup method and device |