KR20100134355A - A method for recovering logical data errors in database - Google Patents

A method for recovering logical data errors in database Download PDF

Info

Publication number
KR20100134355A
KR20100134355A KR1020090052943A KR20090052943A KR20100134355A KR 20100134355 A KR20100134355 A KR 20100134355A KR 1020090052943 A KR1020090052943 A KR 1020090052943A KR 20090052943 A KR20090052943 A KR 20090052943A KR 20100134355 A KR20100134355 A KR 20100134355A
Authority
KR
South Korea
Prior art keywords
log
data
transaction
database
file
Prior art date
Application number
KR1020090052943A
Other languages
Korean (ko)
Other versions
KR101071484B1 (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 KR1020090052943A priority Critical patent/KR101071484B1/en
Publication of KR20100134355A publication Critical patent/KR20100134355A/en
Application granted granted Critical
Publication of KR101071484B1 publication Critical patent/KR101071484B1/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
    • HELECTRICITY
    • H04ELECTRIC COMMUNICATION TECHNIQUE
    • H04LTRANSMISSION OF DIGITAL INFORMATION, e.g. TELEGRAPHIC COMMUNICATION
    • H04L67/00Network arrangements or protocols for supporting network services or applications
    • H04L67/01Protocols
    • H04L67/06Protocols specially adapted for file transfer, e.g. file transfer protocol [FTP]

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Networks & Wireless Communication (AREA)
  • Signal Processing (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

PURPOSE: A method for recovering logical data errors in data base is provided to reduce a time for receiving logical data errors by rapidly searching transactions with the logical data errors. CONSTITUTION: Database(1) generates Redo-log files(2) with respect to results for processing the requirement of a user. An archived redo-log file(3) is generated from the redo-log films in a full state. A system server agent(4) is in connection with the database. The system server agent extracts new data from the redo-log files based on the requirement of the user. Index and log data(5) are generated based on transaction. A system client(6) downloads the index data through FTP.

Description

데이터베이스의 논리적 데이터 오류 복구방법{A METHOD FOR RECOVERING LOGICAL DATA ERRORS IN DATABASE}How to recover from logical data errors in a database {A METHOD FOR RECOVERING LOGICAL DATA ERRORS IN DATABASE}

본 발명은 사용자의 잘못에 의해 데이터베이스에 논리적인 데이터 오류가 발생할 경우 이를 복구하기 위한 방법에 관한 것으로, 특히 논리적 데이터 오류에 대해 신속히 검색 및 복구를 수행할 수 있도록 된 데이터베이스의 논리적 데이터 오류 복구방법에 관한 것이다.The present invention relates to a method for recovering a logical data error in a database caused by a user's fault. In particular, the present invention relates to a method for recovering a logical data error of a database, which is capable of quickly searching for and recovering from a logical data error. It is about.

일반적으로 논리적인 데이터 오류가 발생한 경우, 해당 오류의 개략적인 발생 시점의 다수의 어카이브드 로그(Archived Log) 파일을 대상으로 하여 발생 원인이 되는 데이터베이스 테이블에 대한 Redo SQL 문장을 분석해서, Redo SQL문장이 유사하다고 추정되는 모든 자료를 별도의 파일 정보로 생성하고, 생성된 자료를 일일이 확인하여 복구하는 SQL문을 편집하여 DBMS(Database Management System)에 반영하는 방식으로 에러를 복구하였다.In general, when a logical data error occurs, the Redo SQL statement is analyzed by analyzing the Redo SQL statements for the database table that caused the error by targeting a number of archived log files at the time of the general occurrence of the error. The error was recovered by generating all the data that are presumed to be similar as separate file information, editing the SQL statement to check and recover the generated data, and reflecting it in the DBMS (Database Management System).

이때, 복구의 대상이 되는 정확한 트랜잭션(Transaction)을 검색하는데 많은 시간이 소요되고, 복구를 위한 SQL 문장을 재작성하고 검증하는 데에도 많은 시간이 소요되게 된다.At this time, it takes a lot of time to search for the correct transaction that is the target of recovery, and a lot of time to rewrite and verify the SQL statement for recovery.

또, 다른 방법으로서는 현재 시점의 데이터베이스를 백업하고, 논리적 손상 발생 이전의 데이터베이스 백업이 존재하는 경우 논리적 손상이 발생되기 이전 최종 백업(Backup)으로 데이터베이스(Database)를 복원한 후, 논리적 손상이 발생되기 직전 시점까지 복구를 진행한다. 그리고, 해당 논리적 손상이 된 데이터를 추출하고, 현재 시점 백업으로 복원한 후 추출된 데이터를 입력하도록 한다. 그러나, 이러한 경우에는 DBMS를 정상적으로 운영할 수 없는 상태에 이르게 됨으로써 복구에 소요되는 시간 뿐만 아니라, 운영 상에도 많은 문제를 야기시키게 된다.Alternatively, back up the database at the present time, and if there is a database backup before the logical corruption, restore the database to the last backup before the logical corruption occurs, and then the logical corruption occurs. Restore to the last point. Then, the data that has been logically damaged is extracted, restored to the current point-in-time backup, and the extracted data is input. In this case, however, the DBMS cannot be operated normally, which causes many problems not only in time required for recovery but also in operation.

본 발명은 상기한 점을 감안하여 발명된 것으로, 사용자의 잘못에 의해 데이터베이스에 논리적인 데이터 오류가 발생할 경우 신속히 검색 및 복구를 수행할 수 있도록 된 데이터베이스의 논리적 데이터 오류 복구방법을 제공함에 그 목적이 있다.SUMMARY OF THE INVENTION The present invention has been made in view of the above, and an object of the present invention is to provide a method for recovering a logical data error of a database, which enables a user to quickly search and recover a logical data error due to a user's error. have.

상기 목적을 달성하기 위한 본 발명에 따른 데이터베이스의 논리적 데이터 오류 복구방법은, 데이터베이스를 시작한 상태에서, 서버를 시작해서 로그를 생성할 데이터베이스 서버에 접속한 다음, 데이터베이스에서 현재 로깅 중인 Currnet Redo Log 정보를 설정하고, 최종 로깅한 로그 번호 이후의 어카이브드 로그 정보를 설정하는 단계(단계 201∼203)와, 최종 커미트 SCN 이후의 로그 데이터를 선택하는 단계(단계 204), 상기 단계 204에 의해 신규로 커미트된 로그 데이터가 존재하는가의 여부를 확인하는 단계(단계 205) 및, 상기 단계 205에서 신규로 커미트된 로그 데이터가 존재하는 경우로 확인될 경우, 생성된 로그 파일을 저장하고, 이어 트랜잭션 단위의 신속한 검색을 할 수 있도록 트랜잭션 기준으로 인덱스 파일을 생성해서 저장하는 단계(단계 206∼207)를 갖춘 서버 처리 과정과;In the logical data error recovery method of the database according to the present invention for achieving the above object, in the state of starting the database, the server is started, connected to the database server to generate a log, and then the Currnet Redo Log information currently being logged in the database Setting and setting archived log information after the last logged log number (steps 201 to 203), selecting log data after the last committed SCN (step 204), and committing newly by step 204 (Step 205), if it is confirmed that there is a newly committed log data in step 205, and saves the generated log file, and then quickly Creating and saving an index file on a transaction basis so that a search can be performed (steps 206 to 207). Equipped server processing process;

정보를 가져올 데이터베이스 및 시스템의 서버자료 수신용 FTP 서버에 접속하고, 사용자의 실수에 의한 논리적 데이터 손실이 발생한 경우 해당 일시 및 접속 한 컴퓨터 정보를 근거로 하여 트랜잭션 검색을 실행해서 복구 대상을 검색하는 단계(단계 301∼302)와, 서버로부터 클라이언트 PC에 존재하지 않거나 변경된 검색을 처리하기 위해 시스템 서버로부터 FTP를 이용하여 복구 대상 파일인 인덱스 파일 및/또는 로그 파일을 다운로드 받는 단계(단계 303), 논리적으로 손실된 데이터가 발생한 트랜잭션이 확인되면, 복구 대상 트랜잭션 정보를 표시하는 단계(단계 304), 상기 단계 304에서 복구 대상 트랜잭션으로 확인된 경우, 해당 트랜잭션에 대하여 선택적 또는 일괄로 Undo SQL을 실행해서, 복구 대상 트랜잭션을 일괄적으로 복구하는 단계(단계 305), 상기 단계 305에서의 일괄 복구 처리가 정상적으로 처리되었는가의 여부를 확인하는 단계(단계 306), 상기 단계 306에서 일괄 복구 처리가 정상적으로 처리되지 않은 것으로 확인된 경우에는 오류 데이터에 대해 롤백 처리를 하고, 상기 단계 306에서 정상적으로 처리되지 않은 내역에 대한 오류 로그 파일을 확인해서 다시 작업이 가능하도록 상기 단계 304로 진행하는 단계(단계 307∼308) 및, 상기 단계 306에서 일괄 복구 처리가 정상적으로 처리된 자료에 대하여 커미트 여부를 결정해서, 커미트한 경우에는 바로 클라이언트 처리를 종료하고, 커미트하지 않은 경우에는 롤백 처리를 한 다음 클라이언트 처리를 종료하는 단계(단계 309∼310)를 갖춘 클라이언트 처리 과정;을 갖추어 이루어진다.Accessing FTP server for receiving server data of database and system to import information, and searching for recovery target by executing transaction search based on the relevant date and time and connected computer information when logical data loss occurs due to user's mistake (Steps 301 to 302), and downloading an index file and / or a log file which is a recovery target file using FTP from the system server to process a search that does not exist or has changed on the client PC from the server (step 303). When the transaction that has lost the data is confirmed, the step of displaying the recovery target transaction information (step 304), if confirmed as the recovery target transaction in step 304, by executing Undo SQL selectively or collectively for the transaction, Collectively recovering the recovery target transaction (step 305); Checking whether the batch recovery process in step 305 has been normally processed (step 306). If it is confirmed in step 306 that the batch recovery process has not been processed normally, the rollback process is performed on the error data; Step 306 (steps 307 to 308) to check the error log file for the details that were not processed normally at step 306 (steps 307 to 308) so that the operation can be performed again, and commits to the data whose batch recovery process is normally processed at step 306. Determining whether or not to commit, immediately ending the client process, and if not, performing a rollback process and terminating the client process (steps 309 to 310).

또한 본 발명은, 상기 단계 204에서의 최종 커미트 SCN 이후의 로그 데이터의 선택이, 단계 202 및 단계 203의 Current Redo Log 및 Archived Log로부터 최종 선택한 SCN 다음의 SCN으로부터 신규로 커미트된 SCN 로그 데이터를 선택하는 것을 특징으로 한다.In addition, the present invention, the selection of the log data after the last commit SCN in step 204, the newly committed SCN log data from the SCN following the last selected SCN from the Current Redo Log and Archived Log of steps 202 and 203 Characterized in that.

또한 본 발명은, 상기 단계 206에서 생성된 로그 파일 저장시, SQL 데이터는 압축을 하고, 로그 파일은 로그시간, 트랜잭션 ID, 접속정보, Redo, Undo Data를 포함하는 것을 특징으로 한다.In addition, the present invention, when storing the log file generated in the step 206, SQL data is compressed, the log file is characterized in that the log time, transaction ID, access information, Redo, Undo Data.

또한 본 발명은, 상기 단계 207에서 트랜잭션 기준으로 인덱스 파일을 생성해서 저장시, 트랜잭션의 단위는 각 DBMS에서 제공하는 트랜잭션 단위를 사용하고, 인덱스 파일은 트랜잭션에 대한 사용자 정보 및 로그 파일 정보를 포함하는 것을 특징으로 한다.In addition, the present invention, when generating and storing the index file on a transaction basis in the step 207, the unit of the transaction uses a transaction unit provided by each DBMS, the index file includes user information and log file information for the transaction It is characterized by.

또한 본 발명은, 상기 단계 303에서 인덱스 파일은 단계 207에서 생성된 파일을 FTP를 이용하여 다운받고, 로그 파일은 단계 206에서 생성된 파일을 FTP를 이용하여 다운받는 것을 특징으로 한다.The present invention is characterized in that in step 303, the index file is downloaded using FTP and the file generated in step 207 is downloaded, and the log file is downloaded using FTP.

본 발명에 따르면, 사용자의 잘못에 의해 데이터베이스에 논리적인 데이터 오류가 발생할 경우, 신속하게 논리적 데이터 오류가 발생한 트랜잭션을 검색할 수 있고, 신속하게 복구를 할 수 있기 때문에, 사용자의 논리적 데이터 오류의 복구에 소요되는 시간을 획기적으로 단축할 수 있게 된다.According to the present invention, when a logical data error occurs in the database due to a user's error, the user can quickly search for a transaction in which the logical data error has occurred and quickly recover the data, thereby recovering the user's logical data error. The time required for this can be significantly shortened.

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

도 1은 본 발명의 실시예에 따른 데이터베이스의 논리적 데이터 오류 복구 시스템의 개략 블록도이다.1 is a schematic block diagram of a logical data error recovery system of a database according to an embodiment of the present invention.

데이터베이스(1; DB)에서 사용자의 요구사항에 대한 처리 결과에 대하여 LGWR(Log Writer)이 Redo 로그 파일(2)을 생성하고, Redo 로그 파일(2)이 풀(Full)로 되면, 로그 스위치를 하면서 ARCn(Archive Process)이 풀로 된 Redo 로그로부터 Archived Redo 로그 파일(3)을 생성한다.When the LGWR (Log Writer) creates a Redo log file (2) and the Redo log file (2) becomes full, the log switch is turned on. ARCn (Archive Process) creates Archived Redo log files (3) from the pooled Redo logs.

시스템 서버 에이전트(4)는 데이터베이스에 접속하여 Redo 로그 파일(2)로부터 사용자 요구에 의한 신규 데이터를 추출하고, 로그 스위치 발생에 의하여 Archived Redo 로그 파일(3)에도 신규 데이터가 존재하는 경우 해당 데이터도 추출한다. 그리고, 추출된 데이터를 트랜잭션 기준의 인덱스 및 로그 데이터(5)를 생성한다.The system server agent 4 accesses the database and extracts new data at the user's request from the redo log file 2, and if the new data also exists in the archived redo log file 3 due to the log switch generation, the corresponding data is also displayed. Extract. The extracted data is then used to generate index based on the transaction and log data 5.

시스템 클라이언트(6)는 복구를 위한 검색시 서버에 저장된 인덱스(Index) 데이터를 FTP를 통해 다운받는다. 다운받은 인덱스를 통해 해당 시간대의 트랜잭션(Transaction)에 대한 접속 정보 및 집계 정보를 표시하고, 복구 대상 트랜잭션을 확인한다. 확인된 트랜잭션을 선택하면 해당 로그 데이터를 FTP를 통해 서버로부터 다운받는다. 다운받은 로그 데이터를 확인한 후, DB에 접속해서 일괄적으로 복구하거나 선택적으로 복구한다.The system client 6 downloads the index data stored in the server through FTP when searching for recovery. Through the downloaded index, access information and aggregate information about transactions in the corresponding time zone are displayed and the recovery target transaction is checked. If you select a confirmed transaction, the log data is downloaded from the server via FTP. After checking the downloaded log data, connect to DB and recover collectively or selectively.

도 2는 본 발명의 실시예에 따른 데이터베이스의 논리적 오류 복구 방법을 구현하기 위한 흐름도이다.2 is a flowchart for implementing a logical error recovery method of a database according to an embodiment of the present invention.

먼저, 데이터베이스(DB)를 시작해서 사용자의 요구를 처리하고, 데이터베이스 로그(DB Log) 버퍼를 기록하며, Redo Log를 생성하고, 어카이브 로그(Archive Log)를 생성한 상태에서, 서버측 처리로서, 먼저 서버를 시작해서 로그를 생성할 데이터베이스 서버(Database Server)에 접속한다(단계 201).First, as a server-side process, start the database (DB), process the user's request, record the database log buffer, create the redo log, and generate the archive log. First, start the server and connect to a database server to generate a log (step 201).

이어, 데이터베이스에서 현재 로깅(Logging) 중인 Currnet Redo Log 정보를 설정하고(단계 202), 최종 로깅한 로그 번호 이후의 어카이브드 로그(Archived Log) 정보를 설정한다(단계 203).Next, Currnet Redo Log information currently being logged in the database is set (step 202), and archived log information after the last logged log number is set (step 203).

이어, 오라클(Oracle)의 로그마이너(Logminer)를 활용하여 최종 커미트(Commit) SCN 이후의 로그 데이터(Log Data)를 선택한다(단계 204). 여기서, 상기 단계 202 및 단계 203의 Current Redo Log 및 Archived Log로부터 최종 선택한 SCN 다음의 SCN으로부터 신규로 커미트된 SCN Log Data를 선택한다.Then, Oracle uses Logminer to select log data after the last commit SCN (step 204). Here, the newly committed SCN Log Data is selected from the SCN following the last selected SCN from the Current Redo Log and Archived Log in steps 202 and 203.

상기 단계 204에 의해 신규로 커미트된 로그 데이터가 존재하는가의 여부를 확인해서, 신규로 커미트된 로그 데이터가 존재하지 않는 경우에는 단계 202로 되돌아가서 상기 단계들을 다시 수행하고, 신규로 커미트된 로그 데이터가 존재하는 경우에는 단계 206으로 진행한다(단계 205).In step 204, it is checked whether the newly committed log data exists. If there is no newly committed log data, the process returns to step 202 to perform the above steps again, and newly committed log data. If is present, the process proceeds to step 206 (step 205).

상기 단계 205에서 신규로 커미트된 로그 데이터가 존재하는 경우로 확인되면, 생성된 로그 파일을 저장한다(단계 206). 여기서, 로그 파일저장시 SQL 데이터는 압축을 한다. 그리고, 로그 파일은 로그시간, 트랜잭션 ID, 접속정보, Redo, Undo Data를 포함한다.If it is confirmed in the step 205 that the newly committed log data exists, the generated log file is stored (step 206). Here, SQL data is compressed when log files are saved. The log file includes log time, transaction ID, access information, redo, and undo data.

이어, 트랜잭션 단위의 신속한 검색을 할 수 있도록 트랜잭션 기준으로 인덱스 파일을 생성해서 저장한다(단계 207). 이때, 트랜잭션의 단위는 각 DBMS에서 제공하는 트랜잭션 단위를 사용한다. 그리고, 인덱스 파일은 트랜잭션에 대한 사 용자 정보 및 로그 파일 정보를 포함한다.Subsequently, an index file is generated and stored on a transaction basis so as to perform a quick search of a transaction unit (step 207). At this time, the unit of transaction uses a transaction unit provided by each DBMS. The index file includes user information and log file information about the transaction.

인덱스 1 : 트랜잭션 정보, 접속정보(PC 정보,IP, DBUSER, 실행프로그램 등), 처리시작, 종료시간을 기준으로 하여 발생한 DML(Data Manipulation Language)별 처리 건수 및 기타 건수를 집계하는 요약정보 파일을 생성한다. 또한, 해당 요약정보 파일에는 발생한 로그 파일의 해당 트랜잭션에 대한 시작과 종료 정보를 포함한다.Index 1: Summary information file that aggregates the number of processing and other cases by DML (Data Manipulation Language) based on transaction information, access information (PC information, IP, DBUSER, execution program, etc.), processing start and end time Create In addition, the summary information file includes start and end information of the corresponding transaction of the generated log file.

인덱스2 : 트랜잭션 정보, 접속정보, 처리시작, 종료시간, 소유자(Object Owner), Object를 기준으로 한 처리 유형별(예, Insert, Update, Delete 등…) 건수를 집계하는 요약정보 파일을 생성한다. 또한, 해당 요약정보 파일에는 발생한 로그 파일의 해당 트랜잭션에 대한 시작과 종료 정보를 포함한다.Index 2: Creates a summary information file that counts the number of transaction information, access information, processing start, end time, owner (Object Owner), and type of processing based on Object (eg, Insert, Update, Delete, etc.). In addition, the summary information file includes start and end information of the corresponding transaction of the generated log file.

이어, 클라이언트측 처리로서, 먼저 정보를 가져올 데이터베이스 및 시스템의 서버자료 수신용 FTP(File Transfer Protocol) 서버에 접속하고(단계 301), 사용자의 실수에 의한 논리적 데이터 손실이 발생한 경우 해당 일시 및 접속한 컴퓨터 정보를 근거로 하여 트랜잭션 검색을 실행해서 복구 대상을 검색한다(단계 302).Next, as a client-side process, first, a server (File Transfer Protocol) server for receiving server data of a database and a system from which information is to be imported is connected (step 301). A transaction search is executed based on the computer information to search for a recovery target (step 302).

이어, 서버로부터 클라이언트 PC에 존재하지 않거나 변경된 검색을 처리하기 위해 시스템 서버로부터 FTP를 이용해서 복구 대상 파일인 인덱스 파일 및/또는 로그 파일을 다운로드 받는다(단계 303). 즉, 검색조건을 확인하여, 검색에 필요한 인덱스파일 및 로그 파일을 다운 받은 후 검색을 실행하게 되는데, 인덱스 파일은 단계 207에서 생성된 파일을 FTP를 이용하여 다운받고, 로그 파일은 단계 206에서 생성된 파일을 FTP를 이용하여 다운받는다. Then, the index file and / or log file, which is a recovery target file, are downloaded from the system server using FTP to process a search that does not exist or has changed on the client PC from the server (step 303). That is, after checking the search condition, the index file and the log file required for the search are downloaded and the search is executed. The index file is downloaded using FTP and the log file is generated in step 206. Download the downloaded file using FTP.

이어, 사용자는 논리적으로 손실된 데이터가 발생한 트랜잭션을 확인해서, 복구 대상 트랜잭션 정보를 표시한다(단계 304). 이 때, 접속 컴퓨터, 접속 DB 사용자, 처리한 테이블 명, DML 처리 건수 및, 처리된 SQL을 확인한다.The user then identifies the transaction in which the logically lost data occurred, and displays the recovery target transaction information (step 304). At this time, check the connected computer, connected DB user, processed table name, the number of DML processing, and processed SQL.

상기 단계 304에서 복구 대상 트랜잭션으로 확인된 경우, 해당 트랜잭션에 대하여 선택적 또는 일괄로 Undo SQL을 실행해서, 복구 대상 트랜잭션을 일괄적으로 복구한다(단계 305).When it is confirmed in step 304 that the recovery target transaction, Undo SQL is selectively or collectively executed for the transaction to recover the recovery target transaction in a batch (step 305).

상기 단계 305에서의 일괄 복구 처리가 정상적으로 처리되었는가의 여부를 확인하여, 정상적으로 처리되지 않은 경우에는 단계 307로 진행하고, 정상적으로 처리된 경우에는 단계 309로 진행한다(단계 306).It is checked whether the batch recovery process in step 305 has been normally processed, and if not normally proceeded to step 307, and if normally processed, step 309 (step 306).

상기 단계 306에서 일괄 복구 처리가 정상적으로 처리되지 않은 것으로 확인된 경우에는 오류 데이터에 대해 롤백(Rollback) 처리를 한다(단계 307).If it is confirmed in step 306 that the batch recovery process is not normally processed, a rollback process is performed on the error data (step 307).

이어, 상기 단계 307에서의 롤백 처리에 의해 단계 306에서 정상적으로 처리되지 않은 내역에 대한 오류 로그 파일을 확인하고, 다시 작업이 가능하도록 단계 304로 진행한다(단계 308).Then, the error log file for the details not processed normally in step 306 by the rollback process in step 307 is checked, and the process proceeds to step 304 again to enable work (step 308).

상기 단계 306에서 일괄 복구 처리가 정상적으로 처리된 자료에 대하여 커미트 여부를 결정하고(단계 309), 커미트한 경우에는 바로 클라이언트 처리를 종료한다. 한편, 상기 단계 309에서 커미트하지 않은 경우에는 롤백 처리를 하고(단계 310), 클라이언트 처리를 종료한다.In step 306, it is determined whether or not to commit the data to which the batch recovery process is normally processed (step 309), and when it is committed, the client processing ends immediately. On the other hand, if it is not committed in step 309, the rollback process is performed (step 310), and the client process is terminated.

도 1은 본 발명의 실시예에 따른 데이터베이스의 논리적 데이터 오류 복구 시스템의 개략 블록도이다.1 is a schematic block diagram of a logical data error recovery system of a database according to an embodiment of the present invention.

도 2는 본 발명의 실시예에 따른 데이터베이스의 논리적 오류 복구 방법을 구현하기 위한 흐름도이다.2 is a flowchart for implementing a logical error recovery method of a database according to an embodiment of the present invention.

Claims (5)

데이터베이스를 시작한 상태에서, 서버를 시작해서 로그를 생성할 데이터베이스 서버에 접속한 다음, 데이터베이스에서 현재 로깅 중인 Currnet Redo Log 정보를 설정하고, 최종 로깅한 로그 번호 이후의 어카이브드 로그 정보를 설정하는 단계(단계 201∼203)와,After starting the database, start the server, connect to the database server to generate logs, set the Currnet Redo Log information currently being logged in the database, and set the archive log information after the last logged log number ( Steps 201 to 203), 최종 커미트 SCN 이후의 로그 데이터를 선택하는 단계(단계 204),Selecting log data after the last commit SCN (step 204), 상기 단계 204에 의해 신규로 커미트된 로그 데이터가 존재하는가의 여부를 확인하는 단계(단계 205) 및,Checking whether the newly committed log data exists in step 204 (step 205), and 상기 단계 205에서 신규로 커미트된 로그 데이터가 존재하는 경우로 확인될 경우, 생성된 로그 파일을 저장하고, 이어 트랜잭션 단위의 신속한 검색을 할 수 있도록 트랜잭션 기준으로 인덱스 파일을 생성해서 저장하는 단계(단계 206∼207)를 갖춘 서버 처리 과정과;If it is determined in step 205 that the newly committed log data exists, storing the generated log file, and then generating and storing the index file on a transaction basis so as to perform a quick search of the transaction unit (step Server processing with 206 to 207; 정보를 가져올 데이터베이스 및 시스템의 서버자료 수신용 FTP 서버에 접속하고, 사용자의 실수에 의한 논리적 데이터 손실이 발생한 경우 해당 일시 및 접속한 컴퓨터 정보를 근거로 하여 트랜잭션 검색을 실행해서 복구 대상을 검색하는 단계(단계 301∼302)와,Accessing FTP server for receiving server data of database and system to import information, and searching for recovery target by executing transaction search based on the relevant date and time and connected computer information when logical data loss occurs due to user's mistake (Steps 301 to 302), 서버로부터 클라이언트 PC에 존재하지 않거나 변경된 검색을 처리하기 위해 시스템 서버로부터 FTP를 이용하여 복구 대상 파일인 인덱스 파일 및/또는 로그 파일을 다운로드 받는 단계(단계 303),Downloading an index file and / or a log file, which is a recovery target file, using FTP from the system server to process a search that does not exist or has changed on the client PC from the server (step 303), 논리적으로 손실된 데이터가 발생한 트랜잭션이 확인되면, 복구 대상 트랜잭션 정보를 표시하는 단계(단계 304),If a transaction that has logically lost data is identified, displaying recovery target transaction information (step 304), 상기 단계 304에서 복구 대상 트랜잭션으로 확인된 경우, 해당 트랜잭션에 대하여 선택적 또는 일괄로 Undo SQL을 실행해서, 복구 대상 트랜잭션을 일괄적으로 복구하는 단계(단계 305),If it is confirmed in step 304 that the recovery target transaction, by executing Undo SQL selectively or collectively for the transaction, to recover the recovery target transaction (step 305), 상기 단계 305에서의 일괄 복구 처리가 정상적으로 처리되었는가의 여부를 확인하는 단계(단계 306),Checking whether or not the batch recovery process in step 305 has been normally processed (step 306), 상기 단계 306에서 일괄 복구 처리가 정상적으로 처리되지 않은 것으로 확인된 경우에는 오류 데이터에 대해 롤백 처리를 하고, 상기 단계 306에서 정상적으로 처리되지 않은 내역에 대한 오류 로그 파일을 확인해서 다시 작업이 가능하도록 상기 단계 304로 진행하는 단계(단계 307∼308) 및,If it is determined in step 306 that the batch recovery process has not been processed normally, a rollback process is performed on the error data, and in step 306, the error log file for the details that have not been processed normally may be checked so that the operation can be performed again. Proceeding to 304 (steps 307 to 308), and 상기 단계 306에서 일괄 복구 처리가 정상적으로 처리된 자료에 대하여 커미트 여부를 결정해서, 커미트한 경우에는 바로 클라이언트 처리를 종료하고, 커미트하지 않은 경우에는 롤백 처리를 한 다음 클라이언트 처리를 종료하는 단계(단계 309∼310)를 갖춘 클라이언트 처리 과정;을 갖추어 이루어진 것을 특징으로 하는 데이터베이스의 논리적 데이터 오류 복구방법.In step 306, it is determined whether or not the batch recovery process has been committed, and if it is committed, immediately terminates client processing; otherwise, rolls back and then ends client processing (step 309). Client processing process; and a logical data error recovery method of a database, characterized in that consisting of. 제1항에 있어서, 상기 단계 204에서의 최종 커미트 SCN 이후의 로그 데이터의 선택이, 단계 202 및 단계 203의 Current Redo Log 및 Archived Log로부터 최종 선택한 SCN 다음의 SCN으로부터 신규로 커미트된 SCN 로그 데이터를 선택하는 것을 특징으로 하는 데이터베이스의 논리적 데이터 오류 복구방법.2. The method of claim 1, wherein the selection of log data after the last committed SCN in step 204 further comprises the newly committed SCN log data from the SCN following the last selected SCN from the Current Redo Log and Archived Log of steps 202 and 203. A method for recovering from logical data errors in a database, characterized in that the selection is made. 제1항에 있어서, 상기 단계 206에서 생성된 로그 파일 저장시, SQL 데이터는 압축을 하고, 로그 파일은 로그시간, 트랜잭션 ID, 접속정보, Redo, Undo Data를 포함하는 것을 특징으로 하는 데이터베이스의 논리적 데이터 오류 복구방법.According to claim 1, When storing the log file generated in the step 206, the SQL data is compressed, the log file includes a log time, transaction ID, access information, Redo, Undo Data logical of the database, characterized in that How to recover from data errors. 제1항에 있어서, 상기 단계 207에서 트랜잭션 기준으로 인덱스 파일을 생성해서 저장시, 트랜잭션의 단위는 각 DBMS에서 제공하는 트랜잭션 단위를 사용하고, 인덱스 파일은 트랜잭션에 대한 사용자 정보 및 로그 파일 정보를 포함하는 것을 특징으로 하는 데이터베이스의 논리적 데이터 오류 복구방법.The method of claim 1, wherein when generating and storing an index file on a transaction basis in step 207, the unit of a transaction uses a transaction unit provided by each DBMS, and the index file includes user information and log file information about a transaction. Logical data error recovery method of the database, characterized in that. 제1항에 있어서, 상기 단계 303에서 인덱스 파일은 단계 207에서 생성된 파일을 FTP를 이용하여 다운받고, 로그 파일은 단계 206에서 생성된 파일을 FTP를 이용하여 다운받는 것을 특징으로 하는 데이터베이스의 논리적 데이터 오류 복구방법.The logical file of the database of claim 1, wherein the index file in step 303 downloads the file generated in step 207 using FTP, and the log file downloads the file generated in step 206 using FTP. How to recover from data errors.
KR1020090052943A 2009-06-15 2009-06-15 A method for recovering logical data errors in database KR101071484B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020090052943A KR101071484B1 (en) 2009-06-15 2009-06-15 A method for recovering logical data errors in database

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020090052943A KR101071484B1 (en) 2009-06-15 2009-06-15 A method for recovering logical data errors in database

Publications (2)

Publication Number Publication Date
KR20100134355A true KR20100134355A (en) 2010-12-23
KR101071484B1 KR101071484B1 (en) 2011-10-10

Family

ID=43509301

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020090052943A KR101071484B1 (en) 2009-06-15 2009-06-15 A method for recovering logical data errors in database

Country Status (1)

Country Link
KR (1) KR101071484B1 (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101429575B1 (en) * 2012-10-22 2014-08-13 주식회사 엔써티 Real time backup system of database, system of recovering data and method of recovering data
KR101435789B1 (en) * 2013-01-29 2014-08-29 (주)소만사 System and Method for Big Data Processing of DLP System
KR20150123070A (en) 2014-04-24 2015-11-03 고려대학교 산학협력단 Apparatus and method for recovering data in DB2 database
KR101657592B1 (en) 2015-08-28 2016-09-19 고려대학교 산학협력단 A recovery method of deleted data for MySQL MyISAM database
CN112948366A (en) * 2021-03-18 2021-06-11 上海新炬网络信息技术股份有限公司 Method for realizing non-conflict between query and recovery in PostgreSQL Standard mode

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100891036B1 (en) 2008-09-08 2009-03-31 (주)데이타뱅크시스템즈 Automatic recovery system for database using real-time replication and its method

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR101429575B1 (en) * 2012-10-22 2014-08-13 주식회사 엔써티 Real time backup system of database, system of recovering data and method of recovering data
KR101435789B1 (en) * 2013-01-29 2014-08-29 (주)소만사 System and Method for Big Data Processing of DLP System
KR20150123070A (en) 2014-04-24 2015-11-03 고려대학교 산학협력단 Apparatus and method for recovering data in DB2 database
KR101657592B1 (en) 2015-08-28 2016-09-19 고려대학교 산학협력단 A recovery method of deleted data for MySQL MyISAM database
CN112948366A (en) * 2021-03-18 2021-06-11 上海新炬网络信息技术股份有限公司 Method for realizing non-conflict between query and recovery in PostgreSQL Standard mode
CN112948366B (en) * 2021-03-18 2023-10-27 上海新炬网络信息技术股份有限公司 Method for realizing no conflict between inquiry and recovery under PostgreSQL Standby mode

Also Published As

Publication number Publication date
KR101071484B1 (en) 2011-10-10

Similar Documents

Publication Publication Date Title
CN109241175B (en) Data synchronization method and device, storage medium and electronic equipment
CN106462586B (en) The method and system that the consistency of Multi version concurrency control based on record is read
US10261869B2 (en) Transaction processing using torn write detection
EP3234780B1 (en) Detecting lost writes
US9218377B2 (en) Failure recovery and error correction techniques for data loading in information warehouses
KR101556435B1 (en) Database backing-up and recovering method and device
US7386752B1 (en) Using asset dependencies to identify the recovery set and optionally automate and/or optimize the recovery
US8086566B2 (en) Transaction consistent content replication
US20110191299A1 (en) Logical data backup and rollback using incremental capture in a distributed database
JP6711884B2 (en) Data integrity verification method and system that minimizes load on source database
CN109542682B (en) Data backup method, device, equipment and storage medium
KR20040088397A (en) Transactionally consistent change tracking for databases
KR101071484B1 (en) A method for recovering logical data errors in database
CN109086382B (en) Data synchronization method, device, equipment and storage medium
US10379969B2 (en) Ephemeral store-based auto-save for applications with a persistence layer
US11531594B2 (en) Data recovery method and apparatus, server, and computer-readable storage medium
CN111427898A (en) Continuous data protection system and method based on analysis of Oracle log
CN109240854B (en) Method and system for recovering data of change caused by misoperation
US7693889B1 (en) Automated backup and recovery for content repository
CN112306743A (en) Data processing method and device, electronic equipment and computer storage medium
CN110825413A (en) Database upgrading method and device and application deployment upgrading method and device
EP2797001B1 (en) System and method for creating variants in a test database during various test stages
US20180032555A1 (en) Object database system including an object-specific historical attribute-change information system
CN111240891A (en) Data recovery method and device based on data consistency among multiple tables of database
CN115168347A (en) Method for combining data through rapid synchronization and abnormal rollback among multiple databases

Legal Events

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

Payment date: 20150630

Year of fee payment: 5

FPAY Annual fee payment

Payment date: 20160928

Year of fee payment: 6

FPAY Annual fee payment

Payment date: 20170913

Year of fee payment: 7

FPAY Annual fee payment

Payment date: 20180822

Year of fee payment: 8

FPAY Annual fee payment

Payment date: 20190814

Year of fee payment: 9