KR20010055981A - Method for recovering main memory database system using stable memory - Google Patents

Method for recovering main memory database system using stable memory Download PDF

Info

Publication number
KR20010055981A
KR20010055981A KR1019990057328A KR19990057328A KR20010055981A KR 20010055981 A KR20010055981 A KR 20010055981A KR 1019990057328 A KR1019990057328 A KR 1019990057328A KR 19990057328 A KR19990057328 A KR 19990057328A KR 20010055981 A KR20010055981 A KR 20010055981A
Authority
KR
South Korea
Prior art keywords
page
list
backup
transaction
main memory
Prior art date
Application number
KR1019990057328A
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 KR1019990057328A priority Critical patent/KR20010055981A/en
Publication of KR20010055981A publication Critical patent/KR20010055981A/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1448Management of the data involved in backup or backup restore
    • G06F11/1451Management of the data involved in backup or backup restore by selection of backup contents
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1446Point-in-time backing up or restoration of persistent data
    • G06F11/1458Management of the backup or restore process

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)
  • Techniques For Improving Reliability Of Storages (AREA)

Abstract

PURPOSE: A method for recovering a main internal memory-resident type database using a secure storing device is provided to enhance a system performance by using a secure storing device for updating and backing-up data of a shadow page method, thereby not reflecting a log creation with respect to a change of a database and a log record. CONSTITUTION: After a system is re-booted, it is judged whether a transaction is started(802). If a transaction is not started, all pages of a backup database are loaded in a main internal memory-resident database(804). If a transaction is started, it is judged whether the corresponding page exists in useful page list(806). If the corresponding page does not exist in an available page list, it is judged whether the corresponding page exists in a backup page list(808). If the corresponding page does not exist in a backup page list, the corresponding page of the backup database is loaded in a shadow area of a secure storing device(810). In addition, the corresponding page is registered in the available page list(812). If the corresponding page exists in a backup page list, the corresponding page is registered in the available page list(812). In addition, the corresponding page is registered in the current page table(814). If the corresponding page exists in the available page list, the corresponding page is registered in the current page table. In addition, a working with respect to the current page is performed(816). The processes are repeated from the (806)stage.

Description

안전기억장치를 이용한 주기억장치 상주형 데이터베이스 회복 방법{METHOD FOR RECOVERING MAIN MEMORY DATABASE SYSTEM USING STABLE MEMORY}Recovery method of main memory resident database using safety memory device {METHOD FOR RECOVERING MAIN MEMORY DATABASE SYSTEM USING STABLE MEMORY}

본 발명은 주기억장치 상주형 데이터베이스 회복 방법에 관한 것으로, 특히 그림자 페이징(paging)기법의 데이터 갱신 및 백업을 위한 공간으로 안전기억장치를 사용하고, 데이터베이스의 변경에 대한 로그(log) 생성 및 회복시 로그 레코드를 반영하지 않음으로써, 시스템의 성능을 향상시킬 수 있는 주기억장치 상주형 데이터베이스 회복 방법과 상기 방법을 실현시키기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록매체에 관한 것이다.The present invention relates to a method for recovering a main memory resident database, and more particularly, to use a safety memory device as a space for data update and backup of a shadow paging technique, and to generate and recover a log of a database change. The present invention relates to a main memory resident database recovery method capable of improving system performance by not reflecting log records, and a computer readable recording medium having recorded thereon a program for realizing the method.

일반적으로, 데이터베이스의 회복기법은, 로그기반 회복기법과 그림자 페이징 기법을 기본으로 하며, 기존의 주기억장치 상주형 데이터베이스 시스템은 로그기반 회복기법 또는 로그기반 회복기법과 그림자 페이징 기법을 병행하여 사용하고있다.In general, the database recovery technique is based on the log-based recovery technique and the shadow paging technique, and the existing main memory resident database system uses the log-based recovery technique or the log-based recovery technique and the shadow paging technique. .

첨부된 도 1 은 종래의 주기억장치 상주형 데이터베이스 회복 시스템의 일실시예 구성도로서, 주기억장치 상주형 데이터베이스(11)와 로그 버퍼(log buffer)를 포함하는 주기억장치(10)와, 페이지를 저장하기 위한 백업 데이터베이스(20)와, 상기 주기억장치 상주형 데이터베이스(11)의 로그를 기록하는 로그 디스크(30)를 구비한다.1 is a block diagram of a conventional main memory resident database recovery system, and includes a main memory 10 including a main memory resident database 11 and a log buffer, and stores pages. And a log disk 30 for recording a log of the main memory resident database 11.

상기한 바와 같은 구성을 가지는 종래의 주기억장치 상주형 데이터베이스 회복 시스템은, 로그기반 회복방법을 사용하면, 회복처리 수행시 실행취소(undo) 및 재시행(redo) 연산을 모두 사용하고, 트랜잭션(transaction) 철회작업 수행시 실행취소 연산을 수행하고, 로그와 그림자 페이징 기반 회복방법을 병용하면, 트랜잭션의 철회 또는 회복작업 수행시 재시행 연산만을 수행한다.In the conventional main memory resident database recovery system having the above-described configuration, if the log-based recovery method is used, both the undo and redo operations are performed and the transaction is performed when the recovery process is performed. ) If you execute the undo operation when the revocation operation is performed, and the log and shadow paging based recovery method are used together, only the retry operation is performed when the transaction is canceled or restored.

또한, 회복처리가 트랜잭션에 미치는 영향을 최소화하기 위한 퍼지 체크포인트(fuzzy checkpoint)방법은, 데이터베이스의 일관성을 유지하기 위하여 두 배의 백업 디스크 공간을 필요로하고, 상기 체크포인트는 가장 최신의 데이터베이스 내용을 백업 디스크에 유지함으로써 회복작업시 로그의 처리시간을 짧게 할 수 있다.In addition, the fuzzy checkpoint method for minimizing the impact of recovery processing on transactions requires twice the backup disk space to maintain database consistency, and the checkpoint is the most recent database content. Can be saved on the backup disk to shorten the log processing time during recovery.

그러나, 상기한 바와 같은 종래의 주기억장치 상주형 데이터베이스 회복 시스템은, 데이터베이스에 대한 처리가 모두 로그로 기록되기 때문에 시스템 성능을 저하시키고, 로그의 생성, 기록 및 저장이 트랜잭션 수행중에 이루어지기 때문에 트랜잭션의 수행시간을 지연시키는 문제가 있다.However, the conventional main memory resident database recovery system as described above degrades the system performance because all processing for the database is recorded in the log, and since the generation, recording, and storage of the log is performed during the execution of the transaction, There is a problem of delaying execution time.

그리고, 시스템 오류 발생시 시스템을 재가동하기 전에 데이터베이스를 복구하기 위하여 로그를 반영하여 새로운 트랜잭션의 처리를 지연시킴으로써, 시스템 다운(down)시간을 증가시키는 다른 문제가 있다.In addition, there is another problem of increasing system down time by delaying the processing of a new transaction by applying a log to recover a database before restarting the system in case of a system error.

또한, 퍼지 체크포인트 방법은, 백업 디스크의 공간을 두배로 유지하기 위한 추가적인 비용이 소요되는 또 다른 문제가 있다.In addition, the fuzzy checkpoint method has another problem in that an additional cost is required to double the space of the backup disk.

따라서, 상기와 같은 문제점을 해결하기 위해 안출된 본 발명은, 그림자 페이지 기법의 데이터 갱신 및 백업을 위해 안전기억장치를 사용하여 데이터베이스의 변경에 대한 로그 생성 및 회복작업시 로그 레코드를 반영하지 않음으로써, 시스템의 성능을 향상시킬 수 있는 안전기억장치를 이용한 주기억장치 상주형 데이터베이스 회복 방법과 상기 방법을 실현시키기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록매체를 제공하는데 그 목적이 있다.Therefore, the present invention devised to solve the above problems, by using the safe memory for the data update and backup of the shadow page technique by not reflecting the log record during the log generation and recovery operation for the database changes It is an object of the present invention to provide a method for recovering a main memory resident database using a safety memory device that can improve the performance of a system, and a computer-readable recording medium recording a program for realizing the method.

도 1 은 종래의 주기억장치 상주형 데이터베이스 회복 시스템의 일실시예 구성도.1 is a block diagram of an embodiment of a conventional main memory resident database recovery system.

도 2 는 본 발명이 적용되는 안전기억장치를 이용한 주기억장치 상주형 데이터베이스 회복 시스템의 일실시예 구성도.Figure 2 is an embodiment configuration of a main memory resident database recovery system using a safety memory device to which the present invention is applied.

도 3 은 본 발명에 따른 안전기억장치의 일실시예 구성도.Figure 3 is a configuration diagram of one embodiment of a safety memory device according to the present invention.

도 4 는 본 발명에 따른 안전기억장치 구성요소들의 자료구조 설명도.4 is an explanatory diagram of a data structure of safety memory components according to the present invention;

도 5 는 본 발명에 따른 안전기억장치를 이용한 트랜잭션 처리방법에 대한 일실시예 처리흐름도.Figure 5 is an embodiment processing flow diagram for a transaction processing method using a safety memory device according to the present invention.

도 6 은 본 발명에 따른 안전기억장치를 이용한 트랜잭션 철회 처리방법에 대한 일실시예 처리흐름도.Figure 6 is a flow chart of one embodiment of a transaction withdrawal processing method using a safety memory device according to the present invention.

도 7 은 본 발명에 따른 안전기억장치를 이용한 페이지 백업방법에 대한 일실시예 처리흐름도.7 is a flowchart illustrating a method for backing up a page using a safety memory device according to the present invention.

도 8 은 본 발명에 따른 안전기억장치를 이용한 시스템 회복 방법에 대한 일실시예 처리흐름도.8 is a flow chart of an embodiment of a system recovery method using the safety memory device according to the present invention.

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

201 : 주기억장치 상주형 데이터베이스 202 : 안전기억장치201: Main memory resident database 202: Safety memory

203 : 백업 데이터베이스 204 : 트랜잭션 관리자203: Backup Database 204: Transaction Manager

205 : 안전기억장치 관리자 206 : 백업관리자205: safety storage manager 206: backup manager

301 : 그림자 영역 302 : 백업 영역301: shadow area 302: backup area

303 : 현재 페이지 테이블 304 : 사용가능 페이지 리스트303: Current page table 304: Available page list

305 : 백업 페이지 리스트 306 : 프리 페이지 리스트305: backup page list 306: free page list

상기 목적을 달성하기 위한 본 발명의 방법은, 안전기억장치를 이용한 주기억장치 상주형 데이터베이스 회복시스템에 적용되는 주기억장치 상주형 데이터베이스 회복방법에 있어서, 안전기억장치를 이용하여 트랜잭션을 처리하는 제 1 단계; 상기 안전기억장치를 이용하여 트랜잭션을 철회하는 제 2 단계; 상기 안전기억장치를 이용하여 페이지를 백업 데이터베이스에 백업하는 제 3 단계; 및 상기 안전기억장치를 이용하여 시스템 오류발생시에 사용했던 페이지를 주기억장치 상주형 데이터베이스에 재적재하는 제 4 단계를 포함한다.The method of the present invention for achieving the above object, in the main memory resident database recovery method applied to the main memory resident database recovery system using a safety memory device, the first step of processing a transaction using the safety memory device ; A second step of withdrawing a transaction using the safe storage device; A third step of backing up a page to a backup database using the safe storage device; And a fourth step of reloading the page used when a system error occurs using the safety memory device to the main memory resident database.

또한, 본 발명은, 마이크로 프로세서를 구비한 안전기억장치를 이용한 주기억장치 상주형 데이터베이스 회복 시스템에, 안전기억장치를 이용하여 트랜잭션을 처리하는 제 1 기능; 상기 안전기억장치를 이용하여 트랜잭션을 철회하는 제 2 기능; 상기 안전기억장치를 이용하여 페이지를 백업 데이터베이스에 백업하는 제 3 기능; 및 상기 안전기억장치를 이용하여 시스템 오류발생시에 사용했던 페이지를 주기억장치 상주형 데이터베이스에 재적재하는 제 4 기능을 실현시키기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록매체를 제공한다.The present invention also provides a main memory resident database recovery system using a safety memory device having a microprocessor, comprising: a first function of processing a transaction using the safety memory device; A second function of withdrawing a transaction using said safe storage device; A third function of backing up a page to a backup database by using the safety memory device; And a computer-readable recording medium having recorded thereon a program for realizing a fourth function of reloading a page used at the time of a system error by using the safety memory device in a main memory resident database.

상술한 목적, 특징들 및 장점은 첨부된 도면과 관련한 다음의 상세한 설명을 통하여 보다 분명해 질 것이다. 이하, 첨부된 도면을 참조하여 본 발명에 따른 바람직한 일실시예를 상세히 설명한다.The above objects, features and advantages will become more apparent from the following detailed description taken in conjunction with the accompanying drawings. Hereinafter, exemplary embodiments of the present invention will be described in detail with reference to the accompanying drawings.

도 2 는 본 발명이 적용되는 안전기억장치를 이용한 주기억장치 상주형 데이터베이스 회복 시스템의 일실시예 구성도이다.2 is a diagram illustrating an embodiment of a main memory resident database recovery system using a safety memory device to which the present invention is applied.

도면에 도시된 바와 같이, 본 발명에 따른 안전기억장치를 이용한 주기억장치 상주형 데이터베이스 회복 장치는, 주기억장치 상주형 데이터베이스(201)와, 상기 주기억장치 상주형 데이터베이스(201)의 페이지에 대한 수정이 요구되면 해당 페이지가 복사되는 그림자 영역을 포함하는 안전기억장치(202)와, 상기 안전기억장치(202)의 그림자영역에서 수정된 페이지 및 페이지 백업을 위한 백업 데이터베이스(203)와, 상기 주기억장치 상주형 데이터베이스(201)에 기록된 페이지(page)에 대한 일반적인 작업을 처리하는 트랜잭션 관리자(204)와, 상기 안전기억장치(202)를 관리하는 안전기억장치 관리자(205)와, 상기 안전기억장치(202)를 통한 페이지의 백업작업 및 회복작업을 관리하는 백업관리자(206)를 구비한다. 여기서, 상기 주기억장치 상주형 데이터베이스(201)의 페이지에 대한 수정이 요구되면, 해당 페이지는 상기 안전기억장치(202)의 그림자 영역에 복사된 후 갱신되고, 수정 트랜잭션 완료후 다시 상기 주기억장치 상주형 데이터베이스(201)에 반영된다. 그리고, 상기 안전기억장치(202)의 그림자 영역에 있던 수정된 페이지는 백업을 수행하기 위해 잔류하며, 상기 백업관리자(206)에 의해 상기 백업 데이터베이스(203)에 저장된다.As shown in the figure, the main memory resident database recovery apparatus using the safety memory device according to the present invention, the main memory resident database 201 and the correction of the pages of the main memory resident database 201 If required, a safety memory device 202 including a shadow area to which the page is copied, a backup database 203 for backing up pages and pages modified in the shadow area of the safety memory device 202, and the main memory resident A transaction manager 204 for processing general operations on pages recorded in the type database 201, a safety memory manager 205 for managing the safety memory device 202, and the safety memory device ( A backup manager 206 manages the backup operation and the recovery operation of the page through 202. Here, if a modification to a page of the main memory resident database 201 is requested, the page is copied after being copied to the shadow area of the safe memory 202, and updated after completion of the modification transaction. Reflected in the database 201. The modified page in the shadow area of the safety memory device 202 remains to perform a backup and is stored in the backup database 203 by the backup manager 206.

이제, 상기 안전기억장치(202)의 구성을 첨부된 도 3 을 참조하여 상세히 설명하면 다음과 같다.Now, the configuration of the safety memory device 202 will be described in detail with reference to FIG. 3.

첨부된 도 3 은 본 발명에 따른 안전기억장치의 일실시예 구성도이다.3 is a configuration diagram of an embodiment of a safety memory device according to the present invention.

도면에 도시된 바와 같이, 본 발명에 따른 안전기억장치는, 상기 주기억장치 상주형 데이터베이스(201)의 페이지에 대한 수정이 요구되었을 때, 해당 페이지를 복사하는 그림자 영역(301)과, 상기 백업 데이터베이스(203)와 공유되는 백업 영역(302)과, 트랜잭션에 의해 현재 사용중인 페이지들을 관리하는 현재 페이지 테이블(CPTable : CurrentPageTable)(303)과, 현재 사용중인 페이지 또는 백업이 완료된 페이지를 관리하는 사용가능 페이지 리스트(UsableList)(304)와, 트랜잭션이 완료된 페이지를 관리하고 상기 백업 관리자(206)가 페이지의 백업을 수행하기 위해 참조하는 백업 페이지 리스트(BackupList)(305)와, 상기 백업 영역(302)의 빈 페이지를 관리하는 프리 페이지 리스트(FreeList)(306)을 포함한다.As shown in the drawing, the safety memory device according to the present invention includes a shadow area 301 for copying a page when a modification to a page of the main memory resident database 201 is requested, and the backup database. A backup area 302 shared with 203, a current page table (CPTable: CurrentPageTable) 303 that manages pages currently being used by a transaction, and a page that is currently being used or pages that have been backed up are available. UsableList 304, a backup page list 305 which the transaction manager has completed and which the backup manager 206 refers to to perform a backup of the page, and the backup area 302. It includes a free page list (FreeList) 306 for managing a blank page of the.

여기서, 현재 트랜잭션이 진행중인 즉, 상기 현재 페이지 테이블의 리스트(303)는 트랜잭션 완료시점에 백업 페이지 리스트(305)에 추가되고, 트랜잭션은 페이지 접근을 위하여 상기 사용가능 페이지 리스트(304)를 참조하며, 백업된 페이지의 리스트는 상기 사용가능 페이지 리스트(304)에 등록된다.Here, the current transaction is in progress, that is, the list 303 of the current page table is added to the backup page list 305 at the completion of the transaction, and the transaction refers to the free page list 304 for page access, The list of backed up pages is registered in the free page list 304.

첨부된 도 4 는 본 발명에 따른 안전기억장치 구성요소들의 자료구조 설명도로서, 상기 도 3 에서 설명한 현재 페이지 테이블(303), 사용가능 페이지 리스트(304) 및 백업 페이지 리스트(305)는, 각각 상기 주기억장치 상주형 데이터베이스(201)내의 페이지 정보(PID) 및 상기 그림자 영역(301)의 정보(S_Addr)를 유지하는 자료구조(400)를 가지고, 상기 프리 페이지 리스트(306)는 상기 그림자 영역(301) 또는 백업 영역(302)의 정보(S_Addr)를 유지하는 자료구조(401)를 갖는다.4 is a diagram illustrating a data structure of the safety memory device according to the present invention. The current page table 303, the usable page list 304, and the backup page list 305 described in FIG. The data structure 400 holds page information PID in the main memory resident database 201 and information S_Addr of the shadow area 301, and the free page list 306 is configured to display the shadow area ( 301 or a data structure 401 for holding information S_Addr of the backup area 302.

그러면, 첨부된 도 5 내지 도 8 을 참조하여 본 발명에 따른 안전기억장치를 이용한 주기억장치 상주형 데이터베이스 회복방법에 대해 자세히 설명한다.Next, a method of recovering a main memory resident database using the safety memory device according to the present invention will be described in detail with reference to FIGS. 5 to 8.

첨부된 도 5 는 본 발명에 따른 안전기억장치를 이용한 트랜잭션 처리방법에 대한 일실시예 처리흐름도이다.5 is a flowchart illustrating a transaction processing method using a safety memory device according to the present invention.

일반적으로, 상기 주기억장치 상주형 데이터베이스(201)는 디스크 입출력이 없기 때문에, 동시수행에 의한 잠금 설정 및 정보유지는 오히려 시스템 전체 성능 및 트랜잭션당 수행시간을 저하시킬 수 있으므로, 본 발명에서는 트랜잭션들을 순차적으로 수행한다.In general, since the main memory resident database 201 has no disk I / O, lock setting and information holding due to concurrent execution may reduce the overall system performance and execution time per transaction. To do it.

먼저, 일반적인 트랜잭션의 생성 및 완료작업시 페이지 정보를 요구하는가를 판단한다(500).First, it is determined whether the page information is required when generating and completing a general transaction (500).

상기 판단결과(500), 페이지 정보 요구가 있을 경우, 해당 페이지가 사용가능 페이지 리스트(304)에 존재하는가를 판단한다(502).As a result of the determination 500, if there is a page information request, it is determined whether the corresponding page exists in the usable page list 304 (502).

상기 판단결과(502), 해당 페이지가 사용가능 페이지 리스트(304)에 존재할 경우, 해당 페이지를 현재 페이지 테이블(303)에 기록하고(504), 트랜잭션을 처리한 후(508), 상기 500단계를 수행한다.In the determination result 502, if the page exists in the usable page list 304, the page is recorded in the current page table 303 (504), after processing the transaction (508), and step 500 is performed. Perform.

상기 판단결과(502), 해당 페이지가 사용가능 페이지 리스트(304)에 존재하지 않을 경우, 상기 프리페이지 리스트(306)에서 새로운 페이지를 할당받고, 상기 주기억장치 상주형 데이터베이스(201)에서 해당 페이지 정보 페이지를 획득한 후(506), 상기 504단계를 수행한다.As a result of the determination 502, if the page does not exist in the usable page list 304, a new page is allocated from the free page list 306, and the page information is stored in the main memory resident database 201. After acquiring the page (506), the step 504 is performed.

상기 판단결과(500), 페이지 정보 요구가 없을 경우, 상기 현재 페이지 테이블(303)의 내용을 상기 주기억장치 상주형 데이터베이스(201)에 반영하고(510), 상기 현재 페이지 테이블(303)의 내용을 상기 백업 페이지 리스트(305)에 등록한다(512).If there is no page information request, the determination result 500 reflects the contents of the current page table 303 to the main memory resident database 201 (510), and the contents of the current page table 303. The backup page list 305 is registered (512).

첨부된 도 6 은 본 발명에 따른 안전기억장치를 이용한 트랜잭션 철회 처리방법에 대한 일실시예 처리흐름도이다.6 is a flowchart illustrating a transaction withdrawal processing method using a safety memory device according to the present invention.

먼저, 트랜잭션 철회요구를 수신하여(600), 상기 현재 페이지 테이블(303)의 모든 페이지를 상기 사용가능 페이스 리스트(304)에서 삭제하고(602), 트랜잭션 철회가 요구된 페이지를 상기 프리 페이지 리스트(306)에 추가한 후(604), 해당 페이지를 상기 현재 페이지 리스트 테이블(303)에서 삭제한다(606).First, a transaction withdrawal request is received (600), all pages of the current page table 303 are deleted from the usable face list 304 (602), and a page for which transaction withdrawal is requested is added to the free page list ( After adding to 306 (604), the page is deleted from the current page list table 303 (606).

첨부된 도 7 은 본 발명에 따른 안전기억장치를 이용한 페이지 백업방법에대한 일실시예 처리흐름도이다.7 is a flowchart illustrating a method for backing up a page using a safety memory device according to the present invention.

먼저, 백업 페이지 리스트(305)가 비었는가를 판단한다(700).First, it is determined whether the backup page list 305 is empty (700).

상기 판단결과(700), 백업 페이지 리스트(305)가 비었을 경우, 상기 700단계를 다시 수행하고, 백업 페이지 리스트(305)가 비어있지 않은 경우, 상기 백업 페이지 리스트(305)의 페이지들을 상기 안전기억장치(202)의 그림자 영역(301)으로 백업한다(702).In response to the determination result 700, when the backup page list 305 is empty, the step 700 is performed again, and when the backup page list 305 is not empty, the pages of the backup page list 305 are stored in the safe state. It backs up to the shadow area 301 of the memory | storage device 202 (702).

그리고, 상기 백업한 페이지가 사용가능 페이지 리스트(304)에 존재하는가를 판단한다(704).Then, it is determined whether the backed up page exists in the usable page list 304 (704).

상기 판단결과(704), 상기 백업한 페이지가 사용가능 페이지 리스트(304)에 존재하지 않을 경우, 해당 페이지를 상기 사용가능 페이지 리스트(304)에 추가하고(706), 상기 백업한 페이지가 사용가능 페이지 리스트(304)에 존재할 경우, 해당 페이지를 프리 페이지 리스트(306)에 추가한다(708).If the determined result 704 does not exist in the usable page list 304, the page is added to the usable page list 304 (706), and the backed up page is available. If present in the page list 304, the page is added to the free page list 306 (708).

첨부된 도 8 은 본 발명에 따른 안전기억장치를 이용한 시스템 회복 방법에 대한 일실시예 처리흐름도이다.8 is a flowchart illustrating a method for recovering a system using a safety memory device according to the present invention.

먼저, 시스템을 재시작한 후(800), 트랜잭션이 시작됐는지를 판단한다(802).First, after restarting the system (800), it is determined whether the transaction has been started (802).

상기 판단결과(802), 트랜잭션이 시작되지 않았을 경우, 백업 데이터베이스(203)의 모든 페이지를 주기억장치 상주형 데이터베이스(201)에 적재하고(804), 트랜잭션이 시작되었을 경우, 해당 페이지가 사용가능 페이지 리스트(304)에 존재하는가를 판단한다(806).As a result of the determination 802, when the transaction has not started, all pages of the backup database 203 are loaded into the main memory resident database 201 (804), and when the transaction starts, the page is available. It is determined whether it exists in the list 304 (806).

상기 판단결과(806), 해당 페이지가 사용가능 페이지 리스트(304)에 존재하지 않으면, 해당 페이지가 상기 백업 페이지 리스트(305)에 존재하는가를 판단한다(808).As a result of the determination 806, if the page does not exist in the usable page list 304, it is determined whether the page exists in the backup page list 305 (808).

상기 판단결과(808), 해당 페이지가 상기 백업 페이지 리스트(305)에 존재하지 않으면, 상기 백업 데이터베이스(203)의 해당 페이지를 상기 안전기억장치(202)의 그림자 영역(301)에 적재하고(810), 해당 페이지를 상기 사용가능 페이지 리스트(304)에 등록한다(812).If the determined result 808 does not exist in the backup page list 305, the corresponding page of the backup database 203 is loaded in the shadow area 301 of the safety memory device 202 (810). In step 812, the page is registered in the usable page list 304.

상기 판단결과(808), 해당 페이지가 상기 백업 페이지 리스트(305)에 존재하면, 해당 페이지를 상기 사용가능 페이지 리스트(304)에 등록하고(812), 해당 페이지를 상기 현재 페이지 테이블(303)에 등록한다(814).In the determination result 808, if the page exists in the backup page list 305, the page is registered in the usable page list 304 (812), and the page is stored in the current page table 303. Register (814).

상기 판단결과(806), 해당 페이지가 사용가능 페이지 리스트(304)에 존재하면, 해당 페이지를 상기 현재 페이지 테이블(303)에 등록하고(814), 해당 페이지에 대한 작업을 수행하고(816), 상기 806단계부터 다시 수행한다.As a result of the determination 806, if the page exists in the usable page list 304, the page is registered in the current page table 303 (814), the operation on the page (816), The process is performed again from step 806.

상기한 바와 같은 본 발명에 따른 안전기억장치를 이용한 시스템 회복 방법은, 복구처리와 상관없이 백업은 비동기적으로 계속 수행되며, 만일, 상기 백업 데이터베이스(203)의 내용을 상기 주기억장치 상주형 데이터베이스(201)에 적재하는 과정에 시스템 오류가 발생하더라도 상기 백업 페이지 리스트(305)는 상기 안전기억장치(202)에 유지되고 있기 때문에 일관성을 유지할 수 있다.In the system recovery method using the safety memory device according to the present invention as described above, backup is continuously performed asynchronously regardless of the recovery process, and if the contents of the backup database 203 are stored in the main memory resident database ( Even if a system error occurs in the process of loading in 201, the backup page list 305 is maintained in the safety memory device 202, thereby maintaining consistency.

이상에서 설명한 본 발명은, 본 발명이 속하는 기술분야에서 통상의 지식을 가진 자에 있어 본 발명의 기술적 사상을 벗어나지 않는 범위 내에서 여러 가지 치환, 변형 및 변경이 가능하므로 전술한 실시예 및 첨부된 도면에 한정되는 것이 아니다.The present invention described above is capable of various substitutions, modifications, and changes without departing from the spirit of the present invention for those skilled in the art to which the present invention pertains. It is not limited to the drawing.

상기와 같은 본 발명은, 페이징(paging)기법의 데이터 갱신 및 백업을 위한 공간으로 안전기억장치를 사용하고, 페이지의 백업작업이 트랜잭션작업과 무관하게 수행됨으로써, 트랜잭션 수행시 로그 처리에 대한 부담이 줄어들어 빠른 트랜잭션 수행작업을 보장할 수 있고, 그림자 페이징 방법을 사용함으로써, 트랜잭션의 철회 또는 회복 작업의 속도를 현저하게 향상시킬 수 있는 효과가 있다.As described above, the present invention uses a safety memory device as a space for data updating and backup of a paging technique, and a backup operation of a page is performed irrespective of a transaction operation, thereby burdening log processing when performing a transaction. By reducing the speed of transaction execution can be guaranteed, by using the shadow paging method, there is an effect that can significantly improve the speed of the transaction withdrawal or recovery.

Claims (8)

안전기억장치를 이용한 주기억장치 상주형 데이터베이스 회복시스템에 적용되는 주기억장치 상주형 데이터베이스 회복방법에 있어서,In the main memory resident database recovery method applied to the main memory resident database recovery system using a safety memory device, 안전기억장치를 이용하여 트랜잭션을 처리하는 제 1 단계;A first step of processing a transaction using a secure memory device; 상기 안전기억장치를 이용하여 트랜잭션을 철회하는 제 2 단계;A second step of withdrawing a transaction using the safe storage device; 상기 안전기억장치를 이용하여 페이지를 백업 데이터베이스에 백업하는 제 3 단계; 및A third step of backing up a page to a backup database using the safe storage device; And 상기 안전기억장치를 이용하여 시스템 오류발생시에 사용했던 페이지를 주기억장치 상주형 데이터베이스에 재적재하는 제 4 단계A fourth step of reloading the page used at the time of system error using the safety memory to the main memory resident database 를 포함하는 안전기억장치를 이용한 주기억장치 상주형 데이터베이스 회복 방법.Main memory resident database recovery method using a safety memory including a. 제 1 항에 있어서,The method of claim 1, 상기 안전기억장치는, 상기 주기억장치 상주형 데이터베이스의 페이지에 대한 수정이 요구되었을 때, 해당 페이지를 복사하는 그림자 영역과, 상기 백업 데이터베이스와 공유되는 백업 영역과, 트랜잭션에 의해 현재 사용중인 페이지들을 관리하는 현재 페이지 테이블과, 현재 사용중인 페이지 또는 백업이 완료된 페이지를 관리하는 사용가능 페이지 리스트와, 트랜잭션이 완료된 페이지를 관리하는 백업페이지 리스트와, 상기 백업 영역의 빈 페이지를 관리하는 프리 페이지 리스트를 포함하는 것을 특징으로 하는 안전기억장치를 이용한 주기억장치 상주형 데이터베이스 회복방법.When the modification of the page of the main memory resident database is requested, the safety memory device manages a shadow area for copying the page, a backup area shared with the backup database, and pages currently being used by a transaction. A current page table, a usable page list for managing a page currently being used or a backup completed page, a backup page list for managing a transaction completed page, and a free page list for managing blank pages of the backup area. A main memory resident database recovery method using a safety memory device characterized in that the. 제 2 항에 있어서,The method of claim 2, 상기 현재 페이지 테이블, 사용가능 페이지 리스트 및 백업 페이지 리스트는, 각각 상기 주기억장치 상주형 데이터베이스내의 페이지 정보 및 상기 그림자 영역의 정보를 유지하는 자료구조를 가지고, 상기 프리 페이지 리스트는 상기 그림자 영역 또는 백업 영역의 정보를 유지하는 자료구조를 가지는 것을 특징으로 하는 안전기억장치를 이용한 주기억장치 상주형 데이터베이스 회복방법.The current page table, the usable page list and the backup page list each have a data structure for holding page information and information of the shadow area in the main memory resident database, wherein the free page list is the shadow area or the backup area. A main memory resident database recovery method using a safety memory device, characterized in that it has a data structure that maintains the information. 제 1 항 내지 제 3 항 중 어느 한 항에 있어서The method according to any one of claims 1 to 3 상기 제 1 단계는,The first step is, 트랜잭션의 생성 및 완료작업시 페이지 정보의 요구유무를 판단하는 제 5 단계;A fifth step of determining whether page information is required during the creation and completion of the transaction; 상기 제 5 단계의 판단결과, 페이지 정보 요구가 있으면, 해당 페이지가 상기 사용가능 페이지 리스트에 존재하는가를 판단하는 제 6 단계;A sixth step of determining whether a page exists in the usable page list if a page information request is found as a result of the fifth step; 상기 제 6 단계의 판단결과, 해당 페이지가 상기 사용가능 페이지 리스트에존재하면, 해당 페이지를 상기 현재 페이지 테이블에 기록하고, 트랜잭션을 처리하는 제 7 단계;A seventh step of writing a corresponding page in the current page table and processing a transaction if the page exists in the usable page list as a result of the determination in the sixth step; 상기 제 6 단계의 판단결과, 해당 페이지가 상기 사용가능 페이지 리스트에 존재하지 않으면, 상기 프리페이지 리스트에서 새로운 페이지를 할당받고, 상기 주기억장치 상주형 데이터베이스에서 해당 페이지 정보 페이지를 획득하는 제 8 단계; 및An eighth step of obtaining a new page from the free page list and acquiring the corresponding page information page from the main memory resident database if the corresponding page does not exist in the usable page list as a result of the determination of the sixth step; And 상기 제 5 단계의 판단결과, 페이지 정보 요구가 없으면, 상기 현재 페이지 테이블의 내용을 상기 주기억장치 상주형 데이터베이스에 반영하고, 상기 현재 페이지 테이블의 내용을 상기 백업 페이지 리스트에 등록하는 제 9 단계를 포함하는 안전기억장치를 이용한 주기억장치 상주형 데이터베이스 회복방법.And a ninth step of reflecting the contents of the current page table in the main memory resident database and registering the contents of the current page table in the backup page list when there is no page information request. A method for recovering a main memory resident database using a secure memory device. 제 4 항에 있어서,The method of claim 4, wherein 상기 제 2 단계는,The second step, 트랜잭션 철회요구를 수신하여, 상기 현재 페이지 테이블의 모든 페이지를 상기 사용가능 페이스 리스트에서 삭제하는 제 10 단계;A tenth step of receiving a transaction withdrawal request and deleting all pages of the current page table from the available face list; 상기 트랜잭션 철회가 요구된 페이지를 상기 프리 페이지 리스트에 추가하는 제 11 단계; 및An eleventh step of adding, to the free page list, the page requiring the transaction withdrawal; And 상기 페이지를 상기 현재 페이지 리스트 테이블에서 삭제하는 제 12 단계를 포함하는 안전기억장치를 이용한 주기억장치 상주형 데이터베이스 회복방법.And a twelfth step of deleting the page from the current page list table. 제 1 항 내지 제 3 항 중 어느 한 항에 있어서,The method according to any one of claims 1 to 3, 상기 제 3 단계는,The third step, 상기 백업 페이지 리스트의 정보를 확인하여 상기 백업 페이지 리스트의 페이지들을 그림자 영역으로 백업하는 제 5 단계;A fifth step of checking information of the backup page list and backing up pages of the backup page list to a shadow area; 상기 백업한 페이지가 상기 사용가능 페이지 리스트에 존재하는가를 판단하는 제 6 단계;A sixth step of determining whether the backed up page exists in the usable page list; 상기 제 6 단계의 판단결과, 상기 백업한 페이지가 사용가능 페이지 리스트에 존재하지 않으면, 해당 페이지를 상기 사용가능 페이지 리스트에 추가하는 제 7 단계;A seventh step of adding the page to the usable page list if the backed up page does not exist in the usable page list as a result of the determination of the sixth step; 상기 제 6 단계의 판단결과, 상기 백업한 페이지가 사용가능 페이지 리스트에 존재할 경우, 해당 페이지를 상기 프리 페이지 리스트에 추가하는 제 8 단계를 포함하는 안전기억장치를 이용한 주기억장치 상주형 데이터베이스 회복방법.And a eighth step of adding the corresponding page to the free page list when the backup page exists in the usable page list as a result of the determination in the sixth step. 제 1 항 내지 제 3 항 중 어느 한 항에 있어서,The method according to any one of claims 1 to 3, 상기 제 4 단계는,The fourth step, 시스템을 재시작한 후, 트랜잭션이 시작됐는지를 판단하는 제 5 단계;After restarting the system, determining whether a transaction has started; 상기 제 5 단계의 판단결과, 트랜잭션이 시작되지 않았으면, 상기 백업 데이터베이스의 모든 페이지를 상기 주기억장치 상주형 데이터베이스에 적재하는 제 6단계;A sixth step of loading all pages of the backup database into the main memory resident database if the transaction is not started as a result of the determination in the fifth step; 상기 제 5 단계의 판단결과, 트랜잭션이 시작되었으면, 해당 페이지가 상기 사용가능 페이지 리스트에 존재하는가를 판단하는 제 7 단계;A seventh step of determining whether a corresponding page exists in the usable page list if a transaction is started as a result of the determination in the fifth step; 상기 제 7 단계의 판단결과, 해당 페이지가 상기 사용가능 페이지 리스트에 존재하지 않으면, 해당 페이지가 상기 백업 페이지 리스트에 존재하는가를 판단하는 제 8 단계;An eighth step of determining whether the page exists in the backup page list if the page does not exist in the usable page list as a result of the determination of the seventh step; 상기 제 8 단계의 판단결과, 해당 페이지가 상기 백업 페이지 리스트에 존재하지 않으면, 상기 백업 데이터베이스에서 해당 페이지를 상기 그림자 영역에 적재하고, 해당 페이지를 상기 사용가능 페이지 리스트에 등록하는 제 9 단계;A ninth step of loading the page into the shadow area in the backup database and registering the page in the usable page list if the page does not exist in the backup page list as a result of the determination in the eighth step; 상기 제 8 단계의 판단결과, 해당 페이지가 상기 백업 페이지 리스트에 존재하면, 해당 페이지를 상기 사용가능 페이지 리스트에 등록하고, 해당 페이지를 상기 현재 페이지 테이블에 등록하는 제 10 단계; 및A tenth step of registering the page in the usable page list and registering the page in the current page table if the page exists in the backup page list as a result of the determination in the eighth step; And 상기 제 7 단계의 판단결과, 해당 페이지가 상기 사용가능 페이지 리스트에 존재하면, 해당 페이지를 상기 현재 페이지 테이블에 등록한 후, 해당 페이지에 대한 작업을 수행하는 제 11 단계를 포함하는 안전기억장치를 이용한 주기억장치 상주형 데이터베이스 회복방법.As a result of the determination of the seventh step, if the page exists in the usable page list, after registering the page in the current page table, and using the safety memory device comprising the step of performing the operation for the page How to recover main memory resident database. 마이크로 프로세서를 구비한 안전기억장치를 이용한 주기억장치 상주형 데이터베이스 회복시스템에,In a main memory resident database recovery system using a safety memory device with a microprocessor, 안전기억장치를 이용하여 트랜잭션을 처리하는 제 1 기능;A first function of processing a transaction using a secure memory device; 상기 안전기억장치를 이용하여 트랜잭션을 철회하는 제 2 기능;A second function of withdrawing a transaction using said safe storage device; 상기 안전기억장치를 이용하여 페이지를 백업 데이터베이스에 백업하는 제 3 기능; 및A third function of backing up a page to a backup database by using the safety memory device; And 상기 안전기억장치를 이용하여 시스템 오류발생시에 사용했던 페이지를 주기억장치 상주형 데이터베이스에 재적재하는 제 4 기능A fourth function of reloading the page used at the time of system error by using the safety memory to the main memory resident database 을 실현시키기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록매체.A computer-readable recording medium having recorded thereon a program for realizing this.
KR1019990057328A 1999-12-13 1999-12-13 Method for recovering main memory database system using stable memory KR20010055981A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1019990057328A KR20010055981A (en) 1999-12-13 1999-12-13 Method for recovering main memory database system using stable memory

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1019990057328A KR20010055981A (en) 1999-12-13 1999-12-13 Method for recovering main memory database system using stable memory

Publications (1)

Publication Number Publication Date
KR20010055981A true KR20010055981A (en) 2001-07-04

Family

ID=19625559

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1019990057328A KR20010055981A (en) 1999-12-13 1999-12-13 Method for recovering main memory database system using stable memory

Country Status (1)

Country Link
KR (1) KR20010055981A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100689762B1 (en) * 2005-01-25 2007-03-08 심상엽 A database system and method for storing a plurality of database components in main memory thereof
KR100781515B1 (en) * 2006-01-10 2007-12-03 삼성전자주식회사 System and method for managing log information for transaction
KR100810013B1 (en) * 2005-11-07 2008-03-10 인터내셔널 비지네스 머신즈 코포레이션 Multistage virtual memory paging system
KR101066783B1 (en) * 2003-05-30 2011-09-21 마이크로소프트 코포레이션 Shadow paging
US8296270B2 (en) 2009-10-28 2012-10-23 Samsung Electronics Co., Ltd. Adaptive logging apparatus and method

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101066783B1 (en) * 2003-05-30 2011-09-21 마이크로소프트 코포레이션 Shadow paging
KR100689762B1 (en) * 2005-01-25 2007-03-08 심상엽 A database system and method for storing a plurality of database components in main memory thereof
KR100810013B1 (en) * 2005-11-07 2008-03-10 인터내셔널 비지네스 머신즈 코포레이션 Multistage virtual memory paging system
KR100781515B1 (en) * 2006-01-10 2007-12-03 삼성전자주식회사 System and method for managing log information for transaction
US7849060B2 (en) 2006-01-10 2010-12-07 Samsung Electronics Co., Ltd. System and method for managing log information for transaction
US8296270B2 (en) 2009-10-28 2012-10-23 Samsung Electronics Co., Ltd. Adaptive logging apparatus and method

Similar Documents

Publication Publication Date Title
US5581750A (en) System and method for improving data recovery performance
US7640276B2 (en) Backup system, program and backup method
US7107294B2 (en) Method and apparatus for interrupting updates to a database to provide read-only access
CA2933790C (en) Apparatus and method for creating a real time database replica
US4868744A (en) Method for restarting a long-running, fault-tolerant operation in a transaction-oriented data base system without burdening the system log
US7627727B1 (en) Incremental backup of a data volume
US7991749B2 (en) Database recovery method applying update journal and database log
US6182241B1 (en) Method and apparatus for improved transaction recovery
JP2505112B2 (en) Transaction management method
US9280578B1 (en) Combining transactions in a metadata transaction log
EP0566966B1 (en) Method and system for incremental backup copying of data
JP2559995B2 (en) Database backup method, restoration method, and data storage system
JP4419884B2 (en) Data replication apparatus, method, program, and storage system
EP0710375B1 (en) File backup system
EP1503290B1 (en) Transaction consistent copy-on-write database
US20060123211A1 (en) Method for optimizing a snapshot operation on a file basis
JPH07175700A (en) Database management system
US6944635B2 (en) Method for file deletion and recovery against system failures in database management system
KR20010055981A (en) Method for recovering main memory database system using stable memory
US9235349B2 (en) Data duplication system, data duplication method, and program thereof
KR100365891B1 (en) Backup/recovery Apparatus and method for non-log processing of real-time main memory database system
JP2002318717A (en) Database system
JPH03134747A (en) Dynamic control system and method of program
JP2000163294A (en) Method and device for managing database and machine- readable recording medium with program recorded thereon
CA2153508C (en) A method of operating a computer system

Legal Events

Date Code Title Description
WITN Withdrawal due to no request for examination