Differential distribution record reflection system between different type rdbms
Abstract
Problem to be solved.To easily carry out replication and automatically correct a difference between a master DB and a replica DB for an improvement in the reliability of the replica DB.
Solution.A computer 2 having a replication function for creating a plurality of replica DBs 107 serving as replicas of the master DB 103 distributes attached address information for specifying a record on the replica DB side 107 even when an univocally classifiable key is not available in a table of a distribution object, so that replication can be carried out. When there is a difference between record contents of the master DB 103 and those of the replica DB 107, all data of the master DB 103 are automatically delivered again by one operation. In this way, the reliability of the replica DB 107 is improved.
Copyright (C)2006,JPO&NCIPI
Term
No projected expiry on record.
- Priority and filed
- Published
- Today
8 claims: 3 independent, 5 dependent
- 1Address information determining means for determining the address of the master DB, batch distribution means for distributing address information indicating the address to all records, and differential distribution for distributing updated difference information with the address information attached. Means, a failure detection means for detecting an abnormality at the time of reflection in a replica DB which is a replica of the master DB on the network, a difference distribution stop means for temporarily stopping the distribution of the difference information, and the difference information. A differential distribution record reflection system between different types of RDBMSs, which is characterized by having a differential distribution resuming means for resuming distribution. マスタDBのアドレスを決定するアドレス情報決定手段と、 全レコードに前記アドレスを示すアドレス情報を添付して配信する一括配信手段と、 前記アドレス情報を添付して更新された差分情報を配信する差分配信手段と、 ネットワーク上にあるマスタDBの複製であるレプリカDBにおいて、反映時の異常を検出する障害検出手段と、 前記差分情報の配信を一時的に停止する差分配信停止手段と、 前記差分情報の配信を再開する差分配信再開手段と を備えることを特徴とする異種RDBMS間での差分配信レコード反映システム。
- 7An address information determination step that determines the address of the master DB, a batch distribution step that attaches the address information indicating the address to all records and distributes it, and a difference distribution that distributes the updated difference information by attaching the address information. In the step, the failure detection step that detects an abnormality at the time of reflection in the replica DB that is a duplicate of the master DB on the network, the differential distribution stop step that temporarily stops the distribution of the difference information, and the difference information A method for reflecting a differential distribution record between different types of RDBMSs, which comprises a differential distribution restart step for resuming distribution. マスタDBのアドレスを決定するアドレス情報決定ステップと、 全レコードに前記アドレスを示すアドレス情報を添付して配信する一括配信ステップと、 前記アドレス情報を添付して更新された差分情報を配信する差分配信ステップと、 ネットワーク上にあるマスタDBの複製であるレプリカDBにおいて、反映時の異常を検出する障害検出ステップと、 前記差分情報の配信を一時的に停止する差分配信停止ステップと、 前記差分情報の配信を再開する差分配信再開ステップと を備えることを特徴とする異種RDBMS間での差分配信レコード反映方法。
- 8An address information determination step that determines the address of the master DB, a batch distribution step that attaches the address information indicating the address to all records and distributes it, and a difference distribution that distributes the updated difference information by attaching the address information. In the step, the failure detection step that detects an abnormality at the time of reflection in the replica DB that is a duplicate of the master DB on the network, the differential distribution stop step that temporarily stops the distribution of the difference information, and the difference information A differential distribution record reflection program between different types of RDBMSs, characterized by having a computer perform a differential distribution resume step to resume distribution. マスタDBのアドレスを決定するアドレス情報決定ステップと、 全レコードに前記アドレスを示すアドレス情報を添付して配信する一括配信ステップと、 前記アドレス情報を添付して更新された差分情報を配信する差分配信ステップと、 ネットワーク上にあるマスタDBの複製であるレプリカDBにおいて、反映時の異常を検出する障害検出ステップと、 前記差分情報の配信を一時的に停止する差分配信停止ステップと、 前記差分情報の配信を再開する差分配信再開ステップと をコンピュータに実行させることを特徴とする異種RDBMS間での差分配信レコード反映プログラム。
Independent claims3
25 paragraphs, as filed
The present invention relates to a differential distribution record reflection system between different types of RDBMSs, and more particularly to a differential distribution record reflection system between different types of RDBMSs having a replication function.
An example of a conventional replication system is described in Patent Document 1. This conventional replication system is composed of a judgment / extraction function unit, a SQL (Structured Query Language) statement conversion processing function unit, a SQL statement loading function unit, and the like. A conventional replication system having such a configuration operates as follows. That is, the database management system has a unique pseudo column corresponding to the physical address by the internal mechanism of RDBMS, and the difference in the record update result is extracted from the user-defined table, temporary table, and update log table using this pseudo column as a key. , It is a mechanism to maintain the consistency of the database by loading the SQL statement after changing the extracted data to the SQL statement.<patcit num="1"><text>Japanese Unexamined Patent Publication No. 2000-132435</text></patcit>
<p> However, the above background technology has the following problems. The first problem is that by holding various tables for extracting differences, a data capacity larger than the actual amount of data used by the user is required. The reason is that the difference is extracted and replicated using the primary table that holds the same data as the master DB for each update. The second problem is that it takes a long time to create the difference record. The reason is that it takes a long time to extract the difference between each table based on the address information in order to create the update record. The present invention has been made in view of such a situation, so that replication can be easily performed, the discrepancy between the master DB and the replica DB can be automatically corrected, and the reliability of the replica DB can be improved. It is something to do.</p>
<p> The difference distribution record reflection system between different types of RDBMSs according to claim 1 includes an address information determining means for determining the address of the master DB and a batch distribution means for distributing all records with address information indicating the address attached. , The difference distribution means that distributes the updated difference information with the address information attached, the failure detection means that detects an abnormality at the time of reflection in the replica DB that is a duplicate of the master DB on the network, and the difference information. It is characterized by including a differential distribution stopping means for temporarily stopping the distribution of the difference information and a differential distribution restarting means for restarting the distribution of the difference information. Further, the address information determining means can create an address map from the record storage position and read order when the master DB does not have a unique key. Further, the batch distribution means can attach the address information determined by the address map and distribute all the records from the master DB to the replica DB. Further, in the replica DB, the address information is defined in advance as one column that does not allow duplication so that a duplicate of the master DB can be created even if the key for specifying the data does not exist. Address information can also be reflected as part of the record. Further, when the update to the master DB is immediately reflected in the replica DB, the difference distribution means attaches the address information based on the address map and distributes the update to the replica DB. be able to. Further, the failure detecting means can monitor the state of the replica DB and detect an error at the time of reflection. The method for reflecting the difference distribution record between different types of RDBMS according to claim 7 includes an address information determination step of determining the address of the master DB and a batch distribution step of attaching the address information indicating the address to all records and distributing the difference. , The difference distribution step of distributing the updated difference information with the address information attached, the failure detection step of detecting an abnormality at the time of reflection in the replica DB which is a duplicate of the master DB on the network, and the difference information. It is characterized by including a differential distribution stop step for temporarily stopping the distribution of the difference information and a differential distribution restart step for resuming the distribution of the difference information. The difference distribution record reflection program between different types of RDBMSs according to claim 8 includes an address information determination step for determining the address of the master DB and a batch distribution step for distributing all records with address information indicating the address attached. , The difference distribution step of distributing the updated difference information with the address information attached, the failure detection step of detecting an abnormality at the time of reflection in the replica DB which is a duplicate of the master DB on the network, and the difference information. It is characterized in that a computer executes a differential distribution stop step for temporarily stopping the distribution of the information and a differential distribution restart step for resuming the distribution of the difference information.</p>
<p> The differential distribution record reflection system between different types of RDBMSs of the present invention is configured and operates as described above, and thus has the following effects. The first effect is that even an existing master DB that does not have a key to uniquely determine a record can be easily replicated without changing the definition or the like. As a result, the existing business program of the master DB is not affected, and it is expected that the system availability will be improved by having the replica DB. The reason is that the record can be specified by adding the unique address information that identifies the record of the master DB to the replica DB as a column and adding the address information to the replica DB in this system. .. In addition, by using the address map, there is less information for management, and by setting the reading order to the key order, the search time on the map can be shortened and the processing time can be improved. The second effect is that if a discrepancy occurs between the master DB and the replica DB, it is automatically detected and repaired, so the reliability of the replica DB is improved. The reason is that the discrepancy between the replica DB and the master DB in the replication system reduces the reliability of not only the corresponding record but the entire replica DB. In that case, if only the corresponding record is repaired, an error may occur in other records as well, and it is necessary to redistribute all the records immediately. However, redelivery of all records will stop the business on the replica DB reference side, so the request varies depending on the business form. Therefore, the user can freely define the error information when redistributing all records in advance, and by managing the error information and process, the function of automatically recovering according to the user's request is realized. There is.</p>
FIG. 1 is a block diagram showing a configuration example of an embodiment of the present invention. As shown in the figure, the present embodiment is composed of a computer 1 and a computer 2 to a computer m (m is an arbitrary natural number), and the computer 1 includes a master DB (database) 103, an address map 104, and the like. It consists of a temporary file 105 and an update log storage file 106. Process (1) 101 to process (n (n is an arbitrary natural number)) 102 executes an update request to the master DB. Computer 2 includes replica DB107. Computer m is equipped with replica DB108.
This embodiment is equipped with a replication function that creates a replica DB107 that is a plurality of replicas of the master DB103, which is a database under a different relational database management system (hereinafter referred to as RDBMS (Relational DataBase Management System)) on the network. In the distribution process in which the computer 2 distributes the update information for creating the replica DB107, even if the table to be distributed does not have a key that can be uniquely classified, the replication DB107 side can be distributed by attaching the address information. The trust of the replica DB107 is achieved by identifying the record of the master DB103, enabling replication, and automatically redistributing all the data of the master DB103 at once when there is a discrepancy in the record contents between the master DB103 and the replica DB107. It is intended to improve sex.
As described above, in the example of FIG. 1, the update request is executed from the process (1) 101 to the master DB 103. In this case, since the corresponding master DB 103 does not have a unique key, the difference data and the address information are distributed to the replica DB 107 of the computer 2. In order to specify the record in the replica DB107, the reflection process is performed using the attached address information.
If computer 2 detects any error during reflection processing, the error is returned to the master DB103 side as a distribution result. At this time, if this error is an error defined as redelivery, the reflection of the differential delivery is interrupted, and the address information and records of all the data are redelivered at once. In this way, differential distribution is possible even if a unique key does not exist, and the reliability of the replica DB107 database (replica DB107) is improved by automatically detecting and repairing inconsistencies in the replica DB107. Can be done.
Referring to FIG. 1, one embodiment of the differential distribution record reflection system between different types of RDBMSs of the present invention is the address information determining means 111 for determining the address of the master DB 103, and the address information is attached to all the records for distribution. A failure to detect an error at the time of reflection in the batch distribution means 113, the difference distribution means 115 that distributes the updated difference information with the address information attached, and the replica DB107 that is a duplicate of the master DB103 on the network. The detection means 116, the differential distribution stopping means 117 for temporarily stopping the differential distribution, and the differential distribution restarting means 119 for restarting the differential distribution are included.
Each of these means operates as follows. The address information determining means 111 creates an address map 104 from the record storage position and read order when the master DB 103 does not have a unique key. The batch distribution means 113 distributes all the records from the master DB 103 to the replica DB 107 by attaching the address information determined by the address map 104. In the replica DB107, the address information is defined in advance as one column that does not allow duplication, and the address information is also reflected as a part of the record. As a result, a duplicate of the master DB 103 can be created even if the key that identifies the data does not exist.
When the difference distribution means 115 immediately reflects the update to the master DB 103 to the replica DB 107 in the replication system, the differential distribution means 115 attaches the address information based on the address map 104 and distributes it to the replica DB 107. The failure detection means 116 monitors the status of the replica DB107 and detects an error at the time of reflection. The difference distribution stop means 117 stops the immediate difference distribution in the program using the master DB 103 based on the definition, and the batch distribution means 113 registers the address information and all the records in the temporary file 105. The differential distribution reflection restart means 119 restarts by changing the update of the master DB 103 so as to store the update data in the update log storage file 106, and when the distribution processing of all records to the replica DB 107 is completed, the update log storage file After completing the distribution from 106, immediately change the update of the master DB 103 and return it to the original operation.
Next, the overall operation of the present embodiment will be described in detail with reference to the flowcharts of FIGS. 2, 3, and 4. As shown in Fig. 2, when creating a duplicate DB in a different RDBMS on the network for the master DB definition 212 for which there is no unique key for uniquely determining the record, the replica DB definition 213 is used. Address information 214 is defined in advance as a column that does not allow any duplication (step 202). In addition, when all records are distributed at once, the read order on the master DB103 side and the error status 223 for redistribution of all records are determined, created in the system shared space 211, and registered as definition information ( Step 203). The reading order can be selected from a specific key order or a physical storage position order.
The address information determining means 111 reads the master DB 103 under the conditions specified by the user, and creates an address map 104 according to the reading order (steps 204, 205). If the address map 104 is in physical order, the correspondence table 215 of the address number 216 and the record relative position 217 is systemized. If the address map 104 is in the key order, the correspondence table 218 of the key value 219, the address number 220 and the record relative position 221 is systemized. Create and register in shared space 211. The batch distribution means 113 adds the address numbers 216 and 220 to each record to the record contents required for creating the replica DB 107, and distributes the address numbers to the replica DB 107 (step 206).
As shown in FIG. 3, when the master DB 103 for which the differential distribution definition is executed is updated from a specific program, each address map 104 created by the address information determination means 111 is opened from the DB information. Then, the address information is determined from the type of the update instruction and the address map 104. First, if the instruction is inserted, it is not registered in the address map 104, so (maximum number + 1) on the address map 104 is set as the address number and registered in the address map 104. If the instruction is an update, the address number is determined by searching the address number from the key value and the relative position if the instruction is in the key order, or from the relative position if the instruction is in the physical order. The deletion also searches for the address number in the same way as the update, but after the address number is determined, the corresponding data on the address map 104 is deleted. The address information determined from the address map 104 and the difference record according to the instruction type are registered in the update log storage file 106 (step 303). When the quiesce point is established in the corresponding process, the difference data is distributed from the update log storage file 106 to the replica DB 107 after the update information is confirmed (step 305).
When delivering to the replica DB107, if the reflection result on the replica DB107 side is an error (YES in step 306), the returned error status is searched for registered in the error management table 222. If it is registered (YES in step 307), the differential distribution stop means 117 is activated (step 308). If the returned error status is unregistered (NO in step 307), the process proceeds to step 319 in FIG. 4 to continue the update process. For example, when a record with the same address number already exists when the record is reflected by the insert command, or when a record with the same address number does not exist with the update or delete command, the difference distribution stop means. This is the case when 117 is started.
If there is another process using the same DB (YES in step 309), the differential delivery stop means 117 waits for a quiesce point (step 310), and if all synchronization can be secured, the batch delivery means 113 is used. Launch (step 311 in Figure 4). The batch distribution means 113 executes the address information determination means 111 for all records (step 312), reassigns the addresses, and recreates the address map 104 (step 313).
Next, copying all the records with the address numbers of the master DB 103 to a temporary file is performed (step 314). When the copying is completed, if there is a process on the master DB103 side (YES in step S324), the process that has been synchronized immediately is notified of the cancellation of the wait. In the process that received the wait cancellation notification, the difference reflection process is changed to a mode in which only the difference reflection process is stored in the update log storage file 106 and not delivered, and the update process is continued as it is (step 319). On the other hand, if there is no process on the master DB103 side (NO in step 324), the process proceeds to step 317.
Further, after the copying of the master DB 103 to the temporary file is completed in step 314, a warning message occupying the replica DB 107 is notified in order to collectively reflect the copy to the replica DB 107 (step 315), and the temporary file is used as input data for all. Redistribute the record (step 320). After the redistribution of all records is completed, the process using the master DB 103 is instructed to change to the mode of immediate distribution instead of storing the differential distribution in the update log storage file 106. It also notifies that the redelivery has been reflected and releases the replica DB107 (step 321). After that, in the replica DB107, the update log accumulated in the update log accumulation file 106 is delivered (step 322), and this is reflected (step 323). As a result, the repair process is completed, and the replica DB 107 becomes a complete copy of the master DB 103.
After the replica DB 107 is released in step 321, the process proceeds to step 317, and if there is a process on the master side 103 (YES in step 317), the mode is changed to immediate mode (step 318). Then, the process proceeds to step 319. If there is no process on the master side (NO in step 317), the process proceeds to step 319. In step 319, the repair process is completed and the update process is continued.
Next, the operation of the present embodiment will be described with reference to a specific example. As shown in FIG. 5, when each data 402 to 404 is stored in the master DB 103 on a certain network, the replica DB 107 is given the format and address information obtained by extracting a specific column, and the read order is the column of the master DB 103. The differential distribution definition is implemented as the key order of 5. In the batch load, the columns 5 of each record on the master DB 103 are read in this order, and the address information corresponding to each record is registered in the address map 104 to create maps 422 to 424. Next, all records are distributed to the replica DB107, but they are registered in the order of the address map. After that, if any error occurs, it is checked whether it is the same as the status of the error information in the error management table 222, and it is redistributed.
Needless to say, the configuration and operation of the above-described embodiment are examples and can be appropriately changed without departing from the spirit of the present invention.
<figref num="1">It is a block diagram which shows the structural example of one Embodiment of this invention.</figref><figref num="2">It is a flowchart for demonstrating the whole operation of embodiment of FIG.</figref><figref num="3">It is a flowchart for demonstrating the whole operation of embodiment of FIG.</figref><figref num="4">It is a flowchart for demonstrating the whole operation of embodiment of FIG.</figref><figref num="5">It is a figure for demonstrating the specific operation of this embodiment.</figref>
Code description
1,2 Computer 101 Process (1) 102 Process (n) 103 Master DB 104,302 Address map 105 Temporary file 106,304 Update log storage file 107,108 Replica DB 111 Address information determination means 113 Bulk delivery means 115 Difference delivery means 116 Failure detection means 117 Difference Delivery stop means 119 Difference delivery reflection restart means 211 System shared space 215,218 Correspondence table 222 Error management table
Every citation, both ways
| Document | Relation | Office | Cited during |
|---|---|---|---|
| US9298878B2 | Cited by | United States of America | Applicant |
| JP2013535737A | Cited by | Japan | Examiner |
| US9442995B2 | Cited by | United States of America | Applicant |
| US9047392B2 | Cited by | United States of America | Applicant |
| US10860732B2 | Cited by | United States of America | Applicant |
| USRE48243E | Cited by | United States of America | Applicant |
| JP2013535737A | Cited by | Japan | Search report |
| JP2018116357A | Cited by | Japan | Search report |
2 priority claims, no other members on record
Priority claims2
| Document | Office | Kind | Date |
|---|---|---|---|
| 2004108515 | Japan | A | |
| JP20040108515 | – | – | – |
4 legal events, as the office reported them to INPADOC
Over the term
Point at a mark for the eventEvents
| Event | Code | |
|---|---|---|
| Decision of refusalA02 | A02 | |
| Written amendmentA521 | A521 | |
| Notification of reasons for refusalA131 | A131 | |
| Report on retrievalA977 | A977 |
Numbers
- Publication
- 2005293323
- Publication, DOCDB
- 2005293323
- Publication, EPODOC
- JP2005293323
- Application
- 108515
- Application, DOCDB
- 2004108515
- Application, EPODOC
- JP20040108515
Titles3
- Japanese
- 異種RDBMS間での差分配信レコード反映システム
- English
- Difference distribution record reflection system between different RDBMS
- English
- DIFFERENTIAL DISTRIBUTION RECORD REFLECTION SYSTEM BETWEEN DIFFERENT TYPE RDBMS
Classification
- IPC, 1
- G06F12 00