KR101825910B1 - Heterogeneous database synchronization system and method using neutral data based on redo log analysis - Google Patents

Heterogeneous database synchronization system and method using neutral data based on redo log analysis Download PDF

Info

Publication number
KR101825910B1
KR101825910B1 KR1020160112206A KR20160112206A KR101825910B1 KR 101825910 B1 KR101825910 B1 KR 101825910B1 KR 1020160112206 A KR1020160112206 A KR 1020160112206A KR 20160112206 A KR20160112206 A KR 20160112206A KR 101825910 B1 KR101825910 B1 KR 101825910B1
Authority
KR
South Korea
Prior art keywords
data
redo log
database
neutral
dbms
Prior art date
Application number
KR1020160112206A
Other languages
Korean (ko)
Inventor
민준기
김홍연
홍길석
Original Assignee
국방과학연구소
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 국방과학연구소 filed Critical 국방과학연구소
Priority to KR1020160112206A priority Critical patent/KR101825910B1/en
Application granted granted Critical
Publication of KR101825910B1 publication Critical patent/KR101825910B1/en

Links

Images

Classifications

    • G06F17/30581
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • G06F16/275Synchronous replication

Abstract

The present invention relates to a system and a method for heterogeneous database synchronization using neutral data based on redo log analysis. The system for heterogeneous database synchronization using neutral data based on redo log analysis comprises: a first database management system (DBMS) having a database having a subscriber role, and storing a redo log of a first structure; at least one second database management system (DBMS) having a database having a provider role, and storing a redo log of a second structure incompatible with the first structure; and a data repeater to relay data transceived for synchronization between the first and the second DBMS. The first DBMS restores a redo log generated when data are updated in a database to original update data to store information of the restored update data in neutral data having an identical structure regardless of a type of a DBMS to transmit the information to a DBMS of a subscriber role.

Description

리두 로그 분석 기반의 중립 데이터를 이용한 이기종 데이터베이스의 데이터 동기화 시스템 및 방법{HETEROGENEOUS DATABASE SYNCHRONIZATION SYSTEM AND METHOD USING NEUTRAL DATA BASED ON REDO LOG ANALYSIS}BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a data synchronization system and a method for synchronizing data in a heterogeneous database using neutral data based on redo log analysis,

본 발명은 이기종 데이터베이스 간의 데이터 동기화에 관한 것으로, 특히 리두 로그 분석 기반의 중립 데이터를 이용한 이기종 데이터베이스의 데이터 동기화 시스템 및 방법에 관한 것이다. BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to data synchronization between heterogeneous databases, and more particularly, to a system and method for synchronizing data in a heterogeneous database using neutral data based on redo log analysis.

데이터베이스 동기화는 물리적으로 분리된 두 개 이상의 데이터베이스 간의 데이터 공유 및 백업을 위해서 사용되는 기술 중 하나이다. 이러한 동기화 기술은 여러 데이터베이스들 중 하나의 데이터베이스에서 데이터의 삽입, 갱신 및 삭제가 이루어 졌을 경우, 해당 데이터 변경 사항을 모든 데이터베이스들에게 전파하여 모든 데이터베이스들이 동일한 데이터를 갖도록 할 수 있다. 따라서 하나의 데이터를 여러 곳의 데이터베이스에 공유하여 사용하는 곳에 적합한 기술이다.Database synchronization is one of the techniques used for sharing and backing up data between two or more physically separate databases. This synchronization technique can propagate the corresponding data changes to all databases so that all the databases have the same data when data is inserted, updated and deleted in one of the databases. Therefore, it is a suitable technology for sharing one data in several databases.

이러한 데이터베이스 동기화 구조에서 어느 하나의 데이터베이스가 자연재해, 외부의 침입, 또는 물리적 고장 등에 의해 자신의 데이터를 모두 손실하였을 경우, 손실 데이터의 복원에 인적 및 시간 자원이 소요되어 막대한 손해가 생기게 된다.If one of the databases in the database synchronization structure loses all of its own data due to a natural disaster, an external intrusion, or a physical failure, human and time resources are required to recover the lost data, which causes a great loss.

비동기의 경우 데이터베이스는 일정 주기로 데이터들을 백업하게 되는데 백업한 시점과 데이터가 손실된 시점 사이의 데이터 갱신 여부는 반영이 될 수 없는 문제를 갖는다. 동기화는 데이터의 갱신이 발생했을 때마다 해당 사항을 여러 데이터베이스에 전파하기 때문에 어느 하나의 데이터베이스에 위와 같은 경우가 발생했을 때 데이터 손실을 막고 피해를 최소화할 수 있다.In the asynchronous case, the database backs up the data at regular intervals. However, there is a problem in that data updating between the time of backing up and the time of data loss can not be reflected. Synchronization propagates data to multiple databases whenever data is updated, so data loss can be prevented and damage minimized when any of the above occurs in any one database.

기존의 데이터베이스 동기화 기술들은 어떤 한 데이터베이스로부터 다른 데이터베이스에게 데이터 변경 사항을 전파하는 단방향으로 데이터베이스들 간의 동기화를 수행한다. 이에 따라, 데이터 변경 사항을 수신하는 데이터베이스, 즉, 목적지 데이터베이스에서 어떤 데이터가 변경되었을 때, 해당 변경 사항을 다른 데이터베이스에게 전파하지 못하는 문제점이 있다.Existing database synchronization technologies perform synchronization between databases in one direction, propagating data changes from one database to another. Accordingly, there is a problem in that when data is changed in the database receiving the data change, that is, the destination database, the change can not be propagated to another database.

그리고, 기존의 데이터베이스 동기화 기술들은 동일한 데이터베이스 관리 시스템(DBMS)들 간의 동기화를 수행한다. DBMS의 종류가 다르면 각 DBMS에서 사용하는 질의의 형태와 데이터 타입이 다름에 따라, 서로 다른 DBMS를 사용하는 데이터베이스들 간의 동기화는 부분적으로 불가능하다.And, existing database synchronization technologies perform synchronization between the same database management systems (DBMS). If the types of DBMSs are different, the types of queries and data types used in each DBMS are different, so synchronization between databases using different DBMSs is partially impossible.

현재, 산업, 공업 그리고 농업 등 다양한 응용 분야에서 활용되고 있는 DBMS들은 수십 종류에 달한다. 이러한 응용 분야에서의 DBMS들은 항상 동일한 기종일 수 없지만, 서로 다른 DBMS를 사용하는 어떤 두 기업의 합병과 같은 상황에서 데이터베이스들 간의 동기화는 필수적이다.Currently, there are dozens of DBMSs used in various applications such as industry, industry, and agriculture. DBMSs in these applications can not always be the same model, but synchronization between databases is essential in the same situation as the merger of two companies using different DBMSs.

기존의 데이터베이스 동기화 기술들은 갱신 데이터 감지(Change Data Capture : CDC) 방식을 기반으로 데이터베이스에서 갱신된 데이터를 파악한다. CDC 방식은 크게 리두 로그 (redo log) 방식과 트리거(trigger) 방식으로 분류된다. Existing database synchronization technologies recognize updated data in the database based on Change Data Capture (CDC) method. The CDC method is classified into redo log method and trigger method.

상기 리두 로그 방식은 데이터베이스에서 트랜잭션(transaction)들이 처리된 후에 별도의 공간에 기록되는 리두 로그들을 분석하여 원래의 데이터로 복원하여 다른 데이터베이스들에게 전파하는 방식이다. 이와 다르게, 트리거 방식은 DBMS의 대상(target) 데이터베이스 및 테이블에 트리거를 설정하여 대상 데이터베이스 및 테이블에서 데이터의 갱신을 감지하고 갱신된 데이터를 다른 데이터베이스들에게 전파하는 방식이다.The redo log method is a method of analyzing redo logs recorded in a separate space after transactions are processed in the database, restoring them to original data, and propagating them to other databases. Alternatively, the trigger method is a method of setting a trigger on a target database and a table of a DBMS to detect an update of data in a target database and a table, and to propagate updated data to other databases.

그런데, 트리거 방식 기반의 데이터베이스 동기화 기술들은 트리거가 설정된 데이터베이스 및 테이블의 수가 증가할수록 트리거들을 설정한 DBMS의 부하가 증가하는 단점을 가지고 있다. 이에 따라 복수 개의 데이터베이스들을 동기화하는 시스템에서는 리두 로그 방식이 트리거 방식보다 더 적합하다.However, the database synchronization techniques based on the trigger method have a drawback that the load of the DBMS that sets the triggers increases as the number of the databases and the tables in which the triggers are set increases. Accordingly, in a system for synchronizing a plurality of databases, the redo log method is more suitable than the trigger method.

DBMS에 의해 별도의 저장 공간에 누적된 리두 로그의 종류(유형)는 사용자 질의에 따른 사용자 리두 로그와 DBMS 시스템 설정 변경에 따른 시스템 리두 로그로 분류되며, 본 발명에서는 오직 사용자 리두 로그만 추출 및 분석한다.The types (types) of redo logs accumulated in a separate storage space by the DBMS are classified into a user redo log according to a user query and a system redo log according to a DBMS system configuration change. In the present invention, only a user redo log is extracted and analyzed do.

상기 리두 로그의 구조는 리두 로그 헤더(redo log header)와 갱신된 데이터를 포함하며, 상기 리두 로그 헤더에는 시스템 체인지 번호(SCN : System Change Number)와 로그의 길이, 로그의 유형, 트랜잭션 ID가 기록되며, 리두 로그의 유형에 따라 데이터의 삽입, 갱신 및 삭제를 구분할 수 있다. 이때, 리두 로그의 추출은 시스템 체인지 번호순으로 순차적으로 이루어진다.The structure of the redo log includes a redo log header and updated data. The redo log header includes a system change number (SCN), a log length, a type of log, and a transaction ID , And it is possible to distinguish insertion, update and deletion of data depending on the type of redo log. At this time, the extraction of the redo log is sequentially performed in the system change number order.

따라서, 이기종 DBMS는 서로 호환이 되지 않는 서로 다른 구조의 리두 로그를 유지하고 있기 때문에 기존 리두 로그를 복제 또는 이중화하여 다른 DBMS에게 전파하는 방법은 동일 기종의 DBMS들 간의 데이터 동기화에서만 사용되었다. 특히 DBMS들은 표준 SQL의 구문에 따라 작성된 질의만을 처리하기 때문에 DBMS의 기종에 관계없이 동일하게 수행될 수 있으나, 사용자 정의 타입과 같이 각 DBMS에서 고유하게 사용되는 데이터 타입의 경우에는 각 데이터 타입에 따라 서로 다른 구조의 SQL 구문을 가지며, 이러한 SQL 구문은 다른 기종의 DBMS에서는 처리할 수 없다.Therefore, heterogeneous DBMS maintains redo log of different structure which are incompatible with each other. Therefore, duplication or duplication of existing redo log and propagation to other DBMS is used only for data synchronization between DBMSs of the same type. In particular, since DBMSs only process queries written according to the syntax of standard SQL, they can be executed regardless of the type of DBMS, but in the case of data types that are unique to each DBMS, such as user-defined types, It has different structure of SQL syntax, and this SQL syntax can not be processed by other types of DBMS.

본 발명의 목적은 이기종 데이터베이스 간의 동기화를 지원하여 데이터 갱신시 여러 데이터베이스에서 항상 동일한 데이터를 가질 수 있는 이기종 데이터베이스의 데이터 동기화 시스템 및 방법을 제공하는데 있다.It is an object of the present invention to provide a data synchronization system and method of a heterogeneous database which supports synchronization between heterogeneous databases and can always have the same data in various databases at the time of updating data.

본 발명의 다른 목적은 하나의 데이터베이스가 외부 요인으로 동작을 멈췄을 경우 데이터 손실 없이 동기화 중인 데이터베이스를 이용하여 복구할 수 있는 이기종 데이터베이스의 데이터 동기화 시스템 및 방법을 제공하는데 있다.It is another object of the present invention to provide a data synchronization system and method of a heterogeneous database which can recover data using a synchronizing database without loss of data when one database stops operating due to external factors.

상기와 같은 목적을 달성하기 위하여 본 발명의 일 실시예에 따른 이기종 데이터베이스의 데이터 동기화 시스템은, 구독자 역할을 갖는 데이터베이스를 갖으며, 제1구조의 리두 로그(redo log)를 저장하는 제1데이터베이스 관리 시스템(DBMS); 제공자 역할을 갖는 데이터베이스를 갖으며, 상기 제1구조와 서로 호환되지 않는 제2구조의 리두 로그를 저장하는 적어도 하나 이상의 제2데이터베이스 관리 시스템(DBMS; 및 상기 제1,제2DBMS사이에서 동기화를 위해 송수신되는 데이터를 중계하는 데이터 중계기;를 포함하여 구성되어, 상기 제1DBMS는 데이터베이스에서 데이터 갱신이 발생할 때 생성되는 리두 로그를 원래의 갱신 데이터로 복원하여, 상기 복원된 갱신데이터의 정보를 DBMS의 기종에 관계없이 동일한 구조를 갖는 중립 데이터에 저장하여 구독자 역할의 DBMS로 전송하는 것을 특징으로 한다.According to an aspect of the present invention, there is provided a data synchronization system for a heterogeneous database, the system including a database having a role of a subscriber, the database synchronization system comprising: a first database management unit storing a redo log of a first structure; System (DBMS); At least one second database management system (DBMS) having a database having a provider role and storing a redo log of a second structure incompatible with the first structure, The first DBMS restores the redo log, which is generated when data is updated in the database, to the original update data, and stores the restored update data in the DBMS model And stores the data in the neutral data having the same structure, and transmits the data to the DBMS serving as the subscriber.

상기와 같은 목적을 달성하기 위하여 본 발명의 다른 실시예에 따른 이기종 데이터베이스의 데이터 동기화 시스템은, 구독자 또는 제공자 역할을 갖는 데이터베이스를 포함하며 서로 호환되지 않는 상이한 구조의 리두 로그(redo log)를 저장하는 복수의 데이터베이스 관리 시스템(DBMS)에 있어서, 각 데이터베이스 관리 시스템(DBMS)은 데이터베이스에서 데이터 갱신시에 생성되는 리두 로그를 원래의 갱신 데이터로 복원하여, 복원 갱신 데이터의 정보를 DBMS의 기종에 관계없이 동일한 구조를 갖는 중립 데이터에 저장하여 다른 데이터베이스 관리 시스템(DBMS)으로 전송하는 동기화기;를 포함하는 것을 특징으로 한다. According to another aspect of the present invention, there is provided a data synchronization system for a heterogeneous database including a database having a role as a subscriber or a provider and storing a redo log of a different structure incompatible with each other In a plurality of database management systems (DBMSs), each database management system (DBMS) restores the redo log generated at the time of data update in the database to the original update data and stores the information of the restore update data in the DBMS And a synchronizer for storing the data in the neutral data having the same structure and transmitting the data to another database management system (DBMS).

상기와 같은 목적을 달성하기 위하여 본 발명의 다른 실시예에 따른 이기종 데이터베이스의 데이터 동기화 방법은, 서로 호환되지 않는 상이한 구조의 리두 로그(redo log)를 저장하는 복수의 데이터베이스 관리 시스템(DBMS)간의 데이터 동기화 방법에 있어서, 하나의 DBMS에서 데이터베이스 데이터가 갱신되면, 데이터 갱신으로 인해 생성되는 리두 로그를 원래의 갱신 데이터로 복원하는 단계; 상기 복원된 갱신 데이터의 정보를 DBMS의 기종에 관계없이 동일한 구조를 갖는 중립 데이터에 저장하여 중립 데이터를 생성하는 단계; 및 상기 생성된 중립 데이터를 다른 기종의 DBMS로 전송하여 데이터 동기화를 수행하는 단계;를 포함한다. According to another aspect of the present invention, there is provided a method for synchronizing data in a heterogeneous database, the method comprising: receiving data between a plurality of database management systems (DBMSs) storing different redo logs of incompatible structures; In the synchronization method, when the database data is updated in one DBMS, restoring the redo log generated due to the data update to original update data; Storing the restored update data in the neutral data having the same structure regardless of the model of the DBMS to generate neutral data; And transmitting the generated neutral data to a DBMS of another model to perform data synchronization.

본 발명은 서로 다른 제품, 즉, 이기종 데이터베이스 간의 동기화를 지원하여 데이터의 갱신이 발생했을 때 이를 반영하여 여러 데이터베이스에서 항상 같은 데이터를 갖도록 할 수 있고, 하나의 데이터베이스가 외부 요인으로 인해 동작을 멈췄을 경우 데이터 손실 없이 동기화 중인 데이터베이스를 이용하여 복구할 수 있는 장점이 있다. The present invention supports the synchronization between different products, that is, a heterogeneous database, so that when data update occurs, it is possible to always have the same data in various databases, and when one database is stopped due to external factors In this case, there is an advantage that the data can be recovered by using the synchronizing database without data loss.

이에 더하여 본 발명은 동기화기간 갱신 데이터의 정보를 별도의 중립 데이터에 저장하여 송수신함으로써 이기종 DBMS간의 질의 형태와 데이터 유형의 구조적 차이를 해결할 수 있으며 다양한 DBMS들 간의 동기화를 수행할 수 있는 효과가 있다.In addition, according to the present invention, the information of the synchronization period update data is stored in separate neutral data and transmitted / received, thereby resolving the structural difference between the query type and the data type among the heterogeneous DBMSs and effecting synchronization among various DBMSs.

도 1은 본 발명의 실시예에 따른 이기종 데이터베이스의 데이터 동기화 시스템(DBMS)의 구성도.
도 2는 중립 데이터의 구조체를 나타낸 도면.
도 3은 본 발명의 실시예에 따른 동기화기의 리두 로그 복원 동작을 나타낸 순서도.
도 4는 본 발명에서 데이터베이스의 역할이 제공자일 때 동기화기의 고장에 따른 대처 방안을 나타낸 순서도.
도 5는 도 4에서 누락 데이터에 대한 동기화 동작(S240)을 나타낸 순서도.
도 6은 본 발명에서 데이터베이스의 역할이 구독자일 때 동기화기의 고장에 따른 대처 방안을 나타낸 순서도.
도 7은 본 발명에서 데이터 동기화 중에 데이터 중계기의 고장에 따른 대처 방안을 나타낸 순서도.
1 is a configuration diagram of a data synchronization system (DBMS) of a heterogeneous database according to an embodiment of the present invention;
Figure 2 shows a structure of neutral data.
3 is a flowchart illustrating a redo log restoration operation of a synchronizer according to an embodiment of the present invention;
FIG. 4 is a flowchart showing a countermeasure according to a failure of a synchronizer when a role of a database is a provider in the present invention. FIG.
5 is a flowchart showing a synchronization operation (S240) for missing data in FIG.
6 is a flowchart showing a countermeasure according to a failure of a synchronizer when a role of a database is a subscriber in the present invention.
7 is a flowchart showing a countermeasure according to a failure of a data repeater during data synchronization in the present invention.

일반적으로 이기종 데이터베이스 관리 시스템(DBMS : Database Management System)는 서로 호환이 되지 않는 서로 다른 구조의 리두 로그(redo log)를 유지하고 있으며, DBMS의 종류가 다르면 각 DBMS에서 사용하는 질의의 형태와 데이터 타입이 다르기 때문에 서로 다른 DBMS를 사용하는 데이터베이스들 간의 동기화는 용이하지 않은 실정이다. In general, a heterogeneous database management system (DBMS) maintains redo logs of different structures that are incompatible with each other. When different DBMSs are used, the type of query used by each DBMS and the data type It is not easy to synchronize databases using different DBMSs.

따라서, 본 발명은 이기종 데이터베이스 간의 동기화를 지원하여 데이터 갱신시 여러 데이터베이스에서 항상 동일한 데이터를 가질 수 있도록 하며, 각 DBMS에 기록된 리두 로그를 분석하여 갱신된 데이터를 파악하고 이를 다른 DBMS들에게 전파하여 다른 데이터베이스들에서 동일한 데이터를 갱신하는 통합적인 동기화 방법을 제안한다. Therefore, the present invention supports synchronization between heterogeneous databases, so that the same data can always be retained in a plurality of databases at the time of updating the data. The redo log recorded in each DBMS is analyzed to identify updated data and propagate it to other DBMSs We propose an integrated synchronization method that updates the same data in different databases.

이에 대한 일 실시예로 본 발명은 DBMS가 관리하는 데이터베이스들에서 데이터 갱신이 발생하는 경우에 생성되는 리두 로그를 원래의 갱신 데이터로 복원하고, 복원된 갱신 데이터의 정보를 DBMS의 기종에 관계없이 동일한 구조를 갖는 중립 데이터에 저장한 후, 해당 중립 데이터를 서로 다른 기종의 DBMS로 전송하여 데이터 동기화를 수행한다. According to one embodiment of the present invention, the present invention restores redo logs generated when data updates occur in databases managed by a DBMS to original update data, and stores information of the restored update data in the same , And then transmits the neutral data to DBMSs of different models to perform data synchronization.

이를 위하여 본 발명은 크게, 각 DBMS는 구독자 또는 제공자 역할을 갖는 하나 이상의 데이터베이스들로 구성되고, 상기 데이터베이스에서 트랜잭션이 발생하여 트랜잭션에 따른 리두 로그가 생성되면, 생성된 리두 로그에 대해 분석과 복원을 수행하여 갱신 데이터의 정보를 중립 데이터에 저장하고, 이를 다른 DBMS에 전파하는 동기화기와, 다수의 DBMS가 존재하는 경우에 어떤 한 DBMS의 동기화기로부터 전송된 중립 데이터를 다른 동기화기들에게 전파하는 데이터 중계기를 포함할 수 있다. To this end, in the present invention, each DBMS is composed of one or more databases having a role as a subscriber or a provider. When a transaction is generated in the database and a redo log according to the transaction is generated, the generated redo log is analyzed and restored And transmits the neutral data transmitted from the synchronizer of one DBMS to the other synchronizers when there is a plurality of DBMSs, . ≪ / RTI >

도 1은 본 발명의 실시예에 따른 이기종 데이터베이스의 데이터 동기화 시스템(DBMS)의 구성도이다. 1 is a configuration diagram of a data synchronization system (DBMS) of a heterogeneous database according to an embodiment of the present invention.

도 1에 도시된 바와같이, 본 발명의 실시예에 따른 이기종 데이터베이스 간 동기화 시스템은 DBMS (100), 동기화기 (synchronizer)(200)를 포함한다. As shown in FIG. 1, a heterogeneous database synchronization system according to an embodiment of the present invention includes a DBMS 100 and a synchronizer 200.

상기 DBMS(100)는 리두 로그 파일이 기록된 데이터베이스(10)를 포함한다. 상기 데이타베이스(10)의 종류는 DBMS마다 다를 수 있다.The DBMS 100 includes a database 10 in which a redo log file is recorded. The type of the database 10 may be different for each DBMS.

상기 동기화기(200)는 리두 로그 검색기(redo log finder)(20), 리두 로그 복원기(redo log restorer)(21), 데이터 송수신기(data transmitter-receiver)(22) 및 데이터 변환기(data translator)(23)를 포함한다. The synchronizer 200 includes a redo log finder 20, a redo log restorer 21, a data transmitter-receiver 22, and a data translator. (23).

상기 리두 로그 검색기(20)는 DBMS(200)의 데이터베이스(10)에 기록된 리두 로그 파일(11)로부터 리두 로그를 추출하여 고장 대처 및 유지한다. The redo log searcher 20 extracts a redo log from the redo log file 11 recorded in the database 10 of the DBMS 200, and copes with and stores the redo log.

상기 리두 로그 복원기(21)는 DBMS(100)의 데이터베이스(10)에 기록된 리두 로그 파일(21)로부터 리두 로그를 추출 및 분석하여 갱신된 데이터로 복원한다. 이를 위하여, 리두 로그 복원기(21)는 각 DBMS의 리두 로그 구조에 대한 정보를 유지하고 있으며, 상기 정보를 이용하여 각 DBMS에 기록된 리두 로그 파일(11)로부터 리두 로그들을 읽어, 리두 로그에 포함된 갱신 데이터에 대한 정보를 중립 데이터(neutral data)에 저장한다.The redo log restorer 21 extracts and analyzes the redo log from the redo log file 21 recorded in the database 10 of the DBMS 100 and restores the redo log as updated data. To this end, the redo log restorer 21 maintains information on the redo log structure of each DBMS, reads the redo logs from the redo log file 11 recorded in each DBMS using the information, And stores information about the included update data in neutral data.

상기 데이터 송수신기(22)는 갱신 데이터를 데이터 중계기(300)를 통해 다른 DBMS로 송신하거나 데이터 중계기(300)로부터 다른 DBMS가 갱신한 데이터를 수신한다.The data transceiver 22 transmits update data to another DBMS through the data relay 300 or receives data updated by another DBMS from the data relay 300. [

상기 데이터 변환기(23)는 수신한 중립 데이터를 해당 DBMS(100)의 질의로 변환하여 데이터베이스(10)에 기록한다. The data converter 23 converts the received neutral data into a query of the DBMS 100 and records the converted data in the database 10.

상기 데이터 중계기(300)는 DBMS(100)의 동기화기(200)들이 송신한 데이터를 수집하여 다른 동기화기들에게 전파하는 역할을 수행하며, 각 동기화기(200)들로부터 수신된 중립 데이터로부터 갱신된 데이터가 저장된 데이터베이스의 역할(제공자 또는 구독자)을 파악할 수 있다. The data repeater 300 collects data transmitted from the synchronizers 200 of the DBMS 100 and propagates the data to the other synchronizers. The data repeater 300 receives the data updated from the neutral data received from the synchronizers 200 The role of the database where the data is stored (provider or subscriber) can be identified.

본 발명은 동기화기가 설치된 DBMS에서 관리하는 데이터베이스들에 대해 제공자(publisher)와 구독자 (subscriber) 중 하나를 설정하여, 제공자로 설정된 데이터베이스의 데이터 갱신 사항은 해당 데이터베이스의 DBMS에 설치된 동기화기만이 데이터 중계기로 송신하도록 하고, 구독자로 설정된 데이터베이스의 DBMS에 설치된 동기화기만이 데이터 갱신 사항을 수신하도록 한다.In the present invention, one of a publisher and a subscriber is set for databases managed by a DBMS installed with a synchronizer, and only the synchronizer installed in the DBMS of the corresponding database is updated as a data repeater So that only the synchronizer installed in the DBMS of the database set as the subscriber receives the data update.

본 발명에서 리두 로그들은 이진 형태로 표현되며, 데이터베이스(10)에 저장된 데이터의 갱신 사항을 포함한다. 상기 데이터의 갱신 사항은 갱신된 데이터, 갱신된 데이터의 타입, 갱신된 데이터가 포함된 테이블 이름, 갱신된 데이터가 포함된 데이터베이스 이름, DML 타입, 트랜잭션 식별자, 트랜잭션 완료 시간으로 구성되며, 이 데이터를 중립 데이터라고 한다.In the present invention, the redo logs are expressed in binary form and include updates of data stored in the database 10. The update of the data includes the updated data, the type of the updated data, the table name including the updated data, the database name including the updated data, the DML type, the transaction identifier, and the transaction completion time. It is called neutral data.

한편 SQL 구문에 따른 측면에서 서로 다른 기종의 DBMS들은 사용하는 데이터 타입이 서로 상이함에 따라 서로 다른 구조의 SQL 구문을 사용한다. 따라서, SQL 전파를 통한 기존 DBMS간 데이터 동기화 방식은 이기종 DBMS 간의 데이터 동기화를 수행할 수 없는 문제점이 있다. 이를 해결하기 위해, 본 발명에서는 동기화기간 갱신 데이터의 정보를 DBMS의 기종에 관계없이 동일한 구조를 갖는 중립 데이터에 저장하여 데이터를 동기화한다.On the other hand, DBMSs of different models in terms of SQL syntax use different structures of SQL syntax as they use different data types. Therefore, there is a problem in that data synchronization between existing DBMSs through the SQL propagation can not be performed between the different DBMSs. In order to solve this problem, in the present invention, information of the synchronization period update data is stored in the neutral data having the same structure regardless of the model of the DBMS to synchronize the data.

그리고, 리두 로그 구조에 따른 측면에서 서로 다른 기종의 DBMS들은 데이터의 갱신 사항에 대한 내용을 기록하는 리두 로그의 구조가 서로 상이하기 때문에, 리두 로그 복제 또는 이중화를 통한 기존 DBMS간 데이터 동기화 방식으로는 이기종 DBMS 간의 데이터 동기화를 수행할 수 없는 문제점이 있다. 이를 해결하기 위해, 본 발명에서는 동기화기간 갱신 데이터의 정보를 DBMS의 기종에 관계없이 동일한 구조를 갖는 중립 데이터에 저장하여 데이터를 동기화한다.In addition, since the structure of the redo log that records the contents of the data updates differs from each other in terms of the redo log structure, the data synchronization between the existing DBMSs through redo log duplication or duplication Data synchronization between heterogeneous DBMSs can not be performed. In order to solve this problem, in the present invention, information of the synchronization period update data is stored in the neutral data having the same structure regardless of the model of the DBMS to synchronize the data.

본 발명의 일 실시예에서 서로 다른 기종의 DBMS들에 각각 설치된 동기화기(200)는 서로 구분할 수 있는 IP주소를 갖는다. 따라서, 동기화기(200)와 데이터 중계기(300)간에 송수신되는 데이터는 데이터의 갱신 사항을 포함하는 중립 데이터와 각 동기화기의 IP주소를 포함한다.In an embodiment of the present invention, the synchronizer 200 installed in DBMSs of different models has an IP address that can be distinguished from each other. Accordingly, the data transmitted between the synchronizer 200 and the data repeater 300 includes the neutral data including the update of the data and the IP address of each synchronizer.

본 발명의 일 실시예에서, 복수의 DBMS들에 대한 동기화를 수행할 때, 제공자로 설정된 어떤 한 데이터베이스의 리두 로그는 해당 DBMS에 설치된 동기화기(200)에서 중립 데이터로 생성되어 전송되고, 상기 전송된 중립 데이터는 데이터 중계기(300)를 거쳐 구독자로 설정된 데이터베이스를 관리하는 DBMS에 설치된 동기화기들에게만 전파된다. 이를 위하여 중립 데이터를 전파하기 위하여 데이터 중계기(300)는 동기화기(200)들의 IP주소들을 저장하며, 데이터베이스들의 이름과 제공자 또는 구독자로 설정된 기능을 저장하고 있다. In one embodiment of the present invention, when synchronizing a plurality of DBMSs, a redo log of a database set as a provider is generated as neutral data in the synchronizer 200 installed in the corresponding DBMS, The neutral data is propagated only to the synchronizers installed in the DBMS managing the database set as the subscriber via the data relay 300. [ In order to transmit the neutral data, the data relay 300 stores the IP addresses of the synchronizers 200, and stores the names of the databases and functions set as a provider or a subscriber.

이하 첨부된 도면을 참조하여 본 발명에 따른 다양한 실시 예를 설명한다.Various embodiments according to the present invention will be described with reference to the accompanying drawings.

도 1에서 DBMS(100)가 관리하는 데이터베이스(10)가 주어졌을 때, 데이터베이스(10)에서 클라이언트의 질의가 수행되면, DBMS(100)는 데이터베이스(10)에서 해당 질의를 포함하는 트랜잭션을 수행한 후 리두 로그 파일(11)에 데이터의 갱신 사항을 나타내는 리두 로그를 누적시킨다. 1, when a database 10 managed by the DBMS 100 is provided, when a query of a client is performed in the database 10, the DBMS 100 performs a transaction including the query in the database 10 And accumulates a redo log indicating update of data in the redo log file 11.

리두 로그 복원기(21)는 DBMS(100)가 허용하는 시간 범위 내에서 시스템 체인지 번호를 기준으로 리두 로그를 분석하여 갱신된 데이터를 파악한 후 중립 데이터를 생성하여 데이터 송수신기(22)로 전달한다.The redo log restorer 21 analyzes the redo log based on the system change number within a time range allowed by the DBMS 100, obtains the updated data, and transmits the generated neutral data to the data transceiver 22.

데이터 송수신기(22)는 전달된 중립 데이터와 동기화기(200)의 식별자(e.g., IP주소)를 데이터 중계기(300)로 전송한다. 만약, 데이터 중계기(300)로부터 전송중단신호가 수신되면, 데이터 송수신기(22)는 데이터 중계기(308)로부터 재개신호를 수신할 때까지 전송을 정지한다. 이와 다르게, 데이터 중계기(300)로부터 상기 전송한 중립 데이터의 시스템 체인지 번호(SCN)가 수신되면 해당 중립 데이터가 정상적으로 전파되었다고 판단한다. 이때, SCN의 수신 유·무와는 별개로 중립 데이터들의 전송이 수행된다.The data transceiver 22 transmits the transmitted neutral data and the identifier (e.g., IP address) of the synchronizer 200 to the data relay 300. If a transmission stop signal is received from the data repeater 300, the data transceiver 22 stops transmission until it receives a resume signal from the data repeater 308. [ Alternatively, if the system change number (SCN) of the transmitted neutral data is received from the data repeater 300, it is determined that the neutral data has propagated normally. At this time, the transmission of the neutral data is carried out separately from the reception of the SCN.

데이터 중계기(300)는 중립 데이터를 데이터 송수신기(22)로부터 수신할 때마다 해당 중립 데이터의 SCN을 해당 데이터 송수신기(22)로 전파한다. 데이터 중계기(300)는 수신한 중립 데이터에 포함된 식별자(e.g., IP주소)를 근거로 데이터베이스 이름을 조회하고, 구독자로 설정된 데이터베이스를 관리하는 모든 DBMS들의 동기화기들에게 중립 데이터를 전파한다. 즉, 동기화기로부터 중립 데이터의 SCN을 수신하면 다음 중립 데이터를 전파하고, 이와 달리 SCN을 일정 시간 내에 수신하지 못한다면 동기화기의 고장으로 판별한다.Each time the data repeater 300 receives the neutral data from the data transceiver 22, the data repeater 300 propagates the SCN of the neutral data to the corresponding data transceiver 22. The data repeater 300 inquires the database name based on the identifier (e.g., IP address) included in the received neutral data, and transmits the neutral data to the synchronizers of all the DBMSs managing the database set as the subscriber. In other words, if the SCN of the neutral data is received from the synchronizer, the next neutral data is propagated. Otherwise, if the SCN is not received within a predetermined time, the synchronizer is determined to be out of order.

따라서, 구독자로 설정된 복수의 DBMS들의 동기화기는 데이터 중계기(300)가 전송하는 중립 데이터를 수신한다. 이를 도 1을 참조하여 설명하면 다음과 같다. Accordingly, the synchronizers of the plurality of DBMSs set as the subscribers receive the neutral data transmitted by the data repeater 300. This will be described with reference to FIG.

도 1을 참조하면, 이더넷 네트워크를 통해 데이터 중계기(300)로부터 중립 데이터가 수신되면 구독자로 설정된 복수의 DBMS들의 동기화기(200)에 포함된 데이터 송수신기(22)는 수신한 중립 데이터의 SCN을 데이터 중계기(300)로 전송하고, 상기 수신한 중립 데이터를 데이터 변환기(23)로 전달한다.Referring to FIG. 1, when the neutral data is received from the data repeater 300 through the Ethernet network, the data transceiver 22 included in the synchronizer 200 of a plurality of DBMSs set as a subscriber stores the received SCN of the neutral data as data And transfers the received neutral data to the data converter 23.

상기 데이터 변환기(23)는 데이터 송수신기(22)로부터 전달받은 중립 데이터를 해당 동기화기(200)가 설치된 DBMS(100)에서 수행될 수 있는 질의로 변환한 후 해당 질의를 DBMS(100)에서 수행하여 데이타베이스 동기화를 수행한다. The data converter 23 converts the neutral data received from the data transceiver 22 into a query that can be performed in the DBMS 100 installed in the synchronizer 200 and then executes the query in the DBMS 100 Perform database synchronization.

도 2는 중립 데이터의 구조체를 나타낸 도면이다.2 is a diagram showing a structure of neutral data.

도 2에 도시된 바와같이, 중립 데이터 구조체는 갱신된 데이터, 갱신된 데이터의 타입, 갱신된 데이터가 포함된 테이블의 이름, 갱신된 데이터가 포함된 데이터베이스의 이름, DML 타입, 트랜잭션 식별자 및 트랜잭션 완료 시간을 포함한다.As shown in FIG. 2, the neutral data structure includes the updated data, the type of the updated data, the name of the table containing the updated data, the name of the database containing the updated data, the DML type, Time.

도 3은 본 발명의 실시예에 따른 동기화기의 리두 로그 복원 동작을 나타낸 순서도이다. 3 is a flowchart illustrating a redo log restoration operation of a synchronizer according to an embodiment of the present invention.

도 3에 도시된 바와같이, 리두 로그 복원기(21)는 각 DBMS(100)마다 데이터베이스(10)의 상이한 위치에 저장된 리두 로그 파일(11)을 탐색하여(S100) 리드 로그 파일(11)이 수정되었는지 체크한다. 체크결과 리두 로그 파일(11)이 수정된 경우 해당 리두 로그 파일(11)에서 소정 기간(e.g.,가장 최근) 동안에 기록된 리두 로그를 추출한다(S110). 이때 리두 로그의 추출은 시스템 체인지 번호순으로 순차적으로 수행한다.3, the redo log restorer 21 searches for the redo log file 11 stored at a different location in the database 10 for each DBMS 100 (S100), reads the read log file 11 Check if it has been modified. If the redo log file 11 is checked as a result of the check, the redo log recorded during a predetermined period (e.g., most recent) is extracted from the redo log file 11 (S110). At this time, the extraction of the redo log is sequentially performed in the system change number order.

일단 리두 로그가 추출되면 리두 로그 복원기(21)는 추출된 리두 로그의 종류(유형)를 확인한다(S120), 확인 결과 추출된 리두 로그가 사용자 질의에 따른 리두 로그인 경우 해당 리두 로그에서 갱신된 데이터의 정보를 추출한 후 데이터베이스(100)의 역할(설정)을 확인한다(S130). 상기 갱신된 데이터의 정보는 갱신된 데이터, 갱신된 데이터의 타입, 갱신된 데이터가 포함된 테이블 이름, 갱신된 데이터가 포함된 데이터베이스 이름, DML 타입, 트랜잭션 식별자 및 트랜잭션 완료 시간을 포함한다. Once the redo log is extracted, the redo log restorer 21 checks the type (type) of the extracted redo log (S120). If the extracted redo log is a redo logon according to the user query, After the information of the data is extracted, the role (setting) of the database 100 is confirmed (S130). The information of the updated data includes the updated data, the type of the updated data, the table name including the updated data, the database name including the updated data, the DML type, the transaction identifier, and the transaction completion time.

상기 단계(S130)의 확인 결과 현재의 데이터베이스(100)가 '제공자'로 설정된 데이터베이스이면(S140), 리두 로그 복원기(21)는 상기 추출한 정보들을 저장하여 도 2와 같이 중립 데이터를 구성한다(S150). 이때, 리두 로그 복원기(21)는 리두 로그의 DML 타입에 따라 중립 데이터에 저장되는 정보를 결정할 수 있다. 이를위하여 리두 로그 복원기(21)는 리두 로그의 DML 타입을 판별한다(S160). 판별결과 추출된 리두 로그의 DML 타입이 UPDATE문이면, 리두 로그 복원기(21)는 갱신 전 데이터, 갱신 후 데이터 및 각 데이터 타입을 중립 데이터에 저장하고(S170), 이와 다르게 DML 타입이 UPDATE문이 아니면, 갱신된 데이터와 갱신된 데이터의 타입만을 중립 데이터에 저장한다(S180).If the current database 100 is set to 'provider' (S140), the redo log restorer 21 stores the extracted information and configures the neutral data as shown in FIG. 2 (step S130) S150). At this time, the redo log restorer 21 can determine the information stored in the neutral data according to the DML type of the redo log. To this end, the redo log restorer 21 determines the DML type of the redo log (S160). If the DML type of the extracted redo log is an UPDATE statement, the redo log restorer 21 stores the pre-update data, the post-update data, and each data type in the neutral data (S170) Otherwise, only the types of the updated data and the updated data are stored in the neutral data (S180).

상기와 같은 과정에 의해 리두 로그의 모든 정보가 중립 데이터에 저장되면, 리두 로그 복원기(21)는 해당 중립 데이터를 데이터 송수신기(22)로 전달한다 (S190).If all the information of the redo log is stored in the neutral data by the above process, the redo log restorer 21 transmits the neutral data to the data transceiver 22 (S190).

따라서, 본 발명에서는 데이터 타입에 따라 리두 로그가 저장되는 구조가 상이하기 때문에, 각 데이터 타입에 따른 리두 로그 구조를 기 파악하여 리두 로그 파일에서 추출한 리두 로그에서 각 데이터 타입에 따라 데이터를 각기 복원한다.Therefore, according to the present invention, the redo log structure is different depending on the data type. Therefore, the redo log structure according to each data type is known, and data is restored according to each data type in the redo log extracted from the redo log file .

도 4는 본 발명에서 데이터베이스의 역할이 제공자일 때 동기화기의 고장에 따른 대처 방안을 나타낸 순서도이다.4 is a flowchart showing a countermeasure according to the failure of the synchronizer when the role of the database is the provider in the present invention.

도 4에 도시된 바와같이, 동기화기(200)는 자신의 상태 즉, 정상 상태 또는 데이터베이스가 외부 요인으로 인해 동작을 멈추는 고장 상태를 확인할 수 있다(S200). 확인 결과 동기화기(200)가 고장 상태에서 정상 상태로 회복된 경우 (S210) 동기화기(200)는 데이터 중계기(300)로 회복신호를 전송한다(S220). 데이터 중계기(300)는 해당 동기화기(200)가 전송했던 중립 데이터들 중 마지막으로 동기화된 중립 데이터의 SCN과 재개신호를 동기화기(200)로 전송한다(S230).As shown in FIG. 4, the synchronizer 200 can check its own state, that is, a normal state or a failure state where the database stops due to an external factor (S200). If the synchronizer 200 returns from the fault state to the normal state (S210), the synchronizer 200 transmits a recovery signal to the data repeater 300 (S220). The data repeater 300 transmits the SCN and the resume signal of the last synchronized neutral data among the neutral data transmitted by the synchronizer 200 to the synchronizer 200 (S230).

상기 재개신호가 수신되면 동기화기(200)는 후술하는 동기화 절차를 수행하여 동기화가 누락된 데이터에 대하여 동기화를 수행한다(S240).When the resume signal is received, the synchronizer 200 performs a synchronization procedure to be described later to synchronize the missing data (S240).

도 5는 누락 데이터에 대한 동기화 동작(S240)을 나타낸 순서도이다. 5 is a flowchart showing a synchronization operation (S240) for missing data.

도 5를 참조하면, 누락된 데이터에 대하여 동기화를 수행하기 위하여 동기화기(200)는 리두 로그 복원기(21)의 동작을 정지시키고 현재까지 복원된 리두 로그의 SCN을 반환한다(S241). 이어서 동기화기(200)는 리두 로그 검색기(21)를 이용하여 데이터 중계기(300)로부터 재개신호와 함께 수신한 SCN에 해당하는 리두 로그로부터 테이블 식별자를 추출하여 테이블 목록에 추가한다(S242). 이 후, 임시 SCN (tmpSCN)을 생성하여 데이터 중계기(300)로부터 수신한 SCN으로 초기화한다(S243).Referring to FIG. 5, the synchronizer 200 stops the operation of the redo log restorer 21 and returns the SCN of the redo log that has been restored so far to perform synchronization with the missing data (S241). In step S242, the synchronizer 200 extracts the table identifier from the redo log corresponding to the SCN received together with the resume signal from the data repeater 300 using the redo log searcher 21, and adds the table identifier to the table list. Thereafter, a temporary SCN (tmpSCN) is generated and initialized to the SCN received from the data relay 300 (S243).

이어서 동기화기(200)는 초기화된 tmpSCN의 이후 SCN 값을 갖는 리두 로그를 탐색하여 tmpSCN 값으로 초기화하고(S244), 상기 tmpSCN 값이 현재까지 복원된 SCN보다 큰지 체크한다(S245), 체크결과 tmpSCN 값이 현재까지 복원된 SCN보다 크면 상기 리두 로그 검색기(S107)를 정지시킨 후 리두 로그 복원기(21)의 동작을 재개시킨다(S246). 이와 달리, tmpSCN 값이 현재까지 복원된 SCN보다 작거나 같은 값을 갖으면(S310), 동기화기(200)는 tmpSCN 값을 갖는 리두 로그를 복원하여 중립 데이터를 생성한다(S247). 이때, 동기화기(200)는 상기 생성된 중립 데이터의 테이블 식별자가 테이블 목록에 존재하는지 체크하여, 존재하는 경우에만 해당 중립 데이터를 데이터 송수신기(22)로 전달한다(S248). 반면에 테이블 목록에 존재하지 않는 경우에는 tmpSCN 이후의 SCN 값을 갖는 리두 로그를 탐색한다.Then, the synchronizer 200 searches the redo log having the subsequent SCN value of the initialized tmpSCN to initialize it to the tmpSCN value (S244), and checks whether the tmpSCN value is greater than the recovered SCN (S245) If the value is greater than the recovered SCN, the redo log retriever 217 stops the redo log retriever S107 and resumes the operation of the redo log restorer 21 (S246). Otherwise, if the tmpSCN value is less than or equal to the restored SCN (S310), the synchronizer 200 restores the redo log having the tmpSCN value to generate neutral data (S247). At this time, the synchronizer 200 checks whether the table identifier of the generated neutral data exists in the table list, and transmits the neutral data to the data transceiver 22 only if it exists (S248). On the other hand, if it does not exist in the table list, it searches the redo log with the SCN value after tmpSCN.

이에 한정되지 않고 도 5의 동기화 절차(S240)는 이하와 같이 데이터베이스의 역할이 구독자일 경우에 따른 동기화기의 고장 대처와 데이터 중계기의 고장에 따른 대처에서도 동일하게 수행될 수 있다. The synchronization procedure (S240) of FIG. 5 may be performed in the same manner as the failure countermeasure of the synchronizer and the failure of the data repeater according to the case where the role of the database is the subscriber as described below.

도 6은 본 발명에서 데이터베이스의 역할이 구독자일 때 동기화기의 고장에 따른 대처 방안을 나타낸 순서도이다. 6 is a flowchart illustrating a countermeasure according to the failure of the synchronizer when the role of the database is a subscriber in the present invention.

도 1 및 도 6을 참조하면, 데이터 중계기(300)는 제공자 DBMS(100)의 동기화기(200)로부터 수신한 중립 데이터를 다른 이종의 구독자 DBMS(100), 더 상세하게는 이더넷 네트워크를 통해 각 DBMS(100)의 동기화기들로 전파한다(S300). 이후 데이터 중계기(300)는 관리자가 정한 일정 시간 내에 모든 동기화기들로부터 상기 전파한 중립 데이터에 대한 SCN이 수신되는지 체크한다(S310, S320). 1 and 6, the data repeater 300 transmits the neutral data received from the synchronizer 200 of the provider DBMS 100 to a different subscriber DBMS 100, more specifically, through the Ethernet network And propagates to synchronizers of the DBMS 100 (S300). Thereafter, the data repeater 300 checks whether the SCN for the propagated neutral data is received from all synchronizers within a predetermined time determined by the manager (S310, S320).

체크결과 일정 시간 내에 모든 동기화기로부터 SCN가 수신되지 않으면, 데이터 중계기(300)는 SCN을 전송하지 않은 동기화기를 고장으로 판단하고(S330), 상기 고장으로 판단된 동기화기로 전송중단신호를 전송한 다음 (S340) 지속적으로 상태를 확인한다. If the SCN is not received from all the synchronizers within the predetermined period of time, the data repeater 300 determines that the synchronizer that has not transmitted the SCN is failed (S330), transmits a transmission stop signal to the synchronizer determined as the failure (S340), the state is continuously checked.

상기 고장으로 판단된 동기화기의 상태는 해당 동기화기(S100)가 데이터 중계기(300)에 접속하는 것으로 회복의 유/무를 판단할 수 있다. 확인 결과 고장으로 판단된 동기화기가 회복되면(S350, S360), 데이터 중계기(300)는 해당 동기화기로 재개신호와 함께 전송 실패한 중립 데이터의 SCN을 전송한다(S370). 이후 고장에서 회복된 동기화기는 도 5의 동기화 절차(S240)에 따라 동기화를 수행한다. The state of the synchronizer determined as the failure can be determined by whether the synchronizer S100 connects to the data repeater 300 to determine whether or not the recovery is possible. If it is determined that the synchronizer has recovered as a failure (S350, S360), the data relay 300 transmits the SCN of the failed neutral data along with the resume signal to the synchronizer (S370). Then, the synchronizer recovered from the failure performs synchronization according to the synchronization procedure (S240) of FIG.

도 7은 본 발명에서 데이터 중계기의 고장에 따른 대처 방안을 나타낸 순서도이다. 7 is a flowchart showing a countermeasure according to the failure of the data repeater in the present invention.

도 7에 도시된 바와같이, 동기화기(200)는 데이터 중계기(300)로 중립 데이터를 전송한 후(S400), 데이터 중계기(300)로부터 관리자가 정한 일정 시간 내에 중립 데이터의 SCN가 수신되는지를 체크하여 데이터 중계기의 고장 여부를 판단할 수 있다(S400~S420). 이때, 일정 시간 내에 중립 데이터의 SCN가 수신되지 않으면 데이터 중계기(300)에서 고장이 발생하였다고 판단한다. 상기 데이터 중계기(300)가 고장난 것으로 판단되면, 모든 동기화기(200)는 스스로 동작을 정지한다(S430).7, after the synchronizer 200 transmits the neutral data to the data repeater 300 (S400), the synchronizer 200 determines whether the SCN of the neutral data is received from the data repeater 300 within a predetermined time set by the administrator It is possible to determine whether the data repeater is faulty (S400 to S420). At this time, if the SCN of the neutral data is not received within a predetermined time, it is determined that the data repeater 300 has failed. If it is determined that the data repeater 300 has failed, all the synchronizers 200 stop their operation (S430).

이후 데이터 중계기(S108)가 고장으로부터 복구되면 데이터 중계기(300)는 각 동기화기가 마지막으로 전송한(동기화한) 중립 데이터의 SCN과 재개신호를 각 동기화기(S100)로 전송하고, 각 동기화기(S100)는 수신한 재개신호에 따라 동작을 재개하여, 도 5의 동기화 절차(S240)에 따라 동기화를 수행한다(S450). After the data repeater S108 is recovered from the failure, the data repeater 300 transmits the SCN and the resume signal of the neutral data last transmitted (synchronized) by each synchronizer to each synchronizer S100, S100 resumes operation according to the received resume signal, and performs synchronization according to the synchronization procedure (S240) of FIG. 5 (S450).

상술한 바와같이 본 발명은 서로 다른 제품, 즉, 이기종 데이터베이스 간의 동기화를 지원하여 데이터의 갱신이 발생했을 때 이를 반영하여 여러 데이터베이스에서 항상 같은 데이터를 갖도록 할 수 있고, 하나의 데이터베이스가 외부 요인으로 인해 동작을 멈췄을 경우 데이터 손실 없이 동기화 중인 데이터베이스를 이용하여 복구할 수 있는 장점이 있다. As described above, the present invention supports synchronization between different products, i.e., heterogeneous databases, so that data can be always updated in a plurality of databases by reflecting the update of data, If the operation is stopped, there is an advantage that it can be recovered by using the database which is being synchronized without data loss.

그리고 본 발명은 동기화기간 갱신 데이터의 정보를 별도의 중립 데이터에 저장하여 송수신함으로써 이기종 DBMS간의 질의 형태와 데이터 유형의 구조적 차이를 해결할 수 있으며 다양한 DBMS들 간의 동기화를 수행할 수 있는 효과가 있다.In addition, the present invention can solve the structural difference between the query type and the data type between heterogeneous DBMSs by storing information of the synchronization period update data in separate neutral data and transmitting / receiving them, thereby achieving synchronization between various DBMSs.

상기와 같이 설명된 본 발명에 따른 이기종 데이터베이스의 데이터 동기화 시스템 및 방법은 상기 설명된 실시예들의 구성과 방법이 한정되게 적용될 수 있는 것이 아니라, 상기 실시예들은 그 기술적 사상이나 필수적 특징을 변경하지 않고서 다른 구체적인 형태로 실시될 수 있다는 것을 이해할 수 있을 것이다. 그러므로, 상술한 실시예들은 모든 면에서 예시적인 것이며 한정적인 것이 아닌 것으로서 이해해야만 한다. The above-described data synchronization system and method of a heterogeneous database according to the present invention can be applied to the configurations and methods of the above-described embodiments in a limited manner, but the embodiments can be implemented without changing their technical ideas or essential features It will be understood that the invention may be embodied in other specific forms. Therefore, it should be understood that the above-described embodiments are to be considered in all respects as illustrative and not restrictive.

10 : 데이터베이스 11 : 리두 로그파일
20 : 리두 로그 검색기 21 : 리두 로그 복원기
22 : 데이터 송수신기 24 : 데이터 변환기
100 : 데이터베이스 관리 시스템(DBMS) 200 : 동기화기
300 : 데이터 중계기
10: Database 11: Redo Log Files
20: redo log retriever 21: redo log restor
22: data transceiver 24: data converter
100: Database Management System (DBMS) 200: Synchronizer
300: Data Repeater

Claims (14)

구독자 역할을 갖는 데이터베이스를 갖으며, 제1구조의 리두 로그(redo log)를 저장하는 제1데이터베이스 관리 시스템(DBMS);
제공자 역할을 갖는 데이터베이스를 갖으며, 상기 제1구조와 서로 호환되지 않는 제2구조의 리두 로그를 저장하는 적어도 하나 이상의 제2데이터베이스 관리 시스템(DBMS; 및
상기 제1,제2DBMS사이에서 동기화를 위해 송수신되는 데이터를 중계하는 데이터 중계기;를 포함하여 구성되어,
상기 제1DBMS는 데이터베이스에서 데이터 갱신이 발생할 때 생성되는 리두 로그를 원래의 갱신 데이터로 복원하여, 상기 복원된 갱신데이터의 정보를 DBMS의 기종에 관계없이 동일한 구조를 갖는 중립 데이터에 저장하여 구독자 역할의 DBMS로 전송하는 것을 특징으로 하는 이기종 데이터베이스의 데이터 동기화 시스템.
A first database management system (DBMS) having a database having a subscriber role and storing a redo log of the first structure;
At least one second database management system (DBMS) having a database having a provider role and storing a redo log of a second structure incompatible with the first structure;
And a data relay for relaying data transmitted and received for synchronization between the first and second DBMSs,
The first DBMS restores the redo log generated when the data update occurs in the database to the original update data and stores the restored update data in the neutral data having the same structure regardless of the model of the DBMS, And transmitting the data to the DBMS.
제1항에 있어서, 상기 제1,제2DBMS는
데이터베이스에서 트랜잭션 발생시 생성되는 리두 로그를 분석하여 갱신 데이터를 복원하고, 복원된 갱신 데이터의 정보를 중립 데이터에 저장하여 데이터 중계기로 전송하는 동기화기;를 포함하는 것을 특징으로 하는 이기종 데이터베이스의 데이터 동기화 시스템.
2. The method of claim 1, wherein the first and second DBMSs
And a synchronizer for analyzing a redo log generated when a transaction occurs in the database to restore the update data and storing information of the updated update data in the neutral data and transmitting the data to the data relay. .
제2항에 있어서, 상기 데이터 중계기는
수신된 중립 데이터로부터 상기 갱신된 데이터가 저장된 데이터베이스의 역할을 파악한 후 해당 중립 데이터를 구독자 역할의 데이터베이스를 갖는 DBMS의 동기화기로 전파하고, 각 데이터베이스에서 복원된 리두 로그의 식별자를 기록하는 것을 특징으로 하는 것을 특징으로 하는 이기종 데이터베이스의 데이터 동기화 시스템.
3. The apparatus of claim 2, wherein the data repeater
Recognizing the role of the database storing the updated data from the received neutral data, propagating the neutral data to the synchronizer of the DBMS having the database serving as the subscriber, and recording the identifier of the restored redo log in each database Wherein the data synchronization system comprises:
제2항에 있어서, 상기 복원된 갱신 데이터의 정보는
갱신된 데이터, 갱신된 데이터의 타입, 갱신된 데이터가 포함된 테이블 이름, 갱신된 데이터가 포함된 데이터베이스 이름, DML 타입, 트랜잭션 식별자 및 트랜잭션 완료 시간을 포함하는 것을 특징으로 하는 이기종 데이터베이스의 데이터 동기화 시스템.
3. The method of claim 2, wherein the information of the restored updated data is
A database name including the updated data, a DML type, a transaction identifier, and a transaction completion time. The data synchronization system according to claim 1, .
제2항에 있어서, 상기 동기화기는
상기 생성된 리두 로그를 원래의 갱신 데이터로 복원하고 복원된 데이터를 구조체인 중립 데이터에 저장하는 리두 로그 복원기;
상기 리두 로그 복원기에서 전달된 중립 데이터를 데이터 중계기로 전송하거나 데이터 중계기로부터 중립 데이터를 수신하는 데이터 송수신기;
상기 데이터 송수신기가 수신한 중립 데이터를 해당 DBMS에서 사용 가능한 질의로 변환하는 데이터 변환기; 및
동기화기 고장 시에 특정 리두 로그만을 탐색하여 복원하는 리두 로그 검색기;를 포함하는 것을 특징으로 하는 이기종 데이터베이스의 데이터 동기화 시스템.
3. The apparatus of claim 2, wherein the synchronizer
A redo log restorer for restoring the generated redo log to original update data and storing restored data in neutral data as a structure;
A data transceiver for transmitting the neutral data transferred from the redo log restorer to the data relay or receiving the neutral data from the data relay;
A data converter for converting the neutral data received by the data transceiver into a query usable in the corresponding DBMS; And
And a redo log searcher for searching and restoring only a specific redo log when the synchronizer fails.
제5항에 있어서, 상기 데이터 송수신기는
중립 데이터와 함께 동기화기의 식별자를 데이터 중계기로 전송하고, 상기 데이터 중계기로부터 중립 데이터의 시스템 체인지 번호(SCN)를 수신하는 것을 특징으로 하는 이기종 데이터베이스의 데이터 동기화 시스템.
6. The apparatus of claim 5, wherein the data transceiver
And transmits the identifier of the synchronizer together with the neutral data to the data relay, and receives the system change number (SCN) of the neutral data from the data relay.
구독자 또는 제공자 역할을 갖는 데이터베이스를 포함하며 서로 호환되지 않는 상이한 구조의 리두 로그(redo log)를 저장하는 복수의 데이터베이스 관리 시스템(DBMS)에 있어서,
각 데이터베이스 관리 시스템(DBMS)은
데이터베이스에서 데이터 갱신시에 생성되는 리두 로그를 원래의 갱신 데이터로 복원하여, 복원 갱신 데이터의 정보를 DBMS의 기종에 관계없이 동일한 구조를 갖는 중립 데이터에 저장하여 다른 데이터베이스 관리 시스템(DBMS)으로 전송하는 동기화기;를 포함하는 것을 특징으로 하는 이기종 데이터베이스의 데이터 동기화 시스템.
1. A plurality of database management systems (DBMSs) for storing redo logs of different structures that are incompatible with each other, including a database having a subscriber or a provider role,
Each database management system (DBMS)
The redo log generated at the time of updating the data in the database is restored to the original update data and the information of the restoration update data is stored in the neutral data having the same structure irrespective of the model of the DBMS and transmitted to another DBMS And a synchronizer for synchronizing the synchronization of the data.
제7항에 있어서, 상기 전송된 중립 데이터로부터 상기 갱신된 데이터가 저장된 데이터베이스의 역할을 파악한 후 해당 중립 데이터를 다른 데이터베이스 관리 시스템(DBMS)으로 중계하는 데이터 중계기를 더 포함하는 것을 특징으로 하는 것을 특징으로 하는 이기종 데이터베이스의 데이터 동기화 시스템. The data relay system according to claim 7, further comprising a data repeater for determining the role of the database storing the updated data from the transmitted neutral data and relaying the neutral data to another database management system (DBMS) A heterogeneous database of data synchronization systems. 제7항에 있어서, 상기 복원된 갱신 데이터의 정보는
갱신된 데이터, 갱신된 데이터의 타입, 갱신된 데이터가 포함된 테이블 이름, 갱신된 데이터가 포함된 데이터베이스 이름, DML 타입, 트랜잭션 식별자 및 트랜잭션 완료 시간을 포함하는 것을 특징으로 하는 이기종 데이터베이스의 데이터 동기화 시스템.
8. The method of claim 7, wherein the information of the restored updated data is
A database name including the updated data, a DML type, a transaction identifier, and a transaction completion time. The data synchronization system according to claim 1, .
제7항에 있어서, 상기 동기화기는
상기 생성된 리두 로그를 원래의 갱신 데이터로 복원하고 복원된 데이터를 구조체인 중립 데이터에 저장하는 리두 로그 복원기;
상기 리두 로그 복원기에서 전달된 중립 데이터를 데이터 중계기로 전송하거나 데이터 중계기로부터 중립 데이터를 수신하는 데이터 송수신기;
상기 데이터 송수신기가 수신한 중립 데이터를 해당 DBMS에서 사용 가능한 질의로 변환하는 데이터 변환기; 및
동기화기 고장 시에 특정 리두 로그만을 탐색하여 복원하는 리두 로그 검색기;를 포함하는 것을 특징으로 하는 이기종 데이터베이스의 데이터 동기화 시스템.
8. The apparatus of claim 7, wherein the synchronizer
A redo log restorer for restoring the generated redo log to original update data and storing restored data in neutral data as a structure;
A data transceiver for transmitting the neutral data transferred from the redo log restorer to the data relay or receiving the neutral data from the data relay;
A data converter for converting the neutral data received by the data transceiver into a query usable in the corresponding DBMS; And
And a redo log searcher for searching and restoring only a specific redo log when the synchronizer fails.
제10항에 있어서, 상기 데이터 송수신기는
중립 데이터와 함께 동기화기의 식별자를 데이터 중계기로 전송하고, 상기 데이터 중계기로부터 중립 데이터의 시스템 체인지 번호(SCN)를 수신하는 것을 특징으로 하는 이기종 데이터베이스의 데이터 동기화 시스템.
11. The apparatus of claim 10, wherein the data transceiver
And transmits the identifier of the synchronizer together with the neutral data to the data relay, and receives the system change number (SCN) of the neutral data from the data relay.
서로 호환되지 않는 상이한 구조의 리두 로그(redo log)를 저장하는 복수의 데이터베이스 관리 시스템(DBMS)간의 데이터 동기화 방법에 있어서,
하나의 DBMS에서 데이터베이스 데이터가 갱신되면, 데이터 갱신으로 인해 생성되는 리두 로그를 원래의 갱신 데이터로 복원하는 단계;
상기 복원된 갱신 데이터의 정보를 DBMS의 기종에 관계없이 동일한 구조를 갖는 중립 데이터에 저장하여 중립 데이터를 생성하는 단계; 및
상기 생성된 중립 데이터를 다른 기종의 DBMS로 전송하여 데이터 동기화를 수행하는 단계;를 포함하는 것을 특징으로 하는 이기종 데이터베이스의 데이터 동기화 방법.
1. A method for synchronizing data between a plurality of database management systems (DBMSs) storing redo logs of different structures incompatible with each other,
Restoring a redo log generated due to data update into original update data when the database data is updated in one DBMS;
Storing the restored update data in the neutral data having the same structure regardless of the model of the DBMS to generate neutral data; And
And transmitting the generated neutral data to a DBMS of a different type to perform data synchronization.
제12항에 있어서, 상기 복원된 갱신 데이터의 정보는
갱신된 데이터, 갱신된 데이터의 타입, 갱신된 데이터가 포함된 테이블 이름, 갱신된 데이터가 포함된 데이터베이스 이름, DML 타입, 트랜잭션 식별자 및 트랜잭션 완료 시간을 포함하는 것을 특징으로 하는 이기종 데이터베이스의 데이터 동기화 방법.
13. The method of claim 12, wherein the information of the restored updated data is
A database name including the updated data, a DML type, a transaction identifier, and a transaction completion time. The data synchronization method according to claim 1, wherein the updated data includes the updated data, the updated data type, the updated table name, .
제12항에 있어서, 상기 중립 데이터를 생성하는 단계는
리두 로그 파일에서 소정 시간내의 리두 로그를 추출하는 단계;
상기 추출된 리두 로그의 DML 타입을 판별하는 단계; 및
상기 리두 로그의 DML 타입이면 UPDATE문이면 갱신 전 데이터, 갱신 후 데이터 및 각 데이터 타입을 중립 데이터에 저장하고, UPDATE문이 아니면 갱신된 데이터와 갱신된 데이터의 타입만을 중립 데이터에 저장하는 단계를 포함하는 것을 특징으로 하는 이기종 데이터베이스의 데이터 동기화 방법.
13. The method of claim 12, wherein generating the neutral data comprises:
Extracting a redo log in a predetermined time from the redo log file;
Determining a DML type of the extracted redo log; And
If the DML type of the redo log is an UPDATE statement, storing the pre-update data, post-update data, and each data type in the neutral data, and if not, storing only the updated data and the updated data type in the neutral data The data synchronization method comprising:
KR1020160112206A 2016-08-31 2016-08-31 Heterogeneous database synchronization system and method using neutral data based on redo log analysis KR101825910B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020160112206A KR101825910B1 (en) 2016-08-31 2016-08-31 Heterogeneous database synchronization system and method using neutral data based on redo log analysis

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020160112206A KR101825910B1 (en) 2016-08-31 2016-08-31 Heterogeneous database synchronization system and method using neutral data based on redo log analysis

Publications (1)

Publication Number Publication Date
KR101825910B1 true KR101825910B1 (en) 2018-03-22

Family

ID=61901142

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020160112206A KR101825910B1 (en) 2016-08-31 2016-08-31 Heterogeneous database synchronization system and method using neutral data based on redo log analysis

Country Status (1)

Country Link
KR (1) KR101825910B1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109101627A (en) * 2018-08-14 2018-12-28 交通银行股份有限公司 heterogeneous database synchronization method and device
CN110543513A (en) * 2018-05-29 2019-12-06 中兴通讯股份有限公司 incremental data synchronization method, equipment and storage medium for distributed database
KR102209044B1 (en) * 2020-03-12 2021-01-29 주식회사 케이비시스 Cloud system having cloud native database structure

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006092005A (en) * 2004-09-21 2006-04-06 Hitachi Ltd Data processing method, database system, and storage device

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2006092005A (en) * 2004-09-21 2006-04-06 Hitachi Ltd Data processing method, database system, and storage device

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110543513A (en) * 2018-05-29 2019-12-06 中兴通讯股份有限公司 incremental data synchronization method, equipment and storage medium for distributed database
CN110543513B (en) * 2018-05-29 2024-03-15 金篆信科有限责任公司 Incremental data synchronization method, equipment and storage medium for distributed database
CN109101627A (en) * 2018-08-14 2018-12-28 交通银行股份有限公司 heterogeneous database synchronization method and device
CN109101627B (en) * 2018-08-14 2022-03-22 交通银行股份有限公司 Heterogeneous database synchronization method and device
KR102209044B1 (en) * 2020-03-12 2021-01-29 주식회사 케이비시스 Cloud system having cloud native database structure

Similar Documents

Publication Publication Date Title
CN110209726B (en) Distributed database cluster system, data synchronization method and storage medium
KR101904786B1 (en) Apparatus and method for replicating changed data in a source database management system to a target database management system in real time
KR101662212B1 (en) Database Management System providing partial synchronization and method for partial synchronization thereof
US7653668B1 (en) Fault tolerant multi-stage data replication with relaxed coherency guarantees
KR101335101B1 (en) Method and system for data replication management
US6941327B2 (en) Apparatus and method for database synchronization in a duplex system
US7523110B2 (en) High availability designated winner data replication
US6728736B2 (en) System and method for synchronizing a data copy using an accumulation remote copy trio
CN108255647B (en) High-speed data backup method under samba server cluster
US20070299887A1 (en) Multi-master database synchronization without loss of convergence
CN109299183A (en) A kind of data processing method, device, terminal device and storage medium
EP0974895A2 (en) System for user control of version synchronization in mobile computing
KR101825910B1 (en) Heterogeneous database synchronization system and method using neutral data based on redo log analysis
CN105376277B (en) A kind of method of data synchronization and device
CN103532838A (en) Method and system for realizing data exchange between isolation networks
CN109298978B (en) Recovery method and system for database cluster of specified position
CN113360456B (en) Data archiving method, device, equipment and storage medium
CN107229540A (en) A kind of database restoring method and system based on time point
CN110990399B (en) Reconstruction index method and device
CN105323271B (en) Cloud computing system and processing method and device thereof
CN111404737B (en) Disaster recovery processing method and related device
CN107465706B (en) Distributed data object storage device based on wireless communication network
JP5685213B2 (en) Differential replication system, master database device, and slave database device
KR100445194B1 (en) A Method of Database Replication
CN111475470B (en) Method and system for recovering deleted files and directories of recycle bin

Legal Events

Date Code Title Description
E701 Decision to grant or registration of patent right
GRNT Written decision to grant