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

JP3309198B2 - Database multiplexing method - Google Patents

Database multiplexing method

Info

Publication number
JP3309198B2
JP3309198B2 JP00552596A JP552596A JP3309198B2 JP 3309198 B2 JP3309198 B2 JP 3309198B2 JP 00552596 A JP00552596 A JP 00552596A JP 552596 A JP552596 A JP 552596A JP 3309198 B2 JP3309198 B2 JP 3309198B2
Authority
JP
Japan
Prior art keywords
database
revision
data
main database
main
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP00552596A
Other languages
Japanese (ja)
Other versions
JPH09198288A (en
Inventor
和彦 上野
弘 伊藤
正 増子
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Azbil Corp
Original Assignee
Azbil 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 Azbil Corp filed Critical Azbil Corp
Priority to JP00552596A priority Critical patent/JP3309198B2/en
Publication of JPH09198288A publication Critical patent/JPH09198288A/en
Application granted granted Critical
Publication of JP3309198B2 publication Critical patent/JP3309198B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Landscapes

  • Techniques For Improving Reliability Of Storages (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Description

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

【0001】[0001]

【発明の属する技術分野】この発明は、主データベース
と複製データベースとを用いたデータベース多重化方法
に関するものである。
The present invention relates to a database multiplexing method using a main database and a duplicate database.

【0002】[0002]

【従来の技術】従来、この種のデータベース多重化方法
では、主データベースと複製データベースとを備え、主
データベースにデータを蓄積して行く一方、前回のコピ
ー周期から今回のコピー周期までの間に主データベース
に蓄積されたデータを複製データベースに定期的にコピ
ーするようにしている。また、主データベースへのデー
タ蓄積に際しての操作の履歴は、操作ログに記録され
る。複製データベース(主データベースのある時点のバ
ックアップデータ)と主データベースの現在の操作ログ
は、主データベースを保有する装置に障害が起きても、
必ず読み出し可能なようにハードウェア的にバックアッ
プされている。障害発生時には、複製データベースから
主データベースのある時点のバックアップデータを読み
出し、その時点以降の操作を操作ログから読み取り、再
実行することによって完全に主データベースと同じもの
を復元する。この操作は、2重化されたハードウェアと
大容量の2次記録装置によって可能となる。
2. Description of the Related Art Conventionally, this type of database multiplexing method includes a main database and a duplicate database, and accumulates data in the main database. The data stored in the database is regularly copied to a duplicate database. In addition, a history of operations performed when data is stored in the main database is recorded in an operation log. The replica database (backup data of the main database at a certain point in time) and the current operation log of the main database can be used even if the device that holds the main database fails.
It is backed up by hardware so that it can always be read. When a failure occurs, the backup data of the main database at a certain point in time is read from the duplicate database, the operation after that point is read from the operation log, and the operation is re-executed to completely restore the same thing as the main database. This operation is made possible by dual hardware and a large-capacity secondary recording device.

【0003】[0003]

【発明が解決しようとする課題】しかしながら、このよ
うな従来のデータベース多重化方法による、2重化した
ハードウェアと大容量の2次記録装置を必要とするた
め、高コストとなる。すなわち、金融業などの業務にお
いては、障害が起きた場合、主データベースと同じもの
を完全に復元する必要があり、高コストとなってもやむ
を得ない。しかし、ビル管理システムなどの監視を主眼
とするシステムでは、データの損失よりも、連続して監
視業務が行えることとメンテナンスが簡単であることが
重要視されている。このようなシステムにおいて、上述
したデータベース多重化方法を適用した場合、多少デー
タが失われてもよいにも拘らず、主データベースが完全
に復元されてしまうことになり、過剰品質となってコス
トがアップする。
However, such a conventional database multiplexing method requires double hardware and a large-capacity secondary recording device, resulting in high cost. That is, in a business such as a financial business, when a failure occurs, it is necessary to completely restore the same database as the main database, and even if the cost becomes high, it is unavoidable. However, in a system such as a building management system whose main purpose is monitoring, it is more important that data can be continuously monitored and maintenance is easier than data loss. In such a system, when the above-described database multiplexing method is applied, the main database is completely restored even though some data may be lost, resulting in excessive quality and cost. Up.

【0004】本発明はこのような課題を解決するために
なされたもので、その目的とするところは、ビル管理シ
ステムなどの監視を主眼とするシステムにおいて、2重
化したハードウェアと大容量の2次記録装置を不要と
し、コストダウンを図ることのできるデータベース多重
化方法を提供することにある。
The present invention has been made to solve such a problem, and an object of the present invention is to provide a system for monitoring a building management system or the like, which has dual hardware and a large capacity. It is an object of the present invention to provide a database multiplexing method which does not require a secondary recording device and can reduce costs.

【0005】[0005]

【課題を解決するための手段】このような目的を達成す
るために、本発明は、主データベースにデータを蓄積し
て行く一方、前回のコピー周期から今回のコピー周期ま
での間に主データベースに蓄積されたデータを複製デー
タベースに定期的にコピーするデータベース多重化方法
において、主データベースを保有する装置に障害が起き
た場合、複製データベースを新しい主データベースとし
て使用する一方、前回コピーしてから障害が発生するま
での間に古い主データベースに蓄積されたデータを不一
致データとし、この不一致データを除去した古い主デー
タベースを複製データベースとして再利用するようにし
たものである。
In order to achieve the above object, according to the present invention , data is stored in a main database while the data is stored in the main database between a previous copy cycle and a current copy cycle. In a database multiplexing method in which accumulated data is periodically copied to a duplicate database, if a failure occurs in the device that holds the main database, the duplicate database is used as a new main database, while a failure has occurred since the previous copy. Until it happens
Data accumulated in the old primary database during
Old main data from which mismatched data is removed
The database is reused as a duplicate database .

【0006】[0006]

【0007】[0007]

【0008】この発明によれば、主データベースに新し
く蓄積されたデータが、複製データベースに定周期でコ
ピーされる。主データベースを保有する装置に障害が起
きると、複製データベースが新しい主データベースとし
て使用され、システムが連続して運用される。この場
合、前回コピーしてから障害が発生するまでの間に古い
主データベース(障害が起きた装置の保有する主データ
ベース)に蓄積されたデータは新しい主データベースに
は含まれていないが、コピー周期を短くすることによ
り、そのデータの損失量を少なくすることができる。ま
た、この場合、前回コピーしてから障害が発生するまで
の間に古い主データベースに蓄積されたデータが不一致
データとされ、この不一致データを除去した古い主デー
タベースが複製データベースとして再利用される。
According to the present invention, data newly stored in the main database is copied to the duplicate database at regular intervals. When a failure occurs in the device holding the main database, the duplicate database is used as a new main database, and the system is continuously operated. In this case, the data stored in the old main database (main database held by the failed device) between the previous copy and the occurrence of the failure is not included in the new main database, but the copy cycle , The amount of data loss can be reduced. In this case, the data accumulated in the old main database from the previous copy to the occurrence of the failure is regarded as inconsistent data, and the old main database from which the inconsistent data has been removed is reused as the duplicate database.

【0009】[0009]

【発明の実施の形態】以下、本発明を実施の形態に基づ
き詳細に説明する。図2はこの発明を適用してなるビル
管理システムのシステム構成図である。同図において、
1,2,3はメインコントロールユニット(MCU:以
下、監視装置と呼ぶ)、4はエリアコントローラマスタ
(ACM)、5−1,5−2はエリアコントローラ(A
IC)、6−1〜6−6はリモートステーション(I−
DGP)であり、監視装置1,2,3はオペレータイン
ターフェイスを提供し、エリアコントローラマスタ4は
ゲートウェイ機能を提供し、エリアコントローラ5−
1,5−2はエリア内の制御を行い、リモートステーシ
ョン6−1〜6−6は機器単位の制御を行う。
DESCRIPTION OF THE PREFERRED EMBODIMENTS Hereinafter, the present invention will be described in detail based on embodiments. FIG. 2 is a system configuration diagram of a building management system to which the present invention is applied. In the figure,
1, 2 and 3 are main control units (MCU: hereinafter referred to as monitoring devices), 4 is an area controller master (ACM), and 5-1 and 5-2 are area controllers (A
IC), 6-1 to 6-6 are remote stations (I-
DGP), the monitoring devices 1, 2 and 3 provide an operator interface, the area controller master 4 provides a gateway function, and the area controller 5-
1, 5-2 perform control in the area, and the remote stations 6-1 to 6-6 perform control on a device basis.

【0010】このビル管理システムにおいて、監視装置
1,2,3は、監視業務を支援する監視アプリケーショ
ン(以下、監視APと呼ぶ)を備えている。図1に監視
装置1,2,3のシステム構成を示す。監視装置1,
2,3は、監視AP・1−1,2−1,3ー1と、切り
替え処理部1−2,2−2,3ー2と、データベース1
−3,2−3,3ー3と、データベーストリガ1−4,
2−4,3ー4と、変更ログ1−5,2−5,3ー5
と、システムレビジョンテーブル1−6,2−6,3ー
6と、レビジョンテーブル1−7,2−7,3ー7と、
モジュール状態監視部1−8,2−8,3ー8とを有し
ている。なお、この実施の形態では、現在、データベー
ス1−3を主データベースとして、データベース2−
3,3ー3を複製データベースとして使用しているもの
とする。また、図には示していないが、監視装置1,
2,3はCPUを備えている。
In this building management system, the monitoring apparatuses 1, 2, and 3 have a monitoring application (hereinafter, referred to as a monitoring AP) for supporting a monitoring operation. FIG. 1 shows a system configuration of the monitoring apparatuses 1, 2, and 3. Monitoring device 1,
2, 3 are monitoring APs 1-1, 2-1 and 3-1; switching processing units 1-2; 2-2; 3-2;
-3, 2-3, 3-3 and database trigger 1-4,
2-4, 3-4 and change logs 1-5, 2-5, 3-5
And system revision tables 1-6, 2-6, 3-6, revision tables 1-7, 2-7, 3-7,
It has module status monitoring units 1-8, 2-8, and 3-8. In this embodiment, the database 1-3 is currently used as the main database and the database 2-
It is assumed that 3, 3-3 is used as a duplicate database. Although not shown in the figure, the monitoring devices 1 and
2 and 3 have CPUs.

【0011】監視AP・1−1,2−1,3ー1はそれ
ぞれの監視装置1,2,3で動く監視業務を支援する。
切り替え処理部1−2,2−2,3ー2は監視AP・1
−1,2−1,3ー1からの更新,選択要求を主データ
ベース1−3に中継する。主データベース1−3は監視
業務のためのデータを保管する。複製データベース2−
3,3ー3は主データベース1−3のある時点の複製デ
ータを保管する。データベーストリガ1−4,2−4,
3ー4はデータベース1−3,2−3,3ー3に対する
更新個所を書き出す。変更ログ1−5,2−5,3ー5
はデータベース1−3,2−3,3ー3の変更個所の履
歴を保持する。システムレビジョンテーブル1−6,2
−6,3ー6は主データベースの切替回数をシステムレ
ビジョンとして保持する。レビジョンテーブル1−7,
2−7,3ー7はデータベース1−3,2−3,3ー3
のバージョンを示すレビジョンを格納する。モジュール
状態監視部1−8,2−8,3ー8は監視装置1,2,
3が正常に動いているかどうかを監視する。
The monitoring APs 1-1, 2-1 and 3-1 support a monitoring operation performed by the respective monitoring devices 1, 2 and 3.
The switching processing unit 1-2, 2-2, 3-2 is the monitoring AP-1.
-Relay the update / selection request from -1, 2-1 and 3-1 to the main database 1-3. The main database 1-3 stores data for monitoring operations. Duplicate database 2-
3, 3-3 stores the duplicate data of the main database 1-3 at a certain point in time. Database trigger 1-4, 2-4
In step 3-4, an updated location for the database 1-3, 2-3, 3-3 is written. Change log 1-5, 2-5, 3-5
Holds the history of the changed part of the database 1-3, 2-3, 3-3. System revision table 1-6, 2
-6 and 3-6 hold the number of times the main database is switched as the system revision. Revision table 1-7,
2-7, 3-7 are databases 1-3, 2-3, 3-3
Stores revision indicating version of. The module status monitoring units 1-8, 2-8, 3-8 are monitoring devices 1, 2,
Monitor if 3 is working properly.

【0012】次に、このビル管理システムにおける特徴
的な動作(バックアップロジック)について、監視装置
1,2,3での各部の機能を交えながら説明する。
Next, the characteristic operation (backup logic) of the building management system will be described with reference to the functions of each unit in the monitoring devices 1, 2, and 3.

【0013】〔監視APからの更新内容の蓄積〕監視A
P・1−1からの更新内容は切り替え処理部1−2によ
り主データベース1−3へ送られる。監視AP・2−1
からの更新内容は切り替え処理部2−2により主データ
ベース1−3へ送られる。監視AP・3−1からの更新
内容は切り替え処理部3−2により主データベース1−
3へ送られる。これにより、主データベース1−3に、
監視AP・1−1,2−1,3ー1からのデータが更新
蓄積される。
[Accumulation of Update Contents from Monitor AP] Monitor A
The update content from P • 1-1 is sent to the main database 1-3 by the switching processing unit 1-2. Monitoring AP 2-1
Are updated by the switching processing unit 2-2 to the main database 1-3. The contents of updates from the monitoring AP 3-1 are sent to the main database
Sent to 3. Thereby, in the main database 1-3,
The data from the monitoring APs 1-1, 2-1 and 3-1 are updated and accumulated.

【0014】主データベース1−3にデータが更新蓄積
されると、更新の処理毎に、データベーストリガ1−4
が起動し、更新個所をテーブル名とROWID(行)で
変更ログ1−5に記述する。この場合、変更個所は、シ
ステムレビジョンテーブル1−6内のシステムレビジョ
ンによって指定されるレビジョンテーブル1−7のエン
トリ内のレビジョン(主データベース1−3の現在のレ
ビジョン)をNとした場合、N+1で指定される変更ロ
グ1−5のエントリ内に記述される。
When data is updated and stored in the main database 1-3, the database trigger 1-4 is updated every time the data is updated.
Is started, and the update location is described in the change log 1-5 using the table name and the ROWID (row). In this case, if the revision (the current revision of the main database 1-3) in the entry of the revision table 1-7 specified by the system revision in the system revision table 1-6 is N, the change part is N + 1. It is described in the entry of the specified change log 1-5.

【0015】例えば、変更個所を「テーブルの200
行」とした場合、図3に示すように、システムレビジョ
ンテーブル1−6内のシステムレビジョンが「2」であ
れば、このシステムレビジョン「2」によってレビジョ
ンテーブル1−7のエントリ「2」が指定され、このエ
ントリ「2」内のレビジョン「200」が主データベー
ス1−3の現在のレビジョンNとして読み出され、N+
1で指定される変更ログ1−5のエントリ、すなわち2
01番目のエントリ内に変更個所が「テーブルの20
0行」として記述される。変更ログ1−5に変更個所が
記述されると、レビジョンテーブル1−7のエントリ
「2」内のレビジョンがインクリメントされ、「20
1」とされる。
[0015] For example, the changed part is described as "200 in the table".
3, if the system revision in the system revision table 1-6 is "2" as shown in FIG. 3, the system revision "2" designates the entry "2" of the revision table 1-7. The revision “200” in the entry “2” is read as the current revision N of the main database 1-3, and N +
The entry of the change log 1-5 designated by 1, ie, 2
The changed part in the 01th entry is “20 in the table”.
0 line ". When the changed part is described in the change log 1-5, the revision in the entry “2” of the revision table 1-7 is incremented to “20”.
1 ".

【0016】なお、変更ログ1−5のエントリはサイク
リックに使用し、主データベース1−3の現在のレビジ
ョンが変更ログ1−5の最大エントリを示していた時
は、変更ログ1−5の第1番目のエントリに変更個所が
記述される。
The entries of the change log 1-5 are used cyclically, and when the current revision of the main database 1-3 indicates the maximum entry of the change log 1-5, the change log 1-5 is used. The changed part is described in the first entry.

【0017】〔複製データベースへのコピー処理〕図4
にコピー処理が行われる前の監視装置1および監視装置
2の状態を例示する。この例では、主データベース1−
3および複製データベース2−3に、データの更新蓄積
場所としてテーブル,を有しているものとしてい
る。また、監視装置1における主データベース1−3の
現在のレビジョンを「201」、監視装置2における複
製データベース2−3の現在のレビジョンを「199」
としている。また、前回のコピー処理により、主データ
ベース1ー3と複製データベース2−3とは、テーブル
の200行目、テーブルの1500行目以外は一致
しているものとする。
[Copy Process to Replica Database] FIG. 4
2 illustrates a state of the monitoring device 1 and the monitoring device 2 before the copy processing is performed. In this example, the main database 1-
3 and a copy database 2-3 have a table as a data update storage location. Further, the current revision of the main database 1-3 in the monitoring device 1 is “201”, and the current revision of the duplicate database 2-3 in the monitoring device 2 is “199”.
And In addition, it is assumed that the main database 1-3 and the duplicate database 2-3 match by the previous copy process except for the 200th line of the table and the 1500th line of the table.

【0018】前回のコピー処理から一定時間が経過する
と、監視装置2のCPUがコピー処理プログラムを起動
し、前回のコピー周期から今回のコピー周期までの間に
主データベース1−3に更新蓄積されたデータを複製デ
ータベース2−3にコピーする。すなわち、監視装置2
のCPUは、主データベース1−3の現在のレビジョン
と複製データベース2−3の現在のレビジョンとを比較
し、主データベース1−3の現在のレビジョンが複製デ
ータベース2−3の現在のレビジョンよりも進んでいる
部分の更新蓄積データを、1つのトランザクションとし
て複製データベース2−3にコピーする。
When a certain period of time has elapsed since the previous copy processing, the CPU of the monitoring apparatus 2 starts a copy processing program, and the copy processing program is updated and stored in the main database 1-3 from the previous copy cycle to the current copy cycle. Copy the data to the duplicate database 2-3. That is, the monitoring device 2
CPU compares the current revision of the main database 1-3 with the current revision of the duplicate database 2-3, and the current revision of the main database 1-3 is ahead of the current revision of the duplicate database 2-3. Is copied to the replication database 2-3 as one transaction.

【0019】図4で言えば、主データベース1−3の現
在のレビジョンが「201」、複製データベース2−3
の現在のレビジョンが「199」であり、主データベー
ス1−3の現在のレビジョンが「200」,「201」
の2レビジョン進んでいるので、変更ログ1−5のエン
トリ「200」で示される「テーブルの1500行
目」の内容、および変更ログ1−5のエントリ「20
1」で示される「テーブルの200行目」内容を、複
製データベース2−3の「テーブルの1500行目」
および「テーブルの200行目」にコピーする。コピ
ー時の主データベース1−3からの読み出しは、テーブ
ル内容がコピーのトランザクション開始時の内容に保持
される方法(データベース機能)で行う。
In FIG. 4, the current revision of the main database 1-3 is "201" and the duplicate database 2-3 is
Is "199", and the current revision of the main database 1-3 is "200", "201".
Of the change log 1-5, the contents of the “1500th line of the table” indicated by the entry “200” and the entry “20 of the change log 1-5”
The contents of the “line 200 of the table” indicated by “1” are copied to the “line 1500 of the table”
And "line 200 of the table". Reading from the main database 1-3 at the time of copying is performed by a method (database function) in which the table contents are retained at the contents at the time of starting the transaction of the copy.

【0020】複製データベース2−3の現在のレビジョ
ンと変更ログ2−5の内容は、コピー処理により複製デ
ータベース2−3の内容が更新されることにより、デー
タベーストリガ2−4が起動し、前述した「監視APか
らの更新内容の蓄積」の場合と同じロジックで更新され
る。これにより、レビジョンテーブル2−7のエントリ
「2」内のレビジョンは「201」となり、変更ログ2
−5のエントリ「200」内には「テーブルの150
0行目」が、変更ログ2−5のエントリ「201」内に
は「テーブルの200行目」が記述される。
The contents of the current revision of the duplicate database 2-3 and the contents of the change log 2-5 are updated by updating the contents of the duplicate database 2-3 by the copy process, and the database trigger 2-4 is activated. The update is performed using the same logic as in the case of “accumulation of update content from monitoring AP”. As a result, the revision in the entry “2” of the revision table 2-7 becomes “201”, and the change log 2
-5 entry "200" contains "150
The “line 0” is described in the entry “201” of the change log 2-5.

【0021】なお、ここでは監視装置2の複製データベ
ース2−3へのコピー処理について述べたが、監視装置
3の複製データベース3−3へも同様にしてコピー処理
が行われる。この場合、監視装置3のCPUが複製デー
タベース3−3へのコピー処理を行い、監視装置2,3
のCPUにコピー処理を行わせることによって、主デー
タベース1−3を保有する監視装置1でのCPUの負荷
を軽減することができる。
Although the copy process of the monitoring device 2 to the copy database 2-3 has been described here, the copy process is similarly performed to the copy database 3-3 of the monitoring device 3. In this case, the CPU of the monitoring device 3 performs a copy process to the replication database 3-3, and the monitoring devices 2, 3
By causing the CPU to perform the copy process, the load on the CPU in the monitoring device 1 having the main database 1-3 can be reduced.

【0022】〔主データベースを保有する監視装置の障
害発生時の処理〕主データベース1−3を保有する監視
装置1に障害が起きると、監視装置1,2,3のモジュ
ール状態監視部1−8,2−8,3−8が異常を検知
し、複製データベース2−3,3−3の中で最もレビジ
ョンの進んでいるものを新しい主データベースとし、シ
ステムレビジョンアップ処理を行う。
[Processing when a failure occurs in the monitoring device holding the main database] When a failure occurs in the monitoring device 1 holding the main database 1-3, the module status monitoring units 1-8 of the monitoring devices 1, 2, and 3 , 2-8, and 3-8 detect an abnormality, and the system with the most advanced revision among the duplicate databases 2-3 and 3-3 is set as a new main database, and the system is upgraded.

【0023】例えば、複製データベース2−3が最もレ
ビジョンが進んでいれば、この複製データベース2−3
が新しい主データベースとされる。これにより、以降、
新しい主データベース2−3に、監視AP・1−1,2
−1,3−1からのデータが更新蓄積されるようにな
り、システムが連続して運用される。
For example, if the revision of the copy database 2-3 is the most advanced, the copy database 2-3
Is the new primary database. As a result,
The new main database 2-3 stores the monitoring APs 1-1 and 1-2.
The data from -1 and 3-1 are updated and accumulated, and the system is operated continuously.

【0024】ここで、監視装置1に障害が起きたとき、
主データベース1−3の現在のレビジョンが「20
3」、複製データベース2−3の現在のレビジョンが
「201」であったとすると、主データベース1−3の
レビジョン「202」,「203」に対応する更新デー
タは複製データベース2−3には含まれていない。すな
わち、複製データベース2−3を新しい主データベース
2−3とした場合、古い主データベース1−3のレビジ
ョン「202」,「203」に対応する更新データが失
われる。
Here, when a failure occurs in the monitoring device 1,
The current revision of the main database 1-3 is "20
3 "and the current revision of the duplicate database 2-3 is" 201 ", the update data corresponding to the revisions" 202 "and" 203 "of the main database 1-3 are included in the duplicate database 2-3. Not. That is, when the duplicate database 2-3 is the new main database 2-3, the update data corresponding to the revisions "202" and "203" of the old main database 1-3 is lost.

【0025】しかし、このビル管理システムでは、デー
タの損失よりも、連続して監視業務が行えることとメン
テナンスが簡単であることが重要視される。したがっ
て、古い主データベース1−3のレビジョン「20
2」,「203」に対応する更新データが失われても、
それほど問題は生じない。例えば、ヒストリカルデータ
(日月報や検針値など)は、垂直分散により、ACMで
保証されているため、この仕組みでの損失が原因で、欠
測とはならない。また、通常のオペレータ操作(スケジ
ュールの変更や温度の設定値の変更)は、コントローラ
がマスタデータを持っているため、この仕組みでの損失
により、その操作がキャンセルされることはない。この
データの損失量は、コピー周期を短くすることにより、
少なくすることができる。
However, in this building management system, it is more important that data can be continuously monitored and that maintenance is easy than data loss. Therefore, the revision “20” of the old main database 1-3 is
Even if the update data corresponding to “2” and “203” is lost,
Not much problem. For example, historical data (daily / monthly reports, meter readings, etc.) is guaranteed by the ACM by vertical dispersion, so that a loss due to this mechanism does not result in missing data. In addition, a normal operator operation (change of schedule or change of set value of temperature) is not canceled due to loss in this mechanism because the controller has master data. The amount of data loss can be reduced by shortening the copy cycle.
Can be reduced.

【0026】システムレビジョンアップ処理では、障害
が起きた古い主データベース1−3を保有する監視装置
1以外の監視装置、すなわち監視装置2,3について、
そのシステムレビジョンテーブル2−6,3−6内のシ
ステムレビジョンをインクリメントし、その時の複製デ
ータベース2−3,3−3の現在のレビジョンを、イン
クリメントされた新しいシステムレビジョンによって指
定されるレビジョンテーブル2−7,3−7内のエント
リにコピーする。
In the system revision up process, the monitoring devices other than the monitoring device 1 having the old main database 1-3 in which the failure has occurred, that is, the monitoring devices 2 and 3,
The system revision in the system revision table 2-6, 3-6 is incremented, and the current revision of the duplicate database 2-3, 3-3 at that time is updated to the revision table 2- specified by the incremented new system revision. Copy to the entry in 7, 3-7.

【0027】このシステムレビジョンアップ処理を監視
装置2を例にとって説明すれば、図5に示すように、そ
のシステムレビジョンテーブル2−6内のシステムレビ
ジョンをインクリメントして「3」とし、このインクリ
メントされた新しいシステムレビジョン「3」によって
指定されるレビジョンテーブル2−7のエントリ「3」
内に、その時の複製データベース2−3の現在のレビジ
ョン「201」をコピーする。
This system revision up processing will be described by taking the monitoring device 2 as an example. As shown in FIG. 5, the system revision in the system revision table 2-6 is incremented to "3", and this incremented value is set. Entry "3" of revision table 2-7 specified by new system revision "3"
The current revision “201” of the duplicate database 2-3 at that time is copied.

【0028】なお、レビジョンテーブル2−7(3−
7)のエントリはサイクリックに使用し、現在のシステ
ムレビジョンがレビジョンテーブル2−7(3−7)の
最大エントリを示していた時は、レビジョンテーブル2
−7(3−7)の第1番目のエントリにその時の複製デ
ータベース2−3(3−3)の現在のレビジョンをコピ
ーする。
The revision table 2-7 (3-
The entry of 7) is used cyclically, and when the current system revision indicates the maximum entry of the revision table 2-7 (3-7), the revision table 2 is used.
-7 (3-7) copies the current revision of the duplicate database 2-3 (3-3) to the first entry.

【0029】〔主データベースの再利用のための処理〕
主データベース1−3を保有する監視装置1に障害が発
生すると、上述した如く、自動的にリスタートし、監視
機能を復旧する。この時、例えば、複製データベース2
−3を新しい主データベースとして、システムは既に運
用を開始している。この時、新しい主データベース2−
3は、古い主データベース1−3の障害が発生する直前
のコピー処理までのデータに対して、障害発生後の更新
データが加えられる。すなわち、新しい主データベース
2−3には、前回コピーしてから障害が発生するまでの
間に古い主データベース1−3に更新蓄積されたデータ
を含まないまま、障害発生後の更新データが加えられ
る。
[Process for Reusing Main Database]
When a failure occurs in the monitoring device 1 having the main database 1-3, the monitoring device 1 is automatically restarted and the monitoring function is restored as described above. At this time, for example, the replication database 2
-3 is the new main database, and the system has already started operation. At this time, a new main database 2-
In No. 3, update data after the occurrence of the failure is added to data up to the copy processing immediately before the occurrence of the failure in the old main database 1-3. That is, the updated data after the occurrence of the failure is added to the new main database 2-3 without including the data updated and accumulated in the old main database 1-3 from the previous copy to the occurrence of the failure. .

【0030】ここで、古い主データベース1−3を複製
データベースとして再利用するには、前回コピーしてか
ら障害が発生するまでの間に古い主データベース1−3
に更新蓄積されたデータを不一致データとして除去した
後(以下、この処理をデータ一致処理と呼ぶ)、新しい
主データベース2−3に更新蓄積された障害発生後の更
新データを古い主データベース1−3にコピーする必要
がある。
Here, in order to reuse the old main database 1-3 as a duplicate database, the old main database 1-3 is copied from the previous copy until the failure occurs.
After the data accumulated and updated in the new main database 2-3 is removed as unmatched data (hereinafter, this processing is referred to as data matching processing), the updated data after the occurrence of the failure that has been updated and accumulated in the new main database 2-3 is replaced with the old main database 1-3 Need to be copied to

【0031】〔データ一致処理〕データ一致処理につい
て図6〜図8を用いて具体的に説明する。図6は障害発
生直前の監視装置1および監視装置2の状態である。主
データベース1−3のテーブルの200行目とテーブ
ルの1500行目はまだ複製データベース2−3にコ
ピーされていない。
[Data Matching Process] The data matching process will be specifically described with reference to FIGS. FIG. 6 shows a state of the monitoring device 1 and the monitoring device 2 immediately before the occurrence of the failure. The 200th line of the table of the main database 1-3 and the 1500th line of the table have not yet been copied to the duplicate database 2-3.

【0032】図7は監視装置1に障害が起きた状態を示
している。監視装置2のデータベース2−3は新しい主
データベースとなり、システムバージョンアップ処理に
よりシステムレビジョンテーブル2−6のシステムレビ
ジョンが「3」とされ、レビジョンテーブル2−7のエ
ントリ「3」にデータベース2−3の現在のレビジョン
「199」がコピーされている。
FIG. 7 shows a state where a failure has occurred in the monitoring apparatus 1. The database 2-3 of the monitoring device 2 becomes a new main database, and the system revision of the system revision table 2-6 is set to "3" by the system version-up processing, and the database 2-3 is entered in the entry "3" of the revision table 2-7. Has been copied.

【0033】図8は障害でダウンしていた監視装置1が
復帰してきた状態を示している。この状態では、新しい
主データベース2ー3と古い主データベース1−3と
は、テーブルの200行目、テーブルの1500行
目が食い違っている。この状態を復旧するのがデータ一
致処理である。
FIG. 8 shows a state in which the monitoring apparatus 1 which has been down due to a fault has returned. In this state, the new main database 2-3 is different from the old main database 1-3 in the 200th line of the table and the 1500th line of the table. The data matching process recovers this state.

【0034】このデータ一致処理では、監視装置1のシ
ステムレビジョン1−6内のシステムレビジョン「2」
に基づき、このシステムレビジョン「2」で指定される
監視装置2におけるレビジョンテーブル2−7のエント
リ「2」内のレビジョン「199」を読み取り、このレ
ビジョン「199」に「1」を加えたレビジョン「20
0」から古い主データベース1−3の現在のレビジョン
「201」までの間に変更ログ1−5に記述された「テ
ーブルの1500行目」、「テーブルの200行
目」について、新しい主データベース2−3の内容で古
い主データベース1−3を上書きする。
In this data matching process, the system revision “2” in the system revision 1-6 of the monitoring device 1 is used.
, The revision “199” in the entry “2” of the revision table 2-7 in the monitoring device 2 designated by the system revision “2” is read, and the revision “1” is added to the revision “199”. 20
From “0” to the current revision “201” of the old main database 1-3, “the 1500th row of the table” and the “200th row of the table” described in the change log 1-5 are changed to the new main database 2 -3 overwrites the old main database 1-3.

【0035】このようにして、データ一致処理を行った
後、監視装置1においてシステムレビジョンアップ処理
を行い、古い主データベース1−3を複製データベース
として再利用する。すなわち、監視装置1において、シ
ステムレビジョンテーブル1−6内のシステムレビジョ
ンをインクリメントし、前回コピー時のレビジョン「1
99」を新しいシステムレビジョン「3」によって指定
されるレビジョンテーブル1−7内のエントリ「3」に
コピーする。
After performing the data matching process in this way, the monitoring device 1 performs a system revision up process, and reuses the old main database 1-3 as a duplicate database. That is, in the monitoring device 1, the system revision in the system revision table 1-6 is incremented, and the revision "1" at the time of the previous copy is set.
99 "into the entry" 3 "in the revision table 1-7 designated by the new system revision" 3 ".

【0036】なお、この実施の形態では、レビジョンや
システムレビジョンをサイクリックに使用している。こ
のため、ただ単にその数値が大きいからといって、レビ
ジョンやシステムレビジョンが「進んでいる」と判断す
ることはできない。そこで、この実施の形態では、レビ
ジョンやシステムレビジョンが半周以上離れることはな
いと仮定し、レビジョンが半周より進んでいた場合は遅
れていると判断するようにしている。
In this embodiment, a revision and a system revision are used cyclically. For this reason, it is not possible to judge that the revision or the system revision is “advanced” just because the numerical value is large. Therefore, in this embodiment, it is assumed that the revision and the system revision are not separated by more than half a lap, and if the revision is more than half a lap, it is determined that the revision is late.

【0037】[0037]

【発明の効果】以上説明したことから明らかなように本
発明によれば、主データベースに新しく蓄積されたデー
タが複製データベースに定周期でコピーされ、主データ
ベースを保有する装置に障害が起きると、複製データベ
ースが新しい主データベースとして使用されるものとな
り、この場合、前回コピーしてから障害が発生するまで
の間に古い主データベースに蓄積されたデータは新しい
主データベースには含まれていないが、コピー周期を短
くすることによってそのデータの損失量を少なくするこ
とが可能となり、また、前回コピーしてから障害が発生
するまでの間に古い主データベースに蓄積されたデータ
が不一致データとされ、この不一致データを除去した古
い主データベースが複製データベースとして再利用され
るものとなり、ビル管理システムなどの監視を主眼とす
るシステムにおいて、2重化したハードウェアと大容量
の2次記録装置を不要とし、コストダウンを図ることが
できるようになる。
As is apparent from the above description, according to the present invention, if data newly stored in the main database is copied to the duplicate database at regular intervals and a failure occurs in the device holding the main database, The replicated database will be used as the new primary database. In this case, the data stored in the old primary database between the previous copy and the failure will not be included in the new primary database, but will be copied. By shortening the cycle, it is possible to reduce the amount of data loss , and failures have occurred since the last copy
Data stored in the old primary database until
Is the mismatched data, and the old
The primary database is reused as a duplicate database
In a system such as a building management system whose main purpose is monitoring, redundant hardware and a large-capacity secondary recording device are not required, and costs can be reduced.

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

【図1】 図2に示したビル管理システムにおける各監
視装置のシステム構成を示す図である。
FIG. 1 is a diagram showing a system configuration of each monitoring device in the building management system shown in FIG.

【図2】 本発明を適用してなるビル管理システムのシ
ステム構成図である。
FIG. 2 is a system configuration diagram of a building management system to which the present invention is applied.

【図3】 監視APからの更新内容の蓄積を説明するた
めの図である。
FIG. 3 is a diagram for explaining accumulation of update contents from a monitoring AP;

【図4】 複製データベースへのコピー処理を説明する
ための図である。
FIG. 4 is a diagram illustrating a copy process to a duplicate database;

【図5】 システムレビジョンアップ処理を説明するた
めの図である。
FIG. 5 is a diagram for explaining a system revision up process;

【図6】 データ一致処理を説明(障害発生直前)する
ための図である。
FIG. 6 is a diagram for explaining data matching processing (immediately before a failure occurs).

【図7】 データ一致処理を説明(障害発生時)するた
めの図である。
FIG. 7 is a diagram for explaining data matching processing (when a failure occurs).

【図8】 データ一致処理を説明(障害復帰時)するた
めの図である。
FIG. 8 is a diagram for explaining data matching processing (at the time of failure recovery).

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

1,2,3…監視装置、1−1,2−1,3ー1…監視
AP、1−2,2−2,3ー2…切り替え処理部、1−
3,2−3,3ー3…データベース、1−4,2−4,
3ー4…データベーストリガ、1−5,2−5,3ー5
…変更ログ、1−6,2−6,3ー6…システムレビジ
ョンテーブル、1−7,2−7,3ー7…レビジョンテ
ーブル、1−8,2−8,3ー8…モジュール状態監視
部。
1, 2, 3 ... monitoring device, 1-1, 2-1, 3-1 ... monitoring AP, 1-2, 2-2, 3-2 ... switching processing unit, 1-
3,2-3,3-3 ... database, 1-4,2-4
3-4: Database trigger, 1-5, 2-5, 3-5
... Change log, 1-6, 2-6, 3-6 ... System revision table, 1-7, 2-7, 3-7 ... Revision table, 1-8, 2-8, 3-8 ... Module status monitoring Department.

───────────────────────────────────────────────────── フロントページの続き (56)参考文献 特開 平3−250257(JP,A) 特開 平5−307576(JP,A) 特開 平7−262068(JP,A) 特開 平5−73393(JP,A) (58)調査した分野(Int.Cl.7,DB名) G06F 12/00 531 G06F 12/16 310 ────────────────────────────────────────────────── ─── Continuation of the front page (56) References JP-A-3-250257 (JP, A) JP-A-5-307576 (JP, A) JP-A-7-262068 (JP, A) JP-A-5-262068 73393 (JP, A) (58) Field surveyed (Int. Cl. 7 , DB name) G06F 12/00 531 G06F 12/16 310

Claims (1)

(57)【特許請求の範囲】(57) [Claims] 【請求項1】 主データベースにデータを蓄積して行く
一方、前回のコピー周期から今回のコピー周期までの間
に前記主データベースに蓄積されたデータを複製データ
ベースに定期的にコピーするデータベース多重化方法に
おいて、 前記主データベースを保有する装置に障害が起きた場
合、前記複製データベースを新しい主データベースとし
て使用する一方、前回コピーしてから前記障害が発生す
るまでの間に前記古い主データベースに蓄積されたデー
タを不一致データとし、この不一致データを除去した前
記古い主データベースを複製データベースとして再利用
するようにしたことを特徴とすることを特徴とするデー
タベース多重化方法。
1. A database multiplexing method for storing data in a main database and periodically copying data stored in the main database between a previous copy cycle and a current copy cycle to a duplicate database. In the case where a failure occurs in an apparatus holding the main database, the duplicate database is used as a new main database while the failure occurs after the previous copy.
Data stored in the old main database until
Data before and after removing this mismatched data.
Reuse old master database as duplicate database
Database multiplexing method characterized by characterized by the the to.
JP00552596A 1996-01-17 1996-01-17 Database multiplexing method Expired - Fee Related JP3309198B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP00552596A JP3309198B2 (en) 1996-01-17 1996-01-17 Database multiplexing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP00552596A JP3309198B2 (en) 1996-01-17 1996-01-17 Database multiplexing method

Publications (2)

Publication Number Publication Date
JPH09198288A JPH09198288A (en) 1997-07-31
JP3309198B2 true JP3309198B2 (en) 2002-07-29

Family

ID=11613614

Family Applications (1)

Application Number Title Priority Date Filing Date
JP00552596A Expired - Fee Related JP3309198B2 (en) 1996-01-17 1996-01-17 Database multiplexing method

Country Status (1)

Country Link
JP (1) JP3309198B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4774400B2 (en) * 2007-10-31 2011-09-14 株式会社日立製作所 Monitoring system

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP3064319B2 (en) * 1990-02-28 2000-07-12 株式会社日立製作所 High reliability online system
JP3126225B2 (en) * 1991-07-12 2001-01-22 富士通株式会社 Database system
JPH0573393A (en) * 1991-09-11 1993-03-26 Nec Corp Decentralized file control system
JP2708386B2 (en) * 1994-03-18 1998-02-04 インターナショナル・ビジネス・マシーンズ・コーポレイション Method and apparatus for recovering duplicate database through simultaneous update and copy procedure

Also Published As

Publication number Publication date
JPH09198288A (en) 1997-07-31

Similar Documents

Publication Publication Date Title
US7565572B2 (en) Method for rolling back from snapshot with log
US5799322A (en) System and method for stopping updates at a specified timestamp in a remote duplicate database facility
US5799323A (en) Remote duplicate databased facility with triple contingency protection
US5704031A (en) Method of performing self-diagnosing hardware, software and firmware at a client node in a client/server system
US7225307B2 (en) Apparatus, system, and method for synchronizing an asynchronous mirror volume using a synchronous mirror volume
US6742138B1 (en) Data recovery method and apparatus
EP1540510B1 (en) Method and apparatus for managing data integrity of backup and disaster recovery data
US7660832B2 (en) System recovery method and computer system using the same
US20050283504A1 (en) Disaster recovery system suitable for database system
JP2003507791A (en) Remote mirroring system, apparatus and method
JP2000163344A (en) Data base recovery system for network management system
US5931955A (en) Method and generic automatic database recovery
JP3309198B2 (en) Database multiplexing method
WO2025200562A1 (en) Cache disk data recombination method and apparatus, and device, medium and program product
JPH04369735A (en) Backup system for computer system
JPH04299435A (en) Data base equivalent system
CN113190379B (en) A method, system and medium for database backup to reduce backup set
JPS58103052A (en) Automatic data gathering system
JP3514332B2 (en) Database backup method
JP2850756B2 (en) Failure recovery method for files in distributed processing system
JPH01237716A (en) Volume switching method
KR100526221B1 (en) Method and System for Restoring Database Synchronization in Independent Mated Pair System
JPH07261989A (en) Control program recovery method
JPH10508968A (en) Data set backup method and apparatus in shared environment
JP2631185B2 (en) Database backup method

Legal Events

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

Free format text: PAYMENT UNTIL: 20080524

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20080524

Year of fee payment: 6

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

Free format text: PAYMENT UNTIL: 20090524

Year of fee payment: 7

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

Free format text: PAYMENT UNTIL: 20100524

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20100524

Year of fee payment: 8

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

Free format text: PAYMENT UNTIL: 20110524

Year of fee payment: 9

LAPS Cancellation because of no payment of annual fees