JP2001256085A - Relational data base management system - Google Patents

Relational data base management system

Info

Publication number
JP2001256085A
JP2001256085A JP2000065242A JP2000065242A JP2001256085A JP 2001256085 A JP2001256085 A JP 2001256085A JP 2000065242 A JP2000065242 A JP 2000065242A JP 2000065242 A JP2000065242 A JP 2000065242A JP 2001256085 A JP2001256085 A JP 2001256085A
Authority
JP
Japan
Prior art keywords
file
database
stored
records
unit
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2000065242A
Other languages
Japanese (ja)
Inventor
Chika Hikuma
千夏 日隈
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.)
Toshiba Corp
Original Assignee
Toshiba 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 Toshiba Corp filed Critical Toshiba Corp
Priority to JP2000065242A priority Critical patent/JP2001256085A/en
Publication of JP2001256085A publication Critical patent/JP2001256085A/en
Pending legal-status Critical Current

Links

Landscapes

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

Abstract

PROBLEM TO BE SOLVED: To provide a relational data base managing system capable of objectively grasping the using situation of a data base file, and preventing the failure of a system due to the excess of a data base file capacity. SOLUTION: This relation data base managing system for managing a data base 7 in which a data base file 71 having a table 73 constituted of columns and lines is prepared is provided with an umber of stored record calculating part 11 for calculating the maximum number of records which can be stored in a table 73 based on the size of an extent constituted of data areas preset in the table 73 and the total sum of the sizes of columns and a file activity ratio calculating part 12 for calculating the activity ratio of the data base file 71 based on the maximum number of stored records calculated by the number of stored record calculating part 11 and the actual number of stored records.

Description

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

【0001】[0001]

【発明の属する技術分野】本発明は、カラムと行から構
成されるテーブルを有するデータベースファイルが作成
されたリレーショナルデータベースを管理するリレーシ
ョナルデータベース管理システムに関する。
BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a relational database management system for managing a relational database in which a database file having a table composed of columns and rows is created.

【0002】[0002]

【従来の技術】リレーショナルデータベース管理システ
ムは、ユーザからの操作に応じて、データベース内に1
以上のデータベースファイルを作成し、各データベース
ファイルにテーブル(表)を作成する。作成された各テ
ーブルは、例えば、社員番号、氏名、所属、業務などの
列(カラム)と、これらの列に各社員の情報を設定して
組み合わせた行(ロー)から構成される。また、リレー
ショナルデータベースは、ユーザからの問い合わせに応
じて、複数のテーブルが格納されたデータベースにデー
タの検索、挿入、削除、更新等の処理を実行する。
2. Description of the Related Art A relational database management system stores one database in a database in response to an operation from a user.
The above database files are created, and a table is created for each database file. Each created table is composed of, for example, columns (columns) such as an employee number, a name, an affiliation, and a business, and rows (rows) in which information of each employee is set and combined in these columns. In addition, the relational database executes processes such as data search, insertion, deletion, and update in a database storing a plurality of tables in response to an inquiry from a user.

【0003】さらに、従来、リレーショナルデータベー
ス管理システムを使用し、システムの運用管理の一環と
してデータベースの容量監視を行っている。この場合、
リレーショナルデータベース管理システムの機能を用い
てデータベースファイルの使用状況を監視したり、ある
いは単純にデータベースファイルのバイト数を算出し、
算出されたバイト数とデータベースファイルに格納され
たデータの実際のバイト数とに基づいてデータベースフ
ァイルの使用率を算出してデータベースの容量を監視し
ていた。
Further, conventionally, a relational database management system is used to monitor the capacity of a database as part of system operation management. in this case,
Monitor the usage status of the database file using the function of the relational database management system, or simply calculate the number of bytes of the database file,
The capacity of the database is monitored by calculating the usage rate of the database file based on the calculated number of bytes and the actual number of bytes of the data stored in the database file.

【0004】[0004]

【発明が解決しようとする課題】しかしながら、従来の
容量監視方法にあっては、データベースファイルの使用
状況をバイト数で算出していたため、データベースファ
イルの使用率は、数値上正確ではあっても客観性に欠け
ていた。このため、システムの運用管理上、効率的では
なかった。
However, in the conventional capacity monitoring method, the usage status of the database file is calculated in terms of the number of bytes. Therefore, the usage rate of the database file is objective even if it is numerically accurate. She lacked gender. For this reason, it was not efficient in system operation management.

【0005】また、ファイルに格納されたデータ量がデ
ータベースファイルの容量に達すると、システムに障害
が発生してしまう。このため、システムの障害を未然に
回避することが要望されていた。
Further, when the amount of data stored in the file reaches the capacity of the database file, a failure occurs in the system. For this reason, there has been a demand for avoiding system failures.

【0006】本発明の目的は、上述した問題を解消する
ためになされたものであり、その目的は、客観的にデー
タベースファイルの使用状況を把握することができ、こ
れによって、システムの運用管理を効率的に行うことが
でき、しかもデータベースファイル容量の超過によるシ
ステムの障害を未然に回避することができるリレーショ
ナルデータベース管理システムを提供することにある。
SUMMARY OF THE INVENTION An object of the present invention is to solve the above-mentioned problem, and an object of the present invention is to make it possible to objectively grasp the use status of a database file and thereby to manage the operation of the system. An object of the present invention is to provide a relational database management system that can be performed efficiently and that can prevent a system failure due to an excess of a database file capacity.

【0007】[0007]

【課題を解決するための手段】本発明のリレーショナル
データベース管理システムは、上記目的を達成するため
に、カラムと行から構成されるテーブルを有するデータ
ベースファイルが作成されたデータベースを管理するリ
レーショナルデータベース管理システムにおいて、テー
ブルに予め設定されたデータ領域からなるエクステント
のサイズとカラムのサイズの総和とに基づいてテーブル
に格納可能な最大レコード格納件数を計算する格納件数
計算手段と、この格納件数計算手段で計算された最大レ
コード格納件数と実際のレコード格納件数とに基づいて
データベースファイルの使用率を計算する使用率計算手
段とを備えることを特徴とする。
To achieve the above object, a relational database management system according to the present invention manages a database in which a database file having a table including columns and rows is created. A storage number calculation means for calculating the maximum number of records that can be stored in the table based on the total size of the extents and the sizes of the columns consisting of a data area preset in the table, and the storage number calculation means And a utilization rate calculating means for calculating a utilization rate of the database file based on the maximum number of stored records and the actual number of stored records.

【0008】この発明によれば、格納件数計算手段がエ
クステントのサイズとカラムのサイズの総和とに基づい
てテーブルに格納可能な最大レコード格納件数を計算
し、使用率計算手段が計算された最大レコード格納件数
と実際のレコード格納件数とに基づいてデータベースフ
ァイルの使用率を計算する。すなわち、データベースフ
ァイルの使用状況を、従来のバイト単位算出ではなくレ
コード単位算出にしたので、客観的にデータベースファ
イルの使用状況を把握することができる。
According to this invention, the number-of-storage-calculating means calculates the maximum number of records that can be stored in the table based on the extent size and the sum of the column sizes, and the usage rate calculating means calculates the maximum record Calculate the database file usage rate based on the number of records and the actual number of records. That is, since the usage status of the database file is not calculated in the conventional byte unit but calculated in the record unit, the usage status of the database file can be grasped objectively.

【0009】また、使用率計算手段で計算されたデータ
ベースファイルの使用率が予め設定した閾値に達してい
るか否かを判定し使用率が閾値に達した場合にはアラー
トを出力するアラート出力手段を備えることを特徴とす
る。
An alert output means for judging whether or not the usage rate of the database file calculated by the usage rate calculation means has reached a preset threshold value and outputting an alert when the usage rate has reached the threshold value is provided. It is characterized by having.

【0010】この発明によれば、データベースファイル
の使用率が閾値に達した場合にはアラートを出力するの
で、データベースファイル容量の超過によるシステムの
障害を未然に知らせることができる。
According to the present invention, an alert is output when the usage rate of the database file reaches the threshold value, so that a system failure due to an excess of the database file capacity can be notified in advance.

【0011】また、アラート出力手段からアラートを受
けた場合に、閾値に達したテーブルへのデータの書き込
みを停止して第1テーブルへの書き込みプロセスに変更
するプロセス変更手段と、新たなデータベースファイル
を作成し該データベースファイルに第2テーブルを作成
するファイル作成手段と、閾値に達したテーブル内のデ
ータと第1テーブル内のデータとを第2テーブルに書き
込む書込手段とを備えることを特徴とする。
Further, when an alert is received from the alert output means, a process changing means for stopping writing of data to the table which has reached the threshold value and changing to a process of writing to the first table, and a new database file. A file creation unit that creates and creates a second table in the database file; and a writing unit that writes data in the table that has reached the threshold value and data in the first table to the second table. .

【0012】この発明によれば、アラートを受けた場合
に、閾値に達したテーブルへのデータの書き込みを停止
して第1テーブルへの書き込みプロセスに変更し、新た
なデータベースファイルを作成し該データベースファイ
ルに第2テーブルを作成し、閾値に達したテーブル内の
データと第1テーブル内のデータとを第2テーブルに書
き込むので、システムを停止させることなく、障害を未
然に回避することができる。
According to the present invention, when an alert is received, the writing of data to the table that has reached the threshold is stopped, the process is changed to the writing process for the first table, and a new database file is created. Since the second table is created in the file and the data in the table that has reached the threshold and the data in the first table are written in the second table, a failure can be avoided without stopping the system.

【0013】[0013]

【発明の実施の形態】以下、本発明の実施の形態のリレ
ーショナルデータベース管理システムを図面を参照しな
がら詳細に説明する。この実施の形態に係るリレーショ
ナルデータベース管理システムは、データベースの容量
監視機能、及び障害回避機能を有している。
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Hereinafter, a relational database management system according to an embodiment of the present invention will be described in detail with reference to the drawings. The relational database management system according to this embodiment has a database capacity monitoring function and a failure avoidance function.

【0014】図1は、実施の形態に係るリレーショナル
データベース管理システムの構成を示す図である。図1
に示すリレーショナルデータベース管理システムは、ネ
ットワーク2に接続されサーバ3に対して問い合わせを
行うパーソナルコンピュータ等のクライアント装置1、
このクライアント装置1からの問い合わせに応じて情報
を提供するサーバ3を備える。
FIG. 1 is a diagram showing a configuration of a relational database management system according to an embodiment. FIG.
Is a client device 1 such as a personal computer connected to a network 2 and making an inquiry to a server 3;
A server 3 that provides information in response to an inquiry from the client device 1 is provided.

【0015】サーバ3は、計算機(マシン)5、この計
算機5に接続されるディスク装置等のデータベース7を
備える。なお、データベース7は、計算機5に内蔵され
ても良い。
The server 3 includes a computer (machine) 5 and a database 7 such as a disk device connected to the computer 5. Note that the database 7 may be built in the computer 5.

【0016】データベース7は、複数のデータベースフ
ァイル71a〜71iを格納する。データベースファイ
ル71a〜71fは、インスタンスAを構成し、データ
ベースファイル71g〜71iは、インスタンスBを構
成する。
The database 7 stores a plurality of database files 71a to 71i. The database files 71a to 71f constitute an instance A, and the database files 71g to 71i constitute an instance B.

【0017】ここで、インスタンスとは、ユーザープロ
セスとの通信を行い、ディスク装置に格納されているデ
ータの制御と操作を行う一群のメモリ構造とプロセスで
ある。また、インスタンスは、システムグローバル領域
(SGA)とプロセスの組み合わせである。インスタン
スAは例えば、会社の総務用に設定され、インスタンス
Bは、例えば、会社の営業用に設定される。
Here, an instance is a group of memory structures and processes that communicate with a user process and control and operate data stored in a disk device. An instance is a combination of a system global area (SGA) and a process. The instance A is set, for example, for general affairs of the company, and the instance B is set, for example, for business of the company.

【0018】データベースファイル71a〜71iは、
図5に示すように、列(カラム)と、行(ロー)から構
成されるテーブル73a〜73iを有している。図5で
は、社員コード、社員名、郵便番号、住所の各カラムが
設定され、各カラム毎にカラムサイズが設定されてい
る。
The database files 71a to 71i are:
As shown in FIG. 5, there are tables 73a to 73i composed of columns (columns) and rows (rows). In FIG. 5, each column of an employee code, an employee name, a zip code, and an address is set, and a column size is set for each column.

【0019】また、システム管理部20に有するデータ
ディクショナリービュー21は、データベース7内の複
数のテーブルから生成される実在しない仮想テーブルで
あり、図2に示すように、インスタンス毎に、そのイン
スタンス(例えばインスタンスA)におけるデータベー
スファイル名F1〜F6、そのファイルのサイズFS1
〜FS6、テーブル名T1〜T6、そのテーブルのエク
ステントサイズES1〜ES6及び拡張エクステントサ
イズEE1〜EE6を格納している。
The data dictionary view 21 provided in the system management unit 20 is a virtual table that does not exist and is generated from a plurality of tables in the database 7. As shown in FIG. Database file names F1 to F6 in the instance A) and the size FS1 of the file
FS6, table names T1 to T6, extent sizes ES1 to ES6 of the table, and extended extent sizes EE1 to EE6.

【0020】各テーブルは、図3に示すように、初期エ
クステント、第1拡張エクステント、第2拡張エクステ
ントから構成される。エクステントは、連続したデータ
ブロックから構成される論理的なデータベース領域であ
り、テーブル作成時には、指定されたデータブロックか
らなる初期エクステントを割り当て、初期エクステント
が満杯の場合には、順番に第1拡張エクステント、第2
拡張エクステントを割り当てる。
Each table includes an initial extent, a first extended extent, and a second extended extent, as shown in FIG. An extent is a logical database area composed of continuous data blocks. When a table is created, an initial extent consisting of a specified data block is allocated. If the initial extent is full, the first extent is sequentially extended. , Second
Allocate extended extents.

【0021】また、エクステントは、図6に示すよう
に、インデックスとしてのヘッダと実データ領域から構
成され、実データ領域は、複数のデータブロックから構
成される。各データブロックは、複数のレコードからな
り、各レコードは、カラムサイズの総和からなる。
As shown in FIG. 6, the extent comprises a header as an index and a real data area, and the real data area comprises a plurality of data blocks. Each data block is composed of a plurality of records, and each record is composed of a sum of column sizes.

【0022】計算機5は、リレーショナルデータベース
管理システムを構成し、データベース7内の容量を監視
する容量監視部10、データディクショナリービュー2
1を有しデータベース7を管理するシステム管理部2
0、障害回避部30、共有メモリ40を備える。
The computer 5 constitutes a relational database management system, a capacity monitoring unit 10 for monitoring the capacity in the database 7, a data dictionary view 2
A system management unit 2 that has a database 1 and manages a database 7
0, a failure avoiding unit 30, and a shared memory 40.

【0023】容量監視部10は、格納件数計算手段に相
当するレコード格納件数計算部11、使用率計算手段に
相当するファイル使用率計算部12、アラート出力手段
に相当するアラート出力処理部13を有している。
The capacity monitoring unit 10 includes a record storage number calculation unit 11 corresponding to the storage number calculation unit, a file usage ratio calculation unit 12 corresponding to the usage ratio calculation unit, and an alert output processing unit 13 corresponding to the alert output unit. are doing.

【0024】レコード格納計算部11は、エクステント
サイズ及びカラムサイズの総和等に基づいてテーブル毎
に格納可能な最大レコード格納件数を計算する。ファイ
ル使用率計算部12は、レコード格納件数計算部11で
計算された最大レコード格納件数と実際のレコード格納
件数とに基づいてファイル使用率を計算する。アラート
出力処理部13は、ファイル使用率計算部12で計算さ
れたファイル使用率が予め設定した閾値に達しているか
否かを判定しファイル使用率が閾値に達している場合に
アラート(警告)をコンソール14に出力する。
The record storage calculation section 11 calculates the maximum number of records that can be stored for each table based on the sum of the extent size and the column size. The file usage rate calculation unit 12 calculates the file usage rate based on the maximum number of record storages calculated by the record storage number calculation unit 11 and the actual number of record storages. The alert output processing unit 13 determines whether or not the file usage rate calculated by the file usage rate calculation unit 12 has reached a preset threshold value, and issues an alert (warning) when the file usage rate has reached the threshold value. Output to the console 14.

【0025】また、計算機5には起動及びログファイル
出力要求用のキーボード8、アラート及びログファイル
を出力するコンソール14、アラート及びログファイル
出力をプリントするプリンタ15が接続されている。
The computer 5 is connected with a keyboard 8 for starting and requesting log file output, a console 14 for outputting alerts and log files, and a printer 15 for printing alerts and log file outputs.

【0026】また、障害回避部30は、プロセス変更手
段に相当するプロセス変更部31、ファイル作成手段に
相当するファイル作成部32、ファイル退避部33、書
込手段に相当する書込部34を有している。
The failure avoiding unit 30 has a process changing unit 31 corresponding to a process changing unit, a file creating unit 32 corresponding to a file creating unit, a file saving unit 33, and a writing unit 34 corresponding to a writing unit. are doing.

【0027】プロセス変更部31は、アラート出力処理
部13からアラートを受けた場合に、閾値に達したテー
ブルへの書き込みを停止し共有メモリ40上に同一構造
の共有メモリテーブル41(第1テーブルに相当)を作
成して該共有メモリテーブル41への書き込みプロセス
に変更する。
When the process change unit 31 receives an alert from the alert output processing unit 13, the process change unit 31 stops writing to the table whose threshold value has been reached, and stores the shared memory table 41 of the same structure on the shared memory 40 (the first table ) And the process is changed to the process of writing to the shared memory table 41.

【0028】ファイル作成部32は、別のディスク装置
に新たなデータベースファイルを作成し該ファイルにテ
ーブル(第2テーブルに相当)を作成する。ファイル退
避部33は、閾値に達したテーブル内のデータを別のフ
ァイルに退避させる。書込部34は、退避された別のフ
ァイルのデータと共有メモリテーブル41のデータと
を、ファイル作成部32で作成されたテーブルに書き込
む。
The file creating section 32 creates a new database file in another disk device and creates a table (corresponding to a second table) in the file. The file saving unit 33 saves the data in the table that has reached the threshold value to another file. The writing unit 34 writes the data of another saved file and the data of the shared memory table 41 into the table created by the file creating unit 32.

【0029】次にこのように構成された実施の形態のリ
レーショナルデータベース管理システムの動作を図面を
参照して詳細に説明する。まず、容量監視部10による
ファイル使用率計算処理を図2乃至図6の図面、及び図
7に示すフローチャートを参照しながら説明する。ここ
では、クライアント装置1とサーバ3と間の処理を説明
する。
Next, the operation of the relational database management system of the embodiment configured as described above will be described in detail with reference to the drawings. First, the file usage rate calculation processing by the capacity monitoring unit 10 will be described with reference to FIGS. 2 to 6 and the flowchart shown in FIG. Here, processing between the client device 1 and the server 3 will be described.

【0030】なお、クライアント装置1の代わりに、キ
ーボード8を用いて、キーボード8からの操作に応じ
て、計算機5を介してデータベース7のデータの格納、
検索、更新、削除等を管理しても良い。
The keyboard 8 is used instead of the client device 1, and data stored in the database 7 is stored via the computer 5 in accordance with an operation from the keyboard 8.
Search, update, deletion, etc. may be managed.

【0031】まず、ネットワーク2を介してクライアン
ト装置1からサーバ3に対して要求を行うと、システム
管理部20は、指定されたインスタンス(例えばインス
タンスA)に接続する(ステップS11)。
First, when a request is made from the client device 1 to the server 3 via the network 2, the system management unit 20 connects to the specified instance (for example, instance A) (step S11).

【0032】そして、システム管理部20内のデータデ
ィクショナリービュー21の内、データベースファイル
名とそのファイルサイズ、テーブル名とそのテーブルの
エクステントサイズを示す図2のビューを検索し(ステ
ップS13)、対象とするインスタンス(例えば、イン
スタンスA)内に存在するテーブルとそのテーブルを使
用しているデータベースファイル、エクステントサイズ
のリストを作成する(ステップS15)。
Then, the data dictionary view 21 in the system management unit 20 is searched for the view of FIG. 2 showing the database file name and its file size, the table name and the extent size of the table (step S13), and A list of tables existing in the instance (for example, instance A) to be executed, database files using the tables, and extent sizes is created (step S15).

【0033】次に、動的パフォーマンス表の内、システ
ム定数を示す表を予め検索し、システム定数の値を静的
に設定する(ステップS17)。ここで、動的パフォー
マンス表とは、パフォーマンスの制御と監視を行うため
に使用するいくつかの表をいい、例えばクライアント装
置(セッション)の数が変化すると、その値も動的に変
化する。また、システム定数は、レコードを構成する各
カラムのバイト数が固定長または可変長によって変化す
ると、これに伴って変化する。
Next, a table showing system constants is searched in advance from the dynamic performance table, and the values of the system constants are statically set (step S17). Here, the dynamic performance table refers to several tables used for controlling and monitoring the performance. For example, when the number of client devices (sessions) changes, the value dynamically changes. Further, the system constant changes with the number of bytes of each column constituting the record when the number of bytes changes with a fixed length or a variable length.

【0034】次に、設定されたシステム定数を使用し
て、エクステントにおけるヘッダ領域のヘッダサイズを
求める(ステップS19)。すなわち、変化したシステ
ム定数により、ヘッダサイズも変化する。このヘッダサ
イズは、後述するように最大レコード格納可能件数を算
出する際に用いられる。
Next, the header size of the header area in the extent is determined using the set system constant (step S19). That is, the header size changes according to the changed system constant. This header size is used when calculating the maximum recordable number of records as described later.

【0035】さらに、各テーブル単位にデータブロック
サイズ当たりの使用可能領域のサイズ(例えば、102
4バイト)、静的データディクショナリービューの内、
テーブル名とそのテーブルが持つカラム名、そのカラム
のサイズを示す図4のビューを検索し、その検索結果を
用いて、1レコード当たりのカラムサイズの総和を求め
る(ステップS21)。
Further, the size of the usable area per data block size (for example, 102
4 bytes) of the static data dictionary view
The view of FIG. 4 showing the table name, the column name of the table, and the size of the column is searched, and the sum of the column size per record is obtained using the search result (step S21).

【0036】図4のビューには、例えばテーブルT1に
対して、複数のカラムcm11〜cm1n、複数のカラ
ムcm11〜cm1nに対応する複数のカラムサイズ
(8バイト、16バイト・・・)が格納される。複数の
カラムサイズの合計がカラムサイズの総和であり、1レ
コードに相当する。
In the view of FIG. 4, for example, a plurality of columns cm11 to cm1n and a plurality of column sizes (8 bytes, 16 bytes...) Corresponding to the plurality of columns cm11 to cm1n are stored for the table T1. You. The sum of the plurality of column sizes is the sum of the column sizes, and corresponds to one record.

【0037】そして、レコード格納件数計算部11は、
データブロックサイズをカラムサイズの総和で除算し、
得られた値の整数部分を、1データブロック当たりの格
納可能なレコード格納件数とする(ステップS23)。
さらに、テーブルにおける複数のデータブロックの格納
可能なレコード件数、すなわち、テーブル単位に格納可
能な最大レコード格納件数を求める(ステップS2
5)。
Then, the record storage number calculation unit 11
Divide the data block size by the sum of the column sizes,
The integer part of the obtained value is set as the number of records that can be stored per data block (step S23).
Further, the number of records that can be stored in a plurality of data blocks in the table, that is, the maximum number of records that can be stored in a table unit is obtained (step S2).
5).

【0038】なお、レコード格納件数計算部11は、エ
クステントサイズからヘッダサイズを差し引き、得られ
た値をカラムサイズの総和(レコード長)で除算し、得
られた値の整数部分を、テーブル単位に格納可能な最大
レコード格納件数とすることもできる。このため、デー
タブロックを用いなくても、テーブル単位に格納可能な
最大レコード格納件数を求めることができる。
The record storage number calculation unit 11 subtracts the header size from the extent size, divides the obtained value by the sum of the column sizes (record length), and converts the integer part of the obtained value into a table unit. The maximum number of records that can be stored can also be used. Therefore, the maximum number of records that can be stored in a table unit can be obtained without using a data block.

【0039】次に、システム管理部20は、対象とする
データベースファイルに実際に格納されているレコード
格納件数を検索し(ステップS27)、検索された実際
のレコード格納件数をファイル使用率計算部12に出力
する。ファイル使用率計算部12は、検索された実際の
レコード格納件数を、レコード格納件数計算部11で計
算された最大レコード格納件数で除算し、得られた値、
すなわち、ファイル使用率(エクステント使用率)を求
める(ステップS29)。
Next, the system management unit 20 searches for the number of records actually stored in the target database file (step S27), and uses the found actual number of records stored as the file usage rate calculation unit 12. Output to The file usage rate calculation unit 12 divides the searched actual number of stored records by the maximum number of stored records calculated by the number of stored records calculation unit 11, and obtains the obtained value,
That is, a file usage rate (extent usage rate) is obtained (step S29).

【0040】そして、全てのテーブルについてファイル
使用率の計算処理を終了したか否かを判定し(ステップ
S31)、全てのテーブルについて計算処理が終了した
場合には、アラート出力処理部13は、テーブル毎に、
ファイル使用率計算部12で得られたファイル使用率が
設定値(閾値)を超過しているか否かを判定する。そし
て、ファイル使用率が閾値を超過しているファイルを計
算結果にマークアップする(ステップS33)。次に、
全ての計算結果をログファイルに出力する(ステップS
35)。
Then, it is determined whether or not the calculation processing of the file usage rate has been completed for all the tables (step S31). When the calculation processing has been completed for all the tables, the alert output processing unit 13 sets Every,
It is determined whether the file usage rate obtained by the file usage rate calculation unit 12 exceeds a set value (threshold). Then, a file whose file usage rate exceeds the threshold is marked up in the calculation result (step S33). next,
Output all calculation results to a log file (step S
35).

【0041】なお、ファイル使用率が閾値を超過してい
る場合、予め1時間当たりの書き込み量の統計を用意し
ておくことにより、拡張エクステントが発生するまで、
或いは容量を超過するまで何時間の余裕があるかを算出
することもできる。
When the file usage rate exceeds the threshold value, the statistics of the amount of data written per hour are prepared in advance so that the extended extent is generated until the extent is generated.
Alternatively, it is also possible to calculate how many hours there is a margin before the capacity is exceeded.

【0042】また、ログファイルの形式をcsv(Comma
Separated Value)形式(*.csv)等に変換して出
力することにより、スプレッドシートへのロードが可能
となる。さらに、ファイル使用率の計算結果において、
閾値を超過したテーブルが存在する場合には、アラート
をコンソール14へ出力する(ステップS37)。
The log file format is csv (Comma
By converting to a Separated Value) format (* .csv) or the like and outputting it, loading to a spreadsheet becomes possible. Furthermore, in the calculation result of the file usage rate,
If there is a table exceeding the threshold, an alert is output to the console 14 (step S37).

【0043】次に、障害回避部30による障害回避処理
を図8の図面、及び図9に示すフローチャートを参照し
ながら説明する。障害回避部30は、アラート出力処理
部13からアラートを受けた場合に障害回避処理を開始
する。
Next, the fault avoiding process by the fault avoiding unit 30 will be described with reference to the drawing of FIG. 8 and the flowchart shown in FIG. The failure avoiding unit 30 starts a failure avoiding process when receiving an alert from the alert output processing unit 13.

【0044】ここでは、例えば、テーブル73aを有す
るデータベースファイル71aのファイル使用率が閾値
を超え、アラートが上がっているものとして説明する。
Here, for example, it is assumed that the file usage rate of the database file 71a having the table 73a exceeds the threshold value and an alert is raised.

【0045】まず、1時間当たりの書き込み件数(=t
rns)を算出し、図9に示すように、算出された書き
込み件数と、容量監視部10で得られたカラムサイズの
総和(=columns)とを乗じた値をサイズとす
る、データベース7のテーブルと同様の構造を持つ共有
メモリテーブル41を予め作成する(ステップS5
1)。また、共有メモリテーブル41のサイズは、何時
間分にしても良い。
First, the number of writes per hour (= t
rns), and as shown in FIG. 9, a table of the database 7 in which the size is a value obtained by multiplying the calculated number of writes by the sum of column sizes (= columns) obtained by the capacity monitoring unit 10. A shared memory table 41 having the same structure as that described above is created in advance (step S5).
1). The size of the shared memory table 41 may be any number of hours.

【0046】なお、既に共有メモリテーブル41を使用
しデータベース7への書き込みを行っている場合には、
現在使用している共有メモリテーブル41からの読み出
し/データベース7への書き込みを全て終了してから新
しく作成するか、共有メモリテーブル41を別名で作成
し、データベース再構築の際に2つの共有メモリテーブ
ル41から読み出す必要がある。
When writing to the database 7 has already been performed using the shared memory table 41,
After the reading from the currently used shared memory table 41 and the writing to the database 7 are all completed, a new shared memory table 41 is created, or the shared memory table 41 is created under a different name, and two shared memory tables are created when the database is reconstructed. It is necessary to read from 41.

【0047】次に、プロセス変更部31は、アラートが
上がったテーブル73aに書き込みを行っているプロセ
スを検索し(ステップS53)、検索されたプロセスを
停止させ、共有メモリテーブル41へ書き込んでいくプ
ロセスに変更する(ステップS55)。すなわち、デー
タが共有メモリテーブル41に書き込まれていく。
Next, the process change unit 31 searches for a process that is writing to the table 73a for which an alert has been raised (step S53), stops the searched process, and writes the process to the shared memory table 41. (Step S55). That is, data is written to the shared memory table 41.

【0048】次に、テーブル73aを確定し(ステップ
S57)、1時間当たりの書き込み件数(=trns)
を算出し、図10に示すように、算出された書き込み件
数に今後業務終了までの時間数(=t)を乗じた件数
と、確定したテーブル73aに格納されている件数(=
records)とを加算して、想定件数(=tota
l records)を算出する。
Next, the table 73a is determined (step S57), and the number of writes per hour (= trns)
As shown in FIG. 10, the calculated number of writes is multiplied by the number of hours until the work is completed (= t) in the future, and the number of records stored in the determined table 73a (=
records) and the expected number (= tota)
1 records).

【0049】さらに、ファイル作成部32は、容量監視
部10で得られたカラムサイズの総和(=column
s)と想定件数total recordsとを乗じ、
得られた値にさらに余裕として1.1〜1.2倍を乗じ
た値をファイルサイズとする新たなデータベースファイ
ル71jを例えば、別のディスクに作成する。(ステッ
プS59)。
Further, the file creation unit 32 calculates the total (= column) of the column sizes obtained by the capacity monitoring unit 10.
s) multiplied by the expected number of total records,
A new database file 71j having a file size of a value obtained by multiplying the obtained value by 1.1 to 1.2 times as a margin is created on another disk, for example. (Step S59).

【0050】なお、データベースファイル71jは、同
一ディスク内に追加分として確保できる場合は、((t
rns*t)*columns)*1.1または((t
rns*t)*columns)*1.2で良い。ただ
し、この場合の余裕率も任意である。
If the database file 71j can be secured as an additional portion in the same disk, ((t
rns * t) * columns) * 1.1 or ((t
rns * t) * columns) * 1.2. However, the margin in this case is also arbitrary.

【0051】さらに、テーブル73aをエクスポートす
る(ステップS61)。すなわち、ファイル退避部33
は、テーブル73aを別のデータベースファイル71k
に退避させてテーブル73kとする。そして、アラート
の上がったテーブル73aを削除する(ステップS6
3)。
Further, the table 73a is exported (step S61). That is, the file saving unit 33
Stores the table 73a in another database file 71k
To the table 73k. Then, the table 73a for which the alert has been raised is deleted (step S6).
3).

【0052】次に、削除したテーブル73aと同一のテ
ーブルを、作成したデータベースファイル71jに作成
する。この際、初期エクステントサイズはcolumn
s*total recordsの値とし、拡張エクス
テントサイズはcolumns*total reco
rds*0.1とする。(ステップS65)。
Next, the same table as the deleted table 73a is created in the created database file 71j. At this time, the initial extent size is column
The value of s * total records is used, and the extended extent size is columns * total record.
rds * 0.1. (Step S65).

【0053】次に、書込部34は、エクスポートしたダ
ンプファイル73kを、作成したテーブル73jにイン
ポートし(ステップS67)、さらに、書込部34は、
共有メモリテーブル41に書き込まれたデータを、作成
したテーブル73jに書き込むプロセスを起動する。
(ステップS69)。そして、プロセスを元に戻す(ス
テップS71)。
Next, the writing unit 34 imports the exported dump file 73k into the created table 73j (step S67).
A process of writing the data written in the shared memory table 41 to the created table 73j is started.
(Step S69). Then, the process is restored (step S71).

【0054】このように実施の形態のリレーショナルデ
ータベース管理システムによれば、テーブル単位にレコ
ード最大格納可能件数を算出し、算出されたレコード最
大格納可能件数を実際のレコード格納件数と比較してフ
ァイル使用率を求める。すなわち、データベースファイ
ルの使用状況(エクステント使用状況)を、従来のバイ
ト単位算出ではなくレコード単位算出にしたので、客観
的にデータベースファイルの使用状況(エクステント使
用状況)を把握することができる。
As described above, according to the relational database management system of the embodiment, the maximum number of records that can be stored for each table is calculated, and the calculated maximum number of records that can be stored is compared with the actual number of records that can be stored. Find the rate. That is, the database file usage status (extent usage status) is not calculated in the conventional byte unit, but is calculated in record units, so that the usage status of the database file (extent usage status) can be grasped objectively.

【0055】また、ファイル使用率が予め設定した閾値
に達しているか、或いは閾値まであと何件格納可能かを
算出し、ログファイルを出力することができる。また、
ログファイルをcsv形式(*.csv)等にしておく
ことによりスプレッドシートに取り込むことができる。
Further, it is possible to calculate whether the file usage rate has reached a preset threshold value or how many more files can be stored up to the threshold value, and output a log file. Also,
By setting the log file in a csv format (* .csv) or the like, the log file can be imported into a spreadsheet.

【0056】また、ファイル使用率が閾値に達している
場合はアラートを上げ、拡張エクステント発生によるシ
ステムの性能劣化やデータベースファイル容量の超過に
よるシステムの障害を未然に知らせることができる。
When the file usage rate has reached the threshold value, an alert can be raised to notify the user of the system performance deterioration due to the occurrence of the extended extent and the system failure due to the excess of the database file capacity.

【0057】また、閾値に達したテーブルに関して、ア
ラートを受け、書き込みを行っているプロセスを一時中
止し、共有メモリテーブルへの書き込みを行うプロセス
に変更し、その間にデータベースを再構築し、データを
移行及び共有メモリテーブルから読み出し/書き込みを
開始することにより、稼動中のシステムを停止させるこ
となく、障害を未然に回避することができる。また、デ
ータベースへの書き込みを一時中止させ、新たにデータ
ベースを構築することから、比較的リアルタイム性の低
い業務要件の場合に有効である。
In addition, for a table that has reached the threshold value, an alert is received, the process that is writing is temporarily stopped, the process is changed to a process that writes to the shared memory table, and during that time the database is reconstructed, and the data is rewritten. By starting read / write from the migration and shared memory table, failures can be avoided beforehand without stopping the operating system. In addition, since writing to the database is temporarily suspended and a new database is constructed, this is effective for business requirements with relatively low real-time properties.

【0058】なお、実施の形態のリレーショナルデータ
ベース管理システムの変形例として図12に示すような
リレーショナルデータベース管理システムを用いても良
い。図12に示すリレーショナルデータベース管理シス
テムの変形例では、計算結果のログファイルを添付ファ
イルとしてメール送信し、利用者に知らせることができ
る。
As a modification of the relational database management system of the embodiment, a relational database management system as shown in FIG. 12 may be used. In a modified example of the relational database management system shown in FIG. 12, a log file of the calculation result can be sent by e-mail as an attached file to notify the user.

【0059】また、加入電話、携帯電話へダイアルアッ
プして音声メッセージを流しアラートを通知することが
できる。さらに、ログファイルをFAX送信して、利用
者に知らせることができる。さらには、ポケットベル
(登録商標)へダイアルアップしてアラートを通知する
こともできる。
It is also possible to dial up to a subscribing telephone or a mobile telephone to send a voice message and notify an alert. Further, the user can be notified of the log file by fax transmission. Furthermore, an alert can be notified by dialing up to a pager (registered trademark).

【0060】[0060]

【発明の効果】以上説明したように、本発明によれば、
データベースファイルの使用状況を、従来のバイト単位
算出ではなくレコード単位算出にしたので、客観的にデ
ータベースファイルの使用状況を把握することができ
る。
As described above, according to the present invention,
Since the usage status of the database file is calculated not in the conventional byte unit but in the record unit, the usage status of the database file can be grasped objectively.

【0061】また、データベースファイルの使用率が閾
値に達した場合にはアラートを出力するので、データベ
ースファイル容量の超過によるシステムの障害を未然に
知らせることができる。
Further, when the usage rate of the database file reaches the threshold value, an alert is output, so that a system failure due to an excess of the database file capacity can be notified in advance.

【0062】また、アラートを受けた場合に、システム
を停止させることなく、障害を未然に回避することがで
きる。
Further, when an alert is received, a failure can be avoided without stopping the system.

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

【図1】本発明の実施の形態に係るリレーショナルデー
タベース管理システムの構成を示す図である。
FIG. 1 is a diagram showing a configuration of a relational database management system according to an embodiment of the present invention.

【図2】データディクショナリービューを示す図であ
る。
FIG. 2 is a diagram showing a data dictionary view.

【図3】テーブル内のエクステント及び拡張エクステン
トを示す図である。
FIG. 3 is a diagram showing an extent and an extended extent in a table.

【図4】静的データディクショナリービューを示す図で
ある。
FIG. 4 is a diagram showing a static data dictionary view.

【図5】カラム及び行からなるテーブルの一例を示す図
である。
FIG. 5 is a diagram illustrating an example of a table including columns and rows.

【図6】エクステントの詳細な構成を示す図である。FIG. 6 is a diagram showing a detailed configuration of an extent.

【図7】容量監視部によるファイル使用率計算処理を示
すフローチャートである。
FIG. 7 is a flowchart illustrating a file usage rate calculation process performed by the capacity monitoring unit.

【図8】障害回避部による障害回避処理を説明するため
の図である。
FIG. 8 is a diagram for explaining a fault avoiding process by a fault avoiding unit.

【図9】共有メモリテーブルに作成されるテーブルサイ
ズを示す図である。
FIG. 9 is a diagram showing a table size created in a shared memory table.

【図10】新たなデータベースファイルに作成されるフ
ァイルサイズを示す図である。
FIG. 10 is a diagram showing a file size created in a new database file.

【図11】障害回避部による障害回避処理を示すフロー
チャートである。
FIG. 11 is a flowchart illustrating a fault avoiding process performed by a fault avoiding unit.

【図12】実施の形態のリレーショナルデータベース管
理システムの変形例を示す図である。
FIG. 12 is a diagram showing a modification of the relational database management system of the embodiment.

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

1 クライアント装置 3 サーバ 5 計算機 7 データベース 10 容量監視部 11 レコード格納件数計算部 12 ファイル使用率計算部 13 アラート出力処理部 14 コンソール 15 プリンタ 20 システム管理部 30 障害回避部 31 プロセス変更部 32 ファイル作成部 33 ファイル退避部 34 書込部 40 共有メモリ 71a〜71i データベースファイル 73a〜73i テーブル REFERENCE SIGNS LIST 1 client device 3 server 5 computer 7 database 10 capacity monitoring unit 11 record storage count calculation unit 12 file usage rate calculation unit 13 alert output processing unit 14 console 15 printer 20 system management unit 30 failure avoidance unit 31 process change unit 32 file creation unit 33 file saving unit 34 writing unit 40 shared memory 71a-71i database file 73a-73i table

Claims (3)

【特許請求の範囲】[Claims] 【請求項1】 カラムと行から構成されるテーブルを有
するデータベースファイルが作成されたデータベースを
管理するリレーショナルデータベース管理システムにお
いて、 前記テーブルに予め設定されたデータ領域からなるエク
ステントのサイズと前記カラムのサイズの総和とに基づ
いて前記テーブルに格納可能な最大レコード格納件数を
計算する格納件数計算手段と、 この格納件数計算手段で計算された最大レコード格納件
数と実際のレコード格納件数とに基づいて前記データベ
ースファイルの使用率を計算する使用率計算手段と、を
備えることを特徴とするリレーショナルデータベース管
理システム。
1. A relational database management system for managing a database in which a database file having a table composed of columns and rows is created, wherein a size of an extent comprising a data area preset in the table and a size of the column Means for calculating the maximum number of records that can be stored in the table based on the sum total of the number of stored records, and the database based on the maximum number of records stored and the actual number of records that are calculated by the stored number calculation means. A relational database management system, comprising: utilization rate calculation means for calculating a utilization rate of a file.
【請求項2】 前記使用率計算手段で計算された前記デ
ータベースファイルの使用率が予め設定した閾値に達し
ているか否かを判定し前記使用率が閾値に達した場合に
はアラートを出力するアラート出力手段を備えることを
特徴とする請求項1記載のリレーショナルデータベース
管理システム。
2. An alert for determining whether or not the usage rate of the database file calculated by the usage rate calculation means has reached a preset threshold value, and outputting an alert when the usage rate has reached the threshold value. 2. The relational database management system according to claim 1, further comprising an output unit.
【請求項3】 前記アラート出力手段からアラートを受
けた場合に、閾値に達した前記テーブルへのデータの書
き込みを停止して第1テーブルへの書き込みプロセスに
変更するプロセス変更手段と、 新たなデータベースファイルを作成し該データベースフ
ァイルに第2テーブルを作成するファイル作成手段と、 閾値に達した前記テーブル内のデータと前記第1テーブ
ル内のデータとを前記第2テーブルに書き込む書込手段
と、を備えることを特徴とする請求項2記載のリレーシ
ョナルデータベース管理システム。
3. A process change unit that stops writing data to the table that has reached a threshold value and changes to a process of writing to the first table when an alert is received from the alert output unit, and a new database. File creation means for creating a file and creating a second table in the database file; and writing means for writing data in the table and data in the first table that have reached a threshold value in the second table. The relational database management system according to claim 2, further comprising:
JP2000065242A 2000-03-09 2000-03-09 Relational data base management system Pending JP2001256085A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2000065242A JP2001256085A (en) 2000-03-09 2000-03-09 Relational data base management system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2000065242A JP2001256085A (en) 2000-03-09 2000-03-09 Relational data base management system

Publications (1)

Publication Number Publication Date
JP2001256085A true JP2001256085A (en) 2001-09-21

Family

ID=18584806

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2000065242A Pending JP2001256085A (en) 2000-03-09 2000-03-09 Relational data base management system

Country Status (1)

Country Link
JP (1) JP2001256085A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015072537A (en) * 2013-10-02 2015-04-16 富士通株式会社 Information processing program, information processing device, and information processing method
CN108416040A (en) * 2018-03-14 2018-08-17 上海达梦数据库有限公司 A kind of database recovering method, device, terminal device and storage medium

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2015072537A (en) * 2013-10-02 2015-04-16 富士通株式会社 Information processing program, information processing device, and information processing method
CN108416040A (en) * 2018-03-14 2018-08-17 上海达梦数据库有限公司 A kind of database recovering method, device, terminal device and storage medium
CN108416040B (en) * 2018-03-14 2020-10-27 上海达梦数据库有限公司 Database repair method and device, terminal equipment and storage medium

Similar Documents

Publication Publication Date Title
US10191675B2 (en) Methods and system of pooling secondary storage devices
US7840771B2 (en) Method and a computer for storage area management
JP5037811B2 (en) Remote copy method and remote copy system
AU694022B2 (en) Real time data migration system and method employing sparse files
US7606871B2 (en) System and method for virtualizing network storages into a single file system view
US7647450B2 (en) Method, computer and computer system for monitoring performance
US7509316B2 (en) Techniques for performing policy automated operations
US20150263909A1 (en) System and method for monitoring a large number of information processing devices in a communication network
US9858306B2 (en) Archiving to a single database table information located across multiple tables
CN101183264B (en) Real-time process history server
JP2007102452A (en) System management program and system management method
KR970022796A (en) Node selection method for serving video data, distributed video server system, video server system, distributed computing system and control method thereof
JP2021501389A (en) Data hierarchy storage and hierarchy search method and device
JP2007241486A (en) Memory system
JP2004164611A (en) Management of attribute data
US6584551B1 (en) System and method for automatic dynamic expansion of a snapshot repository
CN105808449A (en) Virtual storage image version management method and system for virtual machine
EP1456766A1 (en) Managing storage resources attached to a data network
CN108268344A (en) A kind of data processing method and device
CN110532123A (en) The failover method and device of HBase system
CN114780252A (en) Resource management method and device of data warehouse system
JP2012247901A (en) Database management method, database management device, and program
US8051135B2 (en) Server availability reporting using asynchronous e-mail message
JP2001256085A (en) Relational data base management system
CN115993932A (en) Data processing method, device, storage medium and electronic equipment