KR100673233B1 - Auto-tracing recovery system of database of database management system and method thereof - Google Patents

Auto-tracing recovery system of database of database management system and method thereof Download PDF

Info

Publication number
KR100673233B1
KR100673233B1 KR1020030057773A KR20030057773A KR100673233B1 KR 100673233 B1 KR100673233 B1 KR 100673233B1 KR 1020030057773 A KR1020030057773 A KR 1020030057773A KR 20030057773 A KR20030057773 A KR 20030057773A KR 100673233 B1 KR100673233 B1 KR 100673233B1
Authority
KR
South Korea
Prior art keywords
recovery
database
server
log file
archive log
Prior art date
Application number
KR1020030057773A
Other languages
Korean (ko)
Other versions
KR20050020105A (en
Inventor
서준희
함윤식
전석운
이준석
Original Assignee
삼성에스디에스 주식회사
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 삼성에스디에스 주식회사 filed Critical 삼성에스디에스 주식회사
Priority to KR1020030057773A priority Critical patent/KR100673233B1/en
Publication of KR20050020105A publication Critical patent/KR20050020105A/en
Application granted granted Critical
Publication of KR100673233B1 publication Critical patent/KR100673233B1/en

Links

Images

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/1471Saving, restoring, recovering or retrying involving logging of persistent data for recovery
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2201/00Indexing scheme relating to error detection, to error correction, and to monitoring
    • G06F2201/80Database-specific techniques

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)

Abstract

본 발명은 운영 DBMS(DataBase Management System)에서 발생되는 로그 파일을 이용하여 별도의 복구 DBMS를 특정시간 간격으로 자동 복구하는 DBMS의 데이터베이스 자동 복구 시스템 및 그 방법에 관한 것이다. 본 발명에 따른 DBMS(DataBase Management System)의 데이터베이스 복구 시스템은, 고객 서비스 운영에 생성되는 데이터베이스를 저장하기 위한 운영용 데이터베이스와, 상기 운영용 데이터베이스 운영 중에 생성되는 데이터의 이력이 기록된 파일의 모임인 운영용 아카이브 로그 파일을 포함하는 운영 서버, 및 상기 운영용 데이터베이스를 복제한 복구용 데이터베이스 및 상기 운영용 아카이브 로그 파일을 복제한 복구용 아카이브 로그 파일을 포함하며, 특정 시간 간격으로 상기 복구용 아카이브 로그 파일을 상기 복구용 데이터베이스에 적용하여 상기 운영서버를 복구하는 백업서버로 구성된다. 본 발명에 따른 DBMS의 데이터베이스 자동 복구 시스템 및 그 방법은 운영자의 실수 또는 장비의 고장으로 인하여 장애가 발생 시에 특정 시간 간격내의 데이터베이스만 복구하면 되므로, 복구 시간을 크게 단축시키는 효과가 있다.The present invention relates to a database automatic recovery system and a method of a DBMS for automatically recovering a separate recovery DBMS at a specific time interval by using a log file generated from an operational DBMS (Database Management System). The database recovery system of the DBMS (DataBase Management System) according to the present invention is an operating database for storing a database generated in a customer service operation, and a collection of files in which a history of data generated during the operation database operation is recorded. An operational server including an operational archive log file, and a recovery database copying the operational database, and a recovery archive log file replicating the operational archive log file, wherein the recovery archive log is stored at specific time intervals. It is composed of a backup server to recover the operating server by applying a file to the recovery database. The automatic database recovery system and method of the DBMS according to the present invention need to recover only a database within a specific time interval when a failure occurs due to an operator's mistake or equipment failure, thereby greatly reducing the recovery time.

DBMS, 복구 시스템, 복구 방법, 로그 파일DBMS, recovery system, recovery method, log file

Description

DBMS의 데이터베이스 자동 복구 시스템 및 그 방법{Auto-tracing recovery system of database of database management system and method thereof}{Auto-tracing recovery system of database of database management system and method}

도 1은 본 발명의 일실시예에 따른 DBMS의 데이터베이스 자동 복구 시스템의 구성도.1 is a block diagram of a database automatic recovery system of the DBMS according to an embodiment of the present invention.

도 2는 본 발명의 일실시예에 따른 DBMS의 데이터베이스 자동 복구 방법의 전체 흐름도.2 is an overall flowchart of a method for automatically recovering a database of a DBMS according to an embodiment of the present invention.

도 3은 도 2의 DBMS의 데이터베이스 자동 복구 방법에서 운영용 데이터베이스를 복구용 데이터베이스로 복제하는 단계의 흐름도.3 is a flowchart of a step of replicating an operational database into a recovery database in the DBMS automatic recovery method of FIG. 2.

도 4는 도 2의 DBMS의 데이터베이스 자동 복구 방법에서 운영용 아카이브 로그 파일을 복구용 아카이브 로그 파일로 복제하는 단계의 흐름도.4 is a flowchart of a step of replicating an operational archive log file into an archive log file for recovery in the DBMS automatic recovery method of FIG.

도 5는 도 2의 DBMS의 데이터베이스 자동 복구 방법에서 복구용 아카이브 로그 파일을 적용하여 복구용 데이터베이스를 복구하는 단계의 흐름도.5 is a flowchart of a step of recovering a database for recovery by applying the archive log file for recovery in the method for automatic database recovery of the DBMS of FIG.

본 발명은 DBMS(DataBase Management System)의 데이터베이스 자동 복구 시스템 및 그 방법에 관한 것으로, 더욱 상세하게는 운영 DBMS에서 발생되는 로그 파 일을 이용하여 별도의 복구 DBMS를 특정시간 간격으로 자동 복구하는 DBMS의 데이터베이스 자동 복구 시스템 및 그 방법에 관한 것이다.The present invention relates to a database automatic recovery system of DBMS (DataBase Management System) and a method thereof, and more particularly to a DBMS that automatically recovers a separate recovery DBMS at a specific time interval using a log file generated from an operating DBMS. The present invention relates to a database automatic recovery system and a method thereof.

현재 사용되고 있는 DBMS는 용량이 점점 대용량화 되어가고 사용량이 증가하여 서버, 디스크 등의 증설에 많은 비용을 투자하고 있다.The DBMS that is currently being used is investing a lot of money in the expansion of servers, disks, etc. as the capacity is getting bigger and the usage is increased.

이러한 DBMS환경에서 운영자의 실수 또는 장비의 장애로 인하여 장애가 발생할 경우, 대용량화된 DBMS를 복구하기 위하여 많은 복구시간이 필요함에 따라 서비스 중단이 발생하여 고객 및 기업에게 커다란 피해를 안겨 주고 있다.If a failure occurs due to an operator's mistake or equipment failure in such a DBMS environment, a lot of recovery time is required to recover a large-scaled DBMS, resulting in service interruption, which causes great damage to customers and businesses.

따라서, DBMS 장애시에 데이터에 대한 완벽한 복구는 기업의 영속성을 보장해 주는 매우 중요한 요소이며, 특히 얼마나 빠른 복구를 할 수 있는지는 장애로 인한 손실을 최소화할 수 있는 핵심요소이다.Therefore, complete recovery of data in the event of a DBMS failure is a very important factor that guarantees enterprise permanence. Especially, how fast recovery can be the key to minimizing the loss caused by failure.

종래의 DBMS 장애시에 데이터를 복구하는 방법으로는 일정시간(예를 들면, 1일 1회 설정시간)에 운영 DBMS를 복구용 디스크에 복제하고, 이를 이용하여 복구하는 방법이 있었다.As a method of recovering data in the case of a conventional DBMS failure, there was a method of copying an operating DBMS to a recovery disk at a predetermined time (for example, once a day at a set time) and recovering the data using the same.

그러나, 이러한 방법은 일정시간을 기준으로 복제하였기 때문에 매일 1회씩 복제를 할 경우, 운영 DBMS와 복제된 DBMS와 최대 24시간의 시간차이가 발생하므로, 운영 DBMS에 장애가 발생시에 DBMS를 복구하기 위해서는 최대 24시간동안 생성된 로그 파일을 적용하여 복구해야 한다.However, since this method is replicated based on a certain time, if the replication is performed once every day, there is a time difference of up to 24 hours with the replicated DBMS. Therefore, in order to recover the DBMS when the operational DBMS fails, The log file created for 24 hours needs to be restored.

기술적으로는 1일 수회의 DBMS 복제가 가능하나 시스템의 부하증가로 대부분의 경우 현실적으로 1일 1회 이상 DBMS 복제를 수행하는 것이 곤란하다. 따라서, 고정된 복구용 DBMS에 로그 파일을 적용하여 복구하는 시간이 과다하게 소요되는 문제점이 있었다.Technically, DBMS replication can be done several times a day, but in most cases, it is difficult to perform DBMS replication more than once a day due to the increase of system load. Therefore, there is a problem that it takes excessive time to recover by applying a log file to a fixed recovery DBMS.

상술한 문제점을 극복하기 위하여 DBMS제공자(예, Oracle사)에서는 StandBy DBMS의 사용을 권장하고 있다. 그러나, 이 경우에는 StandBy DBMS 복구의 마지막 단계인 StandBy DBMS의 오픈을 일단 한번이라도 실행하면 운영 DBMS를 더 이상 사용할 수 없게 된다.To overcome the above problems, DBMS providers (eg Oracle) recommend the use of StandBy DBMS. However, in this case, if you open the StandBy DBMS, which is the final stage of recovery of the StandBy DBMS, at least once, the production DBMS is no longer available.

따라서, 평상시에는 StandBy DBMS를 오픈할 수 없고, 별도의 테스트용이나 정상적으로 오픈되는지에 대한 여부도 점검하여 볼 수 없는 문제점이 있었다.Therefore, there is a problem in that it is not possible to open the StandBy DBMS at normal times and check whether it is opened for a separate test or normally.

또한, StandBy DBMS를 운영 중에 운영 DBMS에 데이터 파일을 추가 또는 삭제를 할 경우, StandBy DBMS에서도 동일한 절차를 반복하여 수행해야 하므로, 효용성에 비해 DBMS 운영자의 많은 관리 노력이 필요로 하는 문제점도 있었다.In addition, when adding or deleting a data file to the operating DBMS during the operation of the StandBy DBMS, the same procedure must be repeated in the StandBy DBMS, which requires a lot of management effort of the DBMS operator compared to the utility.

상기 문제점을 해결하기 위한 본 발명의 기술적 과제는 DBMS 복구 시간을 단축시키고 DBMS 관리가 효율적인 DBMS의 데이터베이스 자동 복구 시스템 및 그 방법을 제공하는 것이다.The technical problem of the present invention for solving the above problems is to provide a DBMS database automatic recovery system and method thereof that shorten the DBMS recovery time and efficient DBMS management.

본 발명의 목적을 달성하기 위한 DBMS(DataBase Management System)의 데이터베이스 복구 시스템은, 고객 서비스 운영에 생성되는 데이터베이스를 저장하기 위한 운영용 데이터베이스와, 상기 운영용 데이터베이스 운영 중에 생성되는 데이터의 이력이 기록된 파일의 모임인 운영용 아카이브 로그 파일을 포함하는 운영 서버, 및 상기 운영용 데이터베이스를 복제한 복구용 데이터베이스 및 상기 운영용 아카이브 로그 파일을 복제한 복구용 아카이브 로그 파일을 포함하며, 특정 시간 간격으로 상기 복구용 아카이브 로그 파일을 상기 복구용 데이터베이스에 적용하여 상기 운영서버를 복구하는 백업서버를 포함하는 것을 특징으로 한다.Database recovery system of the DBMS (DataBase Management System) for achieving the object of the present invention, the operating database for storing the database generated in the customer service operation, and the history of the data generated during the operation database operation is recorded An operational server including an operational archive log file that is a collection of files, a recovery database that replicates the operational database, and a recovery archive log file that replicates the operational archive log file, wherein And a backup server recovering the operation server by applying a recovery archive log file to the recovery database.

상기 운영 서버와 상기 백업 서버는 지속적으로 운영이 가능한 고 가용성(High Availability; HA) 서버로 구성되는 것을 특징으로 한다. The primary server and the backup server is characterized in that it is configured as a high availability (HA) server that can be continuously operated.

상기 운영 서버는 상기 백업 서버의 기능을 겸하여 수행하는 것을 특징으로 한다.The operation server is characterized in that also serves as a function of the backup server.

상기 운영용 데이터베이스와 상기 복구용 데이터베이스는 서로 구별하기 위한 고유의 ID인 SID(System IDentification)가 설정되어 있는 것을 특징으로 한다.The operational database and the recovery database are characterized in that the SID (System IDentification) is set to distinguish from each other.

한편, 본 발명의 다른 목적을 달성하기 위한 DBMS(DataBase Management System)의 데이터베이스 복구 시스템의 데이터베이스 복구방법은, A) 상기 운영 서버의 상기 운영용 데이터베이스를 상기 백업 서버의 상기 복구용 데이터베이스로 복제하는 단계, B) 상기 데이터베이스 복제와 함께 상기 운영 서버의 상기 운영용 아카이브 로그파일을 상기 백업 서버의 상기 복구용 아카이브 로그파일로 복제하는 단계, 및 C) 상기 백업 서버는 상기 복구용 아카이브 로그파일을 적용하여 상기 복구용 데이터베이스 복구하는 단계를 포함하는 것을 특징으로 한다.On the other hand, the database recovery method of the database recovery system of the DBMS (DataBase Management System) to achieve another object of the present invention, A) replicating the operation database of the operation server to the recovery database of the backup server B) replicating the operational archive log file of the primary server with the recovery archive log file of the backup server together with the database replication; and C) the backup server applies the recovery archive log file by And recovering the recovery database.

상기 A) 단계는 디스크 카피 솔루션을 사용할 경우, A-1) 상기 백업 서버가 상기 복구용 데이터베이스 작동을 종료시키고 상기 복구용 데이터베이스가 상기 운영 서버에 접속되어 데이터 통신을 할 수 있도록 익스포트(export)하는 단계, A-2) 상기 운영 서버가 디스크 카피 솔루션(disk copy solution) 이용하여 운영용 데이 터베이스를 복구용 데이터베이스 디스크로 복제하는 단계, A-3) 상기 운영용 데이터베이스와 상기 복구용 데이터베이스가 동일한 상태가 되면, 상기 운영 서버는 상기 운영용 데이터베이스를 백업상태로 전환하는 단계, A-4) 상기 디스크 카피 솔루션을 이용한 상기 운영용 데이터베이스의 상기 복구용 데이터베이스 디스크로 복제가 완료되면, 상기 운영 서버는 상기 운영용 데이터베이스를 백업상태에서 정상상태로 전환하는 단계, A-5) 상기 백업 서버는 상기 복제된 복구용 데이터베이스를 다시 작동하기 위하여 임포트(import)하는 단계, A-6) 상기 백업 서버는 복구용 데이터 베이스의 콘트롤 파일(control file)을 생성하는 단계, 및 A-7) 상기 운영 서버는 상기 복구용 데이터베이스가 상기 백업 서버(200)와 연동하여 작동할 수 있도록 마운트시키는 단계;를 포함하는 것이 바람직하다.In step A), when the disk copy solution is used, A-1) the backup server terminates the recovery database operation and exports the recovery database to be connected to the operation server for data communication. Step A-2) replicating the operational database to a recovery database disk using a disk copy solution by the production server, A-3) the same operation database as the recovery database In the state, the operation server converts the operation database to a backup state, A-4) When the replication is completed to the recovery database disk of the operation database using the disk copy solution, the operation server is Converting the operational database from the backup state to the normal state, A-5) The up server imports the replicated recovery database to operate again, A-6) the backup server generates a control file of the recovery database, and A-7) The operation server may include mounting the recovery database to operate in conjunction with the backup server 200.

또한, 일반 카피 명령어를 사용할 경우 상기 A) 단계는, A-1') 상기 백업 서버는 상기 복구용 데이터베이스 작동을 종료하고 상기 운영 서버는 상기 운영용 데이터베이스를 백업상태로 전환하는 단계, A-2') 상기 운영 서버는 일반 카피 명령어를 이용하여 운영용 데이터베이스를 복구용 데이터베이스 디스크로 복제하는 단계, A-3') 상기 일반 카피 명령어를 이용한 상기 운영용 데이터베이스의 상기 복구용 데이터베이스 디스크로 복제가 완료되면, 상기 운영 서버는 상기 운영용 데이터베이스를 백업상태에서 정상상태로 전환하는 단계, A-4') 상기 백업 서버는 복구용 데이터 베이스의 콘트롤 파일(control file)을 생성하는 단계, 및 A-5') 상기 운영 서버는 상기 복구용 데이터베이스가 상기 백업 서버(200)와 연동하여 작동할 수 있도록 마운트시키는 단계를 포함하는 것이 바람직하다.In addition, in the case of using a general copy command, the step A) may include A-1 ') the backup server terminating the recovery database operation and the operation server converting the operation database to a backup state, A-2. ') Replicating the production database to the recovery database disk using the general copy command, A-3') replicating the production database to the recovery database disk of the production database using the general copy command; The operation server converts the operation database from the backup state to the normal state, A-4 ') the backup server generates a control file of the recovery database, and A-5 ') The operation server includes the step of mounting the recovery database to operate in conjunction with the backup server 200 It is desirable to.

그리고, 상기 B) 단계는, B-1) 상기 운영 서버는 크론(cron)의 실행과 함께 상기 운영용 데이터베이스에서 생성되는 데이터베이스의 이력이 기록된 상기 운영용 아카이브 로그 파일을 생성하는 단계, 및 B-2) 상기 운영 서버는 상기 크론에서 예약된 상기 운영용 아카이브 로그파일의 복제 시간이 되었는지 판단하여, 상기 크론에서 상기 운영용 아카이브 로그파일의 예약된 복제 시간이 되지 않은 경우에는 상기 운영 서버는 계속하여 상기 운영용 아카이브 로그 파일을 생성하면서 주기가 조정 가능한 다음 예약된 시간이 될 때까지 대기하고, 상기 크론에서 예약된 복제 시간이 된 경우에는 상기 운영 서버는 상기 예약된 복제 시간까지 생성된 상기 운영용 아카이브 로그 파일을 상기 백업 서버의 상기 복구용 아카이브 로그 파일로 복제하는 단계를 포함하는 것이 바람직하다.And, the step B), B-1) the production server generates the operational archive log file recorded the history of the database generated in the production database with the execution of the cron (cron), and B -2) The primary server determines whether the replication time of the operational archive log file reserved in the cron is reached, and if the scheduled replication time of the operational archive log file is not reached in the cron, the production server continues. While generating the operational archive log file and waiting until the next scheduled time is adjustable, and when the scheduled replication time in the cron is reached, the production server generates the operation generated until the scheduled replication time. Duplicating an archive log file for the backup into the recovery archive log file of the backup server. It is desirable.

또한, 상기 C) 단계는, C-1) 상기 백업 서버는 크론의 실행과 함께 상기 백업 서버는 복구용 아카이브 로그 파일을 주기적으로 상기 운영 서버로부터 수신하는 단계, C-2) 상기 백업 서버는 상기 크론에 의해 기 사용된 복구용 아카이브 로그 파일을 삭제할 시간이 되었는지 판단하여, 상기 기 사용된 복구용 아카이브 로그 파일을 삭제할 시간이 된 경우에는 상기 백업 서버는 상기 기 사용된 복구용 아카이브 로그 파일을 삭제하는 단계, C-3) 상기 백업 서버는 복구용 데이터베이스에 복구용 아카이브 로그 파일을 적용하는 시간이 되었는지 판단하여, 상기 복구용 아카이브 로그 파일을 적용하는 시간이 되지 않은 경우에는 백업 서버는 계속하여 복구용 아카이브 로그 파일을 상기 운영 서버로부터 수신하고, 상기 복구용 아카이브 로그 파일을 적용하는 시간이 된 경우에는 상기 백업 서버는 상기 복구용 데이터베 이스가 상기 백업 서버와 연동하여 복구과정이 진행 될 수 있도록 상기 복구용 데이터베이스를 마운트시키는 단계, C-4) 상기 백업 서버는 상기 크론에 예약된 시간을 기준으로 특정 시간 간격이내에 상기 운영 서버로부터 복사된 복구용 아카이브 로그 파일이 존재하는지 검색하여, 상기 예약된 시간에서부터 특정 시간 간격이내에 상기 운영 서버로부터 복사된 복구용 아카이브 로그 파일이 존재하는 경우에는 상기 백업 서버는 일괄적인 적용을 통제하기 위하여 상기 복구용 아카이브 로그 파일을 복구용 데이터베이스가 인식하지 못하는 다른 파일명으로 변경하는 단계, C-5) 상기 백업 서버는 상기 크론에 예약된 시간에서부터 특정 시간 간격이전에 상기 운영 서버로부터 복사된 복구용 아카이브 로그 파일을 상기 복구용 데이터베이스가 인식할 수 있는 파일명으로 원상복구하는 단계, C-6) 상기 백업 서버는 복구를 시작하기 전에 이전 적용 과정에서 데이터파일 변경사항 기록이 존재하는지 확인하여, 상기 변경사항 기록이 존재하는 경우에는 상기 백업 서버는 상기 복구용 데이터베이스에 변경 사항을 적용하는 단계, C-7) 상기 백업 서버는 예약된 시간에서부터 특정 시간 간격이전에 상기 운영 서버로부터 복사된 복구용 아카이브 로그 파일을 순차적으로 상기 복구용 데이터베이스에 적용하여 복구하는 단계를 포함하는 것이 바람직하다.In addition, in step C), the backup server periodically executes cron and the backup server periodically receives a recovery archive log file from the operating server. It is determined whether it is time to delete the previously used recovery archive log file by cron, and when it is time to delete the previously used recovery archive log file, the backup server deletes the previously used recovery archive log file. Step C-3) The backup server determines whether it is time to apply the recovery archive log file to the recovery database, and if it is not time to apply the recovery archive log file, the backup server continues to recover. When receiving the archive log file for the application from the operating server, and applying the recovery archive log file In this case, the backup server mounts the recovery database so that the recovery database can proceed with the backup server in connection with the backup server. C-4) The backup server is reserved for the cron. If there is a recovery archive log file copied from the production server within a specific time interval based on time, and if there is a recovery archive log file copied from the production server within a specific time interval from the scheduled time The backup server changing the recovery archive log file to another file name that is not recognized by the recovery database in order to control batch application; C-5) the backup server has a specific time interval from the time reserved for the cron. Recovery arcs previously copied from the production server Restoring a log file to a file name recognized by the recovery database, C-6) The backup server checks whether a data file change record exists in a previous application process before starting the recovery, and changes If there is a history record, the backup server applies the changes to the recovery database. C-7) The backup server logs the recovery archive log copied from the operation server before a specific time interval from the scheduled time. It is preferable to include the step of applying a file sequentially to the recovery database to recover.

상기 C-7) 단계의 데이터베이스 복구가 진행중에 상기 백업 서버는 데이터파일의 변경사항이 발생하는지를 검사하여, 상기 변경사항이 발생하는 경우에는 상기 백업 서버는 상기 복구용 데이터베이스 복구를 중단하고 상기 변경사항을 기록한 후 데이터베이스 복구를 종료하고, 상기 변경사항이 발생하지 않는 경우에는 상기 백업 서버는 순차적으로 상기 복구용 아카이브 로그 파일을 상기 복구용 데이테베이스에 적용하여 복구하는 단계를 더 포함하는 것이 바람직하다. During the database recovery in step C-7), the backup server checks whether a change in the data file occurs. When the change occurs, the backup server stops restoring the recovery database and changes the change. It is preferable to further include the step of recovering the database after finishing recording, and if the change does not occur, the backup server sequentially applies the recovery archive log file to the recovery database. .

본 명세서에서 사용하는 'SID(System IDentification)'라는 용어는 Oracle DBMS에서 사용하는 용어로서, 각각의 Oracle DBMS를 구별하기 위한 고유의 ID를 의미한다.The term 'SID (System IDentification)' used in the present specification is a term used in an Oracle DBMS, and means a unique ID for distinguishing each Oracle DBMS.

본 명세서에서 사용하는 '익스포트(export)'라는 용어는 어떤 응용프로그램용으로 작성된 데이터를 다른 프로그램에서 사용할 수 있는 형식으로 바꾸는 것을 의미한다.As used herein, the term 'export' means to convert data written for one application program into a format that can be used by another program.

본 명세서에서 사용하는 '임포트(import)'라는 용어는 상기 '익스포트(export)'의 반대 개념으로, 다른 응용프로그램에 의해 생산된 데이터를 사용하는 것을 의미한다.As used herein, the term 'import' refers to the use of data produced by another application as opposed to the term 'export'.

본 명세서에서 사용하는 '마운트(mount)'라는 용어는 데이터베이스 내에 있는 일련의 파일을 DBMS가 파일 위치, 상태 등의 정보를 인지하여 복구용 로그파일을 적용할 수 있는 상태를 의미한다.The term 'mount' as used herein refers to a state in which a DBMS can apply a log file for recovery by recognizing information such as a file location and a state of a series of files in a database.

본 명세서에서 사용하는 '크론(cron)'이라는 용어는 Unix에서 일정한 시점 또는 시간 간격으로 반복해서 작업을 수행시키는 명령어로서, Oracle DBMS에서는 DBMS_JOB package를 이용하여 작업을 수행시킨다.The term 'cron' used in the present specification is a command that repeatedly executes a task at a predetermined time point or a time interval in Unix. In an Oracle DBMS, a task is performed by using the DBMS_JOB package.

이하, 본 발명에 따른 DBMS의 데이터베이스 자동 복구 시스템 및 그 방법을 상세히 설명하기로 한다.Hereinafter, the automatic database recovery system and method of the DBMS according to the present invention will be described in detail.

도 1은 본 발명의 일실시예에 따른 DBMS의 데이터베이스 자동 복구 시스템의 구성도이다.1 is a configuration diagram of a database automatic recovery system of a DBMS according to an embodiment of the present invention.

도 1에 나타낸 바와 같이, 본 발명에 따른 DBMS의 데이터베이스 자동 복구 시스템은 운영 서버(100)와 백업 서버(200)로 구성된다. 상기 운영 서버(100)는 운영용 데이터베이스(110)와 운영용 아카이브 로그 파일(120)을 포함하고, 상기 백업 서버(200)는 복구용 데이터베이스(210)와 복구용 아카이브 로그 파일(220)을 포함한다.As shown in FIG. 1, the automatic database recovery system of the DBMS according to the present invention includes an operation server 100 and a backup server 200. The operational server 100 includes an operational database 110 and an operational archive log file 120, and the backup server 200 includes a recovery database 210 and an archive log file 220 for recovery. do.

상기 운영용 데이터베이스(110)는 운영 서버(100)에서 고객을 위한 서비스 등의 운영 중에 생성되는 데이터베이스를 저장하고 있다.The operation database 110 stores a database generated during operation of a service for a customer in the operation server 100.

상기 운영용 아카이브 로그 파일(120)은 상기 운영용 데이터베이스(110) 운영 중에 생성되는 데이터의 추가, 변경, 삭제 등의 데이터베이스의 이력이 기록된 파일의 모음이다.The operational archive log file 120 is a collection of files in which the history of the database such as addition, change, and deletion of data generated during operation of the operational database 110 is recorded.

상기 복구용 데이터베이스(210)는 상기 운영용 데이터베이스(110)를 복제한 것으로서, 상기 데이터베이스의 복구 시에 사용된다.The recovery database 210 is a replica of the operational database 110 and is used when the database is restored.

상기 복구용 아카이브 로그 파일(220)은 상기 운영용 아카이브 로그 파일(120)이 복제된 것으로서, 상기 복구용 데이터베이스(210)에 적용되어 데이터베이스 복구를 수행한다.The recovery archive log file 220 is a copy of the operational archive log file 120, is applied to the recovery database 210 to perform a database recovery.

상기 운영 서버(100)와 백업 서버(200)는 긴 시간동안 지속적으로 운영이 가능한 고 가용성(High Availability; HA) 서버로 구성되는 것이 바람직하며, 운영 서버(100)가 백업서버(200)의 기능을 겸하여 수행할 수 있다.The production server 100 and the backup server 200 is preferably configured as a High Availability (HA) server that can be continuously operated for a long time, the operation server 100 is a function of the backup server 200 Can also be performed.

운영서버와 백업서버가 다를 경우 동일한 SID를 사용하는 것도 가능하며, 운 영서버와 백업서버가 같은 경우에는 운영용 데이터베이스(110)와 복구용 데이터베이스(210)는 서로 다른 SID(System IDentification)를 가지는 것이 바람직하다.It is also possible to use the same SID if the operating server and backup server are different, and if the operating server and the backup server are the same, the operational database 110 and the recovery database 210 have different SIDs (System IDentification). It is preferable.

도 2는 본 발명의 일실시예에 따른 DBMS의 데이터베이스 자동 복구 방법의 전체 흐름도이다.2 is an overall flowchart of a method for automatically recovering a database of a DBMS according to an embodiment of the present invention.

도 2에 나타낸 바와 같이, 운영 서버(100)의 운영용 데이터베이스(110)를 백업 서버(200)의 복구용 데이터베이스(210)로 복제한다(S100).As shown in FIG. 2, the operation database 110 of the operation server 100 is replicated to the recovery database 210 of the backup server 200 (S100).

상기 데이터베이스 복제와 함께 운영 서버(100)의 운영용 아카이브 로그파일을 백업 서버(200)의 복구용 아카이브 로그파일로 복제한다(S200).Along with the database replication, the operational archive log file of the operation server 100 is replicated to the recovery archive log file of the backup server 200 (S200).

백업 서버(200)는 상기 복구용 아카이브 로그 파일(220)을 적용하여 상기 복구용 데이터베이스(210)를 복구한다(S300).The backup server 200 restores the recovery database 210 by applying the recovery archive log file 220 (S300).

도 3은 도 2의 DBMS의 데이터베이스 자동 복구 방법에서 운영용 데이터베이스(110)를 복구용 데이터베이스(210)로 복제하는 단계의 흐름도이다.3 is a flowchart of a step of replicating the operational database 110 into a recovery database 210 in the method for automatically recovering a database of the DBMS of FIG. 2.

도 3에 나타낸 바와 같이, 백업 서버(200)는 복구용 데이터베이스(210) 작동의 종료와 복구용 데이터베이스(210)가 운영 서버(100)에 접속되어 데이터 통신을 할 수 있도록 익스포트(export)되었는지 점검한다(S110).As shown in FIG. 3, the backup server 200 checks whether the recovery database 210 is terminated and whether the recovery database 210 has been exported for data communication by being connected to the operation server 100. (S110).

복구용 데이터베이스(210) 작동이 종료되지 않은 경우 백업 서버(200)는 복구용 데이터베이스(210) 작동을 종료하고, 복구용 데이터베이스(210)가 익스포트되지 않은 경우 운영용 데이터베이스(110)를 복제하기 위하여 복구용 데이터베이스(210)를 익스포트한다(S120).When the recovery database 210 operation is not terminated, the backup server 200 terminates the recovery database 210 operation, and in order to replicate the operation database 110 when the recovery database 210 is not exported. The recovery database 210 is exported (S120).

복구용 데이터베이스(210) 작동이 종료되고 복구용 데이터베이스(210)가 익 스포트되면, 운영 서버(100)는 디스크 카피 솔루션(disk copy solution)을 이용하여 운영용 데이터베이스(110) 디스크를 복구용 데이터베이스(210) 디스크로 복제하기 시작한다(S130).When the recovery database 210 operation is terminated and the recovery database 210 is exploited, the operation server 100 restores the operation database 110 disk using the disk copy solution. 210) Start copying to the disk (S130).

상기 운영용 데이터베이스(110)와 복구용 데이터베이스(210)가 동일한 상태가 된 후, 운영 서버(100)는 운영용 데이터베이스(110)를 백업상태로 전환한다(S140).After the operational database 110 and the recovery database 210 is in the same state, the operational server 100 switches the operational database 110 to a backup state (S140).

운영용 데이터베이스(110)가 백업상태로 전환되면, 운영 서버(100)는 디스크 카피 솔루션을 이용한 운영용 데이터베이스(110) 디스크를 복구용 데이터베이스(210) 디스크로 복제를 완료한다(S150).When the operational database 110 is switched to the backup state, the operational server 100 completes the replication of the operational database 110 disk using the disk copy solution to the recovery database 210 disk (S150).

복제가 완료되면, 운영 서버(100)는 운영용 데이터베이스(110)를 백업상태에서 정상상태로 전환한다(S160).When the replication is completed, the operation server 100 switches the operation database 110 from the backup state to the normal state (S160).

여기서 상기 디스크 카피 솔루션이 아닌 일반적인 카피 명령어를 사용하는 경우, 상기 운영용 데이터베이스(110)를 백업상태로 전환한 후(S140), 상기 운영용 데이터베이스(110)를 복구용 데이터베이스(210)로 복제를 수행하고(S130), 복구용 데이터베이스(210)로 복제가 완료되면(S150), 상기 운영용 데이터베이스(110)를 정상상태로 전환한다(S160).In the case where a general copy command is used instead of the disk copy solution, after switching the operation database 110 to a backup state (S140), the operation database 110 is copied to a recovery database 210. In step S130, when the replication is completed to the recovery database 210 (S150), the operation database 110 is switched to a normal state (S160).

상기 일반적인 카피 명령어와 상기 디스크 카피 솔루션을 사용시에는 순서가 상이하다.The order is different when using the general copy instruction and the disk copy solution.

- 일반적인 카피 명령어 : S140 -> S130 -> S150 -> S160-General copy command: S140-> S130-> S150-> S160

- 디스크 카피 솔루션 : S130 -> S140 -> S150 -> S160-Disk Copy Solution: S130-> S140-> S150-> S160

운영용 데이터베이스(110)가 정상상태로 전환되면, 백업 서버(200)는 복제된 복구용 데이터베이스(210)를 다시 작동하기 위하여 임포트(import)한다(S170).When the operational database 110 is switched to the normal state, the backup server 200 imports to operate the replicated recovery database 210 again (S170).

복구용 데이터베이스(210)가 임포트되면, 백업 서버(200)는 복구용 데이터 베이스의 환경, 상태 등이 저장되는 콘트롤 파일(control file)을 생성한다(S180)When the recovery database 210 is imported, the backup server 200 generates a control file in which the environment, state, etc. of the recovery database are stored (S180).

복구용 데이터베이스(210)의 콘트롤 파일이 생성되면, 복구용 데이터베이스(210)가 백업 서버(200)와 연동하여 작동할 수 있도록 마운트시킨다(S190).When the control file of the recovery database 210 is generated, the recovery database 210 is mounted to operate in conjunction with the backup server 200 (S190).

도 4는 도 2의 DBMS의 데이터베이스 자동 복구 방법에서 운영용 아카이브 로그 파일(120)을 복구용 아카이브 로그 파일(220)로 복제하는 단계의 흐름도이다.4 is a flowchart of a step of replicating an operational archive log file 120 into an archive log file 220 for recovery in the method for automatically recovering a database of the DBMS of FIG. 2.

도 4에 나타낸 바와 같이, 운영 서버(100)는 크론(cron)을 실행한다(S210).As shown in FIG. 4, the operation server 100 executes cron (S210).

상기 크론 실행과 함께 운영 서버(100)는 운영용 데이터베이스(110)에서 생성되는 추가, 변경, 삭제 등의 데이터베이스의 이력이 기록된 운영용 아카이브 로그 파일(120)을 생성한다(S220).With the cron execution, the operation server 100 generates an operation archive log file 120 in which the history of the database such as addition, change, deletion, etc. generated in the operation database 110 is recorded (S220).

이후에 운영 서버(100)는 크론에서 예약된 운영용 아카이브 로그파일(120)의 복제 시간이 되었는지 판단한다(S230).Thereafter, the operation server 100 determines whether the replication time of the operational archive log file 120 reserved in cron is reached (S230).

크론에서 예약된 운영용 아카이브 로그파일(120)의 복제 시간이 되지 않은 경우, 운영 서버(100)는 계속하여 운영용 아카이브 로그 파일(120)을 생성하면서 주기가 조정 가능한 다음 예약된 시간이 될 때까지 대기한다(S220).If the time for replication of the operational archive log file 120 scheduled in cron is not reached, the production server 100 continues to generate the operational archive log file 120 while the cycle is at the next scheduled time when the cycle is adjustable. Wait until (S220).

한편, 크론에서 예약된 운영용 아카이브 로그파일(120)의 복제 시간이 된 경우, 운영 서버(100)는 예약된 복제 시간까지 생성된 운영용 아카이브 로그 파일(120)을 백업 서버(200)의 복구용 아카이브 로그 파일(220)로 복제한다(S240).On the other hand, when the clone time of the scheduled operational archive log file 120 in cron, the production server 100 restores the backup archive server 200 to the operational archive log file 120 generated by the scheduled replication time Replicate it to the archive log file 220 for storage (S240).

도 5는 도 2의 DBMS의 데이터베이스 자동 복구 방법에서 복구용 아카이브 로그 파일(220)을 적용하여 복구용 데이터베이스(210)를 복구하는 단계의 흐름도이다.FIG. 5 is a flowchart of a step of recovering a recovery database 210 by applying a recovery archive log file 220 in the DBMS automatic recovery method of FIG. 2.

도 5에 나타낸 바와 같이, 백업 서버(200)는 크론을 실행한다(S305).As shown in FIG. 5, the backup server 200 executes cron (S305).

상기 크론 실행과 함께 백업 서버(200)는 복구용 아카이브 로그 파일(220)을 주기적으로 운영 서버(100)로부터 수신한다(S310).With the cron execution, the backup server 200 periodically receives a recovery archive log file 220 from the operation server 100 (S310).

백업 서버(200)는 크론에 의해 기 사용된 복구용 아카이브 로그 파일(220)을 삭제할 시간이 되었는지 판단한다(S315).The backup server 200 determines whether it is time to delete the recovery archive log file 220 previously used by cron (S315).

기 사용된 복구용 아카이브 로그 파일(220)을 삭제할 시간이 된 경우, 백업 서버(200)는 기 사용된 복구용 아카이브 로그 파일(220)을 삭제하고(S320), 복구용 아카이브 로그파일(220)을 적용하는 시간이 되었는지 판단한다(S325).When it is time to delete the previously used recovery archive log file 220, the backup server 200 deletes the previously used recovery archive log file 220 (S320), the recovery archive log file 220 It is determined whether it is time to apply (S325).

한편, 기 사용된 복구용 아카이브 로그 파일(220)을 삭제할 시간이 아닌 경우, 백업 서버(200)는 복구용 데이터베이스(210)에 복구용 아카이브 로그 파일(220)을 적용하는 시간이 되었는지 판단한다(S325).On the other hand, when it is not time to delete the previously used recovery archive log file 220, the backup server 200 determines whether it is time to apply the recovery archive log file 220 to the recovery database 210 ( S325).

복구용 아카이브 로그 파일(220)을 적용하는 시간이 되지 않은 경우, 백업 서버(200)는 계속하여 복구용 아카이브 로그 파일(220)을 운영 서버(100)로부터 수신한다(S310).When it is not time to apply the recovery archive log file 220, the backup server 200 continuously receives the recovery archive log file 220 from the operation server 100 (S310).

한편, 복구용 아카이브 로그 파일(220)을 적용하는 시간이 된 경우, 백업 서버(200)는 복구용 데이터베이스(210)가 백업 서버(200)와 연동하여 복구과정이 진 행 될 수 있도록 복구용 데이터베이스(210)를 마운트시킨다(S330).On the other hand, when it is time to apply the archive log file 220 for recovery, the backup server 200 is a database for recovery so that the recovery database 210 can proceed with the backup server 200 in conjunction with the recovery process Mount 210 (S330).

복구용 데이터베이스(210)가 백업 서버(200)에 복구할 수 있는 상태로 마운트되면, 백업 서버(200)는 크론에 예약된 시간을 기준으로 특정 시간 간격이내에 운영 서버(100)로부터 복사된 복구용 아카이브 로그 파일(220)이 존재하는지 검색한다(S335).When the recovery database 210 is mounted in a recoverable state in the backup server 200, the backup server 200 is used for recovery copied from the operation server 100 within a specific time interval based on the time reserved for cron. It is searched whether the archive log file 220 exists (S335).

예약된 시간에서부터 특정 시간 간격이내에 운영 서버(100)로부터 복사된 복구용 아카이브 로그 파일(220)이 존재하는 경우, 백업 서버(200)는 특정시간 간격을 유지하기 위하여 상기 복구용 아카이브 로그 파일(220)을 복구용 데이터베이스(210)가 인식하지 못하는 다른 파일명으로 변경한다(S340).When there is a recovery archive log file 220 copied from the operation server 100 within a specific time interval from the scheduled time, the backup server 200 is to restore the archive log file 220 for maintaining a specific time interval. ) Is changed to another file name that the recovery database 210 does not recognize (S340).

한편, 예약된 시간에서부터 특정 시간 간격이내에 운영 서버(100)로부터 복사된 복구용 아카이브 로그 파일(220)이 존재하지 않는 경우, 백업 서버(200)는 크론에 예약된 시간에서부터 특정 시간 간격이전에 운영 서버(100)로부터 복사된 복구용 아카이브 로그 파일(220)을 복구용 데이터베이스(210)가 인식할 수 있는 파일명으로 원상복구한다(S345).On the other hand, if there is no recovery archive log file 220 copied from the production server 100 within a specific time interval from the scheduled time, the backup server 200 operates before a specific time interval from the time scheduled in the cron. The recovery archive log file 220 copied from the server 100 is restored to a file name recognized by the recovery database 210 (S345).

이와 같이 복구용 데이터베이스(210)에서 복구용 아카이브 로그 파일(220)을 인식 혹은 인식하지 못하는 상태로 존재시킴으로써 관리자가 요구하는 특정 시간 간격을 유지하며 자동 복구 할 수 있다.As such, the recovery database log file 220 exists in a state in which the recovery archive log file 220 is recognized or not recognized, and thus the automatic recovery can be performed while maintaining a specific time interval required by the administrator.

상기 S335 단계부터 S345 단계까지의 특정 시간 간격과 복구용 아카이브 로그 파일(220)의 관계에 대하여 예를 들어 설명하면 다음과 같다.For example, the relationship between the specific time interval from step S335 to step S345 and the recovery archive log file 220 will be described below.

상기 크론에 예약된 시간이 12시이고 특정 시간 간격을 4시간이라 하면, 상 기 '예약된 시간에서부터 특정 시간 간격이내에 운영 서버(100)로부터 복사된 복구용 아카이브 로그 파일(220)'은 '08시부터 12시까지 운영 서버(100)로부터 복사된 복구용 아카이브 로그 파일(220)'을 의미하고, 상기 '예약된 시간에서부터 특정 시간 간격이전에 운영 서버(100)로부터 복사된 복구용 아카이브 로그 파일(220)은'은 '08시 이전에 운영 서버(100)로부터 복사된 복구용 아카이브 로그 파일(220)'을 의미한다.If the time scheduled in the cron is 12 o'clock and the specific time interval is 4 hours, the 'archive log file 220 for recovery copied from the operation server 100 within a specific time interval from the scheduled time' is '08. The archive log file 220 for recovery is copied from the production server 100 to the time from 12 o'clock to 12 o'clock, and the archive log file for recovery is copied from the production server 100 before a specific time interval from the scheduled time. Reference numeral 220 denotes a 'archive archive log file 220 copied from the operation server 100 before 8:00'.

따라서 복구용 데이터베이스(210)에서 인식할 수 있는 파일들은 '08시 이전에 운영 서버(100)로부터 복사된 복구용 아카이브 로그 파일(220)'이고, 복구용 데이터베이스(210)가 인식하지 못하는 파일들은 '08시부터 12시 사이에 운영 서버(100)로부터 복사된 복구용 아카이브 로그 파일(220)'이다.Therefore, the files that can be recognized by the recovery database 210 are the 'archive archive log file 220 copied from the operation server 100 before 8:00' and the files that the recovery database 210 does not recognize are It is a recovery archive log file 220 copied from the production server 100 between 08:00 and 12 o'clock.

다음으로, 예약된 시간(12시)에서부터 특정 시간 간격이전(08시 이전)에 운영 서버(100)로부터 복사된 복구용 아카이브 로그 파일(220)이 복구용 데이터베이스(210)가 인식할 수 있는 파일명으로 원상복구되면, 백업 서버(200)는 복구를 시작하기 전에 이전 적용 과정에서 데이터파일 변경사항 기록이 존재하는지 확인한다(S350).Next, a file name that the recovery database 210 can recognize is the archive log file 220 for recovery, copied from the production server 100 before the specified time interval (before 08:00) from the scheduled time (12 o'clock). When restored to the original, the backup server 200 checks whether the data file change record exists in the previous application process before starting the recovery (S350).

변경사항 기록이 존재하는 경우, 백업 서버(200)는 복구용 데이터베이스(210)에 변경 사항을 적용한 후(S355), 예약된 시간에서부터 특정 시간 간격이전에 운영 서버(100)로부터 복사된 복구용 아카이브 로그 파일(220)을 순차적으로 복구용 데이터베이스(210)에 적용하여 복구를 시작한다(S360).If a change record exists, the backup server 200 applies the changes to the recovery database 210 (S355), and then recovers the archive copied from the operation server 100 before a specific time interval from the scheduled time. The log file 220 is sequentially applied to the recovery database 210 to start recovery (S360).

한편, 변경사항 기록이 존재하지 않는 경우, 백업 서버(200)는 예약된 시간 에서부터 특정 시간 간격이전에 운영 서버(100)로부터 복사된 복구용 아카이브 로그 파일(220)을 순차적으로 복구용 데이터베이스(210)에 적용하여 복구를 시작한다(S360).On the other hand, if the change record does not exist, the backup server 200 sequentially restores the recovery archive log file 220 copied from the operation server 100 before a specific time interval from the scheduled time. ) To start the recovery (S360).

데이터 베이스 복구가 진행 중에 백업 서버(200)는 데이터파일 추가와 같은 변경사항이 발생하는지를 검사한다(S365).During the database recovery, the backup server 200 checks whether a change such as adding a data file occurs (S365).

이때 변경사항이 발생하는 경우, 백업 서버(200)는 복구용 데이터베이스(210) 복구를 중단하고(S365), 변경사항을 기록한 후 데이터베이스 복구를 종료한다(S370). 여기서 남겨진 변경사항 기록은 다음 크론 수행시 상기 S350 단계인 데이터파일의 변경사항 존재 여부 점검 과정에서 검출되어 복구용 데이터베이스(210)에 반영된 후 복구를 진행하게 된다.In this case, when the change occurs, the backup server 200 stops the recovery of the database 210 for recovery (S365), records the change, and ends the database recovery (S370). The change record left here is detected in the process of checking whether there is a change in the data file, which is the step S350, and is reflected in the recovery database 210 to proceed with the recovery.

한편, 변경사항이 발생하지 않는 경우, 백업 서버(200)는 순차적으로 복구용 아카이브 로그파일(220)을 적용하여 특정 시간 간격까지 복구용 데이터베이스(210) 복구 작업이 완료되었는지 판단한다(S375).On the other hand, if the change does not occur, the backup server 200 sequentially determines the recovery of the recovery database 210 for a specific time interval by applying the recovery log file 220 for recovery (S375).

상기 S350 단계에서 S375 단계까지의 과정을 예를 들어 설명하면 다음과 같다.Referring to the process from step S350 to step S375 as an example.

상기 크론에 예약된 최초의 시간이 12시이고 특정 시간 간격이 4시간이라 하면, 상기 S360 단계의 '특정시간 간격 이전에 운영 서버(100)로부터 복사된 복구용 아카이브 로그 파일(220)'은 '08시이전에 운영 서버(100)로부터 복사된 복구용 아카이브 로그 파일(220)'을 의미한다.If the first time reserved for the cron is 12 o'clock and the specific time interval is 4 hours, the recovery archive log file 220 copied from the operation server 100 before the specific time interval in step S360 is' It means a recovery archive log file 220 'copied from the operating server 100 before 08 o'clock.

백업 서버(200)는 08시 이전에 운영 서버(100)로부터 복사된 복구용 아카이 브 로그 파일(220)을 이용하여 복구용 데이터베이스(210)을 복구중이며 07시정도까지의 복구용 아카이브 로그 파일(220)을 복구용 데이터베이스(210)에 적용을 완료하고 복구는 계속 진행 중이라고 하자.The backup server 200 is restoring the database 210 for recovery using the recovery archive log file 220 copied from the operation server 100 before 08 o'clock, and the archive log file for recovery until about 07:00 ( Suppose that 220 is applied to the recovery database 210 and the recovery is in progress.

이때 변경사항이 발생하면 백업 서버(200)가 S370단계의 복구용 DB 복구중단 및 변경사항 기록을 한다.At this time, if a change occurs, the backup server 200 stops the recovery DB for recovery in step S370 and records the change.

다음 크론에 예약된 시간이 13시이면, 13시에 상기 도 5 의 과정이 다시 수행되는데 S350 단계의 복구 시작전 데이터파일의 변경사항 존재 여부 점검 과정에서 S355 단계의 복구용 데이터베이스(210)에 데이터파일 변경사항에 대하여 적용을 한 후, 이전에 종료된 시점인 07시의 복구용 아카이브 로그 파일(220)을 이용하여 다시 S360 단계의 복구용 데이터베이스(210) 복구 과정(S360)을 수행하게 된다.When the next cron is scheduled at 13:00, the process of FIG. 5 is performed again at 13:00, and the data is restored to the recovery database 210 at step S355 in the process of checking whether there is a change in the data file before starting recovery at step S350. After the file change is applied, the recovery process 210 of the recovery database 210 of step S360 is performed again by using the recovery archive log file 220 of 07 o'clock, which was previously terminated.

이후 변경사항이 발생하지 않는다면 백업 서버(200)는 특정 시간 간격인 09시까지의 시간 차이만큼을 유지하며 데이터베이스 복구를 한 후 종료하게 된다.If no change occurs after that, the backup server 200 maintains the time difference up to a specific time interval of 09:00 and ends after recovering the database.

이상에서 본 발명에 대하여 설명하였으나 이는 일실시예에 지나지 않는 바, 본 발명의 기술적 사상을 벗어나지 않는 범위 내에서 얼마든지 다양한 변화 및 변형이 가능함은 당업자에게는 자명한 사실일 것이다. 하지만, 이들은 본 발명의 범위 내에 속한다는 것은 이하의 청구범위를 통해서 확연해 질 것이다.Although the present invention has been described above, this is only one embodiment, and it will be apparent to those skilled in the art that various changes and modifications can be made without departing from the technical spirit of the present invention. However, it will be apparent from the following claims that they fall within the scope of the invention.

상술한 바와 같이, 본 발명에 따른 DBMS의 데이터베이스 자동 복구 시스템 및 그 방법은 운영자의 실수 또는 장비의 고장으로 인하여 장애가 발생 시에 특정 시간 간격내의 데이터베이스만 복구하면 되므로, 복구 시간을 크게 단축시키는 효 과가 있다.As described above, the DBMS database automatic recovery system and method thereof according to the present invention only need to restore the database within a specific time interval when a failure occurs due to an operator's mistake or equipment failure, greatly reducing the recovery time There is.

또한, 본 발명에 따른 DBMS의 데이터베이스 자동 복구 시스템 및 그 방법은 이미 설비된 장비를 복구하는 것 외에도 운영 DBMS의 테스트 용도로도 사용할 수 있다.In addition, the automatic database recovery system and method of the DBMS according to the present invention can be used for testing the operational DBMS, in addition to recovering the equipment already installed.

또한, 본 발명에 따른 DBMS의 데이터베이스 자동 복구 시스템 및 그 방법은 데이터 파일의 추가, 삭제 등의 이력이 기록되어 있는 로그 파일이 데이터베이스 복구에 자동으로 반영되므로, DBMS 운영자는 간편하게 관리할 수 있다.In addition, the automatic database recovery system and method of the DBMS according to the present invention can be easily managed by the DBMS operator because the log file that records the history of addition and deletion of data files is automatically reflected in the database recovery.

따라서, 본 발명에 따른 DBMS의 데이터베이스 자동 복구 시스템 및 그 방법은 장애 복구 시간을 최소화하고 효율적인 복구시스템을 운영하므로, DBMS를 사용하는 고객에게 안정적인 서비스를 제공하여 고객 서비스 만족을 창출할 수 있다.Therefore, the automatic database recovery system and method of the DBMS according to the present invention can minimize failure recovery time and operate an efficient recovery system, thereby providing a stable service to customers using the DBMS, thereby creating customer service satisfaction.

Claims (10)

데이터베이스를 저장하기 위한 운영용 데이터베이스와, 상기 운영용 데이터베이스 운영 중에 생성되는 데이터의 이력이 기록된 파일의 모임인 운영용 아카이브 로그 파일을 포함하는 운영 서버; 및An operational server comprising an operational database for storing a database and an operational archive log file which is a collection of files in which a history of data generated during operation of the operational database is recorded; And 상기 운영용 데이터베이스를 복제한 복구용 데이터베이스와, 상기 운영용 아카이브 로그 파일을 복제한 복구용 아카이브 로그 파일을 포함하는 백업서버를 구비하고, And a backup server including a recovery database replicating the operational database and a recovery archive log file replicating the operational archive log file. a) 상기 운영 서버의 상기 운영용 데이터베이스를 상기 백업 서버의 상기 복구용 데이터베이스로 복제하고, b) 상기 운영 서버는 크론(cron)을 실행하고, 데이터베이스의 이력이 기록된 운영용 아카이브 로그 파일을 생성하고, c) 상기 크론에서 예약된 복제 시간이 되지 않은 경우, 상기 운영 서버는 계속하여 상기 운영용 아카이브 로그 파일을 생성하면서 예약된 시간이 될 때까지 대기하고, 상기 크론에서 예약된 복제 시간이 된 경우, 상기 운영 서버는 상기 예약된 복제 시간까지 생성된 상기 운영용 아카이브 로그 파일을 상기 백업 서버의 상기 복구용 아카이브 로그 파일로 복제하고, d) 상기 백업 서버는 크론을 실행하고 복구용 아카이브 로그 파일을 주기적으로 상기 운영 서버로부터 수신하고, e) 이미 사용된 복구용 아카이브 로그 파일을 삭제할 시간이 된 경우, 상기 백업 서버는 이미 사용된 복구용 아카이브 로그 파일을 삭제하고, f) 상기 복구용 아카이브 로그 파일을 적용할 시간이 되지 않은 경우, 상기 백업 서버는 계속하여 복구용 아카이브 로그 파일을 상기 운영 서버로부터 수신하고, 복구용 아카이브 로그 파일을 적용할 시간이 된 경우, 상기 백업 서버는 상기 복구용 데이터베이스를 마운트시키고, g) 상기 크론에 예약된 시간을 기준으로 특정 시간 간격이내에 상기 운영 서버로부터 복사된 복구용 아카이브 로그 파일이 존재하는 경우, 상기 백업 서버는 상기 복구용 아카이브 로그 파일을 복구용 데이터베이스가 인식하지 못하는 다른 파일명으로 변경하고, h) 상기 백업 서버는 상기 크론에 예약된 시간에서부터 특정 시간 간격이전에 상기 운영 서버로부터 복사된 복구용 아카이브 로그 파일을 상기 복구용 데이터베이스가 인식할 수 있는 파일명으로 원상복구하고, i) 복구를 시작하기 전에 이전 적용 과정에서 데이터파일 변경사항 기록이 존재하는 경우, 상기 백업 서버는 상기 복구용 데이터베이스에 변경 사항을 적용하고, j) 상기 백업 서버는 예약된 시간에서부터 특정 시간 간격이전에 상기 운영 서버로부터 복사된 복구용 아카이브 로그 파일을 순차적으로 상기 복구용 데이터베이스에 적용하여 복구하는 것을 특징으로 하는 데이터베이스 자동 복구 시스템.a) replicating the production database of the production server to the recovery database of the backup server; b) the production server runs a cron and generates an operational archive log file that records the history of the database. And c) if the scheduled replication time is not reached in the cron, the production server continues to generate the operational archive log file and waits until the scheduled time, and the clone time is reached in the cron. The operational server copies the operational archive log file generated by the scheduled replication time into the recovery archive log file of the backup server, and d) the backup server runs cron and restores the archive log file for recovery. Periodically receive from the production server, and e) delete already used archive log files for recovery. If so, the backup server deletes the already used recovery archive log file, and f) if it is not time to apply the recovery archive log file, the backup server continues to recall the recovery archive log file. When it is time to receive from the production server and apply a recovery archive log file, the backup server mounts the recovery database, g) from the production server within a certain time interval based on the time reserved for the cron. If there is a copied archive log file for recovery, the backup server changes the archive log file for recovery to another file name that is not recognized by the database for recovery, and h) the backup server specifies a specific time from the time reserved for the cron. Recovery archive copied from the production server before the time interval. Restore the file to a file name recognizable by the recovery database, and i) if a data file change record exists in the previous application before starting recovery, the backup server may write the changes to the recovery database. J) the backup server recovers by sequentially applying the recovery archive log file copied from the operation server to the recovery database before a specific time interval from the scheduled time. 제1항에 있어서,The method of claim 1, 상기 운영 서버와 상기 백업 서버는 지속적으로 운영이 가능한 고 가용성(High Availability; HA) 서버로 구성되는 것을 특징으로 하는 데이터베이스 자동 복구 시스템.The primary server and the backup server is a database automatic recovery system, characterized in that consisting of a high availability (HA) server that can be operated continuously. 제1항에 있어서,The method of claim 1, 상기 운영서버가 상기 백업서버의 기능을 겸하여 수행하는 것을 특징으로 하는 데이터베이스 자동 복구 시스템.And said operating server performs both functions of said backup server. 제1항에 있어서,The method of claim 1, 상기 운영용 데이터베이스와 상기 복구용 데이터베이스는 서로 구별하기 위한 고유의 ID인 SID(System IDentification)가 설정되어 있는 것을 특징으로 하는 데이터베이스 자동 복구 시스템.And said SID (System IDentification), which is a unique ID for distinguishing each other, from said operational database and said recovery database. 운영용 데이터베이스와 운영용 아카이브 로그 파일을 포함하는 운영 서버 및, 복구용 데이터베이스와 복구용 아카이브 로그 파일을 포함하는 백업서버를 구비하는 데이터베이스 복구 시스템의 데이터베이스 복구방법에 있어서,In a database recovery method of a database recovery system having an operating server including an operational database and an operational archive log file, and a backup server comprising a recovery database and an archive log file for recovery, a) 상기 운영 서버의 상기 운영용 데이터베이스를 상기 백업 서버의 상기 복구용 데이터베이스로 복제하는 단계;a) replicating the production database of the production server to the recovery database of the backup server; b) 상기 운영 서버는 크론(cron)을 실행하고, 데이터베이스의 이력이 기록된 운영용 아카이브 로그 파일을 생성하는 단계; b) the production server executes cron and generates an operational archive log file in which a history of the database is recorded; c) 상기 크론에서 예약된 복제 시간이 되지 않은 경우, 상기 운영 서버는 계속하여 상기 운영용 아카이브 로그 파일을 생성하면서 예약된 시간이 될 때까지 대기하고, 상기 크론에서 예약된 복제 시간이 된 경우, 상기 운영 서버는 상기 예약된 복제 시간까지 생성된 상기 운영용 아카이브 로그 파일을 상기 백업 서버의 상기 복구용 아카이브 로그 파일로 복제하는 단계;c) when the scheduled replication time is not reached in the cron, the production server continues to generate the operational archive log file and waits until the scheduled time, and when the scheduled replication time is reached in the cron, Replicating, by the primary server, the operational archive log file generated up to the scheduled replication time into the recovery archive log file of the backup server; d) 상기 백업 서버는 크론을 실행하고 복구용 아카이브 로그 파일을 주기적으로 상기 운영 서버로부터 수신하는 단계;d) running the cron by the backup server and periodically receiving an archive log file for recovery from the primary server; e) 이미 사용된 복구용 아카이브 로그 파일을 삭제할 시간이 된 경우, 상기 백업 서버는 이미 사용된 복구용 아카이브 로그 파일을 삭제하는 단계;e) when it is time to delete the already used archive archive log file, the backup server deleting the already used archive archive log file; f) 상기 복구용 아카이브 로그 파일을 적용할 시간이 되지 않은 경우, 상기 백업 서버는 계속하여 복구용 아카이브 로그 파일을 상기 운영 서버로부터 수신하고, 복구용 아카이브 로그 파일을 적용할 시간이 된 경우, 상기 백업 서버는 상기 복구용 데이터베이스를 마운트시키는 단계;f) when it is not time to apply the recovery archive log file, the backup server continues to receive a recovery archive log file from the operating server, and when it is time to apply the recovery archive log file, A backup server mounting the recovery database; g) 상기 크론에 예약된 시간을 기준으로 특정 시간 간격이내에 상기 운영 서버로부터 복사된 복구용 아카이브 로그 파일이 존재하는 경우, 상기 백업 서버는 상기 복구용 아카이브 로그 파일을 복구용 데이터베이스가 인식하지 못하는 다른 파일명으로 변경하는 단계;g) If there is a recovery archive log file copied from the operating server within a specific time interval based on the time reserved in the cron, the backup server may not recognize the recovery archive log file in another recovery database. Changing to a file name; h) 상기 백업 서버는 상기 크론에 예약된 시간에서부터 특정 시간 간격이전에 상기 운영 서버로부터 복사된 복구용 아카이브 로그 파일을 상기 복구용 데이터베이스가 인식할 수 있는 파일명으로 원상복구하는 단계;h) restoring, by the backup server, a recovery archive log file copied from the operation server before a specific time interval from the time reserved for the cron to a file name recognized by the recovery database; i) 복구를 시작하기 전에 이전 적용 과정에서 데이터파일 변경사항 기록이 존재하는 경우, 상기 백업 서버는 상기 복구용 데이터베이스에 변경 사항을 적용하는 단계; 및i) if a datafile change record exists in the previous application process before starting recovery, the backup server applying the change to the recovery database; And j) 상기 백업 서버는 예약된 시간에서부터 특정 시간 간격이전에 상기 운영 서버로부터 복사된 복구용 아카이브 로그 파일을 순차적으로 상기 복구용 데이터베이스에 적용하여 복구하는 단계를 포함하는 것을 특징으로 하는 데이터베이스 자동 복구방법.j) The backup server automatically recovers the database by applying the recovery archive log files copied from the operating server before the specified time interval from the scheduled time to the recovery database sequentially . 제5항에 있어서,The method of claim 5, 디스크 카피 솔루션을 사용할 경우 상기 a) 단계는,When using a disk copy solution, step a) above 상기 백업 서버는 상기 복구용 데이터베이스 작동을 종료하고 상기 복구용 데이터베이스가 상기 운영 서버에 접속되어 데이터 통신을 할 수 있도록 익스포트(export)하는 단계;Terminating the recovery database operation and exporting the recovery database so that the recovery database can be connected to the operation server for data communication; 상기 운영 서버는 디스크 카피 솔루션(disk copy solution)을 이용하여 운영용 데이터베이스를 복구용 데이터베이스 디스크로 복제하는 단계;The primary server replicating the operational database to a recovery database disk using a disk copy solution; 상기 운영용 데이터베이스와 상기 복구용 데이터베이스가 동일한 상태가 되면, 상기 운영 서버는 상기 운영용 데이터베이스를 백업상태로 전환하는 단계;When the production database and the recovery database are in the same state, the operation server converting the operation database to a backup state; 상기 디스크 카피 솔루션을 이용한 상기 운영용 데이터베이스의 상기 복구용 데이터베이스 디스크로 복제가 완료되면, 상기 운영 서버는 상기 운영용 데이터베이스를 백업상태에서 정상상태로 전환하는 단계;When the copying of the production database to the recovery database disk using the disk copy solution is completed, the operation server converting the production database from a backup state to a normal state; 상기 백업 서버는 상기 복제된 복구용 데이터베이스를 다시 작동하기 위하여 임포트(import)하는 단계;Importing, by the backup server, the replicated recovery database to operate again; 상기 백업 서버는 복구용 데이터 베이스의 콘트롤 파일(control file)을 생성하는 단계; 및Generating, by the backup server, a control file of a recovery database; And 상기 운영 서버는 상기 복구용 데이터베이스가 상기 백업 서버(200)와 연동하여 작동할 수 있도록 마운트시키는 단계를 포함하는 것을 특징으로 하는 데이터베이스 자동 복구 방법.The operation server comprises the step of mounting the recovery database to operate in conjunction with the backup server 200, characterized in that the automatic database recovery method. 제5항에 있어서,The method of claim 5, 일반 카피 명령어를 사용할 경우 상기 a) 단계는,When using the normal copy command, step a) 상기 백업 서버는 상기 복구용 데이터베이스 작동을 종료하고 상기 운영 서버는 상기 운영용 데이터베이스를 백업상태로 전환하는 단계;The backup server terminating the recovery database operation and the operation server converting the operation database to a backup state; 상기 운영 서버는 일반 카피 명령어를 이용하여 운영용 데이터베이스를 복구용 데이터베이스 디스크로 복제하는 단계;The primary server replicating the operational database to a recovery database disk using a general copy command; 상기 일반 카피 명령어를 이용한 상기 운영용 데이터베이스의 상기 복구용 데이터베이스 디스크로 복제가 완료되면, 상기 운영 서버는 상기 운영용 데이터베이스를 백업상태에서 정상상태로 전환하는 단계;When the copying of the production database to the recovery database disk using the general copy command is completed, the operation server converting the operation database from a backup state to a normal state; 상기 백업 서버는 복구용 데이터 베이스의 콘트롤 파일(control file)을 생성하는 단계; 및Generating, by the backup server, a control file of a recovery database; And 상기 운영 서버는 상기 복구용 데이터베이스가 상기 백업 서버(200)와 연동하여 작동할 수 있도록 마운트시키는 단계를 포함하는 것을 특징으로 하는 DBMS의 데이터베이스 자동 복구 방법.The operation server is a database automatic recovery method of the DBMS, characterized in that it comprises the step of mounting the recovery database to operate in conjunction with the backup server (200). 삭제delete 삭제delete 제5항에 있어서,The method of claim 5, 상기 j) 단계에서 데이터베이스 복구가 진행 중에 상기 백업 서버는 데이터파일의 변경사항이 발생하는지를 검사하여,In step j), while the database recovery is in progress, the backup server checks whether a change of the data file occurs. 상기 변경사항이 발생하는 경우에는 상기 백업 서버는 상기 복구용 데이터베이스 복구를 중단하고 상기 변경사항을 기록한 후 데이터베이스 복구를 종료하고,When the change occurs, the backup server stops restoring the database for recovery, records the change, and ends database recovery. 상기 변경사항이 발생하지 않는 경우에는 상기 백업 서버는 순차적으로 상기 복구용 아카이브 로그 파일을 상기 복구용 데이테베이스에 적용하여 복구하는 단계를 더 포함하는 것을 특징으로 하는 데이터베이스 자동 복구 방법.And if the change does not occur, the backup server sequentially applying the recovery archive log file to the recovery database and recovering the recovery log file.
KR1020030057773A 2003-08-21 2003-08-21 Auto-tracing recovery system of database of database management system and method thereof KR100673233B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020030057773A KR100673233B1 (en) 2003-08-21 2003-08-21 Auto-tracing recovery system of database of database management system and method thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020030057773A KR100673233B1 (en) 2003-08-21 2003-08-21 Auto-tracing recovery system of database of database management system and method thereof

Publications (2)

Publication Number Publication Date
KR20050020105A KR20050020105A (en) 2005-03-04
KR100673233B1 true KR100673233B1 (en) 2007-01-22

Family

ID=37229073

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020030057773A KR100673233B1 (en) 2003-08-21 2003-08-21 Auto-tracing recovery system of database of database management system and method thereof

Country Status (1)

Country Link
KR (1) KR100673233B1 (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111061594A (en) * 2019-12-02 2020-04-24 上海浪擎信息科技有限公司 Log logic analysis-based relational database data replication method
CN116909816B (en) * 2023-09-13 2024-01-09 腾讯科技(深圳)有限公司 Database recovery method and device, storage medium and electronic equipment

Also Published As

Publication number Publication date
KR20050020105A (en) 2005-03-04

Similar Documents

Publication Publication Date Title
CN107145403B (en) Relational database data backtracking method oriented to Web development environment
KR100983300B1 (en) Recovery from failures within data processing systems
US7634679B2 (en) Remote location failover server application
US6983295B1 (en) System and method for database recovery using a mirrored snapshot of an online database
US6981177B2 (en) Method and system for disaster recovery
US8250033B1 (en) Replication of a data set using differential snapshots
US7933872B2 (en) Database backup, refresh and cloning system and method
US6411969B1 (en) Enhanced system and method for management of system database utilities
US6560615B1 (en) Method and apparatus for implementing a highly efficient, robust modified files list (MFL) for a storage system volume
US8082229B2 (en) Methods for backing up a database
US20070043973A1 (en) Isolating and storing configuration data for disaster recovery for operating systems providing physical storage recovery
US5632027A (en) Method and system for mass storage device configuration management
US20060294421A1 (en) Isolating and storing configuration data for disaster recovery
US20060294420A1 (en) Isolating and storing configuration data for disaster recovery
US8762347B1 (en) Method and apparatus for processing transactional file system operations to enable point in time consistent file data recreation
CN112099989A (en) Disaster recovery, migration and recovery method for Kubernetes cloud native application
CN101883135A (en) Selective mirroring method
CN107229540A (en) A kind of database restoring method and system based on time point
CN111367994A (en) Method and system for synchronously backing up incremental data of database
CN110928728A (en) Virtual machine copying and switching method and system based on snapshot
CN112800019A (en) Data backup method and system based on Hadoop distributed file system
CN102708166B (en) Data replication method, data recovery method and data recovery device
US20070043969A1 (en) Isolating and storing configuration data for disaster recovery for operating systems providing physical storage recovery
US7831564B1 (en) Method and system of generating a point-in-time image of at least a portion of a database
US20050262033A1 (en) Data recording apparatus, data recording method, program for implementing the method, and program recording medium

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E601 Decision to refuse application
J201 Request for trial against refusal decision
J301 Trial decision

Free format text: TRIAL DECISION FOR APPEAL AGAINST DECISION TO DECLINE REFUSAL REQUESTED 20051109

Effective date: 20061124

S901 Examination by remand of revocation
GRNO Decision to grant (after opposition)
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20130108

Year of fee payment: 7

FPAY Annual fee payment

Payment date: 20140103

Year of fee payment: 8

FPAY Annual fee payment

Payment date: 20141231

Year of fee payment: 9

FPAY Annual fee payment

Payment date: 20151228

Year of fee payment: 10

LAPS Lapse due to unpaid annual fee