KR101605455B1 - Method for Replicationing of Redo Log without Data Loss and System Thereof - Google Patents

Method for Replicationing of Redo Log without Data Loss and System Thereof Download PDF

Info

Publication number
KR101605455B1
KR101605455B1 KR1020140083579A KR20140083579A KR101605455B1 KR 101605455 B1 KR101605455 B1 KR 101605455B1 KR 1020140083579 A KR1020140083579 A KR 1020140083579A KR 20140083579 A KR20140083579 A KR 20140083579A KR 101605455 B1 KR101605455 B1 KR 101605455B1
Authority
KR
South Korea
Prior art keywords
redo log
database server
remote
local database
file
Prior art date
Application number
KR1020140083579A
Other languages
Korean (ko)
Other versions
KR20160004721A (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 KR1020140083579A priority Critical patent/KR101605455B1/en
Publication of KR20160004721A publication Critical patent/KR20160004721A/en
Application granted granted Critical
Publication of KR101605455B1 publication Critical patent/KR101605455B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F15/00Digital computers in general; Data processing equipment in general
    • G06F15/16Combinations of two or more digital computers each having at least an arithmetic unit, a program unit and a register, e.g. for a simultaneous processing of several programs

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Software Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

본 발명은 데이터 손실 없는 데이터베이스 리두 로그 이중화 방법 및 그를 위한 시스템에 관한 것으로서, 로컬 데이터베이스 서버(Local Database Server)와, 상기 로컬 데이터베이스 서버에 트랜잭션(transaction)이 발생할 경우에 생성되는 리두 로그(Redo Log)를 이중화(Replication)하기 위한 원격지(Remote)를 포함하여 구성되는 데이터 손실 없는 데이터베이스 리두 로그 이중화 시스템에 있어서, 상기 로컬 데이터베이스 서버는 데이터베이스(Database);와, 상기 로컬 데이터베이스 서버에 트랜잭션(Transaction)이 발생하면, 상기 트랜잭션에 상응하는 리두 로그(Redo Log)를 생성하여 원격지로 송신한 후, 상기 생성된 리두 로그를 상기 데이터베이스에 리두 로그 파일(Redo Log File)로 저장하도록 제어하는 로컬 제어부; 및 상기 로컬 제어부의 제어에 따라, 상기 리두 로그를 원격지로 송신하는 로컬 통신부;를 구비하고, 상기 원격지는 상기 로컬 데이터베이스 서버의 로컬통신부로부터 송신된 리두 로그를 수신하는 원격 통신부;와, 상기 원격 통신부를 통해 수신된 리두 로그를 리두 로그 파일로 저장하도록 제어하는 원격 제어부;와, 상기 원격 제어부의 제어에 따라, 리두 로그 파일을 저장하는 원격 저장부;를 구비하는 것을 특징으로 한다. The present invention relates to a method for duplicating a database redo log without data loss and a system therefor, and more particularly, to a system and method for duplicating a redo log, A local database server includes a database; and a database for storing a transaction in the local database server, wherein the local database server includes a database for storing the data, A local control unit for generating a redo log corresponding to the transaction and transmitting the generated redo log to a remote location and storing the generated redo log as a redo log file in the database; And a local communication unit for transmitting the redo log to a remote location under the control of the local control unit, wherein the remote site comprises: a remote communication unit for receiving a redo log transmitted from a local communication unit of the local database server; And a remote storage unit for storing a redo log file under the control of the remote control unit. The redo log file is stored in the redo log file.

Description

데이터 손실 없는 데이터베이스 리두 로그 이중화 방법 및 그를 위한 시스템{Method for Replicationing of Redo Log without Data Loss and System Thereof}BACKGROUND OF THE INVENTION 1. Field of the Invention The present invention relates to a method for duplicating a database redo log without data loss,

본 발명은 데이터 손실 없는 데이터베이스 리두 로그 이중화 방법 및 그를 위한 시스템에 관한 것으로서, 더욱 상세하게는 리두 로그가 생성되는 즉시 원격지로 송신하여 데이터 손실 없이 리두 로그(Redo Log)를 이중화(Replication)하는 데이터 손실 없는 데이터베이스 리두 로그 이중화 방법 및 그를 위한 시스템에 관한 것이다.
The present invention relates to a method for duplicating a database redo log without data loss and a system therefor, and more particularly, to a system for duplicating a redo log without data loss, And a system for the same.

최근, 기존의 데이터베이스 관리도구로 데이터를 수집, 저장, 관리, 분석할 수 있는 역량을 넘어서는 대량의 정형 또는 비정형 데이터 집합 및 이러한 데이터로부터 가치를 추출하고 결과를 분석하는 빅 데이터 처리 등 대용량 데이터베이스 관련 기술이 발전하고 있다.Recently, large-scale database-related technologies such as a large amount of fixed or unstructured data sets beyond the ability to collect, store, manage, and analyze data with existing database management tools and big data processing that extracts values from these data and analyzes the results Is developing.

따라서, 대용량의 데이터를 복제할 경우, 데이터량 폭증에 따른 종래 방법의 한계가 드러나게 되었다. Therefore, when copying a large amount of data, the limitation of the conventional method due to the increase in the data amount is revealed.

이에, 실시간 데이터전송에 따른 네트워크 대역폭을 작게 차지하면서도 효과적인 로그 기반의 CDC(Change Data Capture) 기법이 등장하게 되었는데, CDC 기법은 데이터의 변경사항이 기록된 로그만을 전송하여 네트워크부하 및 복제부하를 최소화할 수 있으며, 타임스탬프 기록이 필요하지 않고, 애플리케이션이나 데이터 테이블의 구조 변경이 필요하지 않다는 장점이 있어, 다수에 의해 사용되었다. Accordingly, an effective log-based CDC (Change Data Capture) technique has been introduced while occupying a small amount of network bandwidth due to real-time data transmission. The CDC technique transmits only a log in which data changes are recorded, , Has the advantage of not requiring timestamp recording, and does not require structural modification of applications or data tables, and is used by many.

한편, CDC 기법을 적용하기 위해서는 리두 로그 파일(Redo Log File)을 필요로 하는데, 데이터베이스의 리두 로그 파일은 데이터베이스의 변경 혹은 운영 중에 발생 및 수행되는 트랜잭션(transaction) 또는 운영정보를 저장하는 파일로서, 데이터베이스의 복구에 사용된다. 이러한 리두 로그 파일은 실제 데이터베이스에 바로 기록하지 않고, 데이터 관련 정보를 나타내는 로그 부분에 먼저 기록하는 WAL(Write Ahead Log)에 따라, 데이터베이스에 해당 내용을 반영하기 전에 반드시 먼저 저장된다. In order to apply the CDC technique, a redo log file is required. The redo log file of the database is a file that stores transaction or operation information generated and executed during a database change or operation, Used to recover the database. These redo log files are not necessarily written directly to the actual database but are stored before the contents are reflected in the database according to the WAL (Write Ahead Log) which is recorded in the log portion indicating the data related information first.

그러나, 기존의 리두 로그 파일을 이중화하는 방식은 리두 로그 파일 전체를 아카이빙(Archiving) 하거나 특정 시점에 대한 백업(Back Up)을 수행하는 방식이 전부였다. 이러한 방식은 리두 로그 파일의 특정 시점에 대해서만 데이터를 보장할 뿐, 최근 데이터에 대한 손실이 발생한다는 문제점이 있다.However, the existing method of duplicating redo log files is all the way of archiving the whole redo log file or performing a back up at a specific point in time. This scheme guarantees data only at a specific point in time of the redo log file, and there is a problem that data is lost recently.

또한, CDC(Change Data Capture)와 같은 리두 로그(Redo Log)를 분석하여 이중화를 수행하는 경우, 로컬(Local) 장비 또는 데이터베이스(Database)가 비정상 종료할 경우에 로컬 데이터베이스에 마지막 반영된 정보를 원격지에 반영하지 못한다는 단점이 있으며, 페일오버(Failover) 수행시 반영하지 못한 데이터는 손실된다는 문제점이 있다.
Also, in case of performing redundancy by analyzing redo log such as CDC (Change Data Capture), when the local device or the database is abnormally terminated, the information finally reflected in the local database is transmitted to the remote site There is a disadvantage that it can not be reflected, and there is a problem that data which is not reflected in failover is lost.

한국등록특허공보 제10-1086392호Korean Patent Registration No. 10-1086392

따라서, 본 발명은 상기와 같은 종래의 문제점을 해결하기 위해 안출된 것으로서, 본 발명의 목적은 데이터베이스에 운영중에 발생하는 트랜잭션에 의해 생성되는 리두 로그를 원격지로 실시간 송신하여 이중화(Replication)함으로써, 데이터베이스 시스템 운영중에 발생할 수 있는 비정상 운영 및 비정상 종료 등의 장애에 실시간 사전 대비할 수 있는 데이터 손실 없는 데이터베이스 리두 로그 이중화 방법 및 그를 위한 시스템을 제공하는 데 있다. SUMMARY OF THE INVENTION The present invention has been made to solve the above-mentioned problems occurring in the prior art, and it is an object of the present invention to provide a redo log generation system, The present invention provides a method of duplicating a database redo log without data loss that can be prepared in real time in case of a failure such as abnormal operation or abnormal termination that may occur during system operation, and a system therefor.

또한, 본 발명의 다른 목적은 데이터베이스 운영중에 트랜잭션이 발생하여 데이터가 변경될 경우, 데이터의 변경사항이 기록된 로그만을 전송하여 네트워크부하 및 복제부하를 최소화하는 데이터 손실 없는 데이터베이스 리두 로그 이중화 방법 및 그를 위한 시스템을 제공하는 데 있다. It is another object of the present invention to provide a method of duplicating a database redo log without data loss, which minimizes network load and replication load by transmitting only a log in which data changes are recorded when a transaction occurs during a database operation, To provide a system for

아울러, 본 발명의 또 다른 목적은 트랜잭션이 발생함에 따라 생성되는 리두 로그 파일을 해당 데이터베이스에 저장하기 전에 원격지로 먼저 송신하여 이중화함으로써, 장애 발생에 대한 복구(Recovery)를 수행할 시에 리두 로그 손실을 최소화하는 데이터 손실 없는 데이터베이스 리두 로그 이중화 방법 및 그를 위한 시스템을 제공하는 데 있다.
It is still another object of the present invention to provide a method and system for recovering a redo log file in a case where a redo log file generated as a transaction occurs is first transmitted to a remote site before being stored in a corresponding database, And to provide a system for the same.

상기한 목적을 달성하기 위한 본 발명의 일 실시예에 따른 데이터베이스 시스템은, 로컬 데이터베이스 서버(Local Database Server)와, 상기 로컬데이터베이스에 트랜잭션(transaction)이 발생할 경우에 생성되는 리두 로그(Redo Log)를 이중화(Replication)하기 위한 원격지(Remote)를 포함하여 구성되는 데이터 손실 없는 데이터베이스 리두 로그 이중화 시스템에 있어서, 상기 로컬 데이터베이스 서버는 데이터베이스(Database);와, 상기 로컬 데이터베이스 서버에 트랜잭션(Transaction)이 발생하면, 상기 트랜잭션에 상응하는 리두 로그(Redo Log)를 생성하여 원격지로 송신한 후, 상기 생성된 리두 로그를 상기 데이터베이스에 리두 로그 파일(Redo Log File)로 저장하도록 제어하는 로컬 제어부; 및 상기 로컬 제어부의 제어에 따라, 상기 리두 로그를 원격지로 송신하는 로컬 통신부;를 구비하고, 상기 원격지는 상기 로컬 데이터베이스 서버의 로컬통신부로부터 송신된 리두 로그를 수신하는 원격 통신부;와, 상기 원격 통신부를 통해 수신된 리두 로그를 리두 로그 파일로 저장하도록 제어하는 원격 제어부;와, 상기 원격 제어부의 제어에 따라, 리두 로그 파일을 저장하는 원격 저장부;를 구비하는 것을 특징으로 한다.According to an aspect of the present invention, there is provided a database system including a local database server and a redo log generated when a transaction occurs in the local database, A system for duplicating a database redo log without data loss, the system comprising a remote database for replicating the database, wherein the local database server comprises: a database; and, when a transaction occurs in the local database server A local controller for generating a redo log corresponding to the transaction and transmitting the generated redo log to a remote location and storing the generated redo log as a redo log file in the database; And a local communication unit for transmitting the redo log to a remote location under the control of the local control unit, wherein the remote site comprises: a remote communication unit for receiving a redo log transmitted from a local communication unit of the local database server; And a remote storage unit for storing a redo log file under the control of the remote control unit. The redo log file is stored in the redo log file.

또한, 상기한 목적을 달성하기 위한 본 발명의 일 실시예에 따른 데이터베이스 운영 방법은, 로컬 데이터베이스 서버(Local Database Server)와, 상기 로컬데이터베이스에 트랜잭션(transaction)이 발생할 경우에 생성되는 리두 로그(Redo Log)를 이중화(Replication)하기 위한 원격지(Remote)를 포함하여 구성되는 리두 로그 이중화 시스템의 데이터 손실 없는 데이터베이스 리두 로그 이중화 방법에 있어서, 상기 로컬 데이터베이스 서버에 트랜잭션(Transaction)이 발생하면, 상기 로컬 데이터베이스 서버가 상기 트랜잭션에 상응하는 리두 로그(Redo Log)를 생성하는 단계; 상기 로컬 데이터베이스 서버가 상기 생성된 리두 로그를 원격지로 송신한 후, 리두 로그 파일(Redo Log File)을 저장하는 단계; 및 상기 원격지가 상기 로컬 데이터베이스 서버로부터 송신된 리두 로그를 파일을 수신하여 리두 로그 파일로 저장하는 단계를 포함하여 이루어지는 것을 특징으로 한다.
According to another aspect of the present invention, there is provided a database management method comprising: a local database server; a redo log generated when a transaction occurs in the local database; The present invention relates to a method of duplicating a database redo log without data loss in a redo log duplication system including a remote for replicating a local database The server generating a redo log corresponding to the transaction; Storing the redo log file after the local database server transmits the generated redo log to the remote site; And receiving the redo log transmitted from the local database server by the remote site and storing the redo log file as a redo log file.

이상에서 설명한 바와 같이, 본 발명에 따른 데이터 손실 없는 데이터베이스 리두 로그 이중화 방법 및 그를 위한 시스템에 의하면, 하드웨어의 구성 및 구조에 대한 변경 없이, 단순한 처리과정(소프트웨어)의 변경을 통해, 보다 안정되고 복구가 용이한 데이터베이스 시스템을 손쉽게 제공할 수 있다는 효과가 있다. As described above, according to the method and system for duplicating a database redo log without data loss according to the present invention, it is possible to perform more stable recovery It is possible to easily provide a database system that is easy to use.

또한, 본 발명의 일 실시예에 따른 데이터 손실 없는 데이터베이스 리두 로그 이중화 방법 및 그를 위한 시스템에 의하면, 데이터의 변경사항이 기록된 로그만을 원격지로 전송함으로써, 네트워크부하 및 복제부하를 최소화시킬 수 있다는 효과가 있다. In addition, according to the method of duplicating a database redo log without data loss according to an embodiment of the present invention and a system therefor, it is possible to minimize a network load and a replication load by transmitting only a log in which data changes are recorded to a remote location .

아울러, 본 발명의 일 실시예에 따른 데이터 손실 없는 데이터베이스 리두 로그 이중화 방법 및 그를 위한 시스템에 의하면, 트랜잭션이 발생함에 따라 변경된 데이터 및 관련정보를 이중화를 위한 원격지로 실시간 전송하여 저장함으로써, 데이터베이스의 비정상 운영 및 비정상 종료시에 발생하는 데이터 손실을 최소화할 수 있다는 효과가 있다.
In addition, according to the method of duplicating a database redo log without data loss according to an embodiment of the present invention, when changed data and related information are transmitted to a remote site in real time for storage, It is possible to minimize the data loss occurring during operation and abnormal termination.

도 1은 본 발명의 일 실시예에 따른 리두 로그 이중화를 위한 데이터베이스 시스템을 개략적으로 도시한 시스템도이다.
도 2는 본 발명의 일 실시예에 따른 리두 로그 이중화를 위한 로컬 데이터베이스 서버 및 원격지의 구성을 개략적으로 도시한 블록도이다.
도 3은 본 발명의 일 실시예에 따른 로컬 데이터베이스 서버에서 이루어지는 리두 로그 이중화 과정을 설명하기 위해 개략적으로 도시한 동작 흐름도이다.
도 4는 본 발명의 일 실시예에 따른 원격지에서 이루어지는 리두 로그 이중화 과정을 설명하기 위해 개략적으로 도시한 동작 흐름도이다.
도 5는 본 발명의 일 실시예에 따른 리두 로그 이중화 시스템에서 원격지의 리두 로그 파일이 손실 또는 손상된 경우, 원격지를 복구하는 방법을 설명하기 위해 도시한 도면이다.
도 6은 본 발명의 일 실시예에 따른 리두 로그 이중화 시스템의 동작을 설명하기 위해 시스템 구성을 개략적으로 도시한 도면이다.
도 7은 본 발명의 일 실시예에 따른 로컬 데이터베이스 서버 및 원격지 간에 이루어지는 리두 로그 이중화를 위한 데이터 송수신 동작을 설명하기 위해 도시한 도면이다.
1 is a system diagram schematically illustrating a database system for redo log duplication according to an embodiment of the present invention.
FIG. 2 is a block diagram schematically illustrating a configuration of a local database server and a remote site for redo log duplication according to an embodiment of the present invention. Referring to FIG.
FIG. 3 is a flowchart illustrating a redo log duplication process performed by a local database server according to an exemplary embodiment of the present invention.
4 is a flowchart illustrating a redo log duplication process performed at a remote location according to an exemplary embodiment of the present invention.
5 is a diagram illustrating a method for recovering a remote location when a redo log file is lost or damaged in a redo log duplication system according to an embodiment of the present invention.
FIG. 6 is a diagram schematically showing a system configuration to explain an operation of a redo log duplication system according to an embodiment of the present invention.
7 is a view for explaining a data transmission / reception operation for redo log duplication performed between a local database server and a remote site according to an embodiment of the present invention.

이하, 본 발명의 바람직한 실시예들을 첨부한 도면들을 참조하여 상세히 설명하도록 한다. 우선 각 도면의 구성요소들에 참조부호를 부가함에 있어서, 동일한 구성요소들에 대해서는 비록 다른 도면상에 표시되더라도 가능한 한 동일한 부호를 가지도록 하고 있음에 유의해야 한다. 또한, 본 발명을 설명함에 있어, 관련된 공지 구성 또는 기능에 대한 구체적인 설명이 본 발명의 요지를 흐릴 수 있다고 판단되는 경우에는 그 상세한 설명은 생략한다. Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings. In the drawings, the same reference numerals are used to designate the same or similar components throughout the drawings. In the following description of the present invention, a detailed description of known functions and configurations incorporated herein will be omitted when it may make the subject matter of the present invention rather unclear.

본 발명의 다양한 양상들이 아래에서 설명된다. 여기에서 제시되는 발명들은 폭넓은 다양한 형태들로 구현될 수 있으며, 여기에서 제시되는 임의의 특정한 구조, 기능 또는 이들 모두는 단지 예시적이라는 것을 이해하도록 한다. 여기에서 제시되는 발명들에 기반하여 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자는 여기에서 제시되는 하나의 양상이 임의의 다른 양상들과 독립적으로 구현될 수 있으며, 둘 이상의 이러한 양상들이 다양한 방식들로 결합될 수 있다는 것을 이해할 것이다. 예를 들어, 여기에서 설명되는 임의의 수의 양상들을 이용하여 장치가 구현될 수 있거나 또는 방법이 실시될 수 있다. 또한, 여기에서 설명되는 하나 이상의 양상들에 더하여 또는 이들 양상들이 아닌 다른 구조, 기능 또는 구조 및 기능을 이용하여 이러한 장치가 구현될 수 있거나 또는 이러한 방법이 실시될 수 있다. Various aspects of the invention are described below. The inventions set forth herein may be implemented in a wide variety of forms, and it is to be understood that any particular structure, function, or all of the presented features are illustrative only. It will be apparent to those skilled in the art, based on the inventions set forth herein, that one aspect set forth herein may be implemented independently of the other, and that such aspects may be implemented in various ways Lt; / RTI > For example, an apparatus may be implemented or a method may be practiced using any number of aspects set forth herein. In addition, or in addition to one or more aspects described herein, or with the aid of structures, functions, or structures and functions other than these aspects, such devices may be implemented or such methods may be practiced.

본 명세서에서 데이터베이스(Database)란, 서로 관련된 데이터들을 컴퓨터가 처리할 수 있는 형태로 저장하는 시스템을 의미한다. 즉, 데이터베이스는 데이터를 보관하고 사용자의 물음에 대답하는 시스템이라고 볼 수 있는데, 상기 데이터베이스에 저장된 데이터는 끊임없이 변화할 수 있다. 다시 말해서, 데이터베이스는 이러한 외부의 변화에 맞추어 적절히 저장된 데이터를 변경시킬 수 있어야 하는데, 새로운 데이터를 저장하거나 기존의 데이터를 삭제, 변경시키는 작업을 수행하는 것을 특징으로 한다. 이때, 데이터베이스에 저장되는 데이터는 일관성을 유지해야 한다.In this specification, a database means a system for storing data related to each other in a form that can be processed by a computer. That is, a database can be regarded as a system for storing data and answering a user's question, and the data stored in the database can be constantly changed. In other words, the database should be able to change the data stored appropriately in accordance with such external changes, which is characterized by storing new data or deleting or changing existing data. At this time, the data stored in the database must be consistent.

본 명세서에서 이중화(Replication)란, 시스템의 신뢰도와 가용성을 증대시키기 위해 동시에 여러 곳에 동일한 데이터를 저장하는 것을 의미한다. 즉, 데이터베이스를 이중화할 경우, 메인이 되는 데이터베이스에 장애가 발생해도 이중화되어 있는 원격지의 데이터를 투입하여 바로 서비스를 복구 가능하도록 구현될 수 있다. 특히, 인터넷 서비스를 하는 기업의 데이터베이스에는 쇼핑몰의 제품정보, 주문/결재내역 등을 비롯하여 언론사의 기사자료, 병원의 진료기록, 인터넷 커뮤니티 사이트의 게시판 자료 등 서비스에 필요한 각종 중요데이터들이 저장될 수 있는데, 해당 데이터베이스를 이중화할 경우, 늘어나는 사이트 접속자에 대응하여 부하를 분산시킬 수 있고, 서버에 장애가 발생해도 신속하게 서비스 복구가 가능하여 중단 없는 서비스를 제공할 수 있다. Replication in this specification means storing the same data in several places at the same time in order to increase the reliability and availability of the system. In other words, when a database is duplicated, even if a failure occurs in the main database, it is possible to restore the service immediately by inputting data of a remote site. In particular, databases of companies providing Internet services can store various important data necessary for services such as shopping mall product information, order / payment details, articles of journalists, medical records of hospitals, and bulletin boards of Internet community sites If the database is duplicated, the load can be distributed in response to an increasing number of site visitors, and even if a server fails, the service can be quickly restored, thereby providing an uninterrupted service.

본 명세서에서 트랜잭션(transaction)이란, 정보의 교환이나 데이터베이스 갱신 등 일련의 작업들에 대한 연속처리단위를 의미하며, 데이터베이스의 무결성이 보장되는 상태에서 요청된 작업을 완수하기 위한 작업의 기본 단위로 정의될 수도 있다. 예를 들어, 고객의 전화 주문을 받아 대리인이 주문 내용을 컴퓨터에 입력한다면, 데이터베이스로부터 재고량 조사, 주문 상품의 가용 여부 확인, 주문하기, 주문 상태 확인 등의 작업단계를 하나의 트랜잭션으로 볼 수 있는 것이다. 즉, 디지털 신호처리의 경우, 다수의 신호에 대한 처리를 동시에 병행하는 다중처리 방식이 취해지고 있는데, 트랜잭션은 각각의 독립적으로 처리되는 호에 관한 제어정보를 저장하기 위해 호에 대응하여 설계된 메모리 영역에서 각 처리 간 제어정보를 접수 및 관리할 수 있다. 따라서, 트랜잭션은 특정 작업처리를 위한 호에 상응하게 발생되며, 처리종료 후에는 다시 공백 상태로 되돌아가서 다른 호에 의하여 사용할 수 있다.In this specification, a transaction refers to a unit of continuous processing for a series of operations such as information exchange or database update, and is defined as a basic unit of work for completing a requested task in a state where the integrity of the database is guaranteed . For example, if a customer takes a telephone order and the agent enters the order into the computer, they can view the transaction steps from the database, such as checking inventory, checking availability of order items, placing orders, will be. That is, in the case of the digital signal processing, a multiprocessing system in which a plurality of signals are concurrently processed in parallel is provided. The transaction includes a memory area designed corresponding to a call to store control information on each independently processed call It is possible to receive and manage control information between the respective processes. Thus, a transaction occurs corresponding to a call for a specific job operation, and after the end of the transaction, it is returned to the empty state and can be used by another call.

본 명세서에서 리두(Redo)란, 데이터베이스 운영중에 트랜잭션 또는 운영정보의 발생 등과 같이, 데이터 변경에 관련된 내용을 모두 기록해 두었다가 장애에 대비하는 기능을 의미한다. 즉, 리두(Redo)를 통해 복구할 수 있는 장애로는 물리적으로 디스크가 깨지는 Media Fail 발생 시에 데이터베이스 복구를 위해 사용되는 데이터베이스 복구(Media recovery) 기능과, 인스턴스(Instance)가 비정상적으로 종료됐을 때 트랜잭션 데이터의 유실에 대비하기 위한 인스턴스 복구(Instance Recovery) 기능 및 트랜잭션 발생시에 우선 변경사항을 리두 로그(Redo log)에 기록하고, 메모리 데이터블록과 데이터 파일 간 동기화는 나중에 일괄적으로 수행하는 패스트 커밋(Fast Commit) 기능 등을 포함할 수 있다. In the present specification, "Redo" means a function to record all contents related to data change, such as occurrence of transaction or operational information during database operation, and prepare for a failure. That is, the failures that can be recovered through redo include a media recovery function used for database recovery in the event of a media failure that physically breaks the disk, and a data recovery function when the instance is abnormally terminated Instance Recovery function to prepare for the loss of transaction data and the first commit in the redo log when a transaction occurs and synchronize the memory data block and the data file later in a batch. (Fast Commit) function, and the like.

본 명세서에서 리두 로그 파일(Redo Log File)이란, 운영중인 데이터베이스 시스템 내에서 발생하는 장애에 대처하기 위해 저장되는 각종 정보인 리두 로그(Redo Log)를 정식으로 기록해두는 파일을 의미한다. 즉, 특정 데이터를 장애 발생 직전의 상태로 복원(Recovery)시키기 위해 필요한 데이터를 포함하는 파일로서, 예를 들어, 트랜잭션이 발생함에 따라 변경되는 데이터, 트랜잭션이 발생한 시점, 처리 시간, 데이터 변경 및 처리 내역 등 구체적인 내용을 포함할 수 있다. In this specification, a redo log file refers to a file that formally records a redo log, which is various information stored in order to cope with a failure occurring in an operating database system. That is, a file containing data necessary for restoring specific data to a state immediately before occurrence of a failure, for example, data to be changed as a transaction occurs, time when a transaction occurs, processing time, data change and processing And may include specific details such as details.

본 명세서에서 버퍼(Buffer)란, 데이터 이중화를 위해 데이터베이스에서 원격지로 로그 데이터를 전송할 경우, 양자 간 데이터의 전송속도 혹은 처리속도 차이를 보상하여 양호하게 결합시키기 위한 목적으로 사용되는 기억영역을 의미한다. 예를 들어, 데이터베이스로부터 로그 데이터가 수신되면, 원격지는 수신된 로그 데이터를 복사(Copy)하여 버퍼에 임시 저장한 후, 리두 로그 파일(Redo Log File)로 저장할 수 있다. 이때, 로그 데이터가 버퍼에 임시로 저장되어 있는 동안, 로그 데이터의 전송속도 및 처리속도가 보상되어 전체적인 시스템 성능이 향상될 수 있다. In this specification, a buffer refers to a storage area used for the purpose of compensating for a difference in transmission speed or processing speed between two data when transferring log data from a database to a remote place for data duplication . For example, when log data is received from a database, the remote site may copy the received log data, temporarily store the log data in a buffer, and store the log data in a redo log file. At this time, while the log data is temporarily stored in the buffer, the transmission speed and the processing speed of the log data are compensated to improve the overall system performance.

본 발명에서 원격지 복구(Recovery)란, 이중화 운영 중에 원격지에서 손실 혹은 손상되는 리두 로그 파일을 복구하는 것을 의미한다. 예를 들어, 원격지의 전원이 Off되는 경우, 해당 시점 동안은 로컬 데이터베이스 서버로부터 실시간 송신되는 리두 로그를 수신할 수 없다. 따라서, 해당 시점 동안의 리두 로그가 원격지에 저장되어 있지 않으므로, 유실된 데이터를 확인하여 상기 로컬 데이터베이스 서버로부터 다시 가져오는 과정을 수행하여 원격지의 리두 로그 파일을 복구할 수 있다. In the present invention, remote recovery means recovery of a redo log file lost or damaged at a remote site during a duplication operation. For example, if the power of the remote site is turned off, the redo log can not be received in real time from the local database server during that time. Accordingly, since the redo log for the point in time is not stored in the remote location, the lost data can be checked and retrieved from the local database server to recover the redo log file of the remote location.

이하에서는, 첨부한 도면을 참조하여 본 발명에 따른 바람직한 실시예를 상세히 설명하도록 한다.Hereinafter, preferred embodiments of the present invention will be described in detail with reference to the accompanying drawings.

도 1은 본 발명의 일 실시예에 따른 리두 로그 이중화를 위한 데이터베이스 시스템을 개략적으로 도시한 시스템도이다.1 is a system diagram schematically illustrating a database system for redo log duplication according to an embodiment of the present invention.

도 1에 도시된 바와 같이, 본 발명의 일 실시예에 따른 데이터베이스 시스템은 로컬 데이터베이스 서버(110) 및 원격지(120)를 포함하여 구성될 수 있다. 상기 로컬 데이터베이스 서버(110)는 특정 서비스를 운영하는 서버를 포함할 수 있고, 상기 원격지(120)는 장애 및 사고 등에 대비하여 로컬 데이터베이스 서버(110)의 안전성을 향상시키기 위해 이중화(Replication)되는 타겟(Target) 장치로서, 하드웨어(H/W) 또는 소프트웨어(S/W) 형태로 구현될 수 있다. 한편, 상기 로컬 데이터베이스 서버(110)는 (a)과정과 같이, 외부로부터 입력되는 명령을 수신하고, 상기 명령에 대응되는 피드백을 출력할 수 있다. 그리고, 원격지(120)는 상기 로컬 데이터베이스 서버(110)에 저장되어 있는 데이터를 이중화(Replication)하기 위한 시스템을 포함할 수 있다. 이때, (b)과정은 로컬 데이터베이스 서버(110)의 이중화 방향을 나타내는 것으로서, 로컬 데이터베이스로부터 원격지로 단방향에 의해서만 이루어진다. 그리고 (c)과정은 로컬 데이터베이스 서버(110)와 원격지(120) 간의 통신 방향을 나타내는 것으로서, 양방향으로 이루어질 수 있다. 예를 들어, 상기 (c)과정은 장애 복구를 위해 로컬 데이터베이스 서버(110)가 원격지(120)와 데이터를 송수신하는 모든 과정을 포함할 수 있다. As shown in FIG. 1, a database system according to an embodiment of the present invention may include a local database server 110 and a remote site 120. The local database server 110 may include a server that operates a specific service. The remote site 120 may include a target to be replicated in order to improve the safety of the local database server 110, (H / W) or software (S / W) as a target device. Meanwhile, the local database server 110 may receive an instruction input from the outside and output feedback corresponding to the instruction, as in the process (a). The remote site 120 may include a system for replicating data stored in the local database server 110. In this case, the process (b) represents the redundancy direction of the local database server 110, and is performed only in one direction from the local database to the remote location. (C) shows the communication direction between the local database server 110 and the remote site 120, and can be performed in both directions. For example, the process (c) may include all processes in which the local database server 110 transmits / receives data to / from the remote site 120 for failover.

따라서, 본 발명에 따른 리두 로그 이중화 시스템은, 데이터베이스 서버에 트랜잭션이 발생하면, 그에 대응되는 리두 로그를 생성하여 특정 원격지에 우선적으로 송신 및 저장하여 이중화함으로써, 예기치 못한 장애가 발생할 경우에 원격지에 이중화되어 있는 리두 로그를 이용해 데이터베이스를 복구하여 데이터 손실을 최소화할 수 있다는 장점이 있다. Therefore, when a transaction occurs in the database server, the redo log duplication system according to the present invention generates a redo log corresponding to the transaction, and preferentially transmits and stores the redo log to a specific remote site so that the redo log is redundantly duplicated in the remote place when an unexpected failure occurs It has the advantage of minimizing data loss by restoring the database using the redo log.

또한, 본 발명에 따른 리두 로그 이중화 시스템은, 데이터베이스 서버에 트랜잭션이 발생하면, 트랜잭션과 관련한 변경사항을 리두 로그로 생성하고 원격지로 전송하여 이중화시킴으로써, 데이터 변경사항이 기록된 로그만을 원격지로 전송함으로써, 네트워크부하 및 복제부하를 최소화시킬 수 있다는 장점이 있다.
In addition, when a transaction occurs in the database server, the redo log duplication system according to the present invention creates a redo log as a redo log and transmits the redo log to a remote site to duplicate the log, , Network load and replication load can be minimized.

도 2는 본 발명의 일 실시예에 따른 리두 로그 이중화를 위한 로컬 데이터베이스 서버 및 원격지의 구성을 개략적으로 도시한 블록도이다. FIG. 2 is a block diagram schematically illustrating a configuration of a local database server and a remote site for redo log duplication according to an embodiment of the present invention. Referring to FIG.

도 2에 도시된 바와 같이, 본 발명의 일 실시예에 따른 리두 로그 이중화를 위한 데이터베이스 시스템은 로컬 데이터베이스 서버(210) 및 상기 로컬데이터베이스 서버(210)에 트랜잭션(transaction)이 발생할 경우에 생성되는 리두 로그(Redo Log)를 이중화(Replication)하기 위한 원격지(220)를 포함하여 구성될 수 있다. 2, a database system for redo log duplication according to an embodiment of the present invention includes a local database server 210 and a local database server 210. The local database server 210 includes a local database server 210, And a remote site 220 for replicating a redo log.

상기 로컬 데이터베이스 서버(210)는 로컬 제어부(211), 데이터베이스(212) 및 로컬 통신부(213)를 포함하여 구성될 수 있다. The local database server 210 may include a local control unit 211, a database 212, and a local communication unit 213.

상기 로컬 제어부(211)는 로컬 데이터베이스 서버에 트랜잭션(Transaction)이 발생하면, 상기 트랜잭션에 상응하는 리두 로그(Redo Log)를 생성하여 원격지로 송신한 후, 상기 생성된 리두 로그를 상기 데이터베이스에 리두 로그 파일(Redo Log File)로 저장하도록 제어할 수 있다. 즉, 상기 로컬 제어부(211)는 로컬 데이터베이스 서버에 트랜잭션이 발생하여 데이터가 변경된 경우, 장애 및 사고에 대비하여 상기 데이터의 변경사항이 기록된 리두 로그를 생성할 수 있다. 그리고 상기 로컬 제어부(211)는 상기 생성된 리두 로그를 이중화하기 위해 원격지에 먼저 송신한 다음, 로컬 데이터베이스 서버의 데이터베이스(212)에 저장하도록 제어할 수 있다. 이때, 상기 로컬 제어부(211)는 생성된 리두 로그를 버퍼(Buffer)에 복사하여 임시로 저장하였다가, 데이터베이스(212)에 리두 로그 파일(Redo Log File)로 정식으로 저장하도록 제어할 수도 있다. 다시 말해서, 상기 로컬 제어부(211)는 해당 트랜잭션이 데이터베이스에 반영되기 전에 리두 로그를 먼저 생성하여 원격지(220)로 송신함으로써, 원격지(220)에 이중화된 데이터가 트랜잭션이 발생한 후 가장 최초로 발생한 데이터가 되도록 유지할 수 있다. When a transaction occurs in the local database server, the local control unit 211 generates a redo log corresponding to the transaction and transmits the redo log to the remote site. Then, the local control unit 211 transmits the generated redo log to the database, File (Redo Log File). That is, when the data is changed due to a transaction occurring in the local database server, the local control unit 211 may generate a redo log in which the change of the data is recorded in preparation for a failure or an accident. The local control unit 211 may transmit the generated redo log to the remote site first and then store the redo log in the database 212 of the local database server. At this time, the local controller 211 may copy the generated redo log to the buffer, temporarily store the redo log, and then store the redo log file in the database 212 in a form of a redo log file. In other words, before the transaction is reflected in the database, the local control unit 211 first generates a redo log and transmits the redo log to the remote site 220 so that the data that is duplicated in the remote site 220 .

상기 데이터베이스(212)는 상기 로컬 제어부(211)의 제어에 따라, 로컬 제어부(211)를 통해 생성된 리두 로그를 파일로 정식 저장할 수 있다. 또한, 상기 데이터베이스(212)는 로컬 데이터베이스 서버에 구비되는 것으로서, 로컬 데이터베이스 서버에 필요한 각종 데이터를 저장할 수 있다. The database 212 may store the redo log generated through the local control unit 211 as a file under the control of the local control unit 211. In addition, the database 212 is provided in a local database server, and can store various data required for a local database server.

상기 로컬 통신부(213)는 로컬 제어부(211)의 제어에 따라, 생성된 리두 로그를 원격지로 송신할 수 있다. 상기 로컬 통신부(213)는 유/무선 통신 방식으로 구현될 수 있다. 상기 로컬 통신부(213)는 이중화를 위해 생성된 리두 로그를 원격지(220)로 송신하고, 추후에 원격지(220)로부터 송신되는 리두 로그 처리결과에 관련된 정보들을 수신할 수 있다. 또한, 상기 로컬 통신부(213)는 추후 데이터 복구 과정에서 필요한 각종 데이터 및 정보들을 더 수신할 수 있다. The local communication unit 213 can transmit the generated redo log to the remote site under the control of the local control unit 211. [ The local communication unit 213 may be implemented by a wired / wireless communication scheme. The local communication unit 213 may transmit the redo log generated for redundancy to the remote site 220 and may receive information related to the redo log processing result transmitted from the remote site 220 in the future. In addition, the local communication unit 213 may further receive various data and information necessary for data recovery in the future.

한편, 상기 원격지는 원격 통신부(221), 원격 제어부(222) 및 원격 저장부(223)를 포함하여 구성될 수 있다. The remote site may include a remote communication unit 221, a remote control unit 222, and a remote storage unit 223.

상기 원격 통신부(221)는 로컬 데이터베이스 서버(210)에 구비된 로컬 통신부(213)로부터 리두 로그를 수신하여 원격 제어부(222)로 전달할 수 있다. 상기 원격 통신부(221)는 로컬 데이터베이스 서버(210)와 원격지(220) 간의 통신을 지원하는 것으로서, 이중화 및 복구 전반에 사용되는 데이터 송/수신 처리에 관여할 수 있다. The remote communication unit 221 may receive the redo log from the local communication unit 213 included in the local database server 210 and may transmit the redo log to the remote control unit 222. The remote communication unit 221 supports communication between the local database server 210 and the remote site 220. The remote communication unit 221 can participate in data transmission / reception processes used for redundancy and recovery.

상기 원격 제어부(222)는 원격 통신부(221)로부터 전달받은 리두 로그를 저장부에 저장하도록 제어할 수 있다. 이때, 상기 원격 제어부(222)은 동기(Sync) 또는 비동기(Async) 방식으로 상기 리두 로그를 저장할 수 있는데, 비동기(Async) 방식으로 리두 로그를 저장할 경우는 상기 리두 로그를 버퍼에 복사하여 임시저장하였다가 원격 저장부(223)에 리두 로그 파일로 정식 저장할 수 있다. 반면, 동기(Sync) 방식으로 리두 로그를 저장할 경우는 버퍼에 임시저장하는 과정을 거치지 않고 직접 리두 로그 파일로 저장할 수 있다. 상기 동기화 혹은 비동기화 방식으로 리두 로그를 저장하는 방법은 로컬 데이터베이스 서버(210)의 데이터베이스(220)에도 적용될 수 있으며, 해당 과정에 대해서는 도 4에서 더욱 상세하게 설명하기로 한다.The remote control unit 222 may control the redo log received from the remote communication unit 221 to be stored in the storage unit. In this case, the remote controller 222 may store the redo log in a synchronous or asynchronous manner. When the redo log is stored in an asynchronous mode, the remote controller 222 copies the redo log to a buffer, And can formally store it as a redo log file in the remote storage unit 223. On the other hand, when the redo log is stored by the synchronous method, the redo log file can be directly stored without being temporarily stored in the buffer. The method of storing the redo log in the synchronous or asynchronous manner may be applied to the database 220 of the local database server 210, and the process will be described in more detail with reference to FIG.

상기 원격 저장부(223)는 원격 제어부(222)의 제어에 따라, 리두 로그를 파일로 저장할 수 있다. 이때, 상기 원격 저장부(223)는 로컬 데이터베이스 서버(210)의 데이터와 동일한 구조의 데이터를 저장하는 것으로서, 상기 데이터를 카테고리별 테이블 형태로 구분 및 저장할 수 있다.
The remote storage unit 223 may store the redo log as a file under the control of the remote control unit 222. [ At this time, the remote storage unit 223 stores data having the same structure as the data of the local database server 210, and can store and store the data into a table form according to a category.

도 3은 본 발명의 일 실시예에 따른 로컬 데이터베이스 서버에서 이루어지는 리두 로그 이중화 과정을 설명하기 위해 개략적으로 도시한 동작 흐름도이다.FIG. 3 is a flowchart illustrating a redo log duplication process performed by a local database server according to an exemplary embodiment of the present invention.

도 3에 도시된 바와 같이, 본 발명의 일 실시예에 따른 로컬 데이터베이스 서버는 As shown in FIG. 3, the local database server according to an embodiment of the present invention

로컬 데이터베이스 서버에 특정 트랜잭션이 발생할 경우, 해당 트랜잭션에 대응되는 리두 로그를 생성하여 원격지에 우선적으로 전송하여 저장할 수 있다. When a specific transaction occurs in the local database server, a redo log corresponding to the transaction can be generated and transmitted to the remote site for storage.

우선, 로컬 데이터베이스 서버에 트랜잭션이 발생하면, 로컬 데이터베이스 서버가 리두 로그를 생성할 수 있다[S310, S320]. 즉, 로컬 데이터베이스 서버에 데이터베이스 운영 중에 운영정보의 발생 등과 같이 데이터 변경에 의한 트랜잭션이 발생하면, 상기 로컬 데이터베이스 서버는 추후에 발생할지도 모르는 장애나 사고에 대비하여 데이터 변경에 관련된 리두 로그(Redo Log)를 생성하여 이중화(Replication)를 위한 장비(즉, 원격지)로 송신할 수 있다. 상기 리두 로그는 데이터 변경에 관련된 관련정보를 포함할 수 있으며, 상기 로컬 데이터베이스 서버는 상기 발생한 트랜잭션이 데이터베이스에 반영되기 전에 리두 로그를 먼저 생성하여 원격지로 송신할 수 있다. First, when a transaction occurs in the local database server, the local database server can generate the redo log (S310, S320). That is, when a transaction occurs due to a data change such as generation of operational information during operation of a database in a local database server, the local database server stores a redo log related to data change in preparation for a future failure or accident, And transmit it to a device for replication (i.e., a remote place). The redo log may include related information related to the data change, and the local database server may generate the redo log first and transmit the generated redo log to the remote site before the generated transaction is reflected in the database.

그리고 이중화 수행이 요구되면, 상기 로컬 데이터베이스 서버는 상기 생성된 리두 로그를 원격지로 송신한 다음, 해당 리두 로그를 데이터베이스에 저장할 수 있다[S330, S340, S350]. 즉, 로컬 데이터베이스 서버는 생시 생성된 리두 로그를 해당 데이터베이스에 저장하기 전에 먼저 원격지로 송신한 후 리두 로그 파일(Redo Log File)로 정식 저장할 수 있다. 이에, 추후에 로컬 데이터베이스에 장애 혹은 사고가 발생할 경우, 원격지에 이중화시켜 둔 리두 로그를 이용해 시스템을 복구함으로써, 데이터의 유실 없이 가장 최근의 데이터(시스템 장애 전에 저장된 가장 최근 데이터)를 복원할 수 있다. 이때, 상기 로컬 데이터베이스 서버는 상기 리두 로그를 원격지로 송신하기 전에 해당 시스템의 버퍼에 리두 로그를 복사하여 임시 저장할 수도 있다. If duplication is required, the local database server may transmit the generated redo log to the remote site and then store the redo log in the database (S330, S340, S350). That is, the local database server can transmit the generated redo log to the remote site before storing the redo log in the database, and then store the redo log file (redo log file). Therefore, if a failure or an accident occurs in the local database in the future, the system can be restored using the redo log that is duplicated at the remote site, so that the most recent data (the most recent data stored before the system failure) can be restored without loss of data . At this time, the local database server may copy the redo log to the buffer of the corresponding system and temporarily store the redo log before transmitting the redo log to the remote site.

이후, 원격지로부터 상기 전송된 리두 로그에 대한 처리결과가 수신되면, 로컬 데이터베이스 서버는 상기 전송된 처리결과를 확인한 후, 트랜잭션을 종료할 수 있다[S360, S370, S380], 즉, 로컬 데이터베이스 서버는 상기 리두 로그를 이중화한 원격지로부터 리두 로그 처리결과에 대해 수신하여 해당 트랜잭션을 종료할 수 있다. 이때, 상기 원격지로부터 수신된 리두 로그 처리 결과가 수신되면, 상기 로컬 데이터베이스 서버는 데이터베이스에 파일로 저장한 리두 로그의 LSN(Log Sequence Number)과 원격지에서 처리되어 수신된 LSN을 비교하여 정상적으로 처리되었을 경우에 해당 트랜잭션을 종료할 수 있다. 만약 비교결과, 로컬 데이터베이스 서버의 LSN과 원격지로부터 수신한 LSN이 같지 않을 경우, 상기 트랜잭션은 대기를 지속하여 계속 비교를 수행할 수 있다. 한편, 원격지로부터 리두 로그 처리결과가 수신되지 않을 경우, 상기 로컬 데이터베이스 서버는 해당 트랜잭션을 종료시키지 않은 상태에서 처리결과의 수신을 계속 대기할 수 있다. If the processing result of the redo log is received from the remote site, the local database server may terminate the transaction after checking the transferred processing result (S360, S370, S380). That is, It is possible to receive the redo log processing result from the remote site where the redo log is duplicated and end the transaction. At this time, when the redo log processing result received from the remote site is received, the local database server compares the LSN (Log Sequence Number) of the redo log stored as a file in the database with the LSN processed and received at the remote site, To terminate the transaction. If the result of the comparison is that the LSN of the local database server is not the same as the LSN received from the remote location, the transaction can continue to wait and continue the comparison. On the other hand, if the redo log processing result is not received from the remote site, the local database server can wait to receive the processing result without terminating the transaction.

상기한 바와 같이, 본 발명에 따른 리두 로그(Redo Log) 이중화의 경우, 데이터베이스 운영중에 수행되는 트랜잭션(transaction) 및 운영정보를 저장하는 리두 로그 파일(Redo Log File)을 이용하여 데이터베이스를 복구할 수 있는데, 이러한 리두 로그 파일은 WAL(Write Ahead Log)에 따라 데이터베이스에 변경된 내용을 반영하기 전에 반드시 먼저 저장하여, 예고 없이 발생하는 시스템 장애에 항시 대비할 수 있다는 장점이 있다.
As described above, in the case of redo log redundancy according to the present invention, a database can be recovered using a redo log file that stores transaction and operation information performed during database operation. These redo log files are saved in advance before reflecting changes to the database according to the WAL (Write Ahead Log), so that they can always be prepared against system failures that occur without notice.

도 4는 본 발명의 일 실시예에 따른 원격지에서 이루어지는 리두 로그 이중화 과정을 설명하기 위해 개략적으로 도시한 동작 흐름도이다. 4 is a flowchart illustrating a redo log duplication process performed at a remote location according to an exemplary embodiment of the present invention.

도 4에 도시된 바와 같이, 본 발명에 따른 원격지는 로컬 데이터베이스 서버로부터 이중화를 위해 생성되는 리두 로그를 수신 및 저장하여 추후 발생할 수 있는 사고나 장애에 사전 대비할 수 있다.As shown in FIG. 4, the remote site according to the present invention receives and stores a redo log generated for redundancy from a local database server, so that it can prepare for future accidents or failures.

우선, 로컬 데이터베이스 서버로부터 리두 로그가 송신되면, 원격지가 이를 수신할 수 있다[S410]. 상기 리두 로그는 로컬 데이터베이스 서버에 트랜잭션이 발생한 경우 생성되어 상기 로컬 데이터베이스 서버에 저장되기 전에 먼저 원격지로 송신될 수 있다. 즉, 상기 리두 로그는 상기 로컬 데이터베이스 서버는 상기 발생한 트랜잭션이 데이터베이스에 반영되기 전에 생성된 것이다.First, when the redo log is transmitted from the local database server, the remote site can receive the redo log (S410). The redo log may be generated when a transaction occurs in a local database server and may be transmitted to a remote site before being stored in the local database server. That is, the redo log is generated in the local database server before the generated transaction is reflected in the database.

이때, 상기 원격지가 상기 로컬 데이터베이스 서버로부터 수신한 리두 로그를 동기(Sync) 방식으로 저장하고자 하는 경우, 상기 원격지는 리두 로그를 파일로 저장할 수 있다[S420, S450]. 즉, 상기 원격지의 저장방식이 동기 방식으로 설정되어 있을 경우, 상기 원격지는 리두 로그를 곧바로 리두 로그 파일로 저장할 수 있다. 상기 리두 로그 파일은 추후 복구를 위해 사용되는 파일로서, 아카이빙(Archiving)되어 있는 파일을 포함할 수 있다. 그리고 상기 저장방식은 원격지를 최초 세팅할 경우 설정되거나, 혹은 사용자에 의해 실시간으로 설정될 수 있다. At this time, if the remote site wants to store the redo log received from the local database server in a synchronous manner, the remote site can store the redo log as a file (S420, S450). That is, when the remote storage mode is set to the synchronous mode, the remote site can directly store the redo log as a redo log file. The redo log file is a file used for later recovery, and may include a file archived. The storage mode may be set when the remote location is initially set, or may be set in real time by the user.

한편, 상기 원격지가 리두 로그를 비동기(Async) 방식으로 저장하고자 하는 경우, 상기 원격지는 상기 리두 로그를 버퍼(buffer)에 우선 복사하였다가, 해당 버퍼가 풀(Full) 상태가 되면 리두 로그를 파일로 정식 저장할 수 있다[S420, S430, S440, S450]. 즉, 상기 원격지의 저장방식이 비동기 방식으로 설정되어 있을 경우, 상기 원격지는 리두 로그를 복사하여 버퍼에 임시로 저장할 수 있다. 이때, 버퍼가 풀(Full) 상태인 경우, 버퍼에 있는 내용을 파일로 저장할 수 있다. On the other hand, when the remote site wants to store the redo log in an asynchronous manner, the remote copy first copies the redo log into a buffer, and when the corresponding buffer becomes full, (S420, S430, S440, S450). That is, when the remote storage mode is set to the asynchronous mode, the remote host can copy the redo log and temporarily store the redo log in the buffer. At this time, if the buffer is full, the contents of the buffer can be stored in a file.

다시 말해서, 리두 로그를 파일로 저장할 때에는 많은 시간이 소요되는데, 일반적으로 같은 데이터를 여러 번에 나누어 파일로 저장하는 것보다 한번에 파일로 저장하는 것이 시간이 훨씬 적게 소요될 수 있다. 이때, 상기 시간은 단순히 리두 로그를 저장하기 위한 시간이기도 하지만, 원격지의 처리결과를 대기하고 있는 시간도 포함할 수 있기 때문에, 동기 방식과 비동기 방식에는 성능의 차이가 발생하게 된다. 즉, 동기(Sync) 방식의 경우에는 로컬 데이터베이스 서버의 리두 로그 파일과 원격지의 리두 로그 파일이 순간적으로 동일하게 유지된 상태에서 이중화가 유지될 수 있으며, 비동기(Async) 방식의 경우에는 순간적으로는 다를 수 있지만, 일정 시간이 지난 후에는 로컬 데이터베이스 서버와 원격지의 리두 로그 파일이 동일하게 유지될 수 있다. In other words, it takes a lot of time to save a redo log to a file. In general, it may take much less time to save a file at a time than to save the same data in multiple files. At this time, although the time is simply a time for storing the redo log, it may include a time waiting for the result of the remote processing, so that there is a difference in performance between the synchronous method and the asynchronous method. That is, in the case of the synchronous method, redundancy can be maintained while the redo log file of the local database server and the redo log file of the remote location are instantaneously kept the same, and in the case of the asynchronous method, However, after a certain period of time, the local database server and remote redo log files can be kept the same.

그런 다음, 상기 원격지는 리두 로그 처리결과를 로컬 데이터베이스 서버로 송신할 수 있다[S460]. 즉, 상기 원격지는 리두 로그를 파일로 저장한 후, 해당 결과를 로컬 데이터베이스 서버로 송신할 수 있다.
Then, the remote site may transmit the redo log processing result to the local database server (S460). That is, the remote site may save the redo log as a file, and then transmit the result to the local database server.

도 5는 본 발명의 일 실시예에 따른 리두 로그 이중화 시스템에서 원격지의 리두 로그 파일이 손실 또는 손상된 경우, 원격지를 복구하는 방법을 설명하기 위해 도시한 도면이다. 5 is a diagram illustrating a method for recovering a remote location when a redo log file is lost or damaged in a redo log duplication system according to an embodiment of the present invention.

도 5에 도시된 바와 같이, 본 발명에 따른 리두 로그 이중화 시스템은 원격지에 사고 또는 장애가 발생할 경우, 로컬 데이터베이스 서버의 동작만으로 상기 원격지에 저장되는 리두 로그 파일을 복구할 수 있다.As shown in FIG. 5, the redo log duplication system according to the present invention can recover a redo log file stored at the remote site only by the operation of the local database server when an accident or a failure occurs at a remote site.

우선, 로컬 데이터베이스 서버가 원격지에 리두 로그 파일의 상태정보를 요청하여 수신할 수 있다[S510]. 즉, 원격지가 이중화 운영 중에 종료될 수 있는데, 이때, 로컬 데이터베이스 서버는 상기 원격지로부터 리두 로그 파일의 상태정보를 수신하여 수신된 상태정보를 근거로 이중화를 재시도하여 상기 원격지를 복구(Recovery)할 수 있다. 상기 상태정보는 이중화를 위해 원격지에 저장되어 있는 리두 로그 파일의 마지막 상태를 의미하는 것으로서, 이는 원격지에 반영되지 못한 리두 로그의 복구 시작지점을 얻기 위한 정보이다. First, the local database server can request and receive status information of the redo log file at a remote location (S510). That is, the remote site can be terminated during the redundancy operation. At this time, the local database server receives the status information of the redo log file from the remote site and retries the redundancy based on the received status information to recover the remote site . The status information indicates the last status of a redo log file stored at a remote location for redundancy, and is information for obtaining a recovery start point of a redo log that is not reflected at a remote location.

이때, 상기 원격지로부터 수신된 리두 로그 파일의 상태정보에 로컬 데이터베이스 서버의 리두 로그 파일이 모두 반영되어 있다면, 상기 로컬 데이터베이스 서버는 버퍼에 저장되어 있는 리두 로그가 파일로 저장되지 못하도록 파일을 잠금 설정하고, 이중화 수행 여부를 변경한 후에 파일을 잠금 해제할 수 있다[S520, S530, S540, S550]. 즉, 상기 원격지로부터 수신되는 리두 로그 파일의 상태정보가 상기 로컬 데이터베이스 서버의 리두 로그 파일을 모두 반영하고 있을 경우, 상기 로컬 데이터베이스 서버는 일반적인 이중화 처리과정을 거치기 위해 이중화 수행 여부를 변경할 수 있다. 이때, 상기 이중화 수행 여부를 변경하는 동안에는 이중화 처리과정을 거치기 위해 버퍼에 복사되어 있는 리두 로그가 파일로 저장되지 않도록 버퍼 또는 리두 로그 파일을 잠금 설정할 수 있다. 이는, 이중화 수행 여부를 변경하는 도중에 버퍼의 내용이 파일로 저장되어 이중화되는 파일의 상태가 동일하지 않게 되는 것을 방지하기 위해 수행할 수 있다. 다시 말해서, 로컬 데이터베이스 서버는 복구를 수행하지만, 원격지에서는 해당 과정이 복구를 위한 과정인지 일반적인 운영과정인지 구분할 수 없으므로, 원격지에서는 수신된 데이터를 저장하고 처리된 결과를 송신하는 과정을 반복하는 방식으로 일반 처리과정과 동일하게 동작할 수 있다. 그리고 이중화 수행 여부가 변경된 이후에는 버퍼의 내용을 파일로 저장할 수 있도록 잠금을 해제할 수 있는데, 이에, 잠금이 해제된 이후에는 리두 로그 파일로 저장되는 내용은 이중화 과정을 수행하는데 사용될 수 있다. If the redo log file of the local database server is reflected in the status information of the redo log file received from the remote site, the local database server locks the file so that the redo log stored in the buffer is not saved as a file , The file can be unlocked after changing whether to perform the duplication (S520, S530, S540, S550). That is, when the status information of the redo log file received from the remote site reflects all of the redo log files of the local database server, the local database server can change whether or not the redo log file is subjected to a general redo process. At this time, the buffer or the redo log file may be locked so that the redo log copied to the buffer is not saved as a file in order to perform a redundancy process while changing the redundancy performance. This can be performed in order to prevent the contents of the buffer to be stored in the file during the change of whether to perform the redundancy so that the states of the files to be duplicated become unequal. In other words, the local database server performs recovery, but it can not distinguish whether the process is a recovery process or a general operation process at the remote site. Therefore, the remote site stores the received data and repeats the process of transmitting the processed result It can operate in the same manner as the general process. After the replication is performed, the contents of the buffer can be released to be stored in a file. After the lock is released, the contents stored in the redo log file can be used to perform the redundancy process.

한편, 상기 원격지로부터 수신되는 리두 로그 파일의 상태정보가 상기 로컬 데이터베이스 서버의 리두 로그 파일을 모두 반영하고 있지 않을 경우, 상기 로컬 데이터베이스 서버는 상기 상태정보에 대응되는 리두 로그 파일을 읽어 상기 원격지로 재전송할 수 있다[S520, S560]. 즉, 상기 로컬 데이터베이스 서버가 원격지로부터 수신된 리두 로그 파일의 상태정보를 분석할 수 있다. 그리고 분석결과, 로컬 데이터베이스 서버의 리두 로그 파일이 원격지에 모두 반영되어 있다고 판단되지 않으면, 상기 로컬 데이터베이스 서버는 이중화를 다시 수행하기 위해 리두 로그를 원격지로 재송신할 수 있는데, 상기 로컬 데이터베이스 서버로부터 재송신되는 리두 로그 파일은 온라인(Online) 리두 로그 파일 또는 아카이빙(Archiving)되어 있는 파일을 포함할 수 있다. 이때, 상기 로컬 데이터베이스 서버는 상기 원격지로 재송신하기 위한 리두 로그의 LSN(Log Sequence Number)과 수신을 위한 LSN을 비교하여 둘이 동일할 경우에 해당 과정을 수행할 수 있다. On the other hand, when the status information of the redo log file received from the remote site does not reflect all of the redo log files of the local database server, the local database server reads the redo log file corresponding to the status information and retransmits (S520, S560). That is, the local database server can analyze the status information of the redo log file received from the remote site. If it is determined that the redo log file of the local database server is not reflected to the remote site, the local database server may retransmit the redo log to the remote site to perform redundancy again. Redo log files can contain online redo log files or archived files. At this time, the local database server compares the LSN (Log Sequence Number) of the redo log for retransmission to the remote location and the LSN for reception, and performs a corresponding process when they are the same.

상기한 바와 같이, 본 발명의 일 실시예에 따른 리두 로그 이중화 시스템은 원격지에 사고 또는 장애가 발생하여 데이터가 유실되는 경우에도, 로컬 데이터베이스 서버의 동작만으로 원격지를 복구할 수 있으므로, 원격지에서는 처리과정의 변화 없이 일반적인 과정으로 데이터를 처리하기만 하면 된다는 장점이 있다.
As described above, the redo log duplication system according to an embodiment of the present invention can recover a remote location only by the operation of the local database server even when data is lost due to an accident or a failure at a remote site. The advantage is that you only need to process the data in a normal process without change.

도 6은 본 발명의 일 실시예에 따른 리두 로그 이중화 시스템의 동작을 설명하기 위해 시스템 구성을 개략적으로 도시한 도면이고, 도 7은 본 발명의 일 실시예에 따른 로컬 데이터베이스 서버 및 원격지 간에 이루어지는 리두 로그 이중화를 위한 데이터 송수신 동작을 설명하기 위해 도시한 도면이다. FIG. 6 is a diagram schematically showing a system configuration for explaining the operation of the redo log duplication system according to an embodiment of the present invention. FIG. 7 is a schematic diagram of a redo log FIG. 6 is a diagram illustrating a data transmission / reception operation for log duplication. FIG.

이하에서는, 도 6에 도시된 데이터베이스 시스템을 참조로, 도 7에 도시된 데이터베이스 시스템의 리두 로그 이중화를 위한 데이터 송수신 동작을 설명하기로 한다. Hereinafter, the operation of data transmission / reception for redo log duplication in the database system shown in FIG. 7 will be described with reference to the database system shown in FIG.

우선, 도 6에 도시된 바와 같이, 본 발명에 따른 데이터베이스 시스템(611)은 리두 로그 버퍼(612) 및 리두 로그 파일(613)을 포함하여 구성될 수 있고, 원격지(620)는 리시버(621), 버퍼(622) 및 리두 로그 파일(623)를 포함하여 구성될 수 있다. 상기 리두 로그 버퍼(612, 622) 및 리두 로그 파일(613, 623)은 테이블 형태로 구현되어 상기 데이터베이스(610) 내에 존재할 수 있다.6, the database system 611 according to the present invention may include a redo log buffer 612 and a redo log file 613, and the remote site 620 may include a receiver 621, A buffer 622, and a redo log file 623, as shown in FIG. The redo log buffers 612 and 622 and the redo log files 613 and 623 may be implemented in a table form and exist in the database 610.

도 5에 도시된 바와 같이, 본 발명에 따른 이중화된 데이터베이스 시스템은, 상기 데이터베이스에 트랜잭션이 발생하면, 상기 트랜잭션에 상응하는 로그 데이터(Log Data)를 생성한다[S710, S711]. 상기 트랜잭션은 정보의 교환이나 데이터베이스 갱신 등 일련의 작업에 대한 처리 과정을 포함할 수 있다. 그리고 상기 로그 데이터는 운영중인 데이터베이스 시스템 내에 발생할 수 있는 장애에 대처하기 위해 저장되는 각종 정보를 포함할 수 있다. As shown in FIG. 5, when a transaction occurs in the database, the duplicated database system according to the present invention generates log data corresponding to the transaction (S 710, S 711). The transaction may include a process for a series of operations, such as exchanging information or updating a database. The log data may include various information stored in order to cope with a failure that may occur in an operating database system.

이후, 상기 데이터베이스(610)는 데이터베이스(610)를 이중화하기 위해 상기 생성된 로그 데이터를 원격지(620)로 송신할 수 있다[S712, S713, S714]. The database 610 may then send the generated log data to the remote location 620 to duplicate the database 610 (S712, S713, S714).

그러면, 상기 원격지(620)는 리시버(621)를 통해 수신된 로그 데이터를 버퍼(622)에 복사(Copy)한 후, 리두 로그 파일로 저장한다[S715(b), S715(c)]. 이때, 상기 버퍼(622)는 데이터베이스(610)와 원격지(620) 간의 데이터 전송속도 혹은 처리속도 차이를 보상하기 위해 상기 로그 데이터를 복사하여 임시로 저장하는 공간으로서, 데이터베이스 시스템의 성능을 향상시킬 수 있다. 그리고, 상기 리두 로그 파일(623)은 장애로부터 복원하고자하는 데이터(즉, 로그 데이터)를 디스크에 정식으로 기록해두는 파일로서, 트랜잭션이 발생함에 따라 변경되는 데이터, 트랜잭션이 발생한 시점, 처리 시간, 데이터 변경 및 처리 내역 등의 구체적인 내용을 포함할 수 있다. Then, the remote site 620 copies the log data received through the receiver 621 to the buffer 622, and stores the log data in the redo log file (S715 (b), S715 (c)). At this time, the buffer 622 is a space for copying and temporarily storing the log data to compensate for a data transmission speed or a processing speed difference between the database 610 and the remote site 620, have. The redo log file 623 is a file to formally record data (i.e., log data) to be restored from a failure on a disk. The redo log file 623 includes data to be changed as a transaction occurs, Changes, and details of processing.

한편, 상기 데이터베이스(610)는 원격지(620)로 로그 데이터를 송신한 후, 자신의 테이블에도 로그 데이터를 저장할 수 있다. 이때, 상기 데이터베이스(610)는 상기 원격지(620)와 동일한 방법으로 상기 로그 데이터를 로그 데이터 버퍼(612)에 복사하여 임시 저장하였다가 로그 데이터 파일(613)로 저장할 수 있다[S715(a)]. 이때, 상기 데이터베이스(610) 및 원격지(620)를 통해 이루어지는 S715(a) 단계는 S715(b) 단계 및 S715(c) 단계와 동시에 이루어질 수 있다. Meanwhile, the database 610 may transmit log data to the remote site 620, and then store the log data in its own table. At this time, the database 610 copies the log data to the log data buffer 612 in the same manner as the remote location 620, temporarily stores the log data in the log data buffer 612, and stores the log data file in the log data file 613 (S715 (a) . In this case, step S715 (a) through the database 610 and the remote site 620 may be performed simultaneously with steps S715 (b) and S715 (c).

이후, 상기 원격지(620)로부터 처리결과가 수신되면, 상기 데이터베이스(610)는 처리결과를 확인한 후, 트랜잭션을 종료할 수 있다[S716, S717, S718]. 즉, 상기 원격지(620)로부터 수신된 처리결과, 상기 원격지(620)에 리두 로그 파일이 제대로 저장되었을 경우, 상기 원격지(620)는 그에 해당하는 긍정적인 메시지를 상기 데이터베이스(610)로 전송할 수 있다. 그러면, 상기 데이터베이스(610)는 상기 원격지(620)로부터 전송된 메시지를 근거로 트랜잭션을 종료하여 이후에 발생하는 또 다른 트랜잭션을 실행하도록 준비할 수 있다. Thereafter, when the processing result is received from the remote site 620, the database 610 can confirm the processing result and then terminate the transaction (S716, S717, S718). That is, if the redo log file is properly stored in the remote site 620 as a result of the processing received from the remote site 620, the remote site 620 can transmit an affirmative message corresponding to the redo log file to the database 610 . Then, the database 610 may terminate the transaction based on the message transmitted from the remote site 620 and prepare to execute another transaction occurring thereafter.

상기한 바와 같이, 본 발명에 따른 데이터 이중화의 경우, 데이터베이스 운영중에 수행되는 트랜잭션(transaction) 및 운영정보를 저장하는 리두 로그 파일(Redo Log File)을 이용하여 데이터베이스를 복구할 수 있는데, 이러한 리두 로그 파일은 WAL(Write Ahead Log)에 따라 데이터베이스에 변경된 내용을 반영하기 전에 반드시 먼저 저장하여 예고 없이 발생하는 시스템 장애에 항시 대비할 수 있다는 장점이 있다. As described above, in the case of data duplication according to the present invention, a database can be recovered using a redo log file that stores transaction and operational information performed during database operation. The file has a merit that it can always save before the system changes in the database according to the Write Ahead Log (WAL).

상기한 바와 같이, 본 발명에 따르면, 트랜잭션 발생 전에 마지막으로 반영된 데이터는 항상 원격지에 저장되어 있기 때문에, 원격지에 저장된 이중화 데이터를 이용하여 복구할 경우 데이터 손실을 방지할 수 있다는 장점이 있다. As described above, according to the present invention, since the data finally reflected before the occurrence of the transaction is always stored in the remote location, there is an advantage that data loss can be prevented when the duplicated data stored in the remote location is used for restoration.

또한, 본 발명에 따르면, 원격지에 이중화된 리두 로그는 로컬 데이터베이스 서버의 리두 로그와 동일하므로, 로컬 데이터베이스 서버의 리두 로그가 손실 또는 손상되는 경우에 원격지의 리두 로그를 사용하여 데이터 손실 없는 복구가 가능하다는 장점이 있다.
In addition, according to the present invention, redundant redo logs at the remote location are the same as redo logs of the local database server, so that when the redo logs of the local database server are lost or damaged, .

이상과 같이, 본 발명에서는 구체적인 구성요소 등과 같은 특정 사항들과 한정된 실시예 및 도면에 의해 설명되었으나, 이는 본 발명의 보다 전반적인 이해를 돕기 위해서 제공된 것일 뿐, 본 발명은 상기의 실시예에 의해 한정되는 것은 아니며, 본 발명이 속하는 분야에서 통상적인 지식을 가진 자라면 이러한 기재로부터 다양한 수정 및 변형이 가능하다. Although the present invention has been fully described in connection with the preferred embodiments thereof with reference to the accompanying drawings, it is to be understood that the invention is not limited to the disclosed embodiments, but, on the contrary, And various modifications and changes may be made thereto without departing from the scope of the present invention.

따라서, 본 발명의 사상은 설명된 실시예에 국한되어 정해져서는 아니되며, 후술하는 특허청구범위뿐 아니라 이 특허청구범위와 균등하거나 등가적 변형이 있는 모든 것들은 본 발명 사상의 범주에 속한다고 할 것이다.
Accordingly, the spirit of the present invention should not be construed as being limited to the embodiments described, and all of the equivalents or equivalents of the claims, as well as the following claims, belong to the scope of the present invention .

610 : 로컬 데이터베이스 서버 620 : 원격지
611 : 데이터베이스 621 : 리시버
612 : 로컬 버퍼 622 : 원격 버퍼
613 : 로컬 리두 로그 파일 623 : 원격 리두 로그 파일
610: Local database server 620: Remote
611: Database 621: Receiver
612: local buffer 622: remote buffer
613: Local redo log file 623: Remote redo log file

Claims (24)

로컬 데이터베이스 서버(Local Database Server)와, 상기 로컬 데이터베이스 서버에 트랜잭션(transaction)이 발생할 경우에 생성되는 리두 로그(Redo Log)를 이중화(Replication)하기 위한 원격지(Remote)를 포함하여 구성되는 데이터 손실 없는 데이터베이스 리두 로그 이중화 시스템에 있어서,
상기 로컬 데이터베이스 서버는
데이터베이스(Database);와,
상기 로컬 데이터베이스 서버에 트랜잭션(Transaction)이 발생하면, 상기 트랜잭션에 상응하는 리두 로그(Redo Log)를 생성하여 원격지로 송신한 후, 상기 생성된 리두 로그를 상기 데이터베이스에 리두 로그 파일(Redo Log File)로 저장하도록 제어하는 로컬 제어부; 및
상기 로컬 제어부의 제어에 따라, 상기 리두 로그를 원격지로 송신하는 로컬 통신부;를 구비하고,
상기 원격지는
상기 로컬 데이터베이스 서버의 로컬통신부로부터 송신된 리두 로그를 수신하는 원격 통신부;와,
상기 원격 통신부를 통해 수신된 리두 로그를 리두 로그 파일로 저장하도록 제어하는 원격 제어부;와,
상기 원격 제어부의 제어에 따라, 리두 로그 파일을 저장하는 원격 저장부;를 구비하고,
상기 원격지가 이중화 운영 중에 종료되었을 경우,
상기 로컬 데이터베이스 서버는 상기 원격지로부터 리두 로그 파일의 상태정보를 수신하여 수신된 상태정보를 근거로 이중화를 재시도함으로써, 상기 원격지를 복구(Recovery)하고,
상기 원격지로부터 수신되는 리두 로그 파일의 상태정보가 상기 로컬 데이터베이스 서버의 리두 로그 파일을 모두 반영하고 있을 경우,
상기 로컬 데이터베이스 서버는 일반적인 이중화 처리과정을 거치기 위해 이중화 수행 여부를 변경하고,
상기 이중화 수행 여부를 변경하는 동안에는 이중화 처리과정을 거치기 위해 버퍼에 복사되어 있는 리두 로그가 파일로 저장되지 않도록 버퍼를 잠금 설정하는 것을 특징으로 하는 데이터 손실 없는 데이터베이스 리두 로그 이중화 시스템.
And a remote for replicating a redo log generated when a transaction occurs in the local database server, the method comprising the steps of: In a database redo log duplication system,
The local database server
A database,
A redo log corresponding to the transaction is generated and transmitted to a remote site, and the generated redo log is stored in a redo log file in the database, A local control unit for controlling the local control unit; And
And a local communication unit for transmitting the redo log to a remote location under the control of the local control unit,
The remote
A remote communication unit for receiving a redo log transmitted from a local communication unit of the local database server;
A remote control unit for controlling the redo log file received through the remote communication unit to be stored as a redo log file;
And a remote storage unit for storing a redo log file under the control of the remote control unit,
If the remote is terminated during redundancy operation,
The local database server receives the status information of the redo log file from the remote site and retries the redundancy based on the received status information to recover the remote location,
If the status information of the redo log file received from the remote site reflects all of the redo log files of the local database server,
The local database server changes whether to perform redundancy in order to perform a general redundancy process,
Wherein the buffer is locked so that the redo log copied to the buffer is not saved as a file in order to perform a redundancy process while changing whether the redundancy is performed or not.
제 1 항에 있어서,
상기 로컬 데이터베이스 서버의 로컬 제어부는
상기 발생한 트랜잭션이 데이터베이스에 반영되기 전에 상기 생성된 리두 로그를 원격지로 송신하도록 제어하는 것을 특징으로 하는 데이터 손실 없는 데이터베이스 리두 로그 이중화 시스템.
The method according to claim 1,
The local control unit of the local database server
Wherein the control unit controls the generated redo log to be transmitted to the remote site before the generated transaction is reflected in the database.
제 1 항에 있어서,
상기 데이터 손실 없는 데이터베이스 리두 로그 이중화 시스템은
상기 리두 로그를 트랜잭션별로 저장 및 관리하는 것을 특징으로 하는 데이터 손실 없는 데이터베이스 리두 로그 이중화 시스템.
The method according to claim 1,
The data-lossless database redo log duplication system
Wherein the redo log is stored and managed on a transaction-by-transaction basis.
제 1 항에 있어서,
상기 로컬 데이터베이스 서버는
상기 로컬 통신부를 통해 원격지로부터 리두 로그 처리결과가 수신되면,
상기 제어부가 해당 트랜잭션을 종료하도록 제어하는 것을 특징으로 하는 데이터 손실 없는 데이터베이스 리두 로그 이중화 시스템.
The method according to claim 1,
The local database server
When a redo log processing result is received from a remote site via the local communication unit,
Wherein the control unit controls the transaction to end the transaction.
제 1 항에 있어서,
상기 로컬 데이터베이스 서버 및 상기 원격지는
상기 생성된 리두 로그를 동기(Sync) 방식 또는 비동기(Async) 방식 중 어느 하나의 방식으로 저장하는 것을 특징으로 하는 데이터 손실 없는 데이터베이스 리두 로그 이중화 시스템.
The method according to claim 1,
The local database server and the remote
Wherein the generated redo log is stored in either a synchronous mode or an asynchronous mode.
제 5 항에 있어서,
상기 동기(Sync) 방식은
상기 생성된 리두 로그를 곧바로 리두 로그 파일로 저장하는 것을 특징으로 하는 데이터 손실 없는 데이터베이스 리두 로그 이중화 시스템.
6. The method of claim 5,
The Sync scheme
Wherein the generated redo log is immediately saved as a redo log file.
제 5 항에 있어서,
상기 비동기(Async) 방식은
상기 생성된 리두 로그를 리두 로그를 파일로 저장하기 전에 버퍼에 임시 복사(Copy)하는 것을 특징으로 하는 데이터 손실 없는 데이터베이스 리두 로그 이중화 시스템.
6. The method of claim 5,
Asynchronous (Async)
Wherein the generated redo log is temporarily copied to a buffer before the redo log is stored as a file.
삭제delete 삭제delete 삭제delete 제 1 항에 있어서,
상기 원격지로부터 수신되는 리두 로그 파일의 상태정보가 상기 로컬 데이터베이스 서버의 리두 로그 파일을 모두 반영하고 있지 않을 경우,
상기 로컬 데이터베이스 서버는
상기 상태정보에 대응되는 리두 로그 파일을 상기 원격지로 재전송하여 원격지를 복구하는 것을 특징으로 하는 데이터 손실 없는 데이터베이스 리두 로그 이중화 시스템.
The method according to claim 1,
When the status information of the redo log file received from the remote site does not reflect all the redo log files of the local database server,
The local database server
Wherein the redo log file corresponding to the status information is retransmitted to the remote site to recover the remote location.
제 11 항에 있어서,
상기 로컬 데이터베이스 서버로부터 재전송되는 리두 로그 파일은 온라인(Online) 리두 로그 파일 또는 아카이빙(Archiving) 되어 있는 파일 중 어느 하나인 것을 특징으로 하는 데이터 손실 없는 데이터베이스 리두 로그 이중화 시스템.
12. The method of claim 11,
Wherein the redo log file redirected from the local database server is any one of an online redo log file and an archived file.
로컬 데이터베이스 서버(Local Database Server)와, 상기 로컬 데이터베이스 서버에 트랜잭션(transaction)이 발생할 경우에 생성되는 리두 로그(Redo Log)를 이중화(Replication)하기 위한 원격지(Remote)를 포함하여 구성되는 리두 로그 이중화 시스템의 데이터 손실 없는 데이터베이스 리두 로그 이중화 방법에 있어서,
상기 로컬 데이터베이스 서버에 트랜잭션(Transaction)이 발생하면, 상기 로컬 데이터베이스 서버가 상기 트랜잭션에 상응하는 리두 로그(Redo Log)를 생성하는 단계;
상기 로컬 데이터베이스 서버가 상기 생성된 리두 로그를 원격지로 송신한 후, 리두 로그 파일(Redo Log File)을 저장하는 단계; 및
상기 원격지가 상기 로컬 데이터베이스 서버로부터 송신된 리두 로그를 파일을 수신하여 리두 로그 파일로 저장하는 단계를 포함하고,
상기 원격지가 이중화 운영 중에 종료될 경우,
상기 로컬 데이터베이스 서버는 상기 원격지로부터 리두 로그 파일의 상태정보를 수신하여 수신된 상태정보를 근거로 이중화를 재시도함으로써, 상기 원격지를 복구(Recovery)하고,
상기 원격지로부터 수신되는 리두 로그 파일의 상태정보가 상기 로컬 데이터베이스 서버의 리두 로그 파일을 모두 반영하고 있을 경우,
상기 로컬 데이터베이스 서버는 일반적인 이중화 처리과정을 거치기 위해 이중화 수행 여부를 변경하는 것을 특징으로 하고,
상기 이중화 수행 여부를 변경하는 동안에는 이중화 처리과정을 거치기 위해 버퍼에 복사되어 있는 리두 로그가 파일로 저장되지 않도록 버퍼를 잠금 설정하는 것을 특징으로 하는 데이터 손실 없는 데이터베이스 리두 로그 이중화 방법.
And a remote for replicating a redo log created when a transaction occurs in the local database server. The redo log duplication unit includes a local database server, In a method of duplicating a database redo log without data loss of the system,
When a transaction occurs in the local database server, the local database server generates a redo log corresponding to the transaction;
Storing the redo log file after the local database server transmits the generated redo log to the remote site; And
Receiving the redo log transmitted from the local database server by the remote site and storing the redo log file as a redo log file;
If the remote end is terminated during redundancy operation,
The local database server receives the status information of the redo log file from the remote site and retries the redundancy based on the received status information to recover the remote location,
If the status information of the redo log file received from the remote site reflects all of the redo log files of the local database server,
The local database server may change whether to perform redundancy in order to perform a general replication process.
Wherein the buffer is locked so that the redo log copied to the buffer is not saved as a file in order to perform a redundancy process while changing whether the redundancy is performed or not.
제 13 항에 있어서,
상기 로컬 데이터베이스 서버는
상기 발생한 트랜잭션이 데이터베이스에 반영되기 전에 상기 생성된 리두 로그를 원격지로 송신하는 것을 특징으로 하는 데이터 손실 없는 데이터베이스 리두 로그 이중화 방법.
14. The method of claim 13,
The local database server
Wherein the generated redo log is transmitted to a remote site before the generated transaction is reflected in the database.
제 13 항에 있어서,
상기 리두 로그 이중화 시스템은
상기 리두 로그를 트랜잭션별로 저장 및 관리하는 것을 특징으로 하는 데이터 손실 없는 데이터베이스 리두 로그 이중화 방법.
14. The method of claim 13,
The redo log duplication system
Wherein the redo log is stored and managed on a transaction-by-transaction basis.
제 13 항에 있어서,
상기 리두 로그 이중화 방법은,
상기 로컬 데이터베이스 서버가
상기 원격지로부터 리두 로그 처리결과가 수신되면, 해당 트랜잭션을 종료하는 것을 특징으로 하는 데이터 손실 없는 데이터베이스 리두 로그 이중화 방법.
14. The method of claim 13,
In the redo log duplication method,
The local database server
And terminating the transaction when the redo log processing result is received from the remote site.
제 13 항에 있어서,
상기 로컬 데이터베이스 서버 및 상기 원격지는
상기 생성된 리두 로그를 동기(Sync) 방식 또는 비동기(Async) 방식 중 어느 하나의 방식으로 저장하는 것을 특징으로 하는 데이터 손실 없는 데이터베이스 리두 로그 이중화 방법.
14. The method of claim 13,
The local database server and the remote
Wherein the generated redo log is stored in either a synchronous mode or an asynchronous mode.
제 17 항에 있어서,
상기 동기(Sync) 방식은
상기 생성된 리두 로그를 곧바로 리두 로그 파일로 저장하는 것을 특징으로 하는 데이터 손실 없는 데이터베이스 리두 로그 이중화 방법.
18. The method of claim 17,
The Sync scheme
Wherein the generated redo log is immediately stored as a redo log file.
제 17 항에 있어서,
상기 비동기(Async) 방식은
상기 생성된 리두 로그를 리두 로그를 파일로 저장하기 전에 버퍼에 임시 복사(Copy)하는 것을 특징으로 하는 데이터 손실 없는 데이터베이스 리두 로그 이중화 방법.
18. The method of claim 17,
Asynchronous (Async)
Wherein the generated redo log is temporarily copied to a buffer before the redo log is stored as a file.
삭제delete 삭제delete 삭제delete 제 13 항에 있어서,
상기 원격지로부터 수신되는 리두 로그 파일의 상태정보가 상기 로컬 데이터베이스 서버의 리두 로그 파일을 모두 반영하고 있지 않을 경우,
상기 로컬 데이터베이스 서버는
상기 상태정보에 대응되는 리두 로그 파일을 상기 원격지로 재전송하여 원격지를 복구하는 것을 특징으로 하는 데이터 손실 없는 데이터베이스 리두 로그 이중화 방법.
14. The method of claim 13,
When the status information of the redo log file received from the remote site does not reflect all the redo log files of the local database server,
The local database server
And the redo log file corresponding to the status information is retransmitted to the remote site to recover the remote location.
제 23 항에 있어서,
상기 로컬 데이터베이스 서버로부터 재전송되는 리두 로그 파일은 온라인(Online) 리두 로그 파일 또는 아카이빙(Archiving) 되어 있는 파일 중 어느 하나인 것을 특징으로 하는 데이터 손실 없는 데이터베이스 리두 로그 이중화 방법.
24. The method of claim 23,
Wherein the redo log file redirected from the local database server is one of an online redo log file and an archived file.
KR1020140083579A 2014-07-04 2014-07-04 Method for Replicationing of Redo Log without Data Loss and System Thereof KR101605455B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020140083579A KR101605455B1 (en) 2014-07-04 2014-07-04 Method for Replicationing of Redo Log without Data Loss and System Thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020140083579A KR101605455B1 (en) 2014-07-04 2014-07-04 Method for Replicationing of Redo Log without Data Loss and System Thereof

Publications (2)

Publication Number Publication Date
KR20160004721A KR20160004721A (en) 2016-01-13
KR101605455B1 true KR101605455B1 (en) 2016-03-22

Family

ID=55172624

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020140083579A KR101605455B1 (en) 2014-07-04 2014-07-04 Method for Replicationing of Redo Log without Data Loss and System Thereof

Country Status (1)

Country Link
KR (1) KR101605455B1 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018216839A1 (en) * 2017-05-24 2018-11-29 (주)선재소프트 Database replication method and database replication system
KR20190063835A (en) 2017-11-30 2019-06-10 주식회사 리얼타임테크 System for processing real-time data modification of in-memory database
KR102303895B1 (en) 2020-03-12 2021-09-23 (주)선재소프트 Database Replication System With Improved Database Replication

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101823130B1 (en) * 2016-11-28 2018-03-09 주식회사 실크로드소프트 Technique for replication of database
US10901944B2 (en) 2017-05-24 2021-01-26 Microsoft Technology Licensing, Llc Statelessly populating data stream into successive files

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100891036B1 (en) * 2008-09-08 2009-03-31 (주)데이타뱅크시스템즈 Automatic recovery system for database using real-time replication and its method
US20110066595A1 (en) 2009-09-14 2011-03-17 Software Ag Database server, replication server and method for replicating data of a database server by at least one replication server

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100891036B1 (en) * 2008-09-08 2009-03-31 (주)데이타뱅크시스템즈 Automatic recovery system for database using real-time replication and its method
US20110066595A1 (en) 2009-09-14 2011-03-17 Software Ag Database server, replication server and method for replicating data of a database server by at least one replication server

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018216839A1 (en) * 2017-05-24 2018-11-29 (주)선재소프트 Database replication method and database replication system
KR20190063835A (en) 2017-11-30 2019-06-10 주식회사 리얼타임테크 System for processing real-time data modification of in-memory database
KR102303895B1 (en) 2020-03-12 2021-09-23 (주)선재소프트 Database Replication System With Improved Database Replication

Also Published As

Publication number Publication date
KR20160004721A (en) 2016-01-13

Similar Documents

Publication Publication Date Title
EP2281240B1 (en) Maintaining data integrity in data servers across data centers
CN103226502B (en) A kind of data calamity is for control system and data reconstruction method
US7793060B2 (en) System method and circuit for differential mirroring of data
JP4108074B2 (en) Data synchronization with multiple remote storage
CN102891849B (en) Service data synchronization method, data recovery method, data recovery device and network device
CN106776130B (en) Log recovery method, storage device and storage node
KR101605455B1 (en) Method for Replicationing of Redo Log without Data Loss and System Thereof
JP2007518195A (en) Cluster database using remote data mirroring
CN105159795A (en) Data synchronization method, apparatus and system
US20110161724A1 (en) Data management apparatus, monitoring apparatus, replica apparatus, cluster system, control method and computer-readable medium
JPH08212095A (en) Client server control system
US20070100909A1 (en) Data mirroring using a virtual connection
JP5292350B2 (en) Message queue management system, lock server, message queue management method, and message queue management program
WO2023151443A1 (en) Synchronizing main database and standby database
JP2006285336A (en) Storage, storage system, and control method thereof
CN112948484A (en) Distributed database system and data disaster recovery drilling method
JP5218121B2 (en) Information system and disaster recovery method
CN112052127B (en) Data synchronization method and device for dual-computer hot standby environment
JP4721057B2 (en) Data management system, data management method, and data management program
US7587628B2 (en) System, method and computer program product for copying data
JPH04299435A (en) Data base equivalent system
JP2007148520A (en) Information notification method and computer system
JP2004272884A5 (en)
JP2004272884A (en) Data synchronization system after remote copy suspension in multiple remote storage
CN113626517B (en) PostgreSQL database stream replication exception handling method and device

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: 20190311

Year of fee payment: 4