KR20020075062A - A Method of Database Replication - Google Patents

A Method of Database Replication Download PDF

Info

Publication number
KR20020075062A
KR20020075062A KR1020010015244A KR20010015244A KR20020075062A KR 20020075062 A KR20020075062 A KR 20020075062A KR 1020010015244 A KR1020010015244 A KR 1020010015244A KR 20010015244 A KR20010015244 A KR 20010015244A KR 20020075062 A KR20020075062 A KR 20020075062A
Authority
KR
South Korea
Prior art keywords
transaction
replication
log
duplication
database
Prior art date
Application number
KR1020010015244A
Other languages
Korean (ko)
Other versions
KR100445194B1 (en
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 KR10-2001-0015244A priority Critical patent/KR100445194B1/en
Publication of KR20020075062A publication Critical patent/KR20020075062A/en
Application granted granted Critical
Publication of KR100445194B1 publication Critical patent/KR100445194B1/en

Links

Classifications

    • 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/24Querying
    • G06F16/245Query processing
    • G06F16/2452Query translation
    • G06F16/24522Translation of natural language queries to structured queries
    • 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

Abstract

PURPOSE: A method for a database replication is provided to copy modified contents of a database(local database) with respect to many databases which are physically located at different portions into other databases(remote database). CONSTITUTION: Replication transmitters created by replication managers try a connection to replication receivers of a priority database server(S101,S102). If a replication receiver is connected, the replication transmitter transmits information of tables which participate in a replication to the replication receiver, receives a replication constraint condition checking result, and checks a success or not(S103). A replication starting point is adjusted and the position thereof is stored in a corresponding replication object(S104). It is checked whether a replication terminating request exists from a user database server or other database server(S105). If a replication terminating request does not exist and a replication LSN(XLSN, LSN: log sequence number) is not identified with the current LSN of the database server(S107), a log record of the XLSN position is obtained in a database log, and the XLSN value is increased(S108). If the obtained log record is not a data modification or transaction control log(S109), the stage is returned to the above (S105) stage. If the obtained log record is a data modification or transaction control log and a log record type is a transaction starting log, a transaction is registered in a replication transaction table.

Description

데이터베이스 이중화 방법{A Method of Database Replication}A method of database replication

본 발명은 물리적으로 떨어져 있는 여러 개의 데이터베이스들에 대해 한 데이터베이스(로컬 데이터베이스)의 변경된 내용을 다른 데이터베이스(원격 데이터베이스)들에 복제하는 데이터베이스 이중화(database replication) 방법에 관한 것으로서, 보다 상세하게는 사용이 편리한 이중화 사용자 인터페이스(interface)를 통한 이중화의 정의 및 운영, 이중화 객체(replication object) 개념의 도입, 이중화 시스템간의 고장 또는 네트워크 단절에 대한 감지 및 대응, 그리고 데이터베이스 변경 로그(log)를 기반으로 하는 데이터베이스 이중화 방법에 관한 것이다.The present invention relates to a database replication method for replicating changes of one database (local database) to other databases (remote databases) for a plurality of physically separated databases. Definition and operation of redundancy through a convenient redundancy user interface, introduction of the concept of a replication object, detection and response to failures or network disconnections between redundant systems, and a database based on a database change log It relates to a redundancy method.

데이터베이스를 이중화하는 것은 데이터베이스를 안정적으로 서비스하기 위한 것으로서, 예를 들어 CDMA 가입자 서비스의 경우, 이동 전화 가입자 서비스를 관리하는 HLR(home location register) 시스템은 자신에 등록된 가입자들(보통 수십만)에 대한 서비스를 담당하고 있다. 만일 이 HLR 시스템이 임의의 사고로 정지된다면, 이 시스템이 복구되는 동안 여기에서 관리하는 가입자에 대해서는 서비스를 못하게 된다. 따라서 대부분의 이동통신 회사는 HLR 시스템이 관리하는 데이터를 다른 HLR 시스템에 복제시켜서, 운영 도중 만일 한 HLR 시스템이 고장나면 곧바로 복제시킨 시스템으로 가입자 서비스를 옮김으로써 무정지 서비스를 실현하고 있다.Redundancy of the database is intended to reliably serve the database. For example, in the case of CDMA subscriber service, a home location register (HLR) system that manages mobile subscriber service is responsible for subscribers (usually hundreds of thousands) registered to it. I am in charge of the service. If this HLR system goes down in any event, it will not be able to serve the subscribers it manages while the system is being recovered. Therefore, most mobile communication companies realize uninterrupted service by copying data managed by HLR system to other HLR system and moving subscriber service to the system that is immediately copied if one HLR system fails during operation.

일반적인 데이터베이스 이중화 방법을 도 1과 함께 설명하면, 서로 상이한 시스템에 존재하는 데이터베이스(16a, 16b)에 변경이 발생하면 그 내용을 상대 데이터베이스에 반영하여 줌으로써(ⓕ), 유사 시 한 데이터베이스서버(10a)의 장애로 인하여 응용 프로그램 서비스(17a)가 불가능할 때 상대 데이터베이스서버(10b)가 대신하여 동일한 응용 프로그램 서비스(17b)를 수행할 수 있도록 하는 것이다.Referring to FIG. 1, a general method of database duplication is to change a database 16a or 16b in a different system to reflect the contents in a counterpart database (ⓕ). When the application service 17a is not possible due to the failure of the other database server 10b can perform the same application service 17b instead.

보다 상세하게 설명하면, 이중화에 대한 종래 기술 중 가장 원시적인 방법으로서 응용 어플리케이션 수준에서의 이중화가 있는데, 이 방법은 동일 질의를 두 데이터베이스서버(10a, 10b)에 똑같이 적용하는 것이다(ⓖ, ⓗ). 이 방법은 이중화 성능이 떨어질 뿐만 아니라, 네트워크 및 데이터베이스서버(10a, 10b)의 고장 발생에 대하여 데이터베이스(16a, 16b)의 일치성을 보장하기 어려운 문제점이 있다.In more detail, the most primitive method of the prior art for duplication is duplication at the application level, which applies the same query to both database servers 10a and 10b (ⓖ, ⓗ). . This method not only reduces the redundancy performance but also makes it difficult to guarantee the consistency of the databases 16a and 16b against the occurrence of failure of the network and the database servers 10a and 10b.

또한, 로컬의 데이터베이스서버(10a)에서 처리된 데이터베이스 질의어를 원격의 데이터베이스서버(10b)에 전송하여, 원격의 데이터베이스서버(10b)에서 이 질의어를 처리하는 형태로 데이터베이스 이중화를 수행한다(ⓐ). 이와 같은 방법은 동일한 질의가 양쪽에서 수행되어 부하 분산(load balance)의 효과가 적고, 상대데이터베이스에는 없는 테이블의 내용을 이중화 테이블에 삽입하는 것과 같은 질의는 이중화 될 수 없는 등 이중화에 대한 제약 사항이 많은 문제점이 있다.In addition, the database query word processed by the local database server 10a is transmitted to the remote database server 10b, and database replication is performed in the form of processing the query word by the remote database server 10b (ⓐ). In this method, the same query is executed on both sides, so there is less load balance effect, and queries such as inserting the contents of a table that does not exist in the counterpart database into a duplicate table cannot be duplicated. There are many problems.

한편, 실행 계획(execution plan) 레벨에서 이중화를 수행하는데(ⓑ), 구문 분석 및 정당성 검사와 같은 단계를 거치지 않아 상대 시스템에서의 이중화 적용 성능이 (ⓐ)의 경우보다는 나으나, 트랜잭션 수행 도중에 상대 시스템과 통신 및 간섭이 발생해 시스템의 성능이 떨어져 시스템의 지역성(locality)을 보장하기 어렵고, 실행 계획은 SQL 문이나 로그보다 사이즈가 커서 통신 부하가 큰 문제점이 있다. 디스크에 저장된 로그를 SQL형태로 치환하여 이중화를 하는 것(ⓒ)은 시스템의 지역성을 보장한다는 장점은 있으나, 로그를 조합하여 SQL을 구성하는 비용이 크고 상대 서버에서의 이중화 적용을 위해 질의를 다시 수행하는 비용이 크다.On the other hand, the redundancy is performed at the execution plan level (ⓑ), and the performance of applying redundancy on the counterpart system is lower than that of (ⓐ) because it does not go through steps such as parsing and validity checking. It is difficult to guarantee the locality of the system because the performance of the system is degraded due to communication and interference with the system, and the execution plan is larger in size than the SQL statement or the log. Redundancy by replacing the log stored on disk with SQL type (ⓒ) has the advantage of guaranteeing the locality of the system. However, the cost of constructing SQL by combining logs is high, and the query is re-applied to apply redundancy on the other server. It is expensive to carry out.

또한, 로컬의 데이터베이스(16a)의 변경 로그를 원격의 데이터베이스 서버(10b)로 보내서 이 로그를 이용하여 자료저장관리자 레벨로 처리하여 이중화를 수행하는데(ⓔ), 로컬의 데이터베이스(16a)의 변경 로그 레코드 자체를 원격의 데이터베이스서버(10b)에 전송하여 이 로그를 데이터베이스(16b)에 반영하는 것으로, 마치 데이터베이스 회복 절차와 같은 방식으로 데이터베이스(16a, 16b)를 이중화한다. 그러나 이는 로컬의 데이터베이스(16a)와 원격의 데이터베이스(16b) 모두 논리적인 구조가 같아야 한다는 것이다. 즉, 모든 레코드 식별자(RID)가 양쪽 모두 같아야 하기 때문에 이 것을 유지시키기 위해서는 이중화 방법이 매우 복잡하고, 이중화를 위한 제약 사항이 많으며, 사용하는데 불편한 문제점이 많다. 예를 들어 두 데이터베이스(10a, 10b)간의 이중화에 있어서 동시에 양쪽 데이터베이스(10a, 10b)를 변경하는 것이 어려워, 오로지 로컬의 데이터베이스(10a)의 변경만을 제공하는 경우가 대다수이다. 따라서 이 방법은 대부분 즉 수행-대기(active-standby) 형태로 운영이 가능하다는 문제점이 있다.In addition, the change log of the local database 16a is sent to the remote database server 10b, and the log is processed at the data storage manager level to perform redundancy (ⓔ). The change log of the local database 16a is performed. The record itself is transmitted to the remote database server 10b to reflect this log to the database 16b, and the databases 16a and 16b are duplicated in the same manner as the database recovery procedure. However, this means that both the local database 16a and the remote database 16b must have the same logical structure. That is, since all record identifiers (RIDs) must be the same for both, the duplication method is very complicated, there are many restrictions for duplication, and there are many inconveniences to use. For example, in the redundancy between two databases 10a and 10b, it is difficult to change both databases 10a and 10b at the same time, and in most cases, only a change of the local database 10a is provided. Therefore, this method has a problem in that it can be operated mostly in the form of active-standby.

따라서, 본 발명은 이와 같은 문제점을 해결하기 위한 것으로서, 본 발명은 SQL과 같은 구조의 데이터베이스 이중화 인터페이스를 이용하여 이중화 객체를 정의하고 이 객체를 기본 정보로 하여 이중화를 수행하는데 있어서, 로컬 데이터베이스의 변경 로그를 이중화 레코드로 변경하여 원격 서버에 전송하고 원격 서버는 이 이중화 레코드를 자신의 자료저장관리자가 마치 트랜잭션을 처리하는 것과 같이 이중화를 수행함으로써, 사용의 편리성, 이중화의 성능의 향상, 서버 또는 네트워크의 고장 감지와 대응, 그리고 데이터베이스가 일치성을 갖도록 하는 데이터베이스 이중화 방법을 제공하는데 그 목적이 있다.Accordingly, the present invention is to solve such a problem, the present invention is to change the local database in defining a replication object using a database replication interface of a structure such as SQL, and performing the replication using this object as the basic information Transmit the log to a remote server by converting the log into a redundant record, and the remote server replicates the duplicate record as if its data storage manager handled the transaction, improving the ease of use, improving the performance of the replication, server or Its purpose is to provide database redundancy methods to detect and cope with network failures, and to make databases consistent.

도 1은 일반적인 데이터베이스 이중화 방법의 개념도,1 is a conceptual diagram of a general database redundancy method;

도 2는 본 발명에 따른 데이터베이스 이중화 방법이 적용되는 하드웨어 구성도,2 is a hardware configuration diagram to which a database duplication method according to the present invention is applied;

도 3은 본 발명에 따른 데이터베이스 이중화 방법의 위상을 구현하는 개념도,3 is a conceptual diagram for implementing a topology of a database redundancy method according to the present invention;

도 4는 본 발명에 따른 데이터베이스 이중화 방법을 구현하는 서버간의 데이터베이스 이중화 구조도,4 is a diagram illustrating a database redundancy structure between servers implementing a database redundancy method according to the present invention;

도 5는 본 발명에 따른 데이터베이스 이중화 방법의 사용자 인터페이스 설명도,5 is an explanatory diagram of a user interface of a database redundancy method according to the present invention;

도 6은 본 발명에 따른 데이터베이스 이중화 방법에 사용되는 이중화 객체 구성도,6 is a configuration diagram of a redundant object used in a database duplication method according to the present invention;

도 7은 본 발명에 따른 데이터베이스 이중화 방법을 이용한 이중화에 참여하는 아이템에 관한 구성도,7 is a block diagram of an item participating in the duplication using the database duplication method according to the present invention;

도 8a 내지 도 8c는 본 발명에 따른 데이터베이스 이중화 방법이 적용되는 이중화송신자의 동작 흐름도,8A to 8C are flowcharts illustrating operations of a redundant sender to which a database duplication method according to the present invention is applied;

도 9는 본 발명에 따른 데이터베이스 이중화 방법이 적용되는 이중화수신자의 동작 흐름도.9 is an operation flowchart of a redundant receiver to which a database replication method according to the present invention is applied.

<도면의 주요 부분에 대한 부호의 설명><Explanation of symbols for the main parts of the drawings>

20a, 20b : 컴퓨터 시스템 21a~21n : 프로세서20a, 20b: Computer system 21a-21n: Processor

22 : 메모리 영역 23 : 보조기억장치22: memory area 23: auxiliary storage device

30 : 로컬 데이터베이스 31~33 : 원격 데이터베이스30: local database 31 ~ 33: remote database

40a, 40b : 데이터베이스서버 41a, 41b : 이중화관리자40a, 40b: database server 41a, 41b: replication manager

42a, 42b : 이중화수신자 43a, 43b : 이중화송신자42a, 42b: redundant receiver 43a, 43b: redundant transmitter

이와 같은 목적을 달성하기 위한 본 발명은, 이중화 객체를 생성함에 있어서, 소정 명령을 사용하여 데이터베이스의 이중화 메타 테이블에 이중화 객체 및 이중화에 참여하는 테이블에 대한 정보를 저장하는 단계; 로컬 데이터베이스서버 및 원격 데이터베이스서버의 이중화관리자가 이중화 수행을 위한 조건을 맞추기 위하여 핸드쉐이킹(handshaking)하는 단계; 상기 로컬 데이터베이스서버의 이중화송신자가 데이터베이스 변경 로그를 활용한 고유 로그의 이중화 레코드를 상기 원격 데이터베이스서버로 전송하는 단계; 상기 원격 데이터베이스서버의 이중화수신자가이중화관리자의 트랜잭션 처리 기법으로 전달받은 상기 고유 로그를 자신의 데이터베이스에 반영하는 단계; 이중화 수행 도중에 시스템 또는 상기 로컬 데이터베이스서버 또는 상기 원격 데이터베이스서버의 고장(down) 및 네트워크의 단절을 감지하고 이에 대응하는 단계; 및 고장이 복구된 후, 반영하지 못한 이중화 내용을 상대편 데이터베이스에 자동으로 반영하는 단계를 포함하는데 있다.In order to achieve the above object, the present invention provides a method for generating a duplicate object, the method comprising: storing information about a duplicate object and a table participating in the duplicate in a duplicate meta table of a database using a predetermined command; Handshaking by a duplication manager of a local database server and a remote database server to meet a condition for performing duplication; Transmitting, by the replication sender of the local database server, a replication record of a unique log using a database change log to the remote database server; Reflecting the unique log received by the redundant receiver of the remote database server through the transaction processing technique of the redundant administrator in its database; Detecting and responding to a failure of the system or the local database server or the remote database server and disconnection of the network during the redundancy; And automatically reflecting the duplicated contents that could not be reflected in the opposite database after the failure is recovered.

바람직하게, 상기 소정 명령은 SQL과 유사한 구조를 갖는 명령임을 특징으로 한다.Preferably, the predetermined command is a command having a structure similar to SQL.

바람직하게, 상기 핸드쉐이킹 단계는 로컬 데이터베이스서버의 이중화관리자가 원격 데이터베이스서버의 이중화관리자와 연결을 수행하고 서로 간의 이중화 제약 조건을 확인함으로써 이중화 준비를 마치는 단계임을 특징으로 한다.Preferably, the handshaking step is characterized in that the replication manager of the local database server to complete the replication preparation by performing a connection with the replication manager of the remote database server and confirm the replication constraints between each other.

바람직하게, 상기 고유 로그는 이중화 로그인 XLOG임을 특징으로 한다.Preferably, the unique log is characterized in that the redundant login XLOG.

본 발명의 다른 특징은, 로컬 데이터베이스를 원격 데이터베이스에 실시간으로 복제하는 이중화 방법에 있어서, 데이터베이스 이중화를 정의 및 운용하는데 소정 명령의 사용자 인터페이스를 제공하는 단계; 이중화 객체를 도입하여 이중화에 대한 정보를 상기 로컬 데이터베이스 또는 상기 원격 데이터베이스에 저장하여 운영 관리하는 단계; 정상 트랜잭션과 이중화 트랜잭션의 동시성을 위하여 이중화 트랜잭션 테이블을 유지하는 단계; 전송할 이중화 데이터를 최소화하기 위하여 데이터베이스 로그를 활용, 고유 로그의 이중화 로그를 만드는 단계; 통신 속도 향상을 위하여 검색 트랜잭션은 제거하고 데이터베이스 변경 로그를 포함하는 트랜잭션만 상대 데이터베이스서버에 전송하는 단계; 및 서버 또는 네트워크 고장으로부터 이중화 데이터베이스간의 일치성을 보장하기 위하여, 이중화 재시작 위치를 설정하는 단계를 포함하는데 있다.Another aspect of the invention is a duplication method for replicating a local database to a remote database in real time, comprising: providing a user interface of a predetermined command to define and operate database duplication; Introducing a redundancy object to store information on redundancy in the local database or the remote database for operation management; Maintaining a duplicate transaction table for concurrency of normal and duplicate transactions; Creating a redundant log of a unique log by using a database log to minimize redundant data to be transmitted; Removing a search transaction and transmitting only a transaction including a database change log to a counterpart database server to improve communication speed; And setting a redundancy restart position to ensure consistency between the redundant databases from server or network failure.

바람직하게, 상기 소정 명령은 SQL 문장 형태의 명령임을 특징으로 한다.Preferably, the predetermined command is characterized in that the command of the SQL statement form.

바람직하게, 상기 고유 로그는 XLOG임을 특징으로 한다.Preferably, the unique log is characterized in that the XLOG.

본 발명의 또 다른 특징은, 이중화관리자에 의해서 생성된 이중화송신자는 우선 상대 데이터베이스서버의 이중화수신자와 연결을 시도하는 단계; 연결이 실패하면 이중화 종료 요구가 있는지를 검토하고, 종료 요구가 없으면 다시 상대 수신자와 연결을 시도하고, 종료 요구가 있으면 상기 이중화송신자와의 연결 시도를 종료하는 단계; 상대 이중화수신자와 연결되면 상기 이중화송신자는 이중화에 참여하는 테이블들의 정보를 상대 이중화수신자에게 전송하고, 상대편으로부터 이중화 제약 조건 검사 결과를 전달받아 이것이 성공하였는지를 검사하는 단계; 이중화 제약 조건이 성공하면 이중화테이블의 어디서에서부터 이중화를 시작할 것인지 이중화 시작점을 조정하여 그 위치를 해당 이중화객체에 저장하고, 이중화 데이터를 송신할 준비를 마치는 단계; 사용자 데이터베이스서버 또는 상대 데이터베이스서버로부터 이중화 종료 요구가 있는지를 검사하여, 이중화 종료 요구가 있으면 이중화송신을 종료하는 단계; 상기 이중화 종료 요구 단계에서 이중화 종료 요구가 없을 때, 이중화 LSN이 상기 사용자 데이터베이스서버의 현재 LSN과 동일한 값이면, 이중화 버퍼가 비었는지를 조사하여 비었으면 다시 이중화 데이터 송신부의 처음 위치로 이동하는 단계; 반면에 XLSN이 LSN과 같다면, 데이터베이스 로그에서 XLSN 위치의 로그레코드를 획득한 후 XLSN 값을 증가시키는 단계; 및 획득한 로그레코드가 데이터 변경 또는 트랜잭션 제어 로그가 아니면, 상기 이중화 데이터 송신부의 처음 위치로 이동하고, 데이터 변경 또는 트랜잭션 제어 로그이면 로그 유형에 따라 처리하는 단계를 포함하는데 있다.Another feature of the present invention, the redundant sender generated by the replication manager first attempts to connect with the replication receiver of the counterpart database server; Examining whether there is a duplication termination request if the connection fails, if there is no termination request, attempting to connect with the other party again, and terminating the connection attempt with the duplex sender if there is a termination request; If connected to a counterpart redundant receiver, the duplex sender transmits information of tables participating in the duplication to the counterpart duplex receiver, and receives a result of a duplicate constraint check from the counterpart to check whether the counterpart is successful; Adjusting the redundancy starting point from where in the redundancy table to start redundancy if the redundancy constraint is successful, storing the position in the redundancy object, and preparing to transmit redundancy data; Checking whether there is a duplication termination request from the user database server or the counterpart database server, and terminating the duplication transmission if there is a duplication termination request; When there is no duplication termination request in the duplication termination request step, if the duplication LSN is equal to the current LSN of the user database server, checking whether the duplication buffer is empty and moving back to the initial position of the duplication data transmission unit if the duplication buffer is empty; On the other hand, if the XLSN is equal to the LSN, increasing the XLSN value after obtaining a log record of the XLSN position in the database log; And if the obtained log record is not a data change or transaction control log, moves to the initial position of the redundant data transmitter, and processes the data according to a log type if the data change or transaction control log is used.

바람직하게, 상기 로그 유형에 따라 처리하는 단계는 로그레코드의 타입이 트랜잭션 시작 로그이면 이중화 트랜잭션 테이블에 트랜잭션을 등록하고 상기 이중화 데이터 송신부의 처음 위치로 이동하는 단계; 로그레코드의 타입이 삭제, 삽입, 또는 수정에 관련된 변경 로그이면, 이중화 대상 로그인지를 판단하여 이중화 대상 로그이면 상기 이중화 대상 로그에 해당하는 상기 트랜잭션이 이중화 테이블에 존재하는지를 검사하는 단계; 상기 트랜잭션이 이중화 트랜잭션 테이블에 존재하지 않으면 이중화 종료를 요구하는 단계로 이동하고, 존재하면 현재의 변경 로그가 상기 트랜잭션의 처음에 나타난 것인지를 판단하는 단계; 상기 트랜잭션이 처음을 나타낸다면 처음임을 표시하고 트랜잭션 시작 로그 XLOG 구조로 변환하여 이중화 버퍼에 저장하고, 변경 로그를 XLOG 구조로 변환하여 상기 이중화 버퍼에 저장하는 단계; 획득한 변경 로그가 상기 트랜잭션의 처음에 나타난 것이 아니면 곧바로 상기 변경 로그를 XLOG 구조로 변환하여 상기 이중화 버퍼에 저장하고 상기 이중화 데이터 송신부의 처음 위치로 이동하는 단계; 로그레코드의 타입이 트랜잭션 종료 로그이면 상기 트랜잭션 종료 로그에 해당하는 상기 트랜잭션이 이중화 트랜잭션 테이블에 존재하는지, 그리고 상기 트랜잭션에 데이터 변경이 발생했었는지를 검사하는 단계; 상기 트랜잭션에 데이터 변경이 발생했으면 종료 로그를 상기 이중화 버퍼에 저장하고 XLSN을 이중화 위치로 조정한 다음, 해당 트랜잭션을 이중화 트랜잭션 테이블로부터 제거하는 단계; 해당 트랜잭션이 이중화 트랜잭션 테이블에서 제거되면 상기 이중화 데이터 송신부의 처음위치로 이동하고, 종료 로그에 해당하는 상기 트랜잭션에서 변경 로그가 한번도 발생하지 않았다면 상기 트랜잭션은 검색 트랜잭션이므로 이중화 테이블에서 상기 트랜잭션을 제거하고 상기 이중화 데이터 송신부의 처음으로 이동하는 단계; XLOG를 상기 이중화 버퍼에 넣기 전에 반드시 상기 이중화 버퍼가 찼는지를 검사하고, 상기 이중화 버퍼가 찼으면 상기 이중화 버퍼의 내용 전체를 상대 서버에게 전송하는 단계; 상기 이중화 버퍼의 내용 전체가 상대 서버에 전송된 후에 이중화 트랜잭션 테이블에 상기 트랜잭션이 남아있으면 이중화의 재시작 위치를 조정하고, 하나도 없으면 XLSN 값을 이중화 재시작 위치로 설정하는 단계; 및 이중화 트랜잭션 테이블에 상기 트랜잭션이 남아있어서, 전송된 트랜잭션 중 완료되지 않은 트랜잭션이 남아 있으면 서버 또는 네트워크 고장으로 더 이상 이중화를 할 수 없는 경우에 고장을 회복한 후, 상기 트랜잭션을 처음부터 다시 상대 서버로 재 전송함으로써 데이터베이스간의 일치성을 보장해 주기 위한 단계를 더 포함하는데 있다.Preferably, the processing according to the log type may include registering a transaction in a redundant transaction table and moving to a first position of the redundant data transmitter if a log record type is a transaction start log; If the log type is a change log related to deletion, insertion, or modification, determining whether to log in a replication target and checking whether a transaction corresponding to the replication target log exists in a replication table if it is a replication target log; If the transaction does not exist in the replication transaction table, moving to requesting termination of the replication, and if present, determining whether a current change log appears at the beginning of the transaction; Indicating that the transaction is the first if the transaction is first, converting the transaction start log into an XLOG structure, and storing the transaction in a duplication buffer; If the obtained change log does not appear at the beginning of the transaction, converting the change log into an XLOG structure and storing the change log in the redundant buffer and moving to the initial position of the redundant data transmitter; If the type of log record is a transaction termination log, checking whether the transaction corresponding to the transaction termination log exists in a redundant transaction table and whether a data change occurred in the transaction; If a data change occurs in the transaction, storing a termination log in the duplication buffer, adjusting the XLSN to a duplication position, and then removing the transaction from the duplication transaction table; If the transaction is removed from the replication transaction table, the transaction is moved to the initial position of the replication data transmission unit. If no change log occurs in the transaction corresponding to the termination log, the transaction is a search transaction and thus the transaction is removed from the replication table. Moving to the beginning of the redundant data transmitter; Checking whether the redundancy buffer is full before putting XLOG into the redundancy buffer, and if the redundancy buffer is full, transmitting the entire contents of the redundancy buffer to the counterpart server; Adjusting the restart position of the duplication if the transaction remains in the duplication transaction table after the entire contents of the duplication buffer is transmitted to the counterpart server, and if none, setting the XLSN value to the duplication restart position; And if the transaction remains in the redundant transaction table, and if an incomplete transaction remains among the transmitted transactions, the server may recover from the failure if the replication is no longer possible due to a server or network failure, and then restart the transaction again from the beginning. It further includes a step for ensuring consistency between databases by retransmitting.

본 발명의 또 다른 특징은, 이중화관리자에 의해서 생성된 이중화수신자는 상대 데이터베이스서버의 이중화송신자와 통신이 정상 상태인지를 검사하는 단계; 상기 단계에서 통신 상태가 정상이 아니면, 이중화 트랜잭션 테이블을 확인하여 남아 있는 모든 트랜잭션을 철회하고 이중화 수신 작업을 종료하는 단계; 상기 이중화 수신 작업 종료 단계에서 이중화 테이블에 남아 있는 트랜잭션은 완료되지 않은 트랜잭션이므로 철회하는 단계; 및 통신 상태가 정상이면 상대 데이터베이스서버로부터 이중화로그를 수신하고, 이중화 버퍼가 빈 상태인지를 검사하여 비어 있으면 다시 이중화 로그를 수신하기 위한 상태로 되돌아가고, 빈 상태가 아니면 상기 이중화 버퍼로부터 상기 이중화로그를 읽어서 각각의 이중화로그 타입에 따라 처리하는 단계를 포함하는데 있다.Another feature of the present invention, the duplication receiver generated by the duplication manager to check whether the communication with the duplex sender of the counterpart database server is in a normal state; If the communication state is not normal in the step, checking the duplication transaction table to withdraw all remaining transactions and ending the duplication reception operation; Withdrawing the transaction remaining in the replication table at the end of the replication reception operation because it is not completed; And if the communication state is normal, receiving the replication log from the counterpart database server, checking whether the replication buffer is empty, and if it is empty, returns to receiving the replication log again, and if not, returns the replication log from the replication buffer. It reads and processes according to each replication log type.

바람직하게, 상기 이중화로그 타입에 따라 처리하는 단계는, 상기 이중화로그의 타입이 트랜잭션 시작 로그이면 상기 트랜잭션을 시작시키고, 이중화 트랜잭션 테이블에 상기 트랜잭션을 등록하는 단계; 상기 이중화로그의 타입이 삽입, 갱신, 또는 삭제 로그이면 이중화 트랜잭션 테이블에서 해당 트랜잭션을 검색하여 각 로그 타입에 따라 데이터베이스에 반영하는 단계; 및 상기 이중화로그의 타입이 트랜잭션 종료 로그이면 상기 트랜잭션을 종료시키고 이중화 트랜잭션 테이블로부터 해당 트랜잭션을 제거하는 단계를 더 포함하는데 있다.Preferably, the processing according to the replication log type includes: starting the transaction if the type of the replication log is a transaction start log, and registering the transaction in a replication transaction table; If the type of the duplication log is an insert, update, or delete log, searching for a corresponding transaction in a duplication transaction table and reflecting the corresponding transaction in a database according to each log type; And if the type of the replication log is a transaction termination log, terminating the transaction and removing the transaction from the replication transaction table.

이하 첨부된 도면에 의해 본 발명의 구성 및 작용을 상세히 설명하기로 한다.Hereinafter, the configuration and operation of the present invention will be described in detail with reference to the accompanying drawings.

도 2는 본 발명에 따른 데이터베이스 이중화 방법이 적용되는 하드웨어 구성도로서, 다수의 프로세서(21a 내지 21n), 주기억장치의 메모리영역(22), 보조기억장치(23)로 구성된 하나의 컴퓨터시스템(20a)과 이 컴퓨터시스템(20a)과 유사한 1 개 이상의 컴퓨터시스템(20b)들이 네트워크로 연결된 일반적인 하드웨어 환경에서 작동이 가능하다.FIG. 2 is a hardware configuration diagram to which a database duplication method according to the present invention is applied and includes a single computer system 20a including a plurality of processors 21a to 21n, a memory area 22 of a main memory device, and a secondary memory device 23. As shown in FIG. ) And one or more computer systems 20b similar to this computer system 20a are capable of operating in a networked general hardware environment.

도 3은 본 발명에 따른 데이터베이스 이중화 방법의 이중화 위상(topology)을 나타낸 개념도이다.3 is a conceptual diagram illustrating a replication topology of a database replication method according to the present invention.

도 3에 있어서, 본 발명은 기본적으로 수행-수행(active-active) 형태로 데이터베이스(30 내지 33)를 이중화한다. 로컬 데이터베이스(30 : DB-1)는 여러 원격 데이터베이스(31 : DB-2, 32 : DB-3, 33 : DB-4)로 복제할 수 있으며, 동시에 여러 원격 데이터베이스(31 : DB-2, 32 : DB-3, 33 : DB-4)의 변경 내용을 로컬 데이터베이스(30 : DB-1)에 반영할 수 있다. 즉, 본 발명은 로컬 데이터베이스(30 : DB-1)와 원격 데이터베이스(31 : DB-2, 32 : DB-3, 33 : DB-4) 간의 이중화를 N:M으로 지원함으로써, 망(network) 형태의 데이터베이스 이중화를 제공한다.In Fig. 3, the present invention basically duplicates the databases 30 to 33 in an active-active form. Local database (30: DB-1) can be replicated to multiple remote databases (31: DB-2, 32: DB-3, 33: DB-4), and multiple remote databases (31: DB-2, 32 at the same time). : DB-3, 33: DB-4) can be reflected to the local database (30: DB-1). That is, the present invention supports N: M redundancy between a local database (30: DB-1) and a remote database (31: DB-2, 32: DB-3, 33: DB-4). Provides form of database redundancy.

도 4는 본 발명에 따른 데이터베이스 이중화 방법을 구현하는 서버간의 데이터베이스 이중화 구조도이다.4 is a diagram illustrating a database redundancy structure between servers implementing a database redundancy method according to the present invention.

도 4에 있어서, 이중화관리자(41a, 41b)는 자신의 데이터베이스서버(40a 또는 40b)가 이중화할 수 있도록 준비하는 일과 원격 데이터베이스서버(40b 또는 40a)와 이중화를 수행할 수 있도록 연결하는 일을 수행한다. 이중화송신자(43a, 43b)는 변경 로그를 XLOG로 변환하여 원격 데이터베이스서버(40b 또는 40a)로 전송하는 역할을 담당하고 이중화수신자(42a, 42b)는 상대 데이터베이스서버(40a 또는 40b)로부터 전송받은 XLOG를 자신의 데이터베이스에 반영하는 역할을 담당한다. 이들 이중화송신자(43a, 43b)와 이중화수신자(42a, 42b)는 수행중인 이중화 객체 수 만큼 생성되고 특정 이중화가 중지되면 해당하는 이중화수신자(42a, 42b) 및 이중화송신자(43a, 43b)는 소멸된다.In FIG. 4, the redundancy managers 41a and 41b prepare to allow their database server 40a or 40b to duplicate and connect to the remote database server 40b or 40a to perform redundancy. do. The redundant sender 43a, 43b converts the change log into XLOG and transmits it to the remote database server 40b or 40a. The redundant receiver 42a, 42b receives the XLOG received from the counterpart database server 40a or 40b. It is responsible for reflecting the data in its own database. These duplicated senders 43a and 43b and duplicated receivers 42a and 42b are generated as many as the number of duplicated objects in operation, and the corresponding duplicated receivers 42a and 42b and the duplicated senders 43a and 43b are destroyed when specific duplication is stopped. .

도 5는 본 발명에 따른 데이터베이스 이중화 방법의 사용자 인터페이스 설명도이다.5 is an explanatory diagram of a user interface of a database redundancy method according to the present invention.

도 5에 있어서, 본 발명의 데이터베이스 이중화를 수행하기 위한 사용자 인터페이스가 제공하는 기능으로는 이중화 객체의 생성(S50) 및 삭제(S51), 이중화의 시작(S52) 및 정지(S53), 이중화 테이블의 복사(S54), 이중화의 빠른 시작(S55) 등이다. 이들 인터페이스 규격은 도 3에 도시된 데이터베이스(30 내지 33)의 표준 질의어인 SQL 형태를 따르고 있어서, 데이터베이스 사용자에게 매우 친숙할 뿐만 아니라, 사용이 편리하다. 각각의 기능에 대하여 설명하면 다음과 같다.5, the functions provided by the user interface for performing database replication of the present invention include creation (S50) and deletion (S51) of replication objects, start (S52) and stop (S53) of replication, and replication table. Copy (S54), quick start of redundancy (S55) and the like. These interface specifications follow the SQL form, which is the standard query language of the databases 30 to 33 shown in Fig. 3, so that they are not only very familiar to database users, but also convenient to use. Each function will be described as follows.

사용자는 이중화 작업을 수행하기에 앞서 먼저 이중화 객체를 정의하여야 한다. 이중화의 기본 단위는 테이블이다. 이중화 객체는 로컬 데이터베이스(30)의 어느 테이블들이 원격 데이터베이스(31 내지 33)의 어느 테이블로 이중화되는 지에 대한 정보를 정의하는 것으로서, (S50)과 같은 문장을 사용한다. 여기에서rep1은 이중화 객체의 이름이고,remotehostportno는 원격 서버의 IP 주소와 포트번호를 나타낸다.localtableA는 로컬 데이터베이스(30)의 이중화 대상 테이블 이름이고localtableB는 원격 데이터베이스(31 내지 33)의 이중화 대상 테이블이다. 하나의 이중화 객체는 여러 개의 테이블을 포함할 수 있고 로컬 데이터베이스(30)의 각 테이블은 원격 데이터베이스(31 내지 33)의 테이블과 1:1 대응 관계를 갖는다. 또한 한 데이터베이스에는 여러 개의 이중화 객체를 정의할 수 있다.The user must first define a replication object before performing the replication task. The basic unit of redundancy is a table. The replication object defines information about which tables of the local database 30 are duplicated to which tables of the remote databases 31 to 33, and uses a statement such as (S50). Where rep1 is the name of the replication object and remotehost and portno are the IP address and port number of the remote server. localtableA is a replication target table name of the local database 30 and localtableB is a replication target table of the remote databases 31 to 33. One redundant object may include several tables and each table of the local database 30 has a 1: 1 correspondence with the tables of the remote databases 31 to 33. You can also define multiple replication objects in one database.

도 6은 데이터베이스에 저장되는 이중화 객체들을 표현한 것이며, 도 7은 각각의 이중화 객체에 포함된 테이블들에 관한 정보를 표현한 것이다. 이것들은 본 발명의 기본 원리와는 직접적인 관련성이 적으므로 자세한 설명은 생략한다.FIG. 6 illustrates redundant objects stored in a database, and FIG. 7 illustrates information about tables included in each redundant object. These are not directly related to the basic principle of the present invention, so detailed description thereof will be omitted.

이중화 객체를 생성하는 인터페이스가 있다면, 이중화 객체를 삭제하는 사용자 인터페이스도 필요하다. 본 발명은 drop replication 명령을 통하여 생성된 이중화 객체를 삭제한다(S51).이 명령을 수행하면 데이터베이스(30 내지 33)의 메타 테이블에 저장되어 있는 해당 이중화 객체를 제거한다. 예를 들어,rep1이라는 이중화 객체를 삭제하였다면, 도 6의 메타테이블에서 rep1이라는 객체(레코드)와 도 7의 메타테이블에서rep1에 해당하는 모든 객체를 제거한다.If you have an interface for creating duplicate objects, you also need a user interface to delete duplicate objects. The present invention deletes the duplicated object created through the drop replication command (S51). When the command is executed, the duplicated object stored in the meta tables of the databases 30 to 33 is removed. For example, if a duplicate object called rep1 is deleted, an object called rep1 (record) in the metatable of FIG. 6 and all objects corresponding to rep1 in the metatable of FIG. 7 are removed.

데이터베이스 이중화를 정의한 후, 이중화를 수행하려면 'alter replicationrep1start' 인터페이스(S52)를 사용한다. 그러면 이중화 객체rep1에 포함된 테이블들이 원격 데이터베이스(31 내지 33)의 대응하는 테이블에 복제가 진행된다. 로컬 데이터베이스(30)에 여러 개의 이중화 객체가 정의되어 있고 이 것들을 모두 이중화시키기 위해서는 (S52)과 같은 방법으로 각각의 이중화 객체에 대하여 이중화 시작 명령을 수행해야 한다. 진행되던 이중화를 중지하기 위해서는 'alter replicationrep1stop' 명령(S53)을 사용하고, 원하는 이중화를 중지하기 위해서는 각각의 이중화 객체에 대하여 이중화 정지 명령을 수행해야 한다.After defining database replication, use the 'alter replication rep1 start' interface (S52) to perform replication. Then, the tables included in the replication object rep1 are replicated to the corresponding tables in the remote databases 31 to 33. Several replication objects are defined in the local database 30, and in order to duplicate all of them, a replication start command should be performed for each replication object in the same manner as in S52. To stop the replication in progress, use 'alter replication rep1 stop' command (S53), and to stop the desired replication, execute the replication stop command for each replication object.

이중화 관계에 있는 로컬 데이터베이스(30)의 테이블 전체 내용을 원격 데이터베이스(31 내지 33)에 복사하기 위해서는 'alter replicationrep1sync' 명령(S54)을 이용한다. 데이터베이스서버(40a, 40b)들이 시작(startup) 되었을 때, 이전에 원격 데이터베이스(31 내지 33)로 이중화되지 않은 내용이 있다 하더라도, 지금부터 바뀐 내용부터 이중화시키고자 할 때에는 'alter replicationrep1quickstart' 명령을 사용한다.The 'alter replication rep1 sync' command S54 is used to copy the entire contents of the table of the local database 30 in the replication relationship to the remote databases 31 to 33. When the database servers 40a and 40b are started, even if they have not been duplicated to the remote databases 31 to 33 previously, if you want to duplicate the changed contents from now on, the 'alter replication rep1 quickstart' command Use

이하 본 발명의 이중화 동작 방법을 자세히 설명한다. 본 설명에서는 2개의데이터베이스(30, 31) 간에 이중화를 수행하며 각각의 데이터베이스에는 이중화 객체가 1개 정의되었다고 가정한다.Hereinafter, a duplication operation method of the present invention will be described in detail. In this description, it is assumed that duplication is performed between two databases 30 and 31, and one duplication object is defined in each database.

이중화관리자(41a, 41b)의 동작 방법을 살펴보면, 데이터베이스서버(40a, 40b)의 구동이 시작될 때(startup), 이중화관리자(41a, 41b)는 이중화 메타테이블로부터 활성화될 이중화 객체를 찾아내어 이중화 객체에 대한 이중화송신자(43a, 43b)를 생성하고 자신의 데이터베이스서버(40a 또는 40b)가 이중화를 수행할 준비가 되어 있음을 상대 데이터베이스서버(40b 또는 40a)에게 알려준다. 또한 상대 데이터베이스서버(40b 또는 40a)로부터 이중화 요청을 대기하여 만일 이중화 요청이 있으면 이중화수신자(42a, 42b)를 생성한다. 만일 사용자가 이중화 실행을 중지하면, 이중화관리자(41a, 41b)는 해당 이중화송신자(43a, 43b)를 소멸시킨다.Looking at the operation of the replication manager (41a, 41b), when the startup of the database server (40a, 40b) (startup), the replication manager (41a, 41b) finds the replication object to be activated from the replication metatable to find the replication object Create a duplicate sender (43a, 43b) for and tells the other database server (40b or 40a) that its database server (40a or 40b) is ready to perform the replication. In addition, by waiting for a replication request from the counterpart database server 40b or 40a, if there is a replication request, the replication receivers 42a and 42b are generated. If the user stops the redundancy, the redundancy managers 41a and 41b destroy the redundancy transmitters 43a and 43b.

이중화송신자(43a, 43b)의 동작 방법은 도 8a 내지 도 8c과 함께 설명하도록 한다.The operation method of the redundant transmitters 43a and 43b will be described with reference to FIGS. 8A to 8C.

이중화관리자(41a, 41b)에 의해서 생성된 이중화송신자(43a, 43b)는 우선 상대 데이터베이스서버(40a 또는 40b)의 이중화수신자(42a 또는 42b)와 연결을 시도하여(단계 S101, 단계 S102), 연결이 실패하면 이중화 종료 요구가 있는지를 검토하고(단계 S134) 종료 요구가 없으면 다시 상대 수신자와 연결을 시도한다(단계 S102). 종료 요구가 있으면 이중화송신자(43a, 43b)와의 연결 시도를 종료한다. 상대 이중화수신자(42b 또는 42a)와 연결되면 이중화송신자(43a, 43b)는 이중화에 참여하는 테이블들의 정보를 상대 이중화수신자(42b 또는 42a)에게 전송하고, 상대편으로부터 이중화 제약 조건 검사 결과를 전달받아 성공하였는지를 검사한다(단계S103). 이중화 제약 조건이 실패하면 송신자는 종료된다.The duplication transmitters 43a and 43b generated by the duplication managers 41a and 41b first attempt to connect with the duplication receivers 42a or 42b of the partner database server 40a or 40b (steps S101 and S102). If this fails, it examines whether there is a duplicate termination request (step S134), and if there is no termination request, attempts to connect with the partner receiver again (step S102). If there is a termination request, the connection attempt with the redundant transmitters 43a and 43b ends. When connected to the other redundant receiver 42b or 42a, the redundant transmitter 43a, 43b transmits the information of the tables participating in the replication to the other redundant receiver 42b or 42a, and receives the result of the duplicate constraint check from the other party. It is checked whether it has been done (step S103). If the redundancy constraint fails, the sender terminates.

S103 단계에서 성공하면 이중화테이블의 어디서에서부터 이중화를 시작할 것인지 이중화 시작점을 조정하여 그 위치를 해당 이중화객체에 저장함으로써(단계 S104) 이중화 데이터를 송신할 준비 과정을 마친다.If it succeeds in step S103, the process of preparing to transmit the duplicated data is completed by adjusting the redundancy starting point from which to start the redundancy table and storing the position in the duplicated object (step S104).

다음, 사용자 데이터베이스서버 또는 상대 데이터베이스서버(40a 또는 40b)로부터 이중화 종료 요구가 있는지를 검사하여(단계 S105) 요구가 있으면 이중화송신을 종료한다. 이중화 종료 요구가 없으면 이중화 LSN(XLSN, LSN:log sequence number)이 데이터베이스서버(40a 또는 40b)의 현재(current) LSN과 동일한 값이면(단계 S107), 이중화 버퍼(도시되지 않음)가 비었는지를 조사하여(단계 S106) 비었으면 다시 이중화 데이터 송신부(도시되지 않음)의 처음 위치(단계 S105)로 이동한다. 반면에 XLSN이 LSN과 같지 않다면, 데이터베이스 로그에서 XLSN 위치의 로그레코드를 획득한 후 XLSN 값을 증가시킨다(단계 S108).Next, it is checked whether there is a duplication termination request from the user database server or the counterpart database server 40a or 40b (step S105), and the duplication transmission is terminated when there is a request. If there is no replication termination request, if the replication LSN (XLSN, log sequence number) is the same value as the current LSN of the database server 40a or 40b (step S107), the replication buffer (not shown) is empty. If it checks (step S106) and it is empty, it moves to the initial position (step S105) of a redundant data transmitter (not shown) again. On the other hand, if the XLSN is not equal to the LSN, the XLSN value is increased after acquiring the log record of the XLSN position in the database log (step S108).

획득한 로그레코드가 데이터 변경 또는 트랜잭션 제어 로그가 아니면(단계 S109), 이중화 데이터 송신부의 처음 위치(단계 S105)로 이동하고, 데이터 변경 또는 트랜잭션 제어 로그이면 로그 유형에 따라 다음과 같이 처리한다. 로그레코드의 타입이 트랜잭션 시작 로그이면(단계 S110) 이중화 트랜잭션 테이블에 트랜잭션을 등록하고(단계 S114), 이중화 데이터 송신부의 처음 위치(단계 S105)로 이동한다.If the acquired log record is not a data change or transaction control log (step S109), the controller moves to the initial position of the redundant data transmitter (step S105), and if the data change or transaction control log is processed as follows according to the log type. If the log record type is a transaction start log (step S110), the transaction is registered in the redundant transaction table (step S114), and the procedure moves to the initial position of the redundant data transmitter (step S105).

로그레코드의 타입이 삭제, 삽입, 또는 수정에 관련된 변경 로그이면(단계 S113), 이중화 대상 로그인지를 판단하여(단계 S121) 이중화 대상 로그가 아니면 S105 단계로 이동하고 이중화 대상 로그이면 이중화 로그에 해당하는 트랜잭션이이중화 테이블에 존재하는지를 검사한다(단계 S122). 존재하지 않으면 S105 단계로 이동하고 존재하면 현재의 변경 로그가 트랜잭션의 처음에 나타난 것인지를 판단하여(단계 S123) 그러하다면 처음임을 표시하고(단계 S126) 트랜잭션 시작 로그 XLOG 구조로 변환하여 이중화 버퍼에 저장하고(단계 S128) 변경 로그를 XLOG 구조로 변환하여 이중화 버퍼에 저장한다(단계 S125). 획득한 변경 로그가 트랜잭션의 처음에 나타난 것이 아니면 곧바로 변경 로그를 XLOG 구조로 변환하여 이중화 버퍼에 저장한다(단계 S125). 그런 다음 이중화 데이터 송신부의 처음 위치(단계 S105)로 이동한다.If the log record type is a change log related to deletion, insertion, or modification (step S113), it is determined whether the target log is a replication target (step S121). If the log record is not a replication target log, the process moves to step S105. It is checked whether a transaction exists in the redundancy table (step S122). If it does not exist, go to step S105. If present, determine whether the current change log appears at the beginning of the transaction (step S123). If so, indicate that it is the first one (step S126), and convert it to a transaction start log XLOG structure and store it in the redundant buffer. The change log is converted into an XLOG structure and stored in a redundant buffer (step S125). If the acquired change log does not appear at the beginning of the transaction, the change log is immediately converted into an XLOG structure and stored in a redundant buffer (step S125). Then, it moves to the initial position (step S105) of a redundant data transmission part.

로그레코드의 타입이 트랜잭션 종료 로그이면 트랜잭션 종료 로그에 해당하는 트랜잭션이 이중화 트랜잭션 테이블에 존재하는지(단계 S115) 그리고 트랜잭션에 데이터 변경이 발생했었는지를 검사한다(단계 S116). 그러하다면 종료 로그를 이중화 버퍼에 저장하고 XLSN을 이중화 위치로 조정한 다음, 해당 트랜잭션을 이중화 트랜잭션 테이블로부터 제거한다(단계 S120). 그런 다음 이중화 데이터 송신부의 처음위치로 이동한다. 만약 S116 단계에서 종료 로그에 해당하는 트랜잭션에서 변경 로그가 한번도 발생하지 않았다면, 트랜잭션은 검색 트랜잭션이므로 이중화 테이블에서 트랜잭션을 제거하고(단계 S120), 이중화 데이터 송신부의 처음으로 이동한다.If the type of log record is a transaction termination log, it is checked whether a transaction corresponding to the transaction termination log exists in the redundant transaction table (step S115) and whether a data change has occurred in the transaction (step S116). If so, the end log is stored in the duplication buffer, the XLSN is adjusted to the duplication position, and the corresponding transaction is removed from the duplication transaction table (step S120). Then it moves to the beginning of the redundant data transmitter. If the change log has never occurred in the transaction corresponding to the end log in step S116, the transaction is a search transaction and thus removes the transaction from the duplicated table (step S120), and moves to the beginning of the duplicated data transmitter.

XLOG를 이중화 버퍼에 넣기 전에 반드시 이중화 버퍼가 찼는지를 검사한다(단계 S117, 단계 S124, 단계 S127). 이중화 버퍼가 찼으면 이중화 버퍼 내용 전체를 상대 데이터베이스서버(40a, 40b)에게 전송하고(단계 S129), 그런 다음 이중화트랜잭션 테이블에 트랜잭션이 남아있으면 이중화의 재시작 위치를 조정하고(단계 S131, 단계 S132), 하나도 없으면 XLSN 값을 이중화 재시작 위치로 설정한다(단계 S133). 이중화 트랜잭션 테이블에 트랜잭션이 남아있다는 것은 전송된 트랜잭션 중 완료되지 않은 트랜잭션이 남아 있다는 것이다.Before putting the XLOG into the duplication buffer, it is always checked whether the duplication buffer is full (step S117, step S124, step S127). If the redundancy buffer is full, the entire contents of the redundancy buffer are transferred to the counterpart database servers 40a and 40b (step S129). Then, if a transaction remains in the redundancy transaction table, the restart position of the redundancy is adjusted (step S131, step S132). If none, the XLSN value is set to the redundancy restart position (step S133). Remaining transactions in the redundant transaction table means that incomplete transactions remain among the transmitted transactions.

이 상황에서 데이터베이스서버(40a, 40b) 또는 네트워크 고장으로 더 이상 이중화를 할 수 없는 경우에는 고장 회복 후, 트랜잭션을 처음부터 다시 상대 데이터베이스서버(40b, 40a)로 재 전송함으로써 데이터베이스(30 내지 33)간의 일치성을 보장해 주기 위한 것이다.In this situation, if the database server 40a or 40b can no longer be duplicated due to a network failure, after recovering from the failure, the database 30 to 33 is retransmitted from the beginning to the counterpart database servers 40b and 40a. This is to ensure the consistency between the two.

이중화수신자(42a, 42b)의 동작 방법은 도 9와 함께 설명하도록 한다.An operation method of the redundant receivers 42a and 42b will be described with reference to FIG. 9.

이중화관리자(41a, 41b)에 의해서 생성된 이중화수신자(42a, 42b)는 상대 데이터베이스서버(40b 또는 40a)의 이중화송신자(43b, 43a)와 통신이 정상 상태인지를 검사한다(단계 S201). 만일 통신 상태가 정상이 아니면, 이중화 트랜잭션 테이블을 확인하여(단계 S205) 남아 있는 모든 트랜잭션을 철회(rollback)하고(단계 S206, 단계 S207) 이중화 수신 작업을 종료한다. 이 상태에서 이중화 테이블에 남아 있는 트랜잭션은 완료되지 않은 트랜잭션이므로 철회하는 것이다.The duplication receivers 42a and 42b generated by the duplication managers 41a and 41b check whether communication with the duplex transmitters 43b and 43a of the partner database server 40b or 40a is in a normal state (step S201). If the communication state is not normal, the duplication transaction table is checked (step S205), and all remaining transactions are rolled back (step S206, step S207) and the duplication reception operation is terminated. In this state, the remaining transactions in the replication table are incomplete transactions and are therefore withdrawn.

통신 상태가 정상이면 상대 데이터베이스서버(40b 또는 40a)로부터 이중화로그(XLOG)를 수신한다(단계 S202). 이중화 버퍼가 빈 상태인지를 검사하여(단계 S203), 비어 있으면 다시 XLOG를 수신하기 위한 상태로 되돌아가고(단계 S201), 빈 상태가 아니면 이중화 버퍼로부터 XLOG를 읽어서(단계 S204) 각각의 XLOG 타입에 따라 다음과 같이 처리한다.If the communication state is normal, a duplicate log (XLOG) is received from the partner database server 40b or 40a (step S202). It is checked whether the redundant buffer is empty (step S203), and if it is empty, it returns to the state for receiving XLOG again (step S201), and if it is not empty, it reads the XLOG from the redundant buffer (step S204) and writes to each XLOG type. Therefore, process as follows.

XLOG의 타입이 트랜잭션 시작 로그이면(단계 S208) 트랜잭션을 시작시키고(단계 S209), 이중화 트랜잭션 테이블에 트랜잭션을 등록한다(단계 S210). XLOG의 타입이 삽입, 갱신, 또는 삭제 로그이면(단계 S214) 이중화 트랜잭션 테이블에서 해당 트랜잭션을 검색하여(단계 S215) 각 로그 타입에 따라 데이터베이스(30 내지 33)에 반영한다(단계 S216). XLOG 타입이 트랜잭션 종료 로그이면(단계 S211) 이 트랜잭션을 종료시키고(단계 S212) 이중화 트랜잭션 테이블로부터 해당 트랜잭션을 제거한다(단계 S213).If the type of XLOG is a transaction start log (step S208), the transaction is started (step S209), and the transaction is registered in the redundant transaction table (step S210). If the type of XLOG is an insert, update, or delete log (step S214), the corresponding transaction is retrieved from the redundant transaction table (step S215) and reflected in the databases 30 to 33 according to each log type (step S216). If the XLOG type is a transaction end log (step S211), this transaction ends (step S212) and the corresponding transaction is removed from the duplicated transaction table (step S213).

이와 같이, 본 발명의 상세한 설명에서는 구체적인 실시예에 관해 설명하였으나, 본 발명의 범주에서 벗어나지 않는 한도 내에서 여러가지 변형이 가능함은 물론이다. 그러므로, 본 발명의 범위는 설명된 실시예에 국한되어 정해져서는 안되며 후술하는 특허청구범위 뿐만 아니라 이 특허청구범위와 균등한 것들에 의해 정해져야 한다.As described above, in the detailed description of the present invention, specific embodiments have been described, but various modifications are possible without departing from the scope of the present invention. Therefore, the scope of the present invention should not be limited to the described embodiments, but should be defined by the claims below and equivalents thereof.

결국, 본 발명에 의한 데이터베이스 이중화 방법에 따르면 다음과 같은 이점이 발생한다.As a result, according to the database duplication method according to the present invention the following advantages occur.

즉, 데이터베이스 이중화의 정의 및 운용하는데 있어서 편리한 인터페이스를 지원하며, 로그를 기반으로 이중화하면서 상대편 서버의 이중화관리자 레벨의 트랜잭션 처리 방식을 이용함으로써 성능이 우수하고, 망 구조의 이중화 위상을 제공함으로써 어떠한 형태로도 이중화가 가능하다. 또한, 이중화 도중에도 고장을 감지하고 대응하며, 고장 복구 후에도 반영하지 못한 데이터베이스 변경 내용을 상대편데이터베이스에 반영하여 줌으로써 이중화 데이터베이스간의 일치성을 유지시키고, 상대 서버로 전송해야할 이중화 데이터를 최소화하여 통신 속도를 향상시켜 데이터베이스의 안정성과 무정지 서비스, 그리고 부하 분산을 가질 수 있다.In other words, it supports a convenient interface in defining and managing database redundancy, and provides excellent performance by using the replication manager-level transaction processing method of the other server while redundancy based on logs, and provides a redundancy topology of the network structure. Redundancy is also possible. In addition, it detects and responds to failures during redundancy, and reflects database changes that were not reflected after failure recovery to the other database to maintain consistency among the redundant databases and to minimize communication data to be transmitted to the other server. It can improve database stability, non-stop services, and load balancing.

Claims (11)

이중화 객체를 생성함에 있어서, 소정 명령을 사용하여 데이터베이스의 이중화 메타 테이블에 이중화 객체 및 이중화에 참여하는 테이블에 대한 정보를 저장하는 단계;In creating a replication object, storing information about a replication object and a table participating in the replication in a replication meta table of a database using a predetermined command; 로컬 데이터베이스서버 및 원격 데이터베이스서버의 이중화관리자가 이중화 수행을 위한 조건을 맞추기 위하여 핸드쉐이킹(handshaking)하는 단계;Handshaking by a duplication manager of a local database server and a remote database server to meet a condition for performing duplication; 상기 로컬 데이터베이스서버의 이중화송신자가 데이터베이스 변경 로그를 활용한 고유 로그의 이중화 레코드를 상기 원격 데이터베이스서버로 전송하는 단계;Transmitting, by the replication sender of the local database server, a replication record of a unique log using a database change log to the remote database server; 상기 원격 데이터베이스서버의 이중화수신자가 이중화관리자의 트랜잭션 처리 기법으로 전달받은 상기 고유 로그를 자신의 데이터베이스에 반영하는 단계;Reflecting the unique log received by the replication receiver of the remote database server through the transaction processing technique of the replication manager in its database; 이중화 수행 도중에 시스템 또는 상기 로컬 데이터베이스서버 또는 상기 원격 데이터베이스서버의 고장(down) 및 네트워크의 단절을 감지하고 이에 대응하는 단계; 및Detecting and responding to a failure of the system or the local database server or the remote database server and disconnection of the network during the redundancy; And 고장이 복구된 후, 반영하지 못한 이중화 내용을 상대편 데이터베이스에 자동으로 반영하는 단계를 포함하는 것을 특징으로 하는 데이터베이스 이중화 방법.And automatically reflecting the duplicated contents that could not be reflected in the opposite database after the failure is recovered. 제 1 항에 있어서, 상기 소정 명령은The method of claim 1, wherein the predetermined command is SQL과 유사한 구조를 갖는 명령임을 특징으로 하는 데이터베이스 이중화 방법.Database redundancy method characterized by a command having a structure similar to SQL. 제 1 항에 있어서, 상기 핸드쉐이킹 단계는The method of claim 1, wherein the handshaking step 로컬 데이터베이스서버의 이중화관리자가 원격 데이터베이스서버의 이중화관리자와 연결을 수행하고 서로 간의 이중화 제약 조건을 확인함으로써 이중화 준비를 마치는 단계임을 특징으로 하는 데이터베이스 이중화 방법.A replication method of a local database server, in which a replication manager of a remote database server connects with a replication manager of a remote database server and checks a replication constraint between each other to prepare for replication. 제 1 항에 있어서, 상기 고유 로그는The method of claim 1, wherein the unique log is 이중화 로그인 XLOG임을 특징으로 하는 데이터베이스 이중화 방법.Database redundancy method characterized by redundant login XLOG. 로컬 데이터베이스를 원격 데이터베이스에 실시간으로 복제하는 이중화 방법에 있어서,In a redundant method of replicating a local database to a remote database in real time, 데이터베이스 이중화를 정의 및 운용하는데 소정 명령의 사용자 인터페이스를 제공하는 단계;Providing a user interface of a predetermined command to define and operate database redundancy; 이중화 객체를 도입하여 이중화에 대한 정보를 상기 로컬 데이터베이스 또는 상기 원격 데이터베이스에 저장하여 운영 관리하는 단계;Introducing a redundancy object to store information on redundancy in the local database or the remote database for operation management; 정상 트랜잭션과 이중화 트랜잭션의 동시성을 위하여 이중화 트랜잭션 테이블을 유지하는 단계;Maintaining a duplicate transaction table for concurrency of normal and duplicate transactions; 전송할 이중화 데이터를 최소화하기 위하여 데이터베이스 로그를 활용, 고유 로그의 이중화 로그를 만드는 단계;Creating a redundant log of a unique log by using a database log to minimize redundant data to be transmitted; 통신 속도 향상을 위하여 검색 트랜잭션은 제거하고 데이터베이스 변경 로그를 포함하는 트랜잭션만 상대 서버에 전송하는 단계; 및Removing a search transaction and transmitting only a transaction including a database change log to a counterpart server to improve communication speed; And 데이터베이스서버 또는 네트워크 고장으로부터 이중화 데이터베이스간의 일치성을 보장하기 위하여, 이중화 재시작 위치를 설정하는 단계를 포함하는 것을 특징으로 하는 데이터베이스 이중화 방법.Setting a redundancy restart position to ensure consistency between the redundant databases from a database server or network failure. 제 5 항에 있어서, 상기 소정 명령은The method of claim 5, wherein the predetermined command is SQL 문장 형태의 명령임을 특징으로 하는 데이터베이스 이중화 방법.Database redundancy method characterized in that the SQL statement type command. 제 5 항에 있어서, 상기 고유 로그는The method of claim 5, wherein the unique log is XLOG임을 특징으로 하는 데이터베이스 이중화 방법.Database redundancy method characterized by XLOG. 이중화관리자에 의해서 생성된 이중화송신자는 우선 상대 데이터베이스서버의 이중화수신자와 연결을 시도하는 단계;The duplication sender generated by the duplication manager first attempts to connect with the duplication receiver of the counterpart database server; 연결이 실패하면 이중화 종료 요구가 있는지를 검토하고, 종료 요구가 없으면 다시 상대 수신자와 연결을 시도하고, 종료 요구가 있으면 상기 이중화송신자와의 연결 시도를 종료하는 단계;Examining whether there is a duplication termination request if the connection fails, if there is no termination request, attempting to connect with the other party again, and terminating the connection attempt with the duplex sender if there is a termination request; 상대 이중화수신자와 연결되면 상기 이중화송신자는 이중화에 참여하는 테이블들의 정보를 상대 이중화수신자에게 전송하고, 상대편으로부터 이중화 제약 조건 검사 결과를 전달받아 이것이 성공하였는지를 검사하는 단계;If connected to a counterpart redundant receiver, the duplex sender transmits information of tables participating in the duplication to the counterpart duplex receiver, and receives a result of a duplicate constraint check from the counterpart to check whether the counterpart is successful; 이중화 제약 조건이 성공하면 이중화테이블의 어디서에서부터 이중화를 시작할 것인지 이중화 시작점을 조정하여 그 위치를 해당 이중화객체에 저장하고, 이중화 데이터를 송신할 준비를 마치는 단계;Adjusting the redundancy starting point from where in the redundancy table to start redundancy if the redundancy constraint is successful, storing the position in the redundancy object, and preparing to transmit redundancy data; 사용자 데이터베이스서버 또는 상대 데이터베이스서버로부터 이중화 종료 요구가 있는지를 검사하여, 이중화 종료 요구가 있으면 이중화송신을 종료하는 단계;Checking whether there is a duplication termination request from the user database server or the counterpart database server, and terminating the duplication transmission if there is a duplication termination request; 상기 이중화 종료 요구 단계에서 이중화 종료 요구가 없을 때, 이중화 LSN이 상기 사용자 데이터베이스서버의 현재 LSN과 동일한 값이면, 이중화 버퍼가 비었는지를 조사하여 비었으면 다시 이중화 데이터 송신부의 처음 위치로 이동하는 단계;When there is no duplication termination request in the duplication termination request step, if the duplication LSN is equal to the current LSN of the user database server, checking whether the duplication buffer is empty and moving back to the initial position of the duplication data transmission unit if the duplication buffer is empty; 반면에 XLSN이 LSN과 같다면, 데이터베이스 로그에서 XLSN 위치의 로그레코드를 획득한 후 XLSN 값을 증가시키는 단계; 및On the other hand, if the XLSN is equal to the LSN, increasing the XLSN value after obtaining a log record of the XLSN position in the database log; And 획득한 로그레코드가 데이터 변경 또는 트랜잭션 제어 로그가 아니면, 상기 이중화 데이터 송신부의 처음 위치로 이동하고, 데이터 변경 또는 트랜잭션 제어 로그이면 로그 유형에 따라 처리하는 단계를 포함하는 것을 특징으로 하는 데이터베이스 이중화 방법.If the obtained log record is not a data change or transaction control log, moving to the initial position of the redundant data transmitter, and if the data change or transaction control log, processing according to the log type. 제 8 항에 있어서, 상기 로그 유형에 따라 처리하는 단계는9. The method of claim 8, wherein the processing according to the log type is 로그레코드의 타입이 트랜잭션 시작 로그이면 이중화 트랜잭션 테이블에 트랜잭션을 등록하고 상기 이중화 데이터 송신부의 처음 위치로 이동하는 단계;If a log record type is a transaction start log, registering a transaction in a redundant transaction table and moving to a first position of the redundant data transmitter; 로그레코드의 타입이 삭제, 삽입, 또는 수정에 관련된 변경 로그이면, 이중화 대상 로그인지를 판단하여 이중화 대상 로그이면 상기 이중화 대상 로그에 해당하는 상기 트랜잭션이 이중화 테이블에 존재하는지를 검사하는 단계;If the log type is a change log related to deletion, insertion, or modification, determining whether to log in a replication target and checking whether a transaction corresponding to the replication target log exists in a replication table if it is a replication target log; 상기 트랜잭션이 이중화 트랜잭션 테이블에 존재하지 않으면 이중화 종료를 요구하는 단계로 이동하고, 존재하면 현재의 변경 로그가 상기 트랜잭션의 처음에 나타난 것인지를 판단하는 단계;If the transaction does not exist in the replication transaction table, moving to requesting termination of the replication, and if present, determining whether a current change log appears at the beginning of the transaction; 상기 트랜잭션이 처음을 나타낸다면 처음임을 표시하고 트랜잭션 시작 로그 XLOG 구조로 변환하여 이중화 버퍼에 저장하고, 변경 로그를 XLOG 구조로 변환하여 상기 이중화 버퍼에 저장하는 단계;Indicating that the transaction is the first if the transaction is first, converting the transaction start log into an XLOG structure, and storing the transaction in a duplication buffer; 획득한 변경 로그가 상기 트랜잭션의 처음에 나타난 것이 아니면 곧바로 상기 변경 로그를 XLOG 구조로 변환하여 상기 이중화 버퍼에 저장하고 상기 이중화 데이터 송신부의 처음 위치로 이동하는 단계;If the obtained change log does not appear at the beginning of the transaction, converting the change log into an XLOG structure and storing the change log in the redundant buffer and moving to the initial position of the redundant data transmitter; 로그레코드의 타입이 트랜잭션 종료 로그이면 상기 트랜잭션 종료 로그에 해당하는 상기 트랜잭션이 이중화 트랜잭션 테이블에 존재하는지, 그리고 상기 트랜잭션에 데이터 변경이 발생했었는지를 검사하는 단계;If the type of log record is a transaction termination log, checking whether the transaction corresponding to the transaction termination log exists in a redundant transaction table and whether a data change occurred in the transaction; 상기 트랜잭션에 데이터 변경이 발생했으면 종료 로그를 상기 이중화 버퍼에 저장하고 XLSN을 이중화 위치로 조정한 다음, 해당 트랜잭션을 이중화 트랜잭션 테이블로부터 제거하는 단계;If a data change occurs in the transaction, storing a termination log in the duplication buffer, adjusting the XLSN to a duplication position, and then removing the transaction from the duplication transaction table; 해당 트랜잭션이 이중화 트랜잭션 테이블에서 제거되면 상기 이중화 데이터 송신부의 처음위치로 이동하고, 종료 로그에 해당하는 상기 트랜잭션에서 변경 로그가 한번도 발생하지 않았다면 상기 트랜잭션은 검색 트랜잭션이므로 이중화 테이블에서 상기 트랜잭션을 제거하고 상기 이중화 데이터 송신부의 처음으로 이동하는 단계;If the transaction is removed from the replication transaction table, the transaction is moved to the initial position of the replication data transmission unit. If no change log occurs in the transaction corresponding to the termination log, the transaction is a search transaction and thus the transaction is removed from the replication table. Moving to the beginning of the redundant data transmitter; XLOG를 상기 이중화 버퍼에 넣기 전에 반드시 상기 이중화 버퍼가 찼는지를 검사하고, 상기 이중화 버퍼가 찼으면 상기 이중화 버퍼의 내용 전체를 상대 서버에게 전송하는 단계;Checking whether the redundancy buffer is full before putting XLOG into the redundancy buffer, and if the redundancy buffer is full, transmitting the entire contents of the redundancy buffer to the counterpart server; 상기 이중화 버퍼의 내용 전체가 상대 서버에 전송된 후에 이중화 트랜잭션 테이블에 상기 트랜잭션이 남아있으면 이중화의 재시작 위치를 조정하고, 하나도 없으면 XLSN 값을 이중화 재시작 위치로 설정하는 단계; 및Adjusting the restart position of the duplication if the transaction remains in the duplication transaction table after the entire contents of the duplication buffer is transmitted to the counterpart server, and if none, setting the XLSN value to the duplication restart position; And 이중화 트랜잭션 테이블에 상기 트랜잭션이 남아있어서, 전송된 트랜잭션 중 완료되지 않은 트랜잭션이 남아 있으면 서버 또는 네트워크 고장으로 더 이상 이중화를 할 수 없는 경우에 고장을 회복한 후, 상기 트랜잭션을 처음부터 다시 상대 서버로 재 전송함으로써 데이터베이스간의 일치성을 보장해 주기 위한 단계를 더 포함하는 것을 특징으로 하는 데이터베이스 이중화 방법.If the transaction remains in the redundant transaction table and there is an incomplete transaction among the transmitted transactions, if the server or network failure can no longer be duplicated, after recovering from the failure, the transaction is returned to the counterpart server from the beginning. And resending to ensure consistency between databases. 이중화관리자에 의해서 생성된 이중화수신자는 상대 데이터베이스서버의 이중화송신자와 통신이 정상 상태인지를 검사하는 단계;The duplication receiver generated by the duplication manager checks whether communication with the duplex sender of the counterpart database server is normal; 상기 단계에서 통신 상태가 정상이 아니면, 이중화 트랜잭션 테이블을 확인하여 남아 있는 모든 트랜잭션을 철회하고 이중화 수신 작업을 종료하는 단계;If the communication state is not normal in the step, checking the duplication transaction table to withdraw all remaining transactions and ending the duplication reception operation; 상기 이중화 수신 작업 종료 단계에서 이중화 테이블에 남아 있는 트랜잭션은 완료되지 않은 트랜잭션이므로 철회하는 단계; 및Withdrawing the transaction remaining in the replication table at the end of the replication reception operation because it is not completed; And 통신 상태가 정상이면 상대 데이터베이스서버로부터 이중화로그를 수신하고, 이중화 버퍼가 빈 상태인지를 검사하여 비어 있으면 다시 이중화 로그를 수신하기 위한 상태로 되돌아가고, 빈 상태가 아니면 상기 이중화 버퍼로부터 상기 이중화로그를 읽어서 각각의 이중화로그 타입에 따라 처리하는 단계를 포함하는 것을 특징으로 하는 데이터베이스 이중화 방법.If the communication status is normal, the replication log is received from the partner database server. If the replication buffer is empty, the replication log is checked. If the communication status is empty, the replication log is returned to the reception of the replication log. If the communication status is empty, the replication log is returned from the replication buffer. Read and process according to each replication log type. 제 10 항에 있어서, 상기 이중화로그 타입에 따라 처리하는 단계는,The method of claim 10, wherein the processing according to the duplication log type comprises: 상기 이중화로그의 타입이 트랜잭션 시작 로그이면 상기 트랜잭션을 시작시키고, 이중화 트랜잭션 테이블에 상기 트랜잭션을 등록하는 단계;Starting the transaction if the type of the replication log is a transaction start log and registering the transaction in a replication transaction table; 상기 이중화로그의 타입이 삽입, 갱신, 또는 삭제 로그이면 이중화 트랜잭션 테이블에서 해당 트랜잭션을 검색하여 각 로그 타입에 따라 데이터베이스에 반영하는 단계; 및If the type of the duplication log is an insert, update, or delete log, searching for a corresponding transaction in a duplication transaction table and reflecting the corresponding transaction in a database according to each log type; And 상기 이중화로그의 타입이 트랜잭션 종료 로그이면 상기 트랜잭션을 종료시키고 이중화 트랜잭션 테이블로부터 해당 트랜잭션을 제거하는 단계를 더 포함하는 것을 특징으로 하는 데이터베이스 이중화 방법.If the type of replication log is a transaction termination log, terminating the transaction and removing the transaction from the replication transaction table.
KR10-2001-0015244A 2001-03-23 2001-03-23 A Method of Database Replication KR100445194B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR10-2001-0015244A KR100445194B1 (en) 2001-03-23 2001-03-23 A Method of Database Replication

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR10-2001-0015244A KR100445194B1 (en) 2001-03-23 2001-03-23 A Method of Database Replication

Publications (2)

Publication Number Publication Date
KR20020075062A true KR20020075062A (en) 2002-10-04
KR100445194B1 KR100445194B1 (en) 2004-08-18

Family

ID=27698493

Family Applications (1)

Application Number Title Priority Date Filing Date
KR10-2001-0015244A KR100445194B1 (en) 2001-03-23 2001-03-23 A Method of Database Replication

Country Status (1)

Country Link
KR (1) KR100445194B1 (en)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20040035657A (en) * 2004-04-07 2004-04-29 황지현 Management system and storage media storing management program for off-line shop and small business unit
KR20040040938A (en) * 2002-11-08 2004-05-13 에스케이 텔레콤주식회사 The method of synchronizing the information of the client
KR100677914B1 (en) * 2005-08-03 2007-02-05 삼성탈레스 주식회사 Method for enhancing a speed using epmcq2 remote mode
KR100920241B1 (en) * 2007-08-03 2009-10-05 주식회사 무한 Real time date file backup and recovery system and method there of
KR101041319B1 (en) * 2004-06-30 2011-06-14 마이크로소프트 코포레이션 Systems and methods for providing conflict handling for peer-to-peer synchronization of units of information manageable by a hardware/software interface system
CN111052106A (en) * 2018-04-27 2020-04-21 甲骨文国际公司 System and method for heterogeneous database replication from a remote server
KR102419017B1 (en) * 2021-12-29 2022-07-08 한화시스템 주식회사 Control apparatus for satellite and method thereof

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10207754A (en) * 1997-01-16 1998-08-07 Fujitsu Ltd Duplication system for updating system data base
US5951695A (en) * 1997-07-25 1999-09-14 Hewlett-Packard Company Fast database failover
JP3919303B2 (en) * 1997-09-30 2007-05-23 キヤノン株式会社 Database system, control method thereof, and information processing apparatus
JP2000207266A (en) * 1999-01-13 2000-07-28 Mitsubishi Electric Corp Replica system and replica method
KR20020036502A (en) * 2000-11-10 2002-05-16 오길록 Duplicated Database Management System for Main Memory Resident DBMS

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20040040938A (en) * 2002-11-08 2004-05-13 에스케이 텔레콤주식회사 The method of synchronizing the information of the client
KR20040035657A (en) * 2004-04-07 2004-04-29 황지현 Management system and storage media storing management program for off-line shop and small business unit
KR101041319B1 (en) * 2004-06-30 2011-06-14 마이크로소프트 코포레이션 Systems and methods for providing conflict handling for peer-to-peer synchronization of units of information manageable by a hardware/software interface system
KR100677914B1 (en) * 2005-08-03 2007-02-05 삼성탈레스 주식회사 Method for enhancing a speed using epmcq2 remote mode
KR100920241B1 (en) * 2007-08-03 2009-10-05 주식회사 무한 Real time date file backup and recovery system and method there of
CN111052106A (en) * 2018-04-27 2020-04-21 甲骨文国际公司 System and method for heterogeneous database replication from a remote server
CN111052106B (en) * 2018-04-27 2023-08-11 甲骨文国际公司 System and method for heterogeneous database replication from a remote server
KR102419017B1 (en) * 2021-12-29 2022-07-08 한화시스템 주식회사 Control apparatus for satellite and method thereof

Also Published As

Publication number Publication date
KR100445194B1 (en) 2004-08-18

Similar Documents

Publication Publication Date Title
US6941327B2 (en) Apparatus and method for database synchronization in a duplex system
US10114710B1 (en) High availability via data services
US9317372B1 (en) Dynamic membership management in a distributed system
US7240116B2 (en) Dynamic RDF groups
US7293194B2 (en) Method and device for switching database access part from for-standby to currently in use
US6317754B1 (en) System for user control of version /Synchronization in mobile computing
CN101317163B (en) Non-stop transaction processing system
JP4461147B2 (en) Cluster database using remote data mirroring
US7107355B2 (en) High availability lightweight directory access protocol service
US20030050930A1 (en) Method and apparatus for lockstep data replication
KR20070061088A (en) File management method in file system and metadata server for the same
KR100445194B1 (en) A Method of Database Replication
WO2023151443A1 (en) Synchronizing main database and standby database
JP5416490B2 (en) Distributed data management system, data management apparatus, data management method, and program
JP4129353B2 (en) Distributed data management system, distributed data management method, and distributed data management program
JP2002202906A (en) Database duplex system and method therefor
CN117149885B (en) Read-write separation implementation method based on database master node forwarding
KR100439857B1 (en) System and method of duplexing database in private branch exchange and telecommunication system and synchronizing method of duplexed server
JP2002297593A (en) Management system for base-host switchable database
KR100502501B1 (en) Method for real-time remote logging and recovery of database system
KR0174603B1 (en) How to restore the database of the exchange
CN117931886A (en) Telescopic consistency and extremely high availability distributed data system
KR20040031292A (en) Method for Restoring Database Synchronization in Pair System

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E701 Decision to grant or registration of patent right
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20100805

Year of fee payment: 8

FPAY Annual fee payment

Payment date: 20120808

Year of fee payment: 11

FPAY Annual fee payment

Payment date: 20150810

Year of fee payment: 12

FPAY Annual fee payment

Payment date: 20160802

Year of fee payment: 13

FPAY Annual fee payment

Payment date: 20170810

Year of fee payment: 14

FPAY Annual fee payment

Payment date: 20190809

Year of fee payment: 16