JPH10214211A - Device and method for reorganizing database - Google Patents

Device and method for reorganizing database

Info

Publication number
JPH10214211A
JPH10214211A JP9015282A JP1528297A JPH10214211A JP H10214211 A JPH10214211 A JP H10214211A JP 9015282 A JP9015282 A JP 9015282A JP 1528297 A JP1528297 A JP 1528297A JP H10214211 A JPH10214211 A JP H10214211A
Authority
JP
Japan
Prior art keywords
script
maintenance
data
database
file
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.)
Granted
Application number
JP9015282A
Other languages
Japanese (ja)
Other versions
JP3614596B2 (en
Inventor
Tomonori Morita
知紀 守田
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.)
TEC CORP
Original Assignee
TEC 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 TEC CORP filed Critical TEC CORP
Priority to JP01528297A priority Critical patent/JP3614596B2/en
Publication of JPH10214211A publication Critical patent/JPH10214211A/en
Application granted granted Critical
Publication of JP3614596B2 publication Critical patent/JP3614596B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

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

Abstract

PROBLEM TO BE SOLVED: To reduce labor required for reorganizing and to improve efficiency in processing by successively and automatically performing reorganizing concerning the data table of reorganizing execution object. SOLUTION: A database system 1 loads a reorganizing job program 17 on a database management control part 12 as configuration for putting various data tables formed on a database 11 into optimum storage state. By previously setting a maintenance script corresponding to the data table of reorganizing execution object into a maintenance script file, a reorganizing job is executed by successively and automatically activating the maintenance script corresponding to the data table of reorganizing execution object as needed. Besides, even when the reorganizing job is finished in the middle after the lapse of maintenance limit time, the job can be executed the next time from that finished part. Therefore, it is not necessary for an operator to grasp both the reorganizing completed data table and the non-completed data table, either.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、コンピュータシス
テム等で利用されるデータベース上に形成された種々の
データテーブルを最適な格納状態に整理するデータベー
ス再編成技術に関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a database reorganization technique for arranging various data tables formed on a database used in a computer system or the like in an optimal storage state.

【0002】[0002]

【従来の技術】コンピュータシステム等で利用されるデ
ータベースは、データテーブルの更新,追加及び削除に
よって次第に格納状態の整然性が乱される。そうする
と、使用記憶容量が増大し、システムの性能低下を招
く。このため、ときどきデータテーブルをそれぞれ最適
な格納状態に整理するデータベースの再編成を行う必要
があった。
2. Description of the Related Art In a database used in a computer system or the like, the order of storage is gradually disturbed by updating, adding and deleting data tables. Then, the used storage capacity increases and the performance of the system deteriorates. For this reason, it has sometimes been necessary to reorganize the database to organize the data tables into optimal storage states.

【0003】従来の技術において、このようなデータベ
ースの再編成は、データベース上のデータテーブル別に
該データテーブルを再編成する手順を示したメンテナン
ススクリプトを作成し、オペレータがコンピュータシス
テムを使用して上記メンテナンススクリプトを順次起動
させることによって行っていた。ところで、上述したよ
うなデータベースの再編成は、データベースを使用しな
い時間帯に限られる。このため、再編成実行対象のデー
タテーブルが複数存在した場合に、制限時間内にすべて
のデータテーブルの再編成を完了しないことがあった。
このような場合には、オペレータが再編成を完了したデ
ータテーブルと完了していないデータテーブルとを区別
できるようにメモなどに記録して残しておき、次回はそ
の続きから再編成を行うようにする必要があった。
[0003] In the prior art, in order to reorganize such a database, a maintenance script indicating a procedure for reorganizing the data table for each data table in the database is created, and an operator uses a computer system to perform the maintenance. This was done by starting the scripts sequentially. By the way, the reorganization of the database as described above is limited to a time zone when the database is not used. For this reason, when there are a plurality of data tables to be reorganized, reorganization of all data tables may not be completed within the time limit.
In such a case, it is necessary to record the information in a memo or the like so that the operator can distinguish between the data table for which reorganization has been completed and the data table for which reorganization has not been completed, and perform reorganization from the next time. I needed to.

【0004】[0004]

【発明が解決しようとする課題】このように従来のデー
タベース再編成技術においては、オペレータがコンピュ
ータシステムを使用して再編成実行対象のデータテーブ
ルに対するメンテナンススクリプトを順次起動させなけ
ればならず、手間がかかっていた。しかも、制限時間内
にすべての再編成実行対象のデータテーブルの再編成を
完了しなかった場合に、オペレータが再編成を完了した
データテーブルと完了しなかったデータテーブルとを区
別できるようにしなければならない面倒もあった。
As described above, in the conventional database reorganization technique, an operator must sequentially start a maintenance script for a data table to be reorganized by using a computer system, which is troublesome. It was hanging. Moreover, if the reorganization of all the data tables to be reorganized is not completed within the time limit, the operator must be able to distinguish between the data tables that have been reorganized and those that have not been completed. There was also trouble that did not become.

【0005】そこで本発明は、再編成実行対象のデータ
テーブルに関して順次自動的に再編成を行うことができ
るとともに、制限時間内にすべての再編成実行対象のデ
ータテーブルの再編成を完了しなかった場合には自動的
に次回はその続きから再編成を行うことができ、再編成
に要する手間の削減及び処理効率の向上を図り得るデー
タベース再編成装置及び再編成方法を提供しようとする
ものである。
Therefore, according to the present invention, the data tables to be reorganized can be sequentially and automatically reorganized, and the reorganization of all the data tables to be reorganized has not been completed within the time limit. In this case, it is an object of the present invention to provide a database reorganization apparatus and a reorganization method that can automatically perform reorganization from the next time, and can reduce labor required for reorganization and improve processing efficiency. .

【0006】[0006]

【課題を解決するための手段】本発明のデータベース再
編成装置は、データベース上のデータテーブル別に作成
した複数のメンテナンススクリプトを記憶するメンテナ
ンススクリプトファイルと、このメンテナンススクリプ
トファイルに記憶した各メンテナンススクリプト毎に最
終実行時データを記憶するスクリプト管理ファイルと、
データベース上のデータテーブルを再編成する処理の制
限時間を設定する制限時間設定手段と、スクリプト管理
ファイルに記憶した最終実行時データが古い順にメンテ
ナンススクリプトの実行順序を決定する実行順序決定手
段と、この実行順序決定手段により決定した順序に従い
制限時間設定手段により設定された制限時間の範囲内で
メンテナンススクリプトファイルの該当するメンテナン
ススクリプトを実行してデータテーブルの再編成を行う
再編成処理手段と、この再編成処理手段により実行し終
えたメンテナンススクリプトのスクリプト管理ファイル
における最終実行時データを更新する最終実行時更新手
段とを備えたものである。
A database reorganization apparatus according to the present invention includes a maintenance script file for storing a plurality of maintenance scripts created for each data table on a database, and a maintenance script file for each of the maintenance scripts stored in the maintenance script file. A script management file that stores the last run data,
A time limit setting means for setting a time limit for a process of reorganizing a data table on the database; an execution order determining means for determining an execution order of the maintenance script in an ascending order of the last execution data stored in the script management file; Reorganization processing means for executing the corresponding maintenance script of the maintenance script file within the time limit set by the time limit setting means in accordance with the order determined by the execution order determining means to reorganize the data table; A last execution time updating means for updating last execution time data in the script management file of the maintenance script which has been executed by the composition processing means.

【0007】このものにおいて、スクリプト管理ファイ
ルは、各メンテナンススクリプト毎に最終実行時データ
とともに優先度を設定する優先度データを記憶し、実行
順序決定手段は、スクリプト管理ファイルに記憶した最
終実行時データが古い順でかつ優先度データが高い順に
メンテナンススクリプトの実行順序を決定する手段とす
ると都合がよい。また、再編成処理手段によりメンテナ
ンススクリプトを実行した結果エラーが発生した場合に
そのエラーログデータを出力する手段を設けると好都合
である。
In this apparatus, the script management file stores priority data for setting a priority together with the last execution data for each maintenance script, and the execution order determining means stores the last execution data stored in the script management file. It is convenient to determine the execution order of the maintenance scripts in the order of older and higher priority data. It is also convenient to provide a means for outputting error log data when an error occurs as a result of executing the maintenance script by the reorganization processing means.

【0008】一方、本発明のデータベース再編成方法
は、前記メンテナンススクリプトファイルとスクリプト
管理ファイルとを設け、スクリプト管理ファイルに記憶
した最終実行時データが古い順にメンテナンススクリプ
トの実行順序を決定し、その順序に従い予め決められた
制限時間の範囲内でメンテナンススクリプトファイルの
該当するメンテナンススクリプトを実行してデータテー
ブルの再編成を行うとともに、実行し終えたメンテナン
ススクリプトのスクリプト管理ファイルにおける最終実
行時データを更新するようにしたものである。
On the other hand, in the database reorganization method of the present invention, the maintenance script file and the script management file are provided, and the execution order of the maintenance script is determined in the order of the oldest data at the time of the last execution stored in the script management file. The data table is reorganized by executing the corresponding maintenance script in the maintenance script file within the predetermined time limit according to the above, and the last execution data in the script management file of the maintenance script that has been executed is updated. It is like that.

【0009】[0009]

【発明の実施の形態】以下、本発明の一実施の形態を図
面を参照しながら説明する。図1はデータベースシステ
ム1のブロック図で、種々のデータテーブルを記憶して
なるハードディスクなどで形成したデータベース11
と、このデータベース11に対してデータテーブルの追
加,削除及び更新などを行うCPUなどで形成したデー
タベース管理制御部12とを備えている。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS An embodiment of the present invention will be described below with reference to the drawings. FIG. 1 is a block diagram of a database system 1, and a database 11 formed by a hard disk or the like storing various data tables.
And a database management control unit 12 formed by a CPU or the like for adding, deleting, and updating data tables to the database 11.

【0010】また、このデータベースシステム1は、デ
ータテーブル以外のデータを記憶するROM,RAMな
どの記憶部13、現日付及び時刻を計時する時計部1
4、通信回線によりオンライン接続した外部の監視拠点
とのデータ通信を制御する通信制御部15、このデータ
ベースシステム1を使用するコンピュータシステム2を
接続し、キーボードなどの入力装置21から入力された
データの取込みや、ディスプレイ,プリンタなどの出力
装置22に出力するデータの送出を行うインタフェース
部16を備えている。
The database system 1 includes a storage unit 13 such as a ROM and a RAM for storing data other than a data table, and a clock unit 1 for measuring the current date and time.
4. A communication control unit 15 for controlling data communication with an external monitoring base connected online via a communication line, a computer system 2 using this database system 1 is connected, and a data input from an input device 21 such as a keyboard is performed. An interface unit 16 for taking in and transmitting data to be output to an output device 22 such as a display or a printer is provided.

【0011】そして、このデータベースシステム1は、
データベース11上に形成された種々のデータテーブル
を最適な格納状態に整理するデータベース再編成のため
の構成として、前記データベース管理制御部12に再編
成業務プログラム17を搭載している。また、前記記憶
部13に、図2に示すように、メンテナンススクリプト
ファイル31,スクリプト管理ファイル32,出力順フ
ァイル33,メンテナンス制限時刻メモリ34,エラー
ログファイル35,実行順位カウンタ36及び実行数メ
モリ37の各種メモリエリアを形成している。
[0011] The database system 1
As a configuration for reorganizing a database for organizing various data tables formed on the database 11 into an optimal storage state, a reorganization business program 17 is installed in the database management control unit 12. 2, the maintenance script file 31, the script management file 32, the output order file 33, the maintenance time limit memory 34, the error log file 35, the execution order counter 36, and the execution number memory 37 are stored in the storage unit 13, as shown in FIG. Are formed.

【0012】前記メンテナンススクリプトファイル31
は、前記データベース1上のデータテーブル別に作成し
た複数のメンテナンススクリプトを、該スクリプトを特
定するスクリプト名及び該スクリプトの他のスクリプト
に対する優先順位とともに記憶するファイルである。こ
のメンテナンススクリプトファイル31に対しては、イ
ンタフェース部16を介して接続されたコンピュータシ
ステム2もしくは通信制御部15を介して接続された監
視拠点より、予め再編成実行対象のデータテーブルに対
するメンテナンススクリプトをそのスクリプト名及び優
先順位のデータとともに追加または削除することによっ
て設定しておく。因みに、優先順位は連続番号とし、か
つ重複しないように設定する。
The maintenance script file 31
Is a file that stores a plurality of maintenance scripts created for each data table on the database 1 together with a script name for specifying the script and a priority order of the script relative to other scripts. For the maintenance script file 31, the maintenance script for the data table to be reorganized is previously written by the computer system 2 connected via the interface unit 16 or the monitoring base connected via the communication control unit 15. It is set by adding or deleting it together with the script name and priority data. Incidentally, the priorities are set to consecutive numbers and are set so as not to overlap.

【0013】前記スクリプト管理ファイル32は、上記
メンテナンススクリプトファイル31に記憶した各メン
テナンススクリプト毎に最終実行時データである最終実
行日付のデータと、前記優先順位のデータとを記憶する
ファイルである。また、前記実行順ファイル33は、上
記メンテナンススクリプトファイル31に記憶した各メ
ンテナンススクリプトの実行順にスクリプト名を記憶す
るファイルである。
The script management file 32 is a file for storing the data of the last execution date, which is the last execution data, and the data of the priority for each maintenance script stored in the maintenance script file 31. The execution order file 33 is a file for storing a script name in the execution order of each maintenance script stored in the maintenance script file 31.

【0014】前記メンテナンス制限時刻メモリ34は、
データテーブルの再編成業務を終了しなければならない
時刻を記憶するメモリであって、制限時間設定手段を構
成する。このメンテナンス制限時刻メモリ34に対して
は、前記コンピュータシステム2もしくは監視拠点よ
り、予めシステムの運用時間などに基づいて決定した制
限時刻を設定しておく。
The maintenance time limit memory 34 includes:
This memory stores the time at which the reorganization of the data table must be completed, and constitutes time limit setting means. In the maintenance time limit memory 34, a time limit determined in advance based on the operation time of the system or the like is set from the computer system 2 or the monitoring base.

【0015】前記エラーログファイル35は、データテ
ーブルの再編成業務を実行した際に発生したエラーログ
データを記憶するファイルであり、前記コンピュータシ
ステム2もしくは監視拠点からのコマンドによりクリア
される。また、実行順位カウンタ36は、テーブル再編
成を実行するメンテナンススクリプトの順位nを計数
し、実行数メモリ37はテーブル再編成を実行するメン
テナンススクリプトの総数Nを記憶する。
The error log file 35 is a file for storing error log data generated when a data table reorganization operation is executed, and is cleared by a command from the computer system 2 or a monitoring base. The execution order counter 36 counts the order n of the maintenance script that executes the table reorganization, and the execution number memory 37 stores the total number N of the maintenance scripts that execute the table reorganization.

【0016】しかして、このデータベースシステム1
は、前記コンピュータシステム2もしくは監視拠点から
の起動指令によりデータベース管理制御部12が再編成
業務プログラム17を起動する。これにより、データベ
ース管理制御部12は、図3に示すように、先ず、ST
(ステップ)1として前記スクリプト管理ファイル32
の更新処理を開始する。
The database system 1
The database management control unit 12 starts the reorganization business program 17 in response to a start command from the computer system 2 or the monitoring base. Thereby, the database management control unit 12 first, as shown in FIG.
(Step) The script management file 32 as 1
Start update processing of.

【0017】すなわち、スクリプト管理ファイル32の
スクリプト名とメンテナンススクリプトファイル31の
スクリプト名とを比較し、メンテナンススクリプトファ
イル31に存在してスクリプト管理ファイル32に存在
しないスクリプト名があればそのスクリプト名をスクリ
プト管理ファイル32に追加し、逆にスクリプト管理フ
ァイル32に存在してメンテナンススクリプトファイル
31に存在しないスクリプト名があればそのスクリプト
名のレコードをスクリプト管理ファイル32から削除す
る。次に、スクリプト管理ファイル32の各スクリプト
名に対応した優先順位とメンテナンススクリプトファイ
ル31の各スクリプト名に対応した優先順位とを一致さ
せる。最後に、スクリプト管理ファイル32に新たに追
加したスクリプト名に対応する最終実行日付を時計部1
4から読出した現日付とする。
That is, the script name of the script management file 32 is compared with the script name of the maintenance script file 31. If there is a script name that exists in the maintenance script file 31 but does not exist in the script management file 32, the script name is replaced with the script name. If a script name exists in the script management file 32 but does not exist in the maintenance script file 31, the record of the script name is deleted from the script management file 32. Next, the priority corresponding to each script name in the script management file 32 is matched with the priority corresponding to each script name in the maintenance script file 31. Finally, the last execution date corresponding to the script name newly added to the script management file 32 is set in the clock unit 1.
4 is the current date read out.

【0018】こうして、スクリプト管理ファイル32の
更新処理を終了したならば、次に、ST2として実行順
ファイル33の作成処理を開始する(実行順序決定手
段)。すなわち、前記スクリプト管理ファイル32の各
レコードを最終実行日付が古い順に並べ換える。このと
き、最終実行日付が同日のレコードについては優先順位
の高い順(数値の小さい順)に並べる。しかる後、最終
実行日付が古い順にスクリプト名を読出し、その順にス
クリプト名を実行順ファイル33に格納して、該実行順
ファイル33を作成する。このとき、実行順ファイル3
3に格納したスクリプト名の数Nを実行数メモリ37に
セットする。
When the update processing of the script management file 32 is completed, the process of creating the execution order file 33 is started as ST2 (execution order determining means). That is, the records in the script management file 32 are rearranged in the order of the last execution date. At this time, records having the same final execution date are arranged in the order of higher priority (smallest numerical value). Thereafter, the script names are read out in the order of the latest execution date, the script names are stored in the execution order file 33 in that order, and the execution order file 33 is created. At this time, execution order file 3
The number N of the script names stored in No. 3 is set in the execution number memory 37.

【0019】こうして、実行順ファイル33の作成処理
を終了したならば、最後に、ST3として図4に具体的
に示すテーブル再編成実行処理を開始する。先ず、実行
順位カウンタ36を一旦リセットした後、ST31とし
て[1]だけカウントアップする。次に、ST32とし
て上記実行順位カウンタ36のカウント値nが実行数メ
モリ37のデータNを超えたか否かを判断する。そし
て、超えていない場合には、ST33として時計部14
にて計時している現時刻がメンテナンス制限時刻メモリ
34に設定されている制限時刻を経過しているか否かを
判断する。そして、制限時刻を経過していない場合に
は、ST34として実行順ファイル33から実行順位n
位のスクリプト名を読出し、続いてメンテナンススクリ
プトファイル31からこのスクリプト名のメンテナンス
スクリプトを読出したならば、このメンテナンススクリ
プトを起動して、該当するデータテーブルの再編成を実
行する(再編成処理手段)。
When the process of creating the execution order file 33 is completed, the table reorganization execution process specifically shown in FIG. 4 is started as ST3. First, after once resetting the execution order counter 36, the count is incremented by [1] in ST31. Next, in ST32, it is determined whether or not the count value n of the execution order counter 36 has exceeded the data N of the execution number memory 37. If not exceeded, the clock unit 14 is set as ST33.
Then, it is determined whether or not the current time being counted has exceeded the time limit set in the maintenance time limit memory 34. If the time limit has not elapsed, the process goes to ST34 to execute the execution order n from the execution order file 33.
If the maintenance script with this script name is read from the maintenance script file 31 after reading the script name of the order, the maintenance script is started and the corresponding data table is reorganized (reorganization processing means). .

【0020】その後、このメンテナンススクリプトが終
了したならば、ST35としてこのメンテナンススクリ
プトが再編成未完了のエラー終了であったのか、再編成
完了の正常終了であったのかを調べる。そして、正常終
了であった場合には、ST36として時計部14にて計
時されている現日付を読出し、この日付を当該メンテナ
ンススクリプトの最終実行日付として、スクリプト管理
ファイル32の該当スクリプト名に対応した最終実行日
付データを更新する(最終実行時更新手段)。
Thereafter, when this maintenance script is completed, it is checked in step ST35 whether this maintenance script has been completed with an error that the reorganization has not been completed or has been completed normally. If the operation has been completed normally, the current date measured by the clock unit 14 is read out as ST36, and this date is used as the last execution date of the maintenance script and the corresponding script name in the script management file 32 is set. Update the last execution date data (final execution time updating means).

【0021】これに対し、エラー終了であった場合に
は、ST37としてこのメンテナンススクリプトがスク
リプト名や時計部14から読出した現日付などのデータ
をエラーログデータとしてエラーログファイル35に追
加する。しかる後、ST31に戻り、実行順位カウンタ
36を[1]だけカウントアップしたならば、ST32
以降の処理を繰り返す。
On the other hand, if the error has ended, the maintenance script adds data such as the script name and the current date read from the clock unit 14 to the error log file 35 as error log data in step ST37. Thereafter, returning to ST31, if the execution order counter 36 is counted up by [1], ST32
The subsequent processing is repeated.

【0022】こうして、ST32にて実行順位カウンタ
36のカウント値nが実行数メモリ37のデータNを超
えるか、ST33にて現時刻がメンテナンス制限時刻メ
モリ34に設定された制限時刻を超えたならば、このテ
ーブル再編成実行処理を終了する。このとき、ST38
としてエラーログファイル35にエラーログデータが格
納されていた場合には、このエラーログデータを通信制
御部15を介して監視拠点に送信してから、このテーブ
ル再編成実行処理を終了する。
In this way, if the count value n of the execution order counter 36 exceeds the data N of the execution number memory 37 in ST32, or if the current time exceeds the time limit set in the maintenance time limit memory 34 in ST33. Then, the table reorganization execution processing ends. At this time, ST38
If the error log data is stored in the error log file 35, the error log data is transmitted to the monitoring base via the communication control unit 15, and then the table reorganization execution processing ends.

【0023】このように本実施の形態においては、例え
ばコンピュータシステム2を操作してデータベース再編
成業務の起動指令をデータベースシステム1に与える
と、データベース11に構築された各種のデータテーブ
ルのうち、メンテナンススクリプトファイル31にメン
テナンススクリプトが格納された再編成実行対象のデー
タテーブルに対する再編成処理が開始される。この場合
において、再編成処理が実行される順序は、前回再編成
処理を実行してからの経過期日が長い順に設定される。
また、その経過期日が同日の場合には優先順位が高い順
に設定される。
As described above, in the present embodiment, for example, when the computer system 2 is operated to give a command to start the database reorganization operation to the database system 1, of the various data tables constructed in the database 11, the maintenance is performed. A reorganization process is started for the data table to be reorganized and whose maintenance script is stored in the script file 31. In this case, the order in which the reorganization processing is executed is set in the order of the longest elapsed date since the previous reorganization processing was executed.
If the elapsed date is the same, the priority is set in descending order of priority.

【0024】そして、1つのデータテーブルに対するメ
ンテナンススクリプトが正常に終了してこのデータテー
ブルの再編成が完了すると、メンテナンス管理ファイル
32における該当メンテナンススクリプトのスクリプト
名に対応した最終実行日付が現日付に更新される。な
お、メンテナンススクリプトがエラー終了してこのデー
タテーブルの再編成が未完了であると、メンテナンス管
理ファイル32における該当メンテナンススクリプトの
スクリプト名に対応した最終実行日付が更新されず、エ
ラーログデータがエラーログファイル35に格納され
る。
When the maintenance script for one data table ends normally and the reorganization of this data table is completed, the last execution date corresponding to the script name of the maintenance script in the maintenance management file 32 is updated to the current date. Is done. If the maintenance script ends in error and reorganization of this data table is not completed, the last execution date corresponding to the script name of the maintenance script in the maintenance management file 32 is not updated, and the error log data is changed to the error log. It is stored in the file 35.

【0025】こうして、各再編成実行対象のデータテー
ブルに対する再編成処理が設定された順序に従い順次実
行される。そして、メンテナンス制限時刻メモリ34に
予め設定されているメンテナンス制限時刻に達する前に
すべての再編成実行対象のデータテーブルに対する再編
成処理を終了するか、メンテナンス制限時刻に達したな
らば、この処理が終了する。このとき、エラー終了した
メンテナンススクリプトが存在する場合には、エラーロ
グファイル35内のエラーログデータが監視拠点に送信
されて、エラー内容が通知される。
In this way, the reorganization process for each data table to be reorganized is sequentially executed in the set order. If the reorganization processing for all the data tables to be reorganized is completed before the maintenance restriction time preset in the maintenance restriction time memory 34 is reached, or if the maintenance restriction time is reached, this processing is performed. finish. At this time, if there is an error-terminated maintenance script, the error log data in the error log file 35 is transmitted to the monitoring site, and the contents of the error are notified.

【0026】なお、制限時刻を経過したために実行され
なかった再編成実行対象のデータテーブルに関しては、
そのメンテナンススクリプトの最終実行日付が実行され
た再編成実行対象のデータテーブルに対する最終実行日
付よりも古くなるので、次回に優先的に実行されるよう
になる。
The data table to be reorganized, which has not been executed because the time limit has elapsed, is as follows:
Since the last execution date of the maintenance script is older than the last execution date for the executed data table of the reorganization execution, the maintenance script is preferentially executed next time.

【0027】例えば、このデータベースシステム1を商
店等に構築されるPOS(販売時点情報管理)システム
のストアプロセッサに組込む場合を想定すると、データ
ベース11には、各商品の品番,品名,単価等の商品情
報を記憶する商品情報テーブルや、各顧客の氏名,住
所,電話番号などの顧客情報を記憶する顧客情報テーブ
ルなどが記憶される。これらのデータテーブルは、レコ
ードの追加,削除,更新の頻度が高く、格納状態の整然
性が乱れやすい。そこで、再編成実行対象のテーブルと
してメンテナンススクリプトを作成し、メンテナンスス
クリプトファイル31に設定しておく。こうすることに
より、定期的にこれらのデータテーブルの再編成処理が
実行される。
For example, assuming that the database system 1 is incorporated into a store processor of a point-of-sale (POS) system constructed in a store or the like, the database 11 stores the product number, product name, unit price, etc. of each product. A product information table for storing information, a customer information table for storing customer information such as the name, address, and telephone number of each customer are stored. In these data tables, records are frequently added, deleted, and updated, and the order of storage is likely to be disordered. Therefore, a maintenance script is created as a table to be reorganized and set in the maintenance script file 31. By doing so, the reorganization processing of these data tables is periodically executed.

【0028】この場合において、メンテナンス制限時刻
として開店時刻を予め設定しておくと、データテーブル
の再編成業務が開店後も継続して実施されることはな
く、開店後のPOS端末業務に支障を来たさない。
In this case, if the store opening time is set in advance as the maintenance time limit, the reorganization of the data table will not be continued after the store is opened, and the POS terminal business after the store is opened will be hindered. I won't come.

【0029】このように、本実施の形態によれば、再編
成実行対象のデータテーブルに対するメンテナンススク
リプトを予めメンテナンススクリプトファイル31に設
定しておくことにより、必要なときに再編成実行対象の
データテーブルに対するメンテナンススクリプトが順次
自動的に起動して再編成業務が実行されるので、データ
テーブルの再編成に要する手間を大幅に軽減できる。
As described above, according to the present embodiment, the maintenance script for the data table to be reorganized is set in the maintenance script file 31 in advance, so that the data table to be reorganized can be executed when necessary. , The maintenance script for the data table is automatically started and the reorganization operation is executed, so that the labor required for reorganizing the data table can be greatly reduced.

【0030】また、メンテナンス制限時刻を経過したた
めに再編成業務が途中で終了しても次回はその続きから
実行できるので、再編成を完了したデータテーブルと完
了していないデータテーブルとをオペレータが区別して
把握する必要もなく、この点からも手間の軽減を図り得
る。その結果、複数のデータテーブルの再編成を連続し
て実行できるので、再編成処理の処理効率が向上する。
Further, even if the reorganization operation is completed halfway because the maintenance time limit has elapsed, the next operation can be executed from the next time, so that the operator can distinguish the data table for which reorganization has been completed and the data table which has not been completed. There is no need to grasp it separately, and the labor can be reduced from this point. As a result, the reorganization of a plurality of data tables can be executed continuously, so that the processing efficiency of the reorganization process is improved.

【0031】また、メンテナンススクリプトをメンテナ
ンススクリプトファイル31に追加することにより再編
成実行対象のデータテーブルを追加でき、メンテナンス
スクリプトをメンテナンススクリプトファイル31から
削除することにより再編成実行対象のデータテーブルを
削除できる。したがって、通信制御部15を介して接続
した監視拠点から上記メンテナンススクリプトの追加,
削除を可能にすることによって、遠隔地の監視拠点から
の再編成実行対象のデータテーブルの追加や削除を行え
るようになる。
Further, by adding a maintenance script to the maintenance script file 31, a data table to be reorganized can be added. By deleting the maintenance script from the maintenance script file 31, a data table to be reorganized can be deleted. . Therefore, the maintenance script is added from the monitoring base connected via the communication control unit 15,
By enabling deletion, it is possible to add or delete a data table to be reorganized from a remote monitoring site.

【0032】なお、本発明は前記一実施の形態に限定さ
れるものではない。例えば、前記実施の形態では、再編
成業務をコンピュータシステム2もしくは監視拠点から
の起動指令などによって起動させる場合を示したが、予
め設定した周期で自動的に起動させてもよいものであ
る。
The present invention is not limited to the above embodiment. For example, in the above-described embodiment, a case has been described in which the reorganization work is started by a start command from the computer system 2 or the monitoring base, but may be started automatically at a preset cycle.

【0033】また、前記実施の形態では新たに追加した
メンテナンススクリプトの最終実行日付を再編成業務起
動時として、このメンテナンススクリプトによるデータ
テーブルの再編成をすでに設定したメンテナンススクリ
プトによるデータテーブルの再編成より後から実行する
ようにしたが、最も古い最終実行日付を設定することで
最初に実行するようにしてもよい。
In the above-described embodiment, the re-organization of the newly added maintenance script is defined as the start of the reorganization operation, and the re-organization of the data table by the maintenance script is based on the re-organization of the data table by the already set maintenance script. Although it is executed later, it may be executed first by setting the oldest final execution date.

【0034】また、前記実施の形態ではエラーログデー
タを監視拠点に送出したが、コンピュータシステム2の
出力装置22に送出してもよい。この他、最終実行時デ
ータとして日付に時刻を加味するなど、本発明の要旨を
逸脱しない範囲で種々変形実施可能であるのは勿論であ
る。
In the above embodiment, the error log data is sent to the monitoring base, but may be sent to the output device 22 of the computer system 2. In addition, it is needless to say that various modifications can be made without departing from the gist of the present invention, such as adding the time to the date as the final execution time data.

【0035】[0035]

【発明の効果】以上詳述したように、本発明によれば、
再編成実行対象のデータテーブルに関して順次自動的に
再編成を行うことができるとともに、制限時間内にすべ
ての再編成実行対象のデータテーブルの再編成を完了し
なかった場合には自動的に次回はその続きから再編成を
行うことができる。その結果、再編成に要する手間の削
減及び処理効率の向上を図り得る。
As described in detail above, according to the present invention,
Reorganization can be performed automatically and sequentially on the data tables to be reorganized, and if all the data tables to be reorganized have not been reorganized within the time limit, the next Reorganization can be performed from the continuation. As a result, the labor required for reorganization can be reduced and the processing efficiency can be improved.

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

【図1】 本発明の一実施の形態であるデータベースシ
ステムの要部ブロック図。
FIG. 1 is a main block diagram of a database system according to an embodiment of the present invention.

【図2】 図1における記憶部に形成した主要なメモリ
エリアを示す図。
FIG. 2 is a view showing a main memory area formed in a storage unit in FIG. 1;

【図3】 図1におけるデータベース管理制御部が実行
する再編成業務プログラムの手順を示す流れ図。
FIG. 3 is a flowchart showing a procedure of a reorganization business program executed by a database management control unit in FIG. 1;

【図4】 図3におけるテーブル再編成処理を具体的に
示す流れ図。
FIG. 4 is a flowchart specifically showing a table reorganization process in FIG. 3;

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

1…データベースシステム 2…コンピュータシステム 11…データベース 12…データベース管理制御部 13…記憶部 14…時計部 15…通信制御部 16…インタフェース部 17…再編成業務プログラム 31…メンテナンススクリプトファイル 32…スクリプト管理ファイル 33…実行順ファイル 34…メンテナンス制限時刻メモリ 35…エラーログファイル DESCRIPTION OF SYMBOLS 1 ... Database system 2 ... Computer system 11 ... Database 12 ... Database management control part 13 ... Storage part 14 ... Clock part 15 ... Communication control part 16 ... Interface part 17 ... Reorganization business program 31 ... Maintenance script file 32 ... Script management file 33: execution order file 34: maintenance limit time memory 35: error log file

Claims (4)

【特許請求の範囲】[Claims] 【請求項1】 種々のデータテーブルを記憶してなるデ
ータベースを搭載したデータベースシステムにおいて、 前記データベース上のデータテーブル別に作成した複数
のメンテナンススクリプトを記憶するメンテナンススク
リプトファイルと、 このメンテナンススクリプトファイルに記憶した各メン
テナンススクリプト毎に最終実行時データを記憶するス
クリプト管理ファイルと、 前記データベース上のデータテーブルを再編成する処理
の制限時間を設定する制限時間設定手段と、 前記スクリプト管理ファイルに記憶した最終実行時デー
タが古い順にメンテナンススクリプトの実行順序を決定
する実行順序決定手段と、 この実行順序決定手段により決定した順序に従い前記制
限時間設定手段により設定された制限時間の範囲内で前
記メンテナンススクリプトファイルの該当するメンテナ
ンススクリプトを実行してデータテーブルの再編成を行
う再編成処理手段と、 この再編成処理手段により実行し終えたメンテナンスス
クリプトの前記スクリプト管理ファイルにおける最終実
行時データを更新する最終実行時更新手段とを具備した
ことを特徴とするデータベース再編成装置。
1. A database system equipped with a database storing various data tables, wherein a maintenance script file storing a plurality of maintenance scripts created for each data table on the database is stored in the maintenance script file. A script management file for storing last execution time data for each maintenance script; a time limit setting means for setting a time limit for a process of reorganizing a data table on the database; and a last execution time stored in the script management file. Execution order determining means for determining the execution order of the maintenance script in the order of older data; and performing the maintenance within the time limit set by the time limit setting means in accordance with the order determined by the execution order determining means. Reorganization processing means for executing a corresponding maintenance script of the maintenance script file to reorganize the data table; and updating last execution data in the script management file of the maintenance script which has been executed by the reorganization processing means. A database reorganization apparatus comprising: a last-execution update unit.
【請求項2】 前記スクリプト管理ファイルは、各メン
テナンススクリプト毎に最終実行時データとともに優先
度を設定する優先度データを記憶し、前記実行順序決定
手段は、前記スクリプト管理ファイルに記憶した最終実
行時データが古い順でかつ優先度データが高い順にメン
テナンススクリプトの実行順序を決定する手段であるこ
とを特徴とする請求項1記載のデータベース再編成装
置。
2. The script management file stores priority data for setting a priority together with final execution time data for each maintenance script, and the execution order determining means stores the last execution time data stored in the script management file. 2. The database reorganization apparatus according to claim 1, wherein the means is for deciding an execution order of the maintenance script in an order of older data and higher priority data.
【請求項3】 前記再編成処理手段によりメンテナンス
スクリプトを実行した結果エラーが発生した場合にその
エラーログデータを出力する手段を設けたことを特徴と
する請求項1記載のデータベース再編成装置。
3. The database reorganization apparatus according to claim 1, further comprising means for outputting error log data when an error occurs as a result of executing the maintenance script by said reorganization processing means.
【請求項4】 種々のデータテーブルを記憶してなるデ
ータベースを搭載したデータベースシステムにおいて、 前記データベース上のデータテーブル別に作成した複数
のメンテナンススクリプトを記憶するメンテナンススク
リプトファイルと、このメンテナンススクリプトファイ
ルに記憶した各メンテナンススクリプト毎に最終実行時
データを記憶するスクリプト管理ファイルとを設け、 前記スクリプト管理ファイルに記憶した最終実行時デー
タが古い順にメンテナンススクリプトの実行順序を決定
し、その順序に従い予め決められた制限時間の範囲内で
前記メンテナンススクリプトファイルの該当するメンテ
ナンススクリプトを実行してデータテーブルの再編成を
行うとともに、実行し終えたメンテナンススクリプトの
前記スクリプト管理ファイルにおける最終実行時データ
を更新するようにしたことを特徴とするデータベース再
編成方法。
4. A database system equipped with a database storing various data tables, wherein a maintenance script file storing a plurality of maintenance scripts created for each data table on the database is stored in the maintenance script file. A script management file for storing the last execution data is provided for each maintenance script, and the execution order of the maintenance scripts is determined in the order of oldest last execution data stored in the script management file, and a predetermined limit is determined according to the order. Execute the corresponding maintenance script of the maintenance script file within the time range to reorganize the data table, and execute the script management of the maintenance script that has been executed. Database reorganization method is characterized in that so as to update the final runtime data in file.
JP01528297A 1997-01-29 1997-01-29 Database reorganization apparatus and reorganization method Expired - Fee Related JP3614596B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP01528297A JP3614596B2 (en) 1997-01-29 1997-01-29 Database reorganization apparatus and reorganization method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP01528297A JP3614596B2 (en) 1997-01-29 1997-01-29 Database reorganization apparatus and reorganization method

Publications (2)

Publication Number Publication Date
JPH10214211A true JPH10214211A (en) 1998-08-11
JP3614596B2 JP3614596B2 (en) 2005-01-26

Family

ID=11884513

Family Applications (1)

Application Number Title Priority Date Filing Date
JP01528297A Expired - Fee Related JP3614596B2 (en) 1997-01-29 1997-01-29 Database reorganization apparatus and reorganization method

Country Status (1)

Country Link
JP (1) JP3614596B2 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009237906A (en) * 2008-03-27 2009-10-15 Fujitsu Ltd Backup method of computer system
JP2012141717A (en) * 2010-12-28 2012-07-26 Canon Marketing Japan Inc Workflow control device, workflow control system, workflow control method, program and storage medium
CN111400321A (en) * 2020-03-23 2020-07-10 上海新炬网络技术有限公司 Method for automatically recycling high water level based on ORAC L E database

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009237906A (en) * 2008-03-27 2009-10-15 Fujitsu Ltd Backup method of computer system
JP2012141717A (en) * 2010-12-28 2012-07-26 Canon Marketing Japan Inc Workflow control device, workflow control system, workflow control method, program and storage medium
CN111400321A (en) * 2020-03-23 2020-07-10 上海新炬网络技术有限公司 Method for automatically recycling high water level based on ORAC L E database
CN111400321B (en) * 2020-03-23 2023-05-26 上海新炬网络技术有限公司 ORACLE database-based method for automatically recovering high water level

Also Published As

Publication number Publication date
JP3614596B2 (en) 2005-01-26

Similar Documents

Publication Publication Date Title
US8150809B2 (en) File delete method, file open method, storage medium storing file delete program, and storage medium storing file open program
JPH1069578A (en) Data processing device
JPH02201506A (en) Interactive device for plant monitoring
JP3355896B2 (en) Menu display management device and method
JPH10214211A (en) Device and method for reorganizing database
JPH096653A (en) Data base checking information processor
JP2919240B2 (en) I / O priority control method
JP2000187684A (en) Project management system
JPH0713831A (en) Device and method for file management
US5978321A (en) Retrieval method with repeated retrieval of inputted characters and medium storing implementing software
JPH08305614A (en) Information processor
JP2749188B2 (en) Record search method
JPH07192005A (en) Learning storage controller
JP3143930B2 (en) Data processing device
JPH1049540A (en) Information retrieval system
KR960002362B1 (en) Electronics switching system
JP3512631B2 (en) Job information management apparatus and job information management method
JP2005275444A (en) Information processing apparatus
JPH0523264U (en) Data storage
JP3387162B2 (en) Transaction processing system
JP2792410B2 (en) A program execution controller having a function of determining and executing a module description format
JPH03100841A (en) Information processor
JPH02255975A (en) Electronic filing system
JP2001142756A (en) File managing device and recording medium
JPH05241918A (en) Method for processing idle capacity monitor of data base file and device therefor

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20040803

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20040917

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20041019

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20041027

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20081112

Year of fee payment: 4

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

Free format text: PAYMENT UNTIL: 20091112

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20091112

Year of fee payment: 5

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

Free format text: PAYMENT UNTIL: 20101112

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20101112

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20111112

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20111112

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20121112

Year of fee payment: 8

LAPS Cancellation because of no payment of annual fees