[go: up one dir, main page]

KR100502501B1 - Method for real-time remote logging and recovery of database system - Google Patents

Method for real-time remote logging and recovery of database system Download PDF

Info

Publication number
KR100502501B1
KR100502501B1 KR1020040061676A KR20040061676A KR100502501B1 KR 100502501 B1 KR100502501 B1 KR 100502501B1 KR 1020040061676 A KR1020040061676 A KR 1020040061676A KR 20040061676 A KR20040061676 A KR 20040061676A KR 100502501 B1 KR100502501 B1 KR 100502501B1
Authority
KR
South Korea
Prior art keywords
log
remote
local
agent
lsn
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Lifetime
Application number
KR1020040061676A
Other languages
Korean (ko)
Inventor
김성진
이종민
김범수
Original Assignee
주식회사 알티베이스
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 주식회사 알티베이스 filed Critical 주식회사 알티베이스
Priority to KR1020040061676A priority Critical patent/KR100502501B1/en
Application granted granted Critical
Publication of KR100502501B1 publication Critical patent/KR100502501B1/en
Anticipated expiration legal-status Critical
Expired - Lifetime legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F17/00Digital computing or data processing equipment or methods, specially adapted for specific functions
    • G06F17/40Data acquisition and logging

Landscapes

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

Abstract

본 발명은 데이터베이스 시스템의 실시간 원격 로깅 및 복구 방법을 개시한다.The present invention discloses a real time remote logging and recovery method of a database system.

본 발명에 의하면, DB서버가 서비스 호스트에서 프로세스로 동작하면서 사용자의 요구를 처리하고 지역 DB로그를 기록한 후, 커밋 연산 수행시 지속성 조건을 검사하여 조건에 부합할 때까지 커밋 처리 완료를 지연하여 트랜잭션을 처리하며, 지역 D-AGENT가 서비스 호스트에서 별도의 프로세스로 동작하면서 주기적으로 지역 DB로그 버퍼를 검사하여 새로운 지역 DB로그를 읽어 원격 로깅 호스트 서버에 전송하고, 기록에 성공한 LSN을 수신하여 지속성 조건을 설정하며, 원격 D-AGENT가 원격로깅 호스트에서 프로세스로 동작하면서 지역 D-AGENT로부터 수신한 원격 DB로그를 원격 DB로그 버퍼와 원격 DB로그 파일에 기록하고, 마지막 LSN을 지역 D-AGENT에 전송하여, 사용자가 커밋 명령을 수행하는 경우 종래의 방식대로 DB로그가 DB로그 파일에 완전히 기록되는 것을 기다리는 대신, 별도의 원격로깅 호스트에 DB로그를 완전히 전송하고 응답을 받는 시간동안만 대기함으로써 트랜잭션 처리 성능을 향상시킬 수 있으며, 시스템 오류에 의해 DB서버를 재시작하는 경우 DB로그를 유실하는 문제점을 해결하여 DB서버의 지속성 특성을 강화할 수 있다.According to the present invention, after the DB server operates as a process in the service host, processes the user's request, records the local DB log, checks the persistence condition when performing the commit operation, and delays the completion of the commit process until the condition is met. Local D-AGENT operates as a separate process on the service host and periodically checks the local DB log buffer, reads the new local DB log, sends it to the remote logging host server, and receives the LSN that succeeded in recording. Remote D-AGENT operates as a process on the remote logging host, and records the remote DB log received from the local D-AGENT to the remote DB log buffer and the remote DB log file, and sends the last LSN to the local D-AGENT. When the user executes the commit command, the DB log is completely written to the DB log file in the conventional manner. Instead, it can improve transaction processing performance by sending the DB log to a separate remote logging host completely and waiting only for the time of receiving the response. Also, if the DB server is restarted due to a system error, the DB log is lost. By solving this problem, the persistence characteristics of the DB server can be strengthened.

Description

데이터베이스 시스템의 실시간 원격 로깅 및 복구 방법 {Method for real-time remote logging and recovery of database system}{Method for real-time remote logging and recovery of database system}

본 발명은 데이터베이스 관리에 관한 것으로서, 별도의 원격로깅 호스트를 이용한 실시간 원격 로깅 방법 및 이상이 생긴 경우의 데이터베이스 복구 방법에 관한 것이다.The present invention relates to database management, and more particularly, to a real-time remote logging method using a separate remote logging host and a database recovery method in case of an error.

일반적으로 DB서버는 데이터베이스를 관리함에 있어 데이터베이스 변경을 트랜잭션 단위로 처리하며, 트랜잭션 처리는 ACID 특성을 준수하는 것이 필요하다. ACID 특성은 원자성(Atomicity), 일관성(Consistency), 고립성(Isolation), 지속성(Durability)을 의미한다. 특히, 지속성 특성은 트랜잭션이 커밋(commit)되면 그 트랜잭션에 의한 데이터베이스 상태 변경은 영구히 저장되어야 함을 규정한다. In general, the DB server manages database changes in transaction units to manage the database. Transaction processing needs to comply with the ACID characteristics. ACID characteristics mean atomicity, consistency, isolation, and durability. In particular, the persistence property specifies that once a transaction is committed, changes in database state by that transaction must be stored permanently.

이를 위해 일반적으로 DB 및 DB로그를 영구 저장소인 디스크에 보관한다. 그러나, 디스크는 안정적인 반면 주기억장치에 비해 상대적으로 읽기/쓰기 연산 처리에 많은 시간이 소요되어 성능이 저하되는 문제가 있다. 이를 보완하기 위해 지속성을 어느 정도 희생시키면서 트랜잭션 처리 성능을 향상시키기 위한 종래의 시도가 있다.For this purpose, DB and DB logs are generally kept on disk, which is a permanent storage. However, while the disk is stable, the performance of the read / write operation is relatively longer than that of the main memory, resulting in a decrease in performance. To compensate for this, there are conventional attempts to improve transaction processing performance at some cost of persistence.

도 1은 종래의 DB서버(200)가 트랜잭션을 처리하는 개념도를 포괄적으로 표현한 것으로, DB서비스 수단(211)은 사용자(100)가 커밋을 요구하면(1a) DB로그 버퍼(213)에 기록된(1c) DB로그를 DB로그 파일에 기록하고(1d), 기록이 완료된 것을 확인한 후에(1e) 사용자에게 완료 메시지를 보낸다(1f). 이때, 필요하다면 DB메모리 버퍼(212)내의 페이지는 DB파일(214)로 기록된다(1g). 이 경우, 지속성은 보장할 수 있으나, 사용자는 디스크 기록이 완료되기를 기다리게 되어 DB서버의 트랜잭션 처리 속도가 떨어지는 문제점이 있다.Figure 1 is a comprehensive representation of a conceptual diagram of a conventional DB server 200 processes a transaction, DB service means 211 is recorded in the DB log buffer 213 when the user 100 requests to commit (1a) (1c) The DB log is recorded in the DB log file (1d), and after confirming that the recording is completed (1e), a completion message is sent to the user (1f). At this time, if necessary, the pages in the DB memory buffer 212 are written to the DB file 214 (1g). In this case, the persistence can be guaranteed, but the user waits for the disk recording to be completed, which causes a problem of slowing down the transaction processing speed of the DB server.

도 2는 종래의 일부 DB서버(200)가 트랜잭션 처리 방법을 변형하여 처리하는 개념도를 포괄적으로 표현한 것으로, DB서비스 수단(211)은 사용자(100)가 커밋을 요구하면(2a), DB로그 버퍼(213)에 커밋 로그를 기록하고(2c) 바로 사용자에게 완료 메시지를 보낸다(2d). 이후, DB로그 일치 수단(216)은 DB로그 버퍼(213)가 꽉 찬 경우에 혹은 주기적으로 DB로그 버퍼(213)를 읽어(2e) DB로그 파일(215)에 로그를 기록한다(2f). 이때, 필요하다면 DB메모리 버퍼(212)내의 페이지는 DB파일(214)로 기록된다(2g). 이 경우, 사용자는 DB로그가 DB로그 파일에 실제로 기록되는 것을 기다리지 않으므로 트랜잭션 처리 속도는 향상되지만, DB로그 파일에 기록되지 않고 DB로그 버퍼에만 존재하는 DB로그는 시스템 오류가 발생하면 유실될 위험이 있어서 지속성을 보장하지 못하는 문제점이 있다.FIG. 2 is a general view of a conceptual diagram of a conventional DB server 200 modifying and processing a transaction processing method. When the DB service means 211 requests a user to commit (2a), the DB log buffer is used. Write a commit log at 211 (2c) and immediately send a completion message to the user (2d). Thereafter, the DB log matching means 216 reads the DB log buffer 213 periodically or when the DB log buffer 213 is full (2e) and writes the log to the DB log file 215 (2f). At this time, if necessary, the pages in the DB memory buffer 212 are written to the DB file 214 (2g). In this case, the user does not wait for the DB log to actually be written to the DB log file, which speeds up transaction processing. However, the DB log, which is not written to the DB log file and only exists in the DB log buffer, is at risk of being lost if a system error occurs. There is a problem that can not guarantee the sustainability.

본 발명이 이루고자 하는 기술적인 과제는, 상기의 문제점들을 해결하기 위해, 트랜잭션 처리 성능을 향상시킴과 동시에 지속성을 향상시키는 데이터베이스 시스템의 실시간 원격 로깅 방법을 제공하는데 그 목적이 있다.The technical problem to be achieved by the present invention is to provide a real-time remote logging method of a database system to improve the transaction processing performance and at the same time to solve the above problems.

본 발명의 다른 목적은 시스템 오류가 발생하여 DB서버를 재시작하는 경우에도 DB 상태를 안전하게 복구하는 원격 DB로그를 이용한 DB상태 복구 방법을 제공하는데 있다. Another object of the present invention is to provide a DB state recovery method using a remote DB log that safely recovers the DB state even when a system error occurs and restarts the DB server.

상기 기술적 과제를 해결하기 위한 본 발명에 의한, 데이터베이스 시스템의 실시간 원격 로깅 방법은, DB서버와 지역 DB 에이전트인 D-AGENT를 포함하는 서비스 호스트와 원격 지역의 DB 에이전트인 원격 D-AGENT를 포함하는 하나 혹은 그 이상의 원격로깅 호스트로 구성된 시스템에서 DB서버가 DB로그를 기록하는 방법에 있어서, (a) 상기 DB서버가 상기 서비스 호스트에서 프로세스로 동작하면서 사용자의 요구를 처리하고 지역 DB로그를 기록한 후, 커밋(commit) 연산 수행시 지속성 조건을 검사하여 조건에 부합할 때까지 커밋 처리 완료를 지연하여 트랜잭션을 처리하는 지역 DB로그 기록 및 커밋 트랜잭션 완료 검사 단계; (b) 상기 지역 D-AGENT가 상기 서비스 호스트에서 별도의 프로세스로 동작하면서 주기적으로 지역 DB로그 버퍼를 검사하여 새로운 지역 DB로그를 읽어 원격 로깅 호스트 서버에 전송하고, 기록에 성공한 LSN(Log Sequence Number)을 수신하여 지속성 조건을 설정하는 단계; 및 (c) 상기 원격 D-AGENT가 원격로깅 호스트에서 프로세스로 동작하면서 상기 지역 D-AGENT로부터 수신한 원격 DB로그를 원격 DB로그 버퍼와 원격 DB로그 파일에 기록하고, 마지막 LSN을 상기 지역 D-AGENT에 전송하는 단계;를 포함하는 것을 특징으로 한다.According to the present invention for solving the above technical problem, a real-time remote logging method of a database system includes a service host including a DB server and a local DB agent D-AGENT and a remote D-AGENT that is a DB agent in a remote area. A method of recording a DB log by a DB server in a system configured with one or more remote logging hosts, the method comprising: (a) After the DB server operates as a process on the service host, processes a user's request and records a local DB log. Checking the persistence condition when performing a commit operation, delaying the completion of the commit process until the condition is satisfied, and recording the local DB log and commit transaction completion; (b) While the local D-AGENT operates as a separate process on the service host, periodically checks the local DB log buffer, reads new local DB logs, and transmits them to the remote logging host server. Setting a persistence condition by receiving; And (c) recording the remote DB log received from the local D-AGENT into a remote DB log buffer and a remote DB log file while the remote D-AGENT operates as a process at a remote logging host, and records the last LSN in the local D- AGENT. And transmitting to the AGENT.

이때에 상기 (a) 단계에서 커밋 트랜잭션 완료 검사는, (a1) 사용자의 요구를 받아 트랜잭션을 시작하는 단계; (a2) 상기 트랜잭션에 대응하는 지역 DB로그에 LSN을 할당하여 지역 DB로그 버퍼에 지역 DB로그를 기록하는 단계; (a3) 연산 종류를 판단하여 커밋이 아니면 사용자에게 성공메시지를 전달하고, 커밋이면 공유메모리인 D-INFO에 저장된 D-LSN과 커밋 LSN을 비교하여 지속성 조건을 검사하는 단계; (a4) 커밋 LSN이 D-LSN 보다 작거나 같을 경우 해당 트랜잭션이 지속성을 확보한 것으로 판단하여 사용자에게 성공 메시지를 돌려주고, 커밋 LSN이 D-LSN 보다 큰 경우 해당 트랜잭션이 아직 지속성을 확보하지 못한 것으로 판단하여 대기하며 주기적으로 다시 검사하는 단계; 및 (a5) 주기적으로 지역 DB로그 버퍼의 지역 DB로그를 지역 DB로그 파일로 저장하고 일치 로그를 지역 DB로그 버퍼에 기록하는 단계;를 포함하는 것이 바람직하다.At this time, the commit transaction completion check in the step (a), (a1) receiving a user request to start a transaction; (a2) allocating an LSN to a local DB log corresponding to the transaction and recording the local DB log in a local DB log buffer; (a3) determining a type of operation to transmit a success message to the user if it is not a commit, and checking a persistence condition by comparing a commit LSN with a D-LSN stored in D-INFO, which is a shared memory, if the commit is performed; (a4) If the commit LSN is less than or equal to the D-LSN, it is determined that the transaction has secured the persistence, and a success message is returned to the user. If the commit LSN is greater than the D-LSN, the transaction has not yet secured the persistence. Determining to wait and periodically checking again; And (a5) periodically storing the local DB log of the local DB log buffer as a local DB log file and recording the matching log in the local DB log buffer.

이 경우 상기 D-INFO 는 DB로그가 지속적으로 디스크에 저장되었음을 판단하는 상기 D-LSN을 포함한 정보를 저장하는 공유메모리이며, 상기 D-LSN은 가장 최근의 일치 LSN 또는 상기 원격로깅 호스트에 전송된 최종 LSN을 저장하는 것임이 바람직하다.In this case, the D-INFO is a shared memory for storing information including the D-LSN which determines that the DB log is continuously stored on the disk, and the D-LSN is transmitted to the most recent matching LSN or the remote logging host. It is preferable to store the final LSN.

상기 (b) 단계는, (b1) 상기 지역 DB로그 버퍼를 주기적으로 감시하여 새로운 지역 DB로그가 있는 경우 해당 지역 DB로그를 읽어 상기 원격 D-AGENT에 전송하는 단계; (b2) 상기 원격 D-AGENT로부터 수신한 메시지를 검사하여, 검사가 성공하면 수신한 마지막 LSN 값을 상기 D-LSN값으로 설정하는 단계; 및 (b3) 검사가 실패하거나 상기 원격로깅 호스트 이상으로 인해 성공 메시지가 일정 시간 동안 수신되지 않으면, 상기 지역 DB로그 버퍼에서 최근 일치 로그를 찾아 해당 LSN을 상기 D-LSN값으로 설정하는 단계;를 포함하는 것이 바람직하다.The step (b) may include: (b1) periodically monitoring the area DB log buffer and reading a corresponding area DB log and transmitting it to the remote D-AGENT when there is a new area DB log; (b2) inspecting the message received from the remote D-AGENT and, if the check succeeds, setting the last LSN value received as the D-LSN value; And (b3) if a successful message is not received for a predetermined time due to a check failure or a failure in the remote logging host, finding a recent match log in the local DB log buffer and setting the corresponding LSN to the D-LSN value. It is preferable to include.

상기 (c) 단계는, (c1) 상기 지역 D-AGENT로부터 전송받은 원격 DB로그를 원격 DB로그 버퍼에 저장하고, 저장한 마지막 원격 DB로그의 LSN을 포함한 성공 메시지를 지역 D-AGENT에게 전송하는 단계; 및 (c2) 주기적으로 또는 원격 DB로그 버퍼가 꽉 찼을 때, 원격 DB로그 버퍼의 원격 DB로그를 원격 DB로그 파일에 기록하는 단계;를 포함하는 것이 바람직하다.In step (c), (c1) storing the remote DB log received from the local D-AGENT in a remote DB log buffer and transmitting a success message including the LSN of the last remote DB log stored to the local D-AGENT. step; And (c2) periodically or when the remote DB log buffer is full, recording the remote DB log of the remote DB log buffer to a remote DB log file.

상기 다른 기술적 과제를 해결하기 위한 본 발명에 의한, 원격 DB로그를 이용한 DB상태 복구 방법은, DB서버와 지역의 DB 에이전트인 D-AGENT를 포함하는 서비스 호스트와 원격 지역의 DB 에이전트인 원격 D-AGENT를 포함하는 원격로깅 호스트로 구성된 시스템에서 시스템 오류에 의해 상기 DB서버를 재시작하여 DB를 복구하는 방법에 있어서, (a) 상기 DB서버가 지역 DB로그 파일에 저장된 마지막 일치 로그를 찾아 해당 LSN을 기준 LSN으로 하여 지역 D-AGENT에게 전송하여 필요한 원격 DB로그를 요청하고, 전송받은 원격 DB로그를 지역 DB로그 파일에 기록하여 UNDO/REDO과정을 통해 DB상태를 복구하는 단계; (b) 상기 지역 D-AGENT가 상기 DB서버의 요청에 의해 상기 원격 D-AGENT에게 기준 LSN을 전송하여 필요한 원격 DB로그를 요청하고, 수신한 원격 DB로그를 상기 DB서버에 전송하는 단계; 및 (c) 상기 원격 D-AGENT가 상기 지역 D-AGENT의 요청에 의해 전달받은 기준 LSN을 기준으로 상기 원격 DB로그 버퍼 및 상기 원격 DB로그 파일에 저장된 원격 DB로그 중 소정의 기준에 부합하는 원격 DB로그를 상기 지역 D-AGENT에 전송하는 단계;를 포함하는 것을 특징으로 한다.The DB state recovery method using a remote DB log according to the present invention for solving the above another technical problem, the service host including the DB server and the local DB agent D-AGENT and the remote D- DB agent in the remote region A method for recovering a database by restarting the DB server due to a system error in a system configured as a remote logging host including AGENT, the method comprising: (a) finding the last matching log stored in a local DB log file and searching for the LSN. Requesting the required remote DB log by transmitting to the local D-AGENT as a reference LSN, and recording the received remote DB log in the local DB log file to recover the DB state through UNDO / REDO; (b) the local D-AGENT sending a reference LSN to the remote D-AGENT by request of the DB server to request a necessary remote DB log, and transmitting the received remote DB log to the DB server; And (c) a remote DB log that meets a predetermined criterion among the remote DB log buffer and the remote DB log stored in the remote DB log file based on the reference LSN received by the remote D-AGENT by the request of the local D-AGENT. And transmitting a DB log to the local D-AGENT.

이때에 상기 (a) 단계는, (a1) 마지막 지역 DB로그 파일을 찾아서 마지막 일치 로그의 LSN을 획득하는 단계; (a2) 획득한 LSN을 기준 LSN으로 하여 상기 지역 D-AGENT에 전달하고 필요한 원격 DB로그를 요청하는 단계; (a3) 상기 지역 D-AGENT로부터 전달받은 원격 DB로그를 상기 지역 DB로그 파일에 기록하는 단계; 및 (a4) 소정의 DB회복 수단이 상기 지역 DB로그 파일을 기반으로 UNDO/REDO 과정을 통해 DB상태를 복구하는 단계;를 포함하는 것이 바람직하다.At this time, the step (a), (a1) finding the last local DB log file to obtain the LSN of the last matching log; (a2) transmitting the acquired LSN as a reference LSN to the local D-AGENT and requesting a required remote DB log; (a3) recording the remote DB log received from the local D-AGENT in the local DB log file; And (a4) recovering a DB state by a predetermined DB recovery means through an UNDO / REDO process based on the local DB log file.

그리고 상기 (b) 단계는, (b1) 상기 DB회복 수단으로부터 수신한 기준 LSN을 원격 D-AGENT에 전송하고 필요한 원격 DB로그를 요구하는 단계; 및 (b2) 상기 원격 D-AGENT로부터 수신한 원격 DB로그를 상기 DB회복 수단에 전송하는 단계;를 포함하는 것이 바람직하며, 상기 (c) 단계는, (c1) 상기 지역 D-AGENT로부터 수신한 기준 LSN보다 큰 원격 DB로그를 원격 DB로그 버퍼와 원격 DB로그 파일에서 검색하는 단계; 및 (c2) 검색된 원격 DB로그를 상기 지역 D-AGENT에게 전송하는 단계;를 포함하는 것이 바람직하다.And (b) step (b1) transmitting the reference LSN received from the DB recovery means to a remote D-AGENT and requesting the required remote DB log; And (b2) transmitting the remote DB log received from the remote D-AGENT to the DB recovery means. The step (c) may include (c1) received from the local D-AGENT. Retrieving a remote DB log larger than a reference LSN from a remote DB log buffer and a remote DB log file; And (c2) transmitting the retrieved remote DB logs to the local D-AGENT.

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

도 3은 본 발명에 따른 원격 로깅 및 복구 방법을 실행하는 구성의 예를 블록으로 도시한 것이다. 이 구성은 DB서버(310)와 지역 DB 에이전트인 D-AGENT(320)를 포함하는 서비스 호스트(300)와 원격 지역의 DB 에이전트인 원격 D-AGENT(410)를 포함하는 하나 혹은 그 이상의 원격로깅 호스트(400)로 구성된 시스템이다. 간단하게는 DB서버가 운영되는 하나의 컴퓨터시스템과 이에 대응하는 D-AGENT가 운영되는 컴퓨터시스템들이 네트워크로 연결된 하드웨어 환경이다.3 is a block diagram illustrating an example of a configuration for executing a remote logging and recovery method according to the present invention. This configuration includes one or more remote logging including a service host 300 including a DB server 310 and a D-AGENT 320 as a local DB agent and a remote D-AGENT 410 as a DB agent in a remote area. It is a system composed of a host (400). In short, a computer system in which a DB server is operated and a computer system in which a corresponding D-AGENT is operated are connected to a network.

사용자(100)는 서비스 호스트(300)에 접속하여 업무를 처리한다. 서비스 호스트(300)에는 DB서버(310)와 지역 D-AGENT(320)가 운영되고, 네트웍으로 연결된 원격로깅 호스트(400)에서 운영중인 원격 D-AGENT(410)와 통신을 통해 상호 작용한다. 지역 D-AGENT(320)는 DB서버(310)가 기록하는 DB로그를 원격 D-AGENT(410)에게 전송하고, 각 원격 D-AGENT(410)는 자체 저장소에 수신한 원격 DB로그를 기록한다.The user 100 accesses the service host 300 to process a task. The service host 300 operates the DB server 310 and the local D-AGENT 320 and interacts with the remote D-AGENT 410 operating in the remote logging host 400 connected to the network. The local D-AGENT 320 transmits the DB log recorded by the DB server 310 to the remote D-AGENT 410, and each remote D-AGENT 410 records the remote DB log received in its own storage. .

이 구성에서 원격로깅 호스트는 2 대 이상으로 운영할 수 있으며, 만일 한 대의 원격로깅 호스트에 오류가 발생하면 지역 D-AGENT는 원격로깅 호스트 목록에서 다음 원격로깅 호스트를 선택해 원격 로깅을 지속할 수 있다. 즉, 다수의 원격로깅 호스트 구성을 통해 가용성 및 안정성을 높이는 효과를 가진다.In this configuration, more than one remote logging host can be operated, and if one remote logging host fails, the local D-AGENT can continue remote logging by selecting the next remote logging host from the list of remote logging hosts. . That is, it has the effect of increasing the availability and stability through the configuration of multiple remote logging host.

도 4는 본 발명에 따른 원격 로깅 방법의 설명을 위한 구성을 도시한 것이다.4 illustrates a configuration for explaining a remote logging method according to the present invention.

도 4에 있어서, 사용자(100)는 서비스 호스트(300)에서 운영중인 DB서버(310)에 트랜잭션 처리를 요청한다(4a). DB서비스 수단(311)은 DB메모리 버퍼(312)내의 레코드를 변경하고(4b) 지역 DB로그 버퍼(313)에 지역 DB로그를 기록한다. 이때, DB서비스 수단(311)은 사용자의 요청이 커밋이 아니면 사용자에게 결과를 바로 돌려주고(4k) 커밋이라면 D-INFO(230)의 D-LSN값과 자신의 LSN을 비교하고, D-LSN값이 작다면 대기한다(4d). D-INFO(230)는 DB서버(310)와 지역 D-AGENT(320)가 자료를 교환하는 공유메모리이다. In FIG. 4, the user 100 requests transaction processing from the DB server 310 operating in the service host 300 (4a). The DB service means 311 changes the record in the DB memory buffer 312 (4b) and records the local DB log in the local DB log buffer 313. At this time, the DB service means 311 immediately returns the result to the user if the user request is not a commit (4k), and if the commit is to compare the D-LSN value of the D-INFO 230 with its own LSN, and the D-LSN If the value is small, it waits (4d). The D-INFO 230 is a shared memory in which the DB server 310 and the local D-AGENT 320 exchange data.

이 후, DB서비스 수단(311)은 주기적으로 비교를 수행하여 D-LSN값이 크면 트랜잭션을 완료하고 사용자에게 결과를 돌려준다(4k). 지역 D-AGENT(320)는 실행을 시작할 때, 로깅 호스트(400)에서 운영중인 원격 D-AGENT(410)와 통신을 연결한 후, 지역 DB로그 버퍼(313)를 검사하여 새로운 지역 DB로그를 읽어(4e) 원격 D-AGENT(410)에 전송한다(4f). After that, the DB service means 311 periodically performs a comparison and if the D-LSN value is large, complete the transaction and return the result to the user (4k). When the local D-AGENT 320 starts execution, it connects with the remote D-AGENT 410 operating in the logging host 400, and then checks the local DB log buffer 313 to generate a new local DB log. Read (4e) and transmit to remote D-AGENT 410 (4f).

원격 D-AGENT(410)는 수신한 DB로그를 원격 DB로그 버퍼(420)에 기록하고 지역 D-AGENT(320)에게 저장한 마지막 원격 DB로그의 LSN을 돌려준다(4h). 지역 D-AGENT(320)는 수신한 LSN을 D-INFO(230)에 저장한다(4i). The remote D-AGENT 410 records the received DB log in the remote DB log buffer 420 and returns the LSN of the last remote DB log stored in the local D-AGENT 320 (4h). The local D-AGENT 320 stores the received LSN in the D-INFO 230 (4i).

한편, DB의 로그들이 서로 일치하는 기능을 제공하는 DB로그 일치 수단(316)은 주기적으로 지역 DB로그 버퍼(313)내의 지역 DB로그를 읽어(4l) 지역 DB로그 파일(315)에 기록하고(4m) 일치 LSN을 지역 DB로그 버퍼(313)에 기록한다(4n). Meanwhile, the DB log matching means 316, which provides a function of matching the logs of the DB, periodically reads the local DB logs in the local DB log buffer 313 (4l) and records them in the local DB log file 315 (4l). 4m) The matching LSN is recorded in the local DB log buffer 313 (4n).

이런 과정에서 DB메모리 버퍼(312)내의 페이지는 필요한 경우 DB파일(314)에 기록되고(4o), 원격 D-AGENT(410)는 주기적으로 원격 DB로그 버퍼(420)를 읽어 원격 DB로그 파일(430)에 원격 DB로그를 기록한다(4p). In this process, the pages in the DB memory buffer 312 are written to the DB file 314 if necessary (4o), and the remote D-AGENT 410 periodically reads the remote DB log buffer 420 to read the remote DB log file ( Record the remote DB log at 430 (4p).

만일, 이러한 통신과정이 실패하면, 지역 D-AGENT(320)는 가장 최근의 일치 LSN을 찾아(4e), D-INFO(230)에 저장한다(4i). 이를 통해 원격 로깅이 불가능한 상황에서도 DB서버(310)는 일치 LSN보다 작은 LSN을 가지는 트랜잭션만 처리를 완료함으로써 지속성을 보장한다. 정상적인 상황에서는 로깅 호스트에 기록이 완료된 D-LSN 보다 작은 LSN을 가지는 트랜잭션만 처리를 완료함으로써 지속성을 보장한다. If this communication process fails, the local D-AGENT 320 finds the most recent matching LSN (4e) and stores it in the D-INFO 230 (4i). Through this, even in a situation where remote logging is impossible, the DB server 310 guarantees persistence by completing the processing of only transactions having an LSN smaller than the matching LSN. Under normal circumstances, only transactions with LSNs smaller than the D-LSN whose logging is completed on the logging host can be processed to ensure persistence.

도 5는 본 발명에 따른 원격 로깅 방법의 더 상세한 예시를 위한 구성을 도시한 것이다.Figure 5 shows a configuration for a more detailed illustration of a remote logging method according to the present invention.

도 5에 있어서, 지역 DB로그 버퍼(313)에 LSN이 100 까지인 지역 DB로그가 저장되어 있는 상황에서, 사용자1(100)이 새로운 트랜잭션에서 삽입, 갱신, 커밋 연산을 차례로 실행하고 지역 D-AGENT(320)가 지역 DB로그 버퍼(313)를 읽고, 약간의 시간이 경과한 후에 사용자2(100)가 새로운 트랜잭션을 시작해서 삭제, 커밋 연산을 차례로 실행한 경우의 예를 든다. 이 때, 사용자1(100)은 커밋 연산을 수행한 후 D-INFO(230) 값이 자신의 커밋 LSN 값보다 큰 103 이상이기를 기다리고 있고(5i), 사용자2(100)도 커밋 연산을 수행한 후 D-INFO(230)값이 자신의 커밋 LSN 값보다 큰 105 이상이기를 기다리고 있다(5o). In FIG. 5, in a situation where a local DB log having an LSN of up to 100 is stored in the local DB log buffer 313, the user 1 (100) executes insert, update, and commit operations in a new transaction, and then executes the local D−. The AGENT 320 reads the local DB log buffer 313, and after some time elapses, the user 2 100 starts a new transaction and executes a delete operation and a commit operation in this order. At this time, user 1 (100) waits for the D-INFO (230) value to be 103 or greater than its commit LSN value after performing the commit operation (5i), and user 2 (100) also performs the commit operation. After that, it waits for the D-INFO 230 value to be 105 or more greater than its commit LSN value (5o).

지역 DB로그 파일(315)에는 직전의 DB로그 일치 결과로, 90 부터 100 사이의 LSN을 가지는 지역 DB로그가 저장되어 있고(5a), 지역 DB로그 버퍼(313)에는 차례대로 LSN이 101, 102, 103 인 새로운 지역 DB로그가 저장된다(5b). 지역 D-AGENT(320)는 지역 DB로그 버퍼(313)에서 새로운 지역 DB로그를 읽어(5c), 원격 D-AGENT(410)에 새로운 지역 DB로그인 101, 102, 103을 전송한다(5e).The local DB log file 315 stores the local DB log having the LSN between 90 and 100 as a result of the previous DB log match (5a), and the LSN is sequentially 101, 102 in the local DB log buffer 313. The new local DB log of 103 is stored (5b). The local D-AGENT 320 reads a new local DB log from the local DB log buffer 313 (5c) and transmits new local DB logins 101, 102, and 103 to the remote D-AGENT 410 (5e).

원격 D-AGENT(410)는 원격 DB로그 버퍼(420)에 수신한 원격 DB로그인 101, 102, 103을 저장하고(5f), 마지막 LSN 값인 103을 돌려준다(5g). 지역 D-AGENT(320)는 D-INFO(230)에 상기 마지막 LSN 값인 103을 D-LSN값으로 저장한다(5h). 이 과정이 진행되는 동안 사용자2(100)가 실행한 트랜잭션에 의해 지역 DB로그 버퍼(313)에는 LSN이 104, 105인 새로운 지역 DB로그가 저장되어 있다(5d). 이 시점에서 D-LSN값은 103이고, 사용자1(100)의 커밋 LSN은 103으로 조건을 만족하기 때문에 사용자1(100)의 트랜잭션은 완료 처리가 된다.(5i) The remote D-AGENT 410 stores the received remote DB logins 101, 102, and 103 in the remote DB log buffer 420 (5f), and returns 103, the last LSN value (5g). The local D-AGENT 320 stores the last LSN value 103 as the D-LSN value in the D-INFO 230 (5h). During this process, a new local DB log with LSN 104 and 105 is stored in the local DB log buffer 313 by a transaction executed by user 2 (100) (5d). At this point, since the D-LSN value is 103 and the commit LSN of user 1 (100) satisfies the condition as 103, the transaction of user 1 (100) is completed.

한편, 사용자2(100)의 커밋 LSN은 105 이기 때문에 조건을 만족하지 못하여 사용자2(100)는 다시 기다리기 시작한다(5o). 다시 지역 D-AGENT(320)는 지역 DB로그 버퍼(313)를 읽어(5j) 새로운 지역 DB로그인 104와 105를 원격 D-AGENT(410)에 전송한다(5k). 원격 D-AGENT(410)는 원격 DB로그 버퍼(420)에 수신한 원격 DB로그인 104와 105를 저장하고(5l), 마지막 LSN 값인 105를 돌려준다. 지역 D-AGENT(320)는 D-INFO(230)에 상기 마지막 LSN 값인 105를 D-LSN값으로 저장한다(5n). 상기 D-LSN값은 대기 중인 사용자2(100)의 커밋 LSN인 105와 같기 때문에 조건을 만족하여 사용자2(100)의 트랜잭션은 완료된다. On the other hand, since the commit LSN of the user 2 (100) is 105, the user 2 (100) starts to wait again because the condition is not satisfied (5o). Again, the local D-AGENT 320 reads the local DB log buffer 313 (5j) and sends new local DB logins 104 and 105 to the remote D-AGENT 410 (5k). The remote D-AGENT 410 stores the received remote DB logins 104 and 105 in the remote DB log buffer 420 (5l) and returns 105, the last LSN value. The local D-AGENT 320 stores the last LSN value 105 as the D-LSN value in the D-INFO 230 (5n). Since the D-LSN value is equal to 105, which is the commit LSN of the waiting user 2 100, the condition is satisfied and the transaction of the user 2 100 is completed.

한편, 원격 D-AGENT(410)는 수신한 원격 DB로그를 안전하게 관리하기 위해 원격 DB로그 버퍼(420)에서 읽어 원격 DB로그 파일(430)에 저장한다(5p).Meanwhile, the remote D-AGENT 410 reads from the remote DB log buffer 420 and stores it in the remote DB log file 430 in order to safely manage the received remote DB log (5p).

도 6은 본 발명에 따른 원격 로깅을 활용한 복구 방법의 설명을 위한 구성을 도시한 것이다.6 is a block diagram illustrating a recovery method using remote logging according to the present invention.

도 6에 있어서, 서비스 호스트(300)에서 운영중인 DB서버(310)와 지역 D-AGENT(320) 그리고 원격로깅 호스트(400)에서 운영중인 원격 D-AGENT(410)가 협력하여 시스템 오류 상황에서 복구 방법을 제공한다. In FIG. 6, a DB server 310 operating in a service host 300, a local D-AGENT 320, and a remote D-AGENT 410 operating in a remote logging host 400 cooperate with each other in a system error situation. Provide a recovery method.

DB회복 수단(317)은 DB서버(310)의 한 모듈로서 DB회복 기능을 담당한다. 회복과정이 필요한 경우, DB회복 수단(317)은 마지막 지역 DB로그 파일(315)를 읽어(6a), 마지막 일치 LSN을 획득하고, 상기 LSN값을 기준 LSN으로 하여 지역 D-AGENT(320)에 통상의 통신 방법을 통해 전달한다(6b). The DB recovery means 317 is responsible for the DB recovery function as a module of the DB server 310. If a recovery process is needed, the DB recovery means 317 reads the last local DB log file 315 (6a), obtains the last matched LSN, and uses the LSN value as the reference LSN to the local D-AGENT 320. 6b through a normal communication method.

지역 D-AGENT(320)는 기준 LSN값을 원격 D-AGENT(410)에 전송하고(6c) 수신을 기다린다. 원격 D-AGENT(410)는 수신한 기준 LSN값 보다 큰 모든 LSN을 가지는 원격 DB로그를 원격 DB로그 파일(430)과 원격 DB로그 버퍼(420)에서 읽어(6d, 6e), 지역 D-AGENT(320)에 전송한다(6f). 지역 D-AGENT(320)는 수신한 원격 DB로그를 DB회복 수단(317)에게 통신 방법을 통해 전송하고(6g), DB회복 수단(317)은 수신한 원격 DB로그를 지역 DB로그 버퍼(313)에 기록한 후(6h), 지역 DB로그 파일(315)에 기록한다. 이 때, 필요한 경우, 새로운 지역 DB로그 파일(318)을 생성하여 기록한다(6i).Local D-AGENT 320 sends a reference LSN value to remote D-AGENT 410 (6c) and waits for reception. The remote D-AGENT 410 reads the remote DB log having all LSNs greater than the received reference LSN value from the remote DB log file 430 and the remote DB log buffer 420 (6d, 6e), and the local D-AGENT. (6f). The local D-AGENT 320 transmits the received remote DB log to the DB recovery means 317 through a communication method (6g), and the DB recovery means 317 sends the received remote DB log to the local DB log buffer 313. (6h), and then to the local DB log file 315. At this time, if necessary, a new local DB log file 318 is generated and recorded (6i).

이 후, DB회복 수단(317)은 통상적인 기존의 방법과 동일하게 UNDO/REDO 과정을 수행하여(6j), DB 상태를 회복하고, 회복이 완료된 상태를 DB파일(314)에 기록한다(6k).Thereafter, the DB recovery means 317 performs the UNDO / REDO process in the same manner as the conventional method (6j), recovers the DB state, and records the completed state in the DB file 314 (6k). ).

도 7은 본 발명에 따른 원격 로깅을 활용한 복구 방법의 더 상세한 예시를 위한 구성을 도시한 것이다.7 shows a configuration for a more detailed example of a recovery method utilizing remote logging according to the present invention.

도 7에 있어서, 서비스 호스트(300)에는 DB로그 파일(315)에 LSN값이 100인 DB로그까지 저장되어 있고, 원격로깅 호스트(400)에는 LSN값이 90 부터 102 인 로그는 원격 DB로그 파일(430)에, 103, 104, 105인 DB로그는 원격 DB로그 버퍼(420)에 저장되어 있다. In FIG. 7, the service host 300 stores up to a DB log having an LSN value of 100 in the DB log file 315, and a log having an LSN value of 90 to 102 in the remote logging host 400 is a remote DB log file. At 430, the DB logs 103, 104, 105 are stored in the remote DB log buffer 420.

먼저, DB회복 수단(317)은 마지막 지역 DB로그 파일(315)에서 지역 DB로그를 읽어 지역 DB로그 버퍼(313)에 복사하고(7a), 마지막 일치 로그를 찾아 LSN값을 지역 D-AGENT(320)에 상기 LSN값인 100을 전송한다(7b). 지역 D-AGENT(320)는 수신한 LSN값을 원격 D-AGENT(410)에게 전송하고 수신을 기다린다(7c). First, the DB recovery means 317 reads the local DB log from the last local DB log file 315 and copies it to the local DB log buffer 313 (7a), finds the last match log, and converts the LSN value to the local D-AGENT ( In step 320, the LSN value 100 is transmitted (step 7b). The local D-AGENT 320 sends the received LSN value to the remote D-AGENT 410 and waits for reception (7c).

원격 D-AGENT(410)는 수신한 LSN값인 100과 원격 DB로그 파일(430)과 원격 DB로그 버퍼(420)에 저장된 각 원격 DB로그의 LSN값을 비교하여 값이 큰 원격 DB로그를 찾아서(7d, 7e), 조건에 만족하는 원격 DB로그인 101, 102, 103, 104, 105를 지역 D-AGENT(320)에 전송한다(7f). 지역 D-AGENT(320)는 상기 원격 DB로그를 DB회복 수단(317)에게 통신 방법을 통해 전달한다(7g). The remote D-AGENT 410 finds a remote DB log having a large value by comparing the received LSN value 100 with the LSN value of each remote DB log stored in the remote DB log file 430 and the remote DB log buffer 420 ( 7d, 7e), the remote DB logins 101, 102, 103, 104, and 105 satisfying the condition are transmitted to the local D-AGENT 320 (7f). The local D-AGENT 320 transmits the remote DB log to the DB recovery means 317 through a communication method (7g).

DB회복 수단(317)은 상기 원격 DB로그를 지역 DB로그 버퍼(313)에 기록한 후(7h), 지역 DB로그 파일(315)에 저장한다. 이 때, 필요한 경우, 새로운 지역 DB로그 파일(318)을 생성하여 저장한다(7i). The DB recovery means 317 records the remote DB log in the local DB log buffer 313 (7h) and stores the remote DB log in the local DB log file 315. At this time, if necessary, a new local DB log file 318 is generated and stored (7i).

상기와 같은 과정들이 끝나면, 서비스 호스트(300)에는 필요한 모든 DB로그가 저장되어 있고, DB회복 수단(317)은 상기 DB로그를 활용해 DB상태를 회복한다.When the above processes are completed, all necessary DB logs are stored in the service host 300, and the DB recovery means 317 recovers the DB state using the DB logs.

도 8a 내지 도 8e는 본 발명에 따른 원격 로깅 동작 방법의 흐름을 도시한 것이다.8A to 8E illustrate a flow of a remote logging operation method according to the present invention.

도 8a에 있어서, DB서버(310)의 한 모듈인 DB서비스 수단(311)은 접속된 사용자(100)의 요구를 수신한다(단계 S101). S102 단계에서 트랜잭션 처리에 필요한 지역 DB로그를 생성하고, 지역 DB로그에 LSN을 할당한다(단계 S103). S104 단계에서 지역 DB로그를 지역 DB로그 버퍼(313)에 기록하고, 사용자(100) 요구에 의해 처리한 연산이 커밋인지 검사한다(단계 S105). In Fig. 8A, the DB service means 311, which is a module of the DB server 310, receives a request of the connected user 100 (step S101). In step S102, a local DB log necessary for transaction processing is generated and an LSN is assigned to the local DB log (step S103). In step S104, the local DB log is recorded in the local DB log buffer 313, and it is checked whether the operation processed by the user 100 request is a commit (step S105).

S105 단계에서 검사 결과가 실패로 판단되면, 사용자(100)에게 성공 메시지를 돌려준다(단계 S109). S105 단계에서 검사 결과가 성공 즉, 커밋으로 판단되면, C-LSN 변수 값에 커밋 로그의 LSN값을 설정하고(단계 S106), D-INFO(230)에 저장된 D-LSN값을 읽어 C-LSN값과 비교한다(단계 S107). S107 단계에서 검사가 실패하면, 아직 해당 로그가 저장되지 않은 것이므로, 휴지 기간을 가진 후 S107 단계를 반복한다(단계 S110). S107 단계에서 검사가 성공하면, 해당 로그가 저장된 것이므로, 사용자에게 성공 메시지를 돌려주고(단계 S108) 트랜잭션 처리를 종료한다.If it is determined in step S105 that the test result is a failure, a success message is returned to the user 100 (step S109). If it is determined in step S105 that the check result is successful, that is, commit, the LSN value of the commit log is set in the C-LSN variable value (step S106), and the C-LSN is read by reading the D-LSN value stored in the D-INFO 230. The value is compared (step S107). If the check fails in step S107, since the corresponding log has not been stored yet, the step S107 is repeated after a period of rest (step S110). If the check succeeds in step S107, since the corresponding log is stored, a success message is returned to the user (step S108) and the transaction processing ends.

도 8b에 있어서, DB서버(310)의 한 모듈인 DB로그 일치 수단(316)은 주기적으로 지역 DB로그 버퍼(313)을 감시하여(단계 S201) 새로운 지역 DB로그가 있는지 검사한다(단계 S202). S202 단계에서 검사가 실패하면, 해당 주기 작업을 완료한다. S202 단계에서 검사가 성공하면, 새로운 지역 DB로그를 지역 DB로그 파일(315)에 기록한다(단계 S203). 이 과정을 지역 DB로그 버퍼(313)에 새로운 지역 DB로그가 있는 동안 반복한다(단계 S204). In FIG. 8B, the DB log matching means 316, which is a module of the DB server 310, periodically monitors the local DB log buffer 313 (step S201) and checks whether there is a new local DB log (step S202). . If the check fails in step S202, complete the cycle. If the check succeeds in step S202, a new local DB log is recorded in the local DB log file 315 (step S203). This process is repeated while there is a new local DB log in the local DB log buffer 313 (step S204).

S204 단계에서 더 이상 새로운 지역 DB로그가 없으면, 일치 과정이 완료되었음을 표시하기 위하여 일치 로그(S-LOG)를 생성하고 LSN을 할당한다(단계 S205). 생성된 일치 로그를 지역 DB로그 버퍼(313)에 기록하고(단계 S206), 해당 주기 작업을 완료한다.If there is no new local DB log at step S204, a match log (S-LOG) is generated and an LSN is assigned to indicate that the matching process is completed (step S205). The generated match log is recorded in the local DB log buffer 313 (step S206), and the corresponding periodic task is completed.

도 8c 내지 도 8d에 있어서, 지역 D-AGENT(320)은 주기적으로 지역 DB로그 버퍼(313)을 감시하여(단계 S301), 새로운 지역 DB로그가 있는지 검사한다(단계 S302). 8C to 8D, the area D-AGENT 320 periodically monitors the area DB log buffer 313 (step S301), and checks whether there is a new area DB log (step S302).

S302 단계에서 검사가 실패하면, 해당 주기 작업을 완료한다. S302 단계에서 검사가 성공하면, 송신로그 리스트에 새로운 지역 DB로그를 추가하고(단계 S303), 상기 DB로그가 일치 로그인지 검사한다(단계 S304). If the check fails in step S302, complete the cycle work. If the check succeeds in step S302, a new local DB log is added to the transmission log list (step S303), and it is checked whether the DB log matches the login log (step S304).

S304 단계에서 검사가 성공하면, 최근 S-LSN 변수 값을 일치 로그의 LSN값으로 설정한다(단계 S310). S304 단계에서 검사가 실패하면, 다시 새로운 로그가 있는지 검사하여 성공하면 S303 단계를 반복한다(단계 S305). If the check succeeds in step S304, the latest S-LSN variable value is set to the LSN value of the match log (step S310). If the check fails in step S304, check again whether there is a new log, and if successful, repeat step S303 (step S305).

S305 단계에서 검사가 실패하면, 현재 D-HOST 변수 값의 호스트와 통신이 연결되어 있는지 검사한다(단계 S306). S306 단계에서 성공하면, 송신로그 리스트를 원격 D-AGENT(410)에 전송하고(단계 S307), 원격 D-AGENT(410)로부터 수신을 대기한다. If the check fails in step S305, it is checked whether communication with the host of the current D-HOST variable value is connected (step S306). If it succeeds in step S306, the transmission log list is transmitted to the remote D-AGENT 410 (step S307), and waits for reception from the remote D-AGENT 410.

마지막 LSN 값을 받았는지 검사하여(단계 S308), 수신이 성공하면 D-INFO(230)의 D-LSN을 상기 수신한 LSN값으로 설정하고(단계 S309) 해당 주기 작업을 종료한다. S306 단계 혹은 S308 단계의 검사가 실패하면, D-HOST리스트에 다른 원격로깅 호스트(D-HOST)가 있는지 검사한다(단계 S311). It is checked whether the last LSN value has been received (step S308). If the reception is successful, the D-LSN of the D-INFO 230 is set to the received LSN value (step S309), and the cycle operation is terminated. If the check in step S306 or S308 fails, it is checked whether there is another remote logging host (D-HOST) in the D-HOST list (step S311).

S311 단계에서 검사가 실패하면, 즉 통신이 가능한 다른 D-HOST가 없다면 더 이상 원격 로깅이 불가능한 상태이므로, D-LSN값을 S-LSN값으로 설정하여(단계 S315) 지역 로깅만 수행한다. 이 후, D-HOST리스트의 처음부터 통신을 시도하기 위하여 리스트의 첫번째 호스트로 포인트를 재설정(단계 S316)한다. If the check fails in step S311, that is, the remote logging is no longer possible if there is no other D-HOST capable of communication, the local logging is performed only by setting the D-LSN value to the S-LSN value (step S315). After that, the point is reset to the first host in the list in order to attempt communication from the beginning of the D-HOST list (step S316).

S311 단계에서 검사가 성공하면, 해당 D-HOST에 연결을 시도하고(단계 S312), 연결이 성공했는지 검사한다(단계 S313). S313 단계에서 검사가 실패하면, D-LSN값을 S-LSN값으로 설정하고(단계 S317), S311단계를 다시 수행한다. S313단계에서 검사가 성공하면, 현재 D-HOST 변수를 상기 D-HOST로 변경하고(단계 S314) 해당 주기를 종료한다.If the check succeeds in step S311, it attempts to connect to the corresponding D-HOST (step S312), and checks whether the connection is successful (step S313). If the check fails in step S313, the D-LSN value is set to the S-LSN value (step S317), and step S311 is performed again. If the check succeeds in step S313, the current D-HOST variable is changed to the D-HOST (step S314) and the cycle ends.

도 8e에 있어서, 원격 D-AGENT(410)은 지역 D-AGENT(320)과 통신을 연결 후, 메시지 수신을 하면(단계 S401), 메시지 헤더를 읽어 로그 전송 프로토콜인지 검사한다(단계 S402). S402단계에서 검사가 실패하면 해당 수신 처리를 종료하고 다시 수신을 대기한다. S402단계에서 검사가 성공하면 DB로그 리스트를 수신하여(단계 S403) 원격 DB로그 버퍼(420)에 저장한다(단계 S404). 상기 DB로그 리스트에서 마지막 LSN값을 획득하여(단계 S405), 지역 D-AGENT(320)에 송신하고(단계 S406), 상기 리스트를 원격 DB로그 파일(단계 S407)에 저장한 후 수신 작업을 종료하고 다시 수신을 대기한다.In FIG. 8E, when the remote D-AGENT 410 connects with the local D-AGENT 320 and receives a message (step S401), the remote D-AGENT 410 reads the message header and checks whether it is a log transmission protocol (step S402). If the check fails in step S402, the corresponding processing ends and waits for reception again. If the check succeeds in step S402, the DB log list is received (step S403) and stored in the remote DB log buffer 420 (step S404). Obtain the last LSN value from the DB log list (step S405), send it to the local D-AGENT 320 (step S406), save the list in a remote DB log file (step S407), and then finish the receiving operation. And wait for reception again.

도 9a 내지 도 9c는 본 발명에 따른 원격 로깅을 활용한 복구 방법의 흐름을 도시한 것이다.9a to 9c illustrate the flow of a recovery method utilizing remote logging according to the present invention.

도 9a에 있어서, 시스템 오류에 의해 DB서버(310)를 재시작 하는 과정에서 DB회복 과정이 필요한지 판단한다(단계 S501). S501 단계에서 검사가 실패하면, DB회복 과정을 종료하고, 검사가 성공하면, DB회복 수단(317)은 마지막 지역 DB로그 파일(315)을 오픈한다(단계 S502). In FIG. 9A, it is determined whether a DB recovery process is required in the process of restarting the DB server 310 due to a system error (step S501). If the check fails in step S501, the DB recovery process ends, and if the check succeeds, the DB recovery means 317 opens the last local DB log file 315 (step S502).

상기 지역 DB로그 파일(315)에서 마지막 일치 로그(S-LOG)를 검색하여(단계 S503), 해당 로그의 LSN을 획득한다(단계 S504). 획득한 상기 LSN을 지역 D-AGENT(320)에게 통신 수단을 통해 전달하고 메시지를 대기한다(단계 S505). 지역 D-AGNET(320)가 상기 LSN보다 큰 DB로그 리스트를 전송해오면(단계 S506), 상기 DB로그 리스트를 지역 DB로그 버퍼(313)에 기록하고, 지역 DB로그 파일(315)에 저장한다(단계 S507). 그리고 종래의 방식과 동일하게 UNDO/REDO를 수행하여 DB상태를 회복한다(단계 S508).The last matching log S-LOG is retrieved from the local DB log file 315 (step S503) to obtain an LSN of the corresponding log (step S504). The acquired LSN is transmitted to the local D-AGENT 320 through a communication means and waits for a message (step S505). When the local D-AGNET 320 sends the DB log list larger than the LSN (step S506), the DB log list is written to the local DB log buffer 313 and stored in the local DB log file 315. (Step S507). The DB state is recovered by performing UNDO / REDO as in the conventional method (step S508).

도 9b에 있어서, 지역 D-AGENT(320)은 DB회복 수단(317)이 전송한 메시지를 수신한다(단계 S601). 메시지 헤더를 조사하여 DB로그 요청 메시지인지 검사하여(단계 S602), 검사가 실패하면 해당 과정을 종료한다. S602 단계에서 검사가 성공하면, 수신 메시지에서 LSN을 획득한다(단계 S603). In Fig. 9B, the local D-AGENT 320 receives a message sent by the DB recovery means 317 (step S601). The message header is examined to see if it is a DB log request message (step S602), and if the check fails, the process ends. If the check succeeds in step S602, the LSN is obtained from the received message (step S603).

D-HOST리스트에 있는 각 D-HOST에 상기 LSN을 송신하고(단계 S604), 각 D-HOST로부터 DB로그 리스트를 수신한다(단계 S605). 수신한 각 DB로그 리스트를 LSN을 기준으로 정렬하여(단계 S606), DB회복 수단(317)에게 정렬된 DB로그 리스트를 전송하고(S607) 해당 작업을 종료한다.The LSN is sent to each D-HOST in the D-HOST list (step S604), and a DB log list is received from each D-HOST (step S605). The received DB log list is sorted based on the LSN (step S606), the sorted DB log list is transmitted to the DB recovery means 317 (S607), and the operation ends.

도 9c에 있어서, 원격 D-AGENT(410)는 지역 D-AGENT(320)으로부터 메시지를 수신하여(단계 S701), DB로그 요청 프로토콜인지 검사한다(단계 S702). S702 단계에서 검사가 실패하면 해당 과정을 종료하고, 성공하면 상기 메시지에서 LSN을 획득하여 상기 LSN값을 기준 LSN으로 한다(단계 S703). In FIG. 9C, the remote D-AGENT 410 receives a message from the local D-AGENT 320 (step S701) and checks whether it is a DB log request protocol (step S702). If the check fails in step S702, the process is terminated, and if successful, the LSN is obtained from the message and the LSN value is used as the reference LSN (step S703).

원격 DB로그 파일(430)과 원격 DB로그 버퍼(420)에 저장되어 있는 원격 DB로그를 결합하여 결합리스트를 작성한다(단계 S704). 상기 결합리스트에서 원격 DB로그를 읽어 들여(단계 S705), 상기 원격 DB로그의 LSN이 상기 기준 LSN보다 큰 값인지 검사한다(단계 S706). A combination list is created by combining the remote DB log file 430 and the remote DB log stored in the remote DB log buffer 420 (step S704). The remote DB log is read from the combined list (step S705), and it is checked whether the LSN of the remote DB log is larger than the reference LSN (step S706).

S706 단계에서 검사가 성공하면, DB로그 리스트에 상기 원격 DB로그를 추가한다(단계 S709). 결합리스트가 비어있는지, 즉 마지막 로그인지 검사하여(단계 S707) 아니면 다시 S705 단계를 수행한다. S707 단계에서 검사가 성공하면 필요한 모든 원격 DB로그를 수집하였으므로, 상기 DB로그 리스트를 지역 D-AGENT(320)에 전송하고(단계 S708), 해당 과정을 종료한다.If the check succeeds in step S706, the remote DB log is added to the DB log list (step S709). Check if the join list is empty, that is, the last login (step S707), or perform step S705 again. If the inspection is successful in step S707, all necessary remote DB logs are collected, and the DB log list is transmitted to the local D-AGENT 320 (step S708), and the process ends.

상기와 같은 과정을 통해 DB로그를 DB로그 파일에 기록하고 사용자에게 결과를 돌려주는 방법을 변형함으로써 사용자가 커밋 명령을 수행하는 경우 종래의 방식대로 DB로그가 DB로그 파일에 완전히 기록되는 것을 기다리는 대신, 별도의 원격로깅 호스트에 DB로그를 완전히 전송하고 응답을 받는 시간동안만 대기함으로써 트랜잭션 처리 성능을 향상시킬 수 있다. 그리고 동시에 별도의 원격로깅 호스트에 DB로그를 복제하여 저장함으로써 지속성을 향상시키는 방법을 제공하며, 시스템 오류가 발생하여 DB서버를 재시작하는 경우, 지역 DB로그 파일과 원격 DB로그 파일을 결합하여 DB 상태를 안전하게 복구하게 되는 기능을 제공한다.By modifying the method of recording the DB log to the DB log file and returning the result to the user through the above process, when the user executes the commit command, instead of waiting for the DB log to be completely written to the DB log file in the conventional manner In addition, transaction processing performance can be improved by transmitting DB logs to a separate remote logging host and waiting only for the time for receiving a response. At the same time, it provides a way to improve the persistence by replicating and storing DB logs on a separate remote logging host.In case of restarting the DB server due to a system error, the DB status is combined by combining the local DB log file and the remote DB log file. Provides the ability to safely recover.

본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자는 본 발명이 본 발명의 본질적인 특성에서 벗어나지 않는 범위에서 변형된 형태로 구현될 수 있음을 이해할 수 있을 것이다. 그러므로 본 개시된 실시예들은 한정적인 관점이 아니라 설명적인 관점에서 고려되어야 한다. 상기의 설명에 포함된 예들은 본 발명에 대한 이해를 위해 도입된 것이며, 이 예들은 본 발명의 사상과 범위를 한정하지 않는다. 상기의 예들 외에도 본 발명에 따른 다양한 실시 태양이 가능하다는 것은, 본 발명이 속한 기술 분야에 통상의 지식을 가진 사람에게는 자명할 것이다. 본 발명의 범위는 전술한 설명이 아니라 청구범위에 나타나 있으며, 그와 동등한 범위 내에 있는 모든 차이점은 본 발명에 포함된 것으로 해석되어야 할 것이다. Those skilled in the art will appreciate that the present invention can be implemented in a modified form without departing from the essential features of the present invention. Therefore, the disclosed embodiments should be considered in descriptive sense only and not for purposes of limitation. Examples included in the above description are introduced for the understanding of the present invention, and these examples do not limit the spirit and scope of the present invention. It will be apparent to those skilled in the art that various embodiments in accordance with the present invention in addition to the above examples are possible. The scope of the present invention is shown not in the above description but in the claims, and all differences within the scope will be construed as being included in the present invention.

또한 본 발명에 따른 상기의 각 단계는 일반적인 프로그래밍 기법을 이용하여 소프트웨어적으로 또는 하드웨어적으로 다양하게 구현할 수 있다는 것은 이 분야에 통상의 기술을 가진 자라면 용이하게 알 수 있는 것이다.In addition, it can be easily understood by those skilled in the art that each of the above steps according to the present invention can be variously implemented in software or hardware using a general programming technique.

그리고 본 발명의 일부 단계들은, 또한, 컴퓨터로 읽을 수 있는 기록매체에 컴퓨터가 읽을 수 있는 코드로서 구현하는 것이 가능하다. 컴퓨터가 읽을 수 있는 기록매체는 컴퓨터 시스템에 의하여 읽혀질 수 있는 데이터가 저장되는 모든 종류의 기록장치를 포함한다. 컴퓨터가 읽을 수 있는 기록매체의 예로는 ROM, RAM, CD-ROM, CD-RW, 자기 테이프, 플로피디스크, HDD, 광 디스크, 광자기 저장장치 등이 있으며, 또한 캐리어 웨이브(예를 들어 인터넷을 통한 전송)의 형태로 구현되는 것도 포함한다. 또한 컴퓨터가 읽을 수 있는 기록매체는 네트워크로 연결된 컴퓨터 시스템에 분산되어, 분산방식으로 컴퓨터가 읽을 수 있는 코드로 저장되고 실행될 수 있다.And some steps of the invention may also be embodied as computer readable code on a computer readable recording medium. The computer-readable recording medium includes all kinds of recording devices in which data that can be read by a computer system is stored. Examples of computer-readable recording media include ROM, RAM, CD-ROM, CD-RW, magnetic tape, floppy disks, HDDs, optical disks, magneto-optical storage devices, and carrier wave (eg, Internet It also includes the implementation in the form of). The computer readable recording medium can also be distributed over network coupled computer systems so that the computer readable code is stored and executed in a distributed fashion.

본 발명에 의하면, DB서버가 서비스 호스트에서 프로세스로 동작하면서 사용자의 요구를 처리하고 지역 DB로그를 기록한 후, 커밋 연산 수행시 지속성 조건을 검사하여 조건에 부합할 때까지 커밋 처리 완료를 지연하여 트랜잭션을 처리하며, 지역 D-AGENT가 서비스 호스트에서 별도의 프로세스로 동작하면서 주기적으로 지역 DB로그 버퍼를 검사하여 새로운 지역 DB로그를 읽어 원격 로깅 호스트 서버에 전송하고, 기록에 성공한 LSN을 수신하여 지속성 조건을 설정하며, 원격 D-AGENT가 원격로깅 호스트에서 프로세스로 동작하면서 지역 D-AGENT로부터 수신한 원격 DB로그를 원격 DB로그 버퍼와 원격 DB로그 파일에 기록하고, 마지막 LSN을 지역 D-AGENT에 전송하여, 사용자가 커밋 명령을 수행하는 경우 종래의 방식대로 DB로그가 DB로그 파일에 완전히 기록되는 것을 기다리는 대신, 별도의 원격로깅 호스트에 DB로그를 완전히 전송하고 응답을 받는 시간동안만 대기함으로써 트랜잭션 처리 성능을 향상시킬 수 있다. 또한, 지역 DB로그 파일에 기록함과 동시에 별도의 원격로깅 호스트에 원격 DB로그를 전송하여 기록하는 방법을 제공함으로써, 시스템 오류에 의해 DB서버를 재시작하는 경우, 종래의 방식이 가지는 DB로그를 유실하는 문제점을 해결하여 DB서버의 지속성 특성을 강화할 수 있다. 그리고 지역 DB로그와 원격 DB로그를 효과적으로 결합하는 방법을 제공함으로써 완전하게 DB상태를 복구할 수 있으며, 다수의 원격로깅 호스트로 구성하여 운영하는 방법을 제공함으로써 가용성을 증대시켜 시스템 오류에 대비한 안정성을 한층 더 향상시킬 수 있다.According to the present invention, after the DB server operates as a process in the service host, processes the user's request, records the local DB log, checks the persistence condition when performing the commit operation, and delays the completion of the commit process until the condition is met. Local D-AGENT operates as a separate process on the service host and periodically checks the local DB log buffer, reads the new local DB log, sends it to the remote logging host server, and receives the LSN that succeeded in recording. Remote D-AGENT operates as a process on the remote logging host, and records the remote DB log received from the local D-AGENT to the remote DB log buffer and the remote DB log file, and sends the last LSN to the local D-AGENT. When the user executes the commit command, the DB log is completely written to the DB log file in the conventional manner. Instead of legs, it can be completely transferred to the DB log on a separate remote logging host, and by waiting only for the recipient to improve the response time transaction processing performance. In addition, by providing a method of transmitting and recording the remote DB log to a separate remote logging host while recording in the local DB log file, when the DB server is restarted due to a system error, the DB log of the conventional method is lost. By solving the problem, the persistence characteristics of the DB server can be strengthened. And by providing a method to effectively combine local DB log and remote DB log, DB status can be completely recovered, and by providing a method of operating by configuring a number of remote logging hosts, it increases the availability and stability against system failure Can be further improved.

도 1은 종래의 트랜잭션 처리 및 로깅 개념도이다.1 is a conceptual diagram of a conventional transaction processing and logging.

도 2는 종래의 변형된 트랜잭션 처리 및 로깅 개념도이다.2 is a conceptual diagram of a conventional modified transaction processing and logging.

도 3은 본 발명에 따른 원격 로깅 및 복구 방법을 실행하는 구성을 블록으로 도시한 것이다.3 is a block diagram showing a configuration for executing a remote logging and recovery method according to the present invention.

도 4는 본 발명에 따른 원격 로깅 방법의 설명을 위한 구성을 도시한 것이다.4 illustrates a configuration for explaining a remote logging method according to the present invention.

도 5는 본 발명에 따른 원격 로깅 방법의 더 상세한 예시를 위한 구성을 도시한 것이다.Figure 5 shows a configuration for a more detailed illustration of a remote logging method according to the present invention.

도 6은 본 발명에 따른 원격 로깅을 활용한 복구 방법의 설명을 위한 구성을 도시한 것이다.6 is a block diagram illustrating a recovery method using remote logging according to the present invention.

도 7은 본 발명에 따른 원격 로깅을 활용한 복구 방법의 더 상세한 예시를 위한 구성을 도시한 것이다.7 shows a configuration for a more detailed example of a recovery method utilizing remote logging according to the present invention.

도 8a 내지 도 8e는 본 발명에 따른 원격 로깅 동작 방법의 흐름을 도시한 것이다.8A to 8E illustrate a flow of a remote logging operation method according to the present invention.

도 9a 내지 도 9c는 본 발명에 따른 원격 로깅을 활용한 복구 방법의 흐름을 도시한 것이다.9a to 9c illustrate the flow of a recovery method utilizing remote logging according to the present invention.

Claims (9)

DB서버와 지역 DB 에이전트인 D-AGENT를 포함하는 서비스 호스트와 원격 지역의 DB 에이전트인 원격 D-AGENT를 포함하는 하나 혹은 그 이상의 원격로깅 호스트로 구성된 시스템에서 DB서버가 DB로그를 기록하는 방법에 있어서, The DB server records DB logs in a system composed of a DB server, a service host including D-AGENT, a local DB agent, and one or more remote logging hosts, including a remote D-AGENT, a DB agent in a remote area. In (a) 상기 DB서버가 상기 서비스 호스트에서 프로세스로 동작하면서 사용자의 요구를 처리하고 지역 DB로그를 기록한 후, 커밋(commit) 연산 수행시 지속성 조건을 검사하여 조건에 부합할 때까지 커밋 처리 완료를 지연하여 트랜잭션을 처리하는 지역 DB로그 기록 및 커밋 트랜잭션 완료 검사 단계;(a) After the DB server operates as a process on the service host, processes the user's request, records the local DB log, checks the persistence condition when performing a commit operation, and completes the commit process until the condition is met. Checking local DB log and commit transaction completion processing the transaction by delay; (b) 상기 지역 D-AGENT가 상기 서비스 호스트에서 별도의 프로세스로 동작하면서 주기적으로 지역 DB로그 버퍼를 검사하여 새로운 지역 DB로그를 읽어 원격 로깅 호스트 서버에 전송하고, 기록에 성공한 LSN(Log Sequence Number)을 수신하여 지속성 조건을 설정하는 단계; 및(b) While the local D-AGENT operates as a separate process on the service host, periodically checks the local DB log buffer, reads new local DB logs, and transmits them to the remote logging host server. Setting a persistence condition by receiving; And (c) 상기 원격 D-AGENT가 원격로깅 호스트에서 프로세스로 동작하면서 상기 지역 D-AGENT로부터 수신한 원격 DB로그를 원격 DB로그 버퍼와 원격 DB로그 파일에 기록하고, 마지막 LSN을 상기 지역 D-AGENT에 전송하는 단계;를 포함하는 것을 특징으로 하는 데이터베이스 시스템의 실시간 원격 로깅 방법.(c) The remote D-AGENT operates as a process in the remote logging host, and records the remote DB log received from the local D-AGENT in the remote DB log buffer and the remote DB log file, and records the last LSN in the local D-AGENT. Transmitting to the real-time remote logging method of a database system comprising a. 제1항에 있어서, 상기 (a) 단계에서 커밋 트랜잭션 완료 검사는,The method of claim 1, wherein the commit transaction completion check in the step (a), (a1) 사용자의 요구를 받아 트랜잭션을 시작하는 단계;(a1) initiating a transaction upon request of a user; (a2) 상기 트랜잭션에 대응하는 지역 DB로그에 LSN을 할당하여 지역 DB로그 버퍼에 지역 DB로그를 기록하는 단계; (a2) allocating an LSN to a local DB log corresponding to the transaction and recording the local DB log in a local DB log buffer; (a3) 연산 종류를 판단하여 커밋이 아니면 사용자에게 성공메시지를 전달하고, 커밋이면 공유메모리인 D-INFO에 저장된 D-LSN과 커밋 LSN을 비교하여 지속성 조건을 검사하는 단계;(a3) determining a type of operation to transmit a success message to the user if it is not a commit, and checking a persistence condition by comparing a commit LSN with a D-LSN stored in D-INFO, which is a shared memory, if the commit is performed; (a4) 커밋 LSN이 D-LSN 보다 작거나 같을 경우 해당 트랜잭션이 지속성을 확보한 것으로 판단하여 사용자에게 성공 메시지를 돌려주고, 커밋 LSN이 D-LSN 보다 큰 경우 해당 트랜잭션이 아직 지속성을 확보하지 못한 것으로 판단하여 대기하며 주기적으로 다시 검사하는 단계; 및(a4) If the commit LSN is less than or equal to the D-LSN, it is determined that the transaction has secured the persistence, and a success message is returned to the user. If the commit LSN is greater than the D-LSN, the transaction has not yet secured the persistence. Determining to wait and periodically checking again; And (a5) 주기적으로 지역 DB로그 버퍼의 지역 DB로그를 지역 DB로그 파일로 저장하고 일치 로그를 지역 DB로그 버퍼에 기록하는 단계;를 포함하는 것을 특징으로 하는 데이터베이스 시스템의 실시간 원격 로깅 방법.(a5) periodically storing the local DB log of the local DB log buffer as a local DB log file and recording the matching log in the local DB log buffer. 제2항에 있어서, The method of claim 2, 상기 D-INFO 는 DB로그가 지속적으로 디스크에 저장되었음을 판단하는 상기 D-LSN을 포함한 정보를 저장하는 공유메모리이며, 상기 D-LSN은 가장 최근의 일치 LSN 또는 상기 원격로깅 호스트에 전송된 최종 LSN을 저장하는 것임을 특징으로 하는 데이터베이스 시스템의 실시간 원격 로깅 방법.The D-INFO is a shared memory for storing information including the D-LSN which determines that a DB log is continuously stored on a disk, and the D-LSN is a most recent matching LSN or a final LSN transmitted to the remote logging host. Real time remote logging method of the database system, characterized in that for storing. 제1항에 있어서, 상기 (b) 단계는,According to claim 1, wherein step (b), (b1) 상기 지역 DB로그 버퍼를 주기적으로 감시하여 새로운 지역 DB로그가 있는 경우 해당 지역 DB로그를 읽어 상기 원격 D-AGENT에 전송하는 단계; (b1) periodically monitoring the local DB log buffer and reading a corresponding local DB log and transmitting the new local DB log to the remote D-AGENT; (b2) 상기 원격 D-AGENT로부터 수신한 메시지를 검사하여, 검사가 성공하면 수신한 마지막 LSN 값을 상기 D-LSN값으로 설정하는 단계; 및(b2) inspecting the message received from the remote D-AGENT and, if the check succeeds, setting the last LSN value received as the D-LSN value; And (b3) 검사가 실패하거나 상기 원격로깅 호스트 이상으로 인해 성공 메시지가 일정 시간 동안 수신되지 않으면, 상기 지역 DB로그 버퍼에서 최근 일치 로그를 찾아 해당 LSN을 상기 D-LSN값으로 설정하는 단계;를 포함하는 것을 특징으로 하는 데이터베이스 시스템의 실시간 원격 로깅 방법.(b3) if a successful message is not received for a predetermined time due to a check failure or a failure in the remote logging host, finding a recent match log in the local DB log buffer and setting a corresponding LSN as the D-LSN value; Real time remote logging method of the database system, characterized in that. 제1항에 있어서, 상기 (c) 단계는,The method of claim 1, wherein step (c) comprises: (c1) 상기 지역 D-AGENT로부터 전송받은 원격 DB로그를 원격 DB로그 버퍼에 저장하고, 저장한 마지막 원격 DB로그의 LSN을 포함한 성공 메시지를 지역 D-AGENT에게 전송하는 단계; 및(c1) storing the remote DB log received from the local D-AGENT in a remote DB log buffer and transmitting a success message including the LSN of the last stored remote DB log to the local D-AGENT; And (c2) 주기적으로 또는 원격 DB로그 버퍼가 꽉 찼을 때, 원격 DB로그 버퍼의 원격 DB로그를 원격 DB로그 파일에 기록하는 단계;를 포함하는 것을 특징으로 하는 데이터베이스 시스템의 실시간 원격 로깅 방법.(c2) periodically or when the remote DB log buffer is full, recording the remote DB log of the remote DB log buffer to a remote DB log file. DB서버와 지역의 DB 에이전트인 D-AGENT를 포함하는 서비스 호스트와 원격 지역의 DB 에이전트인 원격 D-AGENT를 포함하는 원격로깅 호스트로 구성된 시스템에서 시스템 오류에 의해 상기 DB서버를 재시작하여 DB를 복구하는 방법에 있어서, Recover the DB by restarting the DB server due to a system error in a system composed of a DB server, a service host including D-AGENT, a local DB agent, and a remote logging host including remote D-AGENT, a DB agent in a remote area. In the way, (a) 상기 DB서버가 지역 DB로그 파일에 저장된 마지막 일치 로그를 찾아 해당 LSN을 기준 LSN으로 하여 지역 D-AGENT에게 전송하여 필요한 원격 DB로그를 요청하고, 전송받은 원격 DB로그를 지역 DB로그 파일에 기록하여 UNDO/REDO과정을 통해 DB상태를 복구하는 단계;(a) The DB server finds the last matching log stored in the local DB log file and sends the local D-AGENT to the local D-AGENT using the LSN as the reference LSN to request the necessary remote DB log, and sends the received remote DB log to the local DB log file. Restoring the DB state through the UNDO / REDO process by writing to the; (b) 상기 지역 D-AGENT가 상기 DB서버의 요청에 의해 상기 원격 D-AGENT에게 기준 LSN을 전송하여 필요한 원격 DB로그를 요청하고, 수신한 원격 DB로그를 상기 DB서버에 전송하는 단계; 및(b) the local D-AGENT sending a reference LSN to the remote D-AGENT by request of the DB server to request a necessary remote DB log, and transmitting the received remote DB log to the DB server; And (c) 상기 원격 D-AGENT가 상기 지역 D-AGENT의 요청에 의해 전달받은 기준 LSN을 기준으로 상기 원격 DB로그 버퍼 및 상기 원격 DB로그 파일에 저장된 원격 DB로그 중 소정의 기준에 부합하는 원격 DB로그를 상기 지역 D-AGENT에 전송하는 단계;를 포함하는 것을 특징으로 하는 원격 DB로그를 이용한 DB상태 복구 방법.(c) a remote DB that meets a predetermined criterion among the remote DB log buffer and the remote DB log stored in the remote DB log file based on the reference LSN received by the remote D-AGENT by the request of the local D-AGENT; Transmitting a log to the local D-AGENT; DB status recovery method using a remote DB log, comprising the. 제6항에 있어서, 상기 (a) 단계는,According to claim 6, wherein step (a), (a1) 마지막 지역 DB로그 파일을 찾아서 마지막 일치 로그의 LSN을 획득하는 단계; (a1) finding the last local DB log file to obtain the LSN of the last matching log; (a2) 획득한 LSN을 기준 LSN으로 하여 상기 지역 D-AGENT에 전달하고 필요한 원격 DB로그를 요청하는 단계;(a2) transmitting the acquired LSN as a reference LSN to the local D-AGENT and requesting a required remote DB log; (a3) 상기 지역 D-AGENT로부터 전달받은 원격 DB로그를 상기 지역 DB로그 파일에 기록하는 단계; 및(a3) recording the remote DB log received from the local D-AGENT in the local DB log file; And (a4) 소정의 DB회복 수단이 상기 지역 DB로그 파일을 기반으로 UNDO/REDO 과정을 통해 DB상태를 복구하는 단계;를 포함하는 것을 특징으로 하는 원격 DB로그를 이용한 DB상태 복구 방법.(a4) recovering a DB state by a predetermined DB recovery means through a UNDO / REDO process based on the local DB log file; and a DB state recovery method using a remote DB log. 제6항에 있어서, 상기 (b) 단계는,According to claim 6, wherein step (b), (b1) 상기 DB회복 수단으로부터 수신한 기준 LSN을 원격 D-AGENT에 전송하고 필요한 원격 DB로그를 요구하는 단계; 및(b1) transmitting a reference LSN received from the DB recovery means to a remote D-AGENT and requesting a required remote DB log; And (b2) 상기 원격 D-AGENT로부터 수신한 원격 DB로그를 상기 DB회복 수단에 전송하는 단계;를 포함하는 것을 특징으로 하는 원격 DB로그를 이용한 DB상태 복구 방법.(b2) transmitting the remote DB log received from the remote D-AGENT to the DB recovery means; DB state recovery method using a remote DB log, comprising the. 제6항에 있어서, 상기 (c) 단계는,The method of claim 6, wherein step (c) comprises: (c1) 상기 지역 D-AGENT로부터 수신한 기준 LSN보다 큰 원격 DB로그를 원격 DB로그 버퍼와 원격 DB로그 파일에서 검색하는 단계; 및(c1) retrieving a remote DB log larger than a reference LSN received from the local D-AGENT in a remote DB log buffer and a remote DB log file; And (c2) 검색된 원격 DB로그를 상기 지역 D-AGENT에게 전송하는 단계;를 포함하는 것을 특징으로 하는 원격 DB로그를 이용한 DB상태 복구 방법.(c2) transmitting the retrieved remote DB log to the local D-AGENT; and recovering the DB state using the remote DB log.
KR1020040061676A 2004-08-05 2004-08-05 Method for real-time remote logging and recovery of database system Expired - Lifetime KR100502501B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020040061676A KR100502501B1 (en) 2004-08-05 2004-08-05 Method for real-time remote logging and recovery of database system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020040061676A KR100502501B1 (en) 2004-08-05 2004-08-05 Method for real-time remote logging and recovery of database system

Publications (1)

Publication Number Publication Date
KR100502501B1 true KR100502501B1 (en) 2005-07-20

Family

ID=37303657

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020040061676A Expired - Lifetime KR100502501B1 (en) 2004-08-05 2004-08-05 Method for real-time remote logging and recovery of database system

Country Status (1)

Country Link
KR (1) KR100502501B1 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113377502A (en) * 2021-06-10 2021-09-10 上海达梦数据库有限公司 Transaction processing method, device, server, database management system and medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113377502A (en) * 2021-06-10 2021-09-10 上海达梦数据库有限公司 Transaction processing method, device, server, database management system and medium

Similar Documents

Publication Publication Date Title
US7266718B2 (en) Computer system for recovering data based on priority of the data
US11614867B2 (en) Distributed storage system-based data processing method and storage device
CN103942252B (en) A kind of method and system for recovering data
EP1625501B1 (en) Read, write, and recovery operations for replicated data
JP5559821B2 (en) Method for storing data, method for mirroring data, machine-readable medium carrying an instruction sequence, and program for causing a computer to execute the method
US20080016300A1 (en) Asynchronous replication with write concurrency grouping
US20100115332A1 (en) Virtual machine-based on-demand parallel disaster recovery system and the method thereof
US20070271431A1 (en) Snapshot mechanism and method thereof
US20090287749A1 (en) Method and system for data processing with data replication for the same
CN101243446A (en) Online page restore from a database mirror
JPH0833857B2 (en) System database sharing system system system
US7228352B1 (en) Data access management system in distributed processing system
US7107355B2 (en) High availability lightweight directory access protocol service
US7693882B2 (en) Replicating data across the nodes in a cluster environment
US7797577B2 (en) Reassigning storage volumes from a failed processing system to a surviving processing system
US8566446B2 (en) Write operation control in storage networks
US7529783B2 (en) Log shipping data replication with parallel log writing and log shipping at the primary site
US10732860B2 (en) Recordation of an indicator representing a group of acknowledgements of data write requests
KR100502501B1 (en) Method for real-time remote logging and recovery of database system
KR20080072813A (en) Transaction protection in a stateless architecture using commodity servers
JPH11127147A (en) Information inconsistency determination and correction apparatus and method in storage-and-switch type electronic conference system, and information inconsistency determination and medium recording correction program
US7587466B2 (en) Method and computer system for information notification
CN114930315A (en) Processing delete requests based on updated change summaries
US20030033440A1 (en) Method of logging message activity
EP1244015B1 (en) Parallel replication mechanism for state information produced by serialized processing

Legal Events

Date Code Title Description
A201 Request for examination
PA0109 Patent application

Patent event code: PA01091R01D

Comment text: Patent Application

Patent event date: 20040805

PA0201 Request for examination
A302 Request for accelerated examination
PA0302 Request for accelerated examination

Patent event date: 20040826

Patent event code: PA03022R01D

Comment text: Request for Accelerated Examination

Patent event date: 20040805

Patent event code: PA03021R01I

Comment text: Patent Application

E902 Notification of reason for refusal
PE0902 Notice of grounds for rejection

Comment text: Notification of reason for refusal

Patent event date: 20041213

Patent event code: PE09021S01D

E701 Decision to grant or registration of patent right
PE0701 Decision of registration

Patent event code: PE07011S01D

Comment text: Decision to Grant Registration

Patent event date: 20050418

GRNT Written decision to grant
PR0701 Registration of establishment

Comment text: Registration of Establishment

Patent event date: 20050711

Patent event code: PR07011E01D

PR1002 Payment of registration fee

Payment date: 20050712

End annual number: 3

Start annual number: 1

PG1601 Publication of registration
PR1001 Payment of annual fee

Payment date: 20080709

Start annual number: 4

End annual number: 6

FPAY Annual fee payment

Payment date: 20110701

Year of fee payment: 9

PR1001 Payment of annual fee

Payment date: 20110701

Start annual number: 7

End annual number: 9

FPAY Annual fee payment

Payment date: 20140609

Year of fee payment: 10

PR1001 Payment of annual fee

Payment date: 20140609

Start annual number: 10

End annual number: 10

FPAY Annual fee payment

Payment date: 20150710

Year of fee payment: 11

PR1001 Payment of annual fee

Payment date: 20150710

Start annual number: 11

End annual number: 11

FPAY Annual fee payment

Payment date: 20160704

Year of fee payment: 12

PR1001 Payment of annual fee

Payment date: 20160704

Start annual number: 12

End annual number: 12

FPAY Annual fee payment

Payment date: 20170711

Year of fee payment: 13

PR1001 Payment of annual fee

Payment date: 20170711

Start annual number: 13

End annual number: 13

FPAY Annual fee payment

Payment date: 20180710

Year of fee payment: 14

PR1001 Payment of annual fee

Payment date: 20180710

Start annual number: 14

End annual number: 14

FPAY Annual fee payment

Payment date: 20190710

Year of fee payment: 15

PR1001 Payment of annual fee

Payment date: 20190710

Start annual number: 15

End annual number: 15

PR1001 Payment of annual fee

Payment date: 20230710

Start annual number: 19

End annual number: 19

PR1001 Payment of annual fee

Payment date: 20240710

Start annual number: 20

End annual number: 20

PC1801 Expiration of term

Termination date: 20250205

Termination category: Expiration of duration