KR102139578B1 - Method for restoring data of database through analysis of disc block pattern - Google Patents

Method for restoring data of database through analysis of disc block pattern Download PDF

Info

Publication number
KR102139578B1
KR102139578B1 KR1020180170741A KR20180170741A KR102139578B1 KR 102139578 B1 KR102139578 B1 KR 102139578B1 KR 1020180170741 A KR1020180170741 A KR 1020180170741A KR 20180170741 A KR20180170741 A KR 20180170741A KR 102139578 B1 KR102139578 B1 KR 102139578B1
Authority
KR
South Korea
Prior art keywords
block
database
data
file
size
Prior art date
Application number
KR1020180170741A
Other languages
Korean (ko)
Other versions
KR20190080793A (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 부경대학교 산학협력단
Publication of KR20190080793A publication Critical patent/KR20190080793A/en
Application granted granted Critical
Publication of KR102139578B1 publication Critical patent/KR102139578B1/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/1446Point-in-time backing up or restoration of persistent data

Abstract

디스크 블록 패턴 분석을 통한 데이터베이스 파일 복구 방법이 개시된다.
본 발명의 실시예에 따른 디스크 블록 패턴 분석을 통한 데이터베이스 파일 복구 방법은 입력부(10)를 통해, 데이터베이스의 데이터 파일을 입력받는 단계; 제어부(20)에 의해, 상기 데이터 파일의 데이터베이스 블록 어드레스(DBA: database block address)로부터 블록의 크기를 예측하는 단계; 및 상기 제어부(20)에 의해, 데이터베이스 블록 어드레스(DBA: database block address)로부터 파일 식별번호를 예측하는 단계;를 포함할 수 있다.
Disclosed is a method for recovering a database file through disk block pattern analysis.
A method for recovering a database file through disk block pattern analysis according to an embodiment of the present invention includes receiving a data file of a database through the input unit 10; Predicting the size of a block from a database block address (DBA) of the data file by the control unit 20; And predicting a file identification number from a database block address (DBA) by the control unit 20.

Description

디스크 블록 패턴 분석을 통한 데이터베이스 파일 복구 방법 {METHOD FOR RESTORING DATA OF DATABASE THROUGH ANALYSIS OF DISC BLOCK PATTERN}How to recover database files through disk block pattern analysis {METHOD FOR RESTORING DATA OF DATABASE THROUGH ANALYSIS OF DISC BLOCK PATTERN}

본 발명은 디스크 블록 패턴 분석을 통한 데이터베이스 파일 복구 방법에 관한 것이다. 더욱 상세하게는, 데이터 파일만을 이용하여 데이터 파일의 구조 정보를 예측할 수 있는 디스크 블록 패턴 분석을 통한 데이터베이스 파일 복구 방법에 관한 것이다. The present invention relates to a method for recovering a database file through disk block pattern analysis. More specifically, the present invention relates to a method for recovering a database file through disk block pattern analysis that can predict structural information of a data file using only the data file.

일반적으로 조직은 많은 양의 데이터를 통합적으로 관리하기 위해 데이터베이스를 이용하므로, 데이터베이스에는 업무데이터, 개인정보와 같은 중요한 정보가 저장되어 있는 경우가 많다. 이는 의미 있는 정보가 남아있을 가능성이 크다는 것을 뜻하므로 디지털 포렌식 관점에서 데이터베이스가 중요한 조사대상이다.In general, an organization uses a database to manage a large amount of data in an integrated manner, and thus, important information such as business data and personal information is often stored in the database. This means that there is a high likelihood that meaningful information will remain, so a database is an important research subject from a digital forensic perspective.

데이터베이스에서 정상적인 레코드를 추출하는 것도 중요하지만, 삭제된 레코드를 복구하는 것도 중요하다. 삭제된 레코드 복구를 통해 사용자의 행위를 재구성할 수 있고, 용의자의 고의적 증거 인멸 행위에 대응할 수 있으므로 수사에 큰 도움을 줄 수 있다.It is important to extract normal records from the database, but it is also important to recover deleted records. The user's behavior can be reconstructed through the recovery of deleted records, and it can respond to the suspect's deliberate destruction of evidence, which can greatly assist investigation.

테이블 스페이스는 데이터베이스에서 실제 데이터를 물리적으로 저장하는 공간을 말한다. 이 테이블 스페이스를 분석하면 데이터베이스의 테이블 데이터와 테이블 스키마 정보를 얻을 수 있다. IDC에 따르면 오라클 데이터베이스는 전 세계적으로 40.7%의 점유율을 기록하고 있으며 국내 데이터베이스 시장에서 오라클 데이터베이스는 60% 점유율을 기록하고 있다.Table space is a space that physically stores actual data in a database. By analyzing this table space, you can obtain table data and table schema information from the database. According to IDC, the Oracle database has a 40.7% share worldwide, and the Oracle database has a 60% share in the domestic database market.

또한, 현재까지의 데이터베이스 포렌식에 대한 선행 연구는 트랜잭션 로그를 토대로 레코드를 복구하는 것에 집중되어 있다. P. Wright는 오라클 데이터베이스에서 리두로그(redolog)와 로그마이너(LogMiner)를 통해 데이터베이스의 변경사항을 추적하는 방안과 이전 시점의 데이터를 복원하는 방법에 대해서 설명하였다. 또한, Heloise Pieterse는 데이터베이스에서 암호화, 분할 저장 등을 이용하여 데이터 값이나 레코드, 테이블을 은닉하는 기법에 대해서 정리하였으며, 트랜잭션 로그의 중요성에 대해서 강조하였다. Oluwasola Mary는 데이터베이스에서 쿼리를 대수학으로 표현할 수 있음을 보였다. 그리고 쿼리를 역으로도 나타낼 수 있으며, 이 수식을 저장하는 Relational Algebra Log를 제안하였다. 이 로그를 통해 이전 시점의 데이터들을 복원하는 기법에 대해서 설명하였다. 일반적으로 오라클 데이터베이스의 삭제된 레코드를 복원할 때는 DBF파일과 트랜잭션 로그가 쌍으로 존재해야 한다. 그리고 운용중인 오라클 데이터베이스에 로그마이너를 이용해 삭제된 레코드를 복원한다. 하지만, 이 방법은 트랜잭션 로그가 기록된 시점만 복구가 가능하며, 기록되지 않은 시점은 복구하지 못한다. 또한, 오라클 데이터베이스에서 트랜잭션 로그를 남기는 방법 중 노아카이브 모드(No Archive Mode)의 경우 미리 지정한 용량을 초과하게 되면 기존의 트랜잭션 로그에 덮어쓰기 때문에 오라클 데이터베이스 운용 환경이나 회사 정책에 따라 복구 여부가 결정될 수도 있다.In addition, previous studies on database forensics to date have focused on recovering records based on transaction logs. P. Wright explained how to track changes in the database through redolog and logminer in the Oracle database and how to restore data from a previous point in time. In addition, Heloise Pieterse summarized the technique of concealing data values, records, and tables using encryption and fragmented storage in the database, and emphasized the importance of transaction logs. Oluwasola Mary showed that queries can be expressed in algebra in a database. Also, the query can be represented in reverse, and a relational algebra log is proposed to store this formula. The method of restoring data from the previous point through this log was described. In general, when restoring deleted records in an Oracle database, DBF files and transaction logs must exist in pairs. Then, the deleted records are restored using the log miner in the running Oracle database. However, this method can only recover the time when the transaction log is recorded, and not the time when the transaction log is not recorded. In addition, in the case of No Archive Mode in the way of leaving the transaction log in the Oracle database, if the specified capacity is exceeded, the existing transaction log is overwritten, so whether or not to recover may be determined according to the Oracle database operating environment or company policy. have.

그러나 종래 기술에 의하면 데이터베이스에 데이터를 복원할 때, 트랜잭션 로그를 통해서만 복구가 가능하다는 문제가 존재하였다. 트랜잭션 로그에 의하지 않고 데이터를 복원할 수 있는 연구가 요구되고 있다.However, according to the prior art, when restoring data to a database, there was a problem that recovery is possible only through a transaction log. Research is needed to restore data without resorting to transaction logs.

앞에서 언급한 바와 같이, 오라클 데이터베이스는 상용 DBMS 중 세계에서 가장 널리 사용되는 제품이며, 국내에서도 많은 기관에서 중요한 데이터를 운용 및 관리하는데 사용되고 있다. 만약, 오라클 데이터베이스에 문제가 발생하여 데이터에 접근할 수 없게 되면 해당 기관은 정상적인 업무를 수행하는데 어려움이 발생한다. As mentioned earlier, Oracle database is the most widely used product in the world among commercial DBMSs, and it is used in many institutions to manage and manage important data in Korea. If there is a problem with the Oracle database and the data cannot be accessed, the institution has difficulties in performing normal tasks.

일반적으로 오라클 데이터베이스에 문제가 발생할 경우 고장회복(recovery) 기능을 사용하여 거의 자동화된 복구가 가능하지만, 사용자의 부주의 혹은 시스템 오류로 인해 일부 시스템 파일에 오류가 발생하면 불가능한 경우가 발생한다. In general, when a problem occurs in the Oracle database, it is possible to perform almost automated recovery using the recovery function, but it is impossible when some system files fail due to user's carelessness or system error.

예를 들어, 오라클 데이터베이스의 구조 정보(데이터 파일의 블록 크기, 식별 번호, 및 경로 등)를 포함하는 제어 파일이 손상되는 경우, 데이터 파일의 블록 크기와 식별 번호 또한 손상된다. 이러한 경우, 데이터 베이스의 운용이나 기동은 물론이고 데이터를 복구 및 추출하는 것도 불가능한 문제가 발생한다. For example, if the control file containing the structure information (block size, identification number, and path of the data file) of the Oracle database is damaged, the block size and identification number of the data file are also damaged. In this case, there is a problem that it is impossible to recover and extract data as well as to operate or start the database.

따라서, 이러한 제어 파일이 손상 또는 손실되는 경우, 데이터베이스의 운동이나 기동은 물론이고 데이터 파일을 복구 또는 추출하는 것도 불가능하게 된다. Therefore, when such a control file is damaged or lost, it becomes impossible to recover or extract the data file as well as movement or startup of the database.

이러한 문제를 해결하기 위해, 제어 파일이 손상 또는 손실되었을 때, 데이터 파일만을 이용하여 각 파일의 구조 정보를 추측하는 방법에 대한 연구가 요구되고 있다.In order to solve this problem, when a control file is damaged or lost, research into a method of estimating the structure information of each file using only data files is required.

이 배경기술 부분에 기재된 사항은 발명의 배경에 대한 이해를 증진하기 위하여 작성된 것으로서, 이 기술이 속하는 분야에서 통상의 지식을 가진 자에게 이미 알려진 종래기술이 아닌 사항을 포함할 수 있다.The items described in the background art section are written to improve the understanding of the background of the invention, and may include matters that are not known to those skilled in the art to which this technology belongs.

본 발명은 상기한 바와 같은 문제점을 해결하기 위한 것으로, 데이터베이스의 제어 파일이 손상되는 경우, 데이터 파일만을 이용하여 데이터 파일의 구조 정보를 예측할 수 있는 디스크 블록 패턴 분석을 통한 데이터베이스 파일 복구 방법을 제공하는 것을 목적으로 한다.The present invention is to solve the above problems, and provides a method for recovering a database file through disk block pattern analysis that can predict the structure information of a data file using only the data file when the control file of the database is damaged. It is aimed at.

상기한 바와 같은 목적을 달성하기 위한 본 발명의 실시예에 따른 디스크 블록 패턴 분석을 통한 데이터베이스 파일 복구 방법은 입력부(10)를 통해, 데이터베이스의 데이터 파일을 입력받는 단계; 제어부(20)에 의해, 상기 데이터 파일의 데이터베이스 블록 어드레스(DBA: database block address)로부터 블록의 크기를 예측하는 단계; 및 상기 제어부(20)에 의해, 데이터베이스 블록 어드레스(DBA: database block address)로부터 파일 식별번호를 예측하는 단계;를 포함할 수 있다.A database file recovery method through disk block pattern analysis according to an embodiment of the present invention for achieving the above object comprises: receiving a data file of a database through the input unit 10; Predicting the size of a block from a database block address (DBA) of the data file by the control unit 20; And predicting a file identification number from a database block address (DBA) by the control unit 20.

상기 블록의 크기를 예측하는 단계는 상기 데이터 파일의 맨 앞에서 설정된 오프셋 지점으로부터 설정된 크기의 제1 데이터를 획득하는 단계; 상기 제1 데이터의 맨 뒤에서 설정된 크기의 제2 데이터를 획득하는 단계; 및 상기 데이터베이스에서 구성 가능한 최대 블록 크기를 상기 제2 데이터로 나누어 상기 블록의 크기를 계산하는 단계;를 포함할 수 있다.The step of predicting the size of the block may include obtaining first data of a set size from an offset point set at the front of the data file; Obtaining second data of a size set at the end of the first data; And calculating the size of the block by dividing the maximum block size that can be configured in the database by the second data.

상기 파일 식별 번호를 예측하는 단계는 상기 데이터 파일의 두 번째 블록의 DBA 오프셋 지점으로부터 설정된 크기의 제3 데이터를 획득하는 단계; 및 상기 제3 데이터의 맨 앞에서 설정된 크기의 제4 데이터를 상기 파일 식별 번호로 예측하는 단계;를 포함할 수 있다.The step of predicting the file identification number may include obtaining third data having a set size from a DBA offset point of the second block of the data file; And predicting fourth data having a size set at the front of the third data using the file identification number.

상기 데이터 파일은 상기 복수의 블록이 연속적으로 구성되고, 상기 데이터 파일의 크기는 단위 블록의 크기보다 작으며, 상기 블록의 크기는 2의 거듭제곱수로 이루어지고, 상기 데이터 파일의 첫 번째 블록은 메타데이터이며, 상기 블록의 시작점으로부터 설정된 위치에 상기 데이터베이스 블록 어드레스가 위치하며, 상기 블록의 번호는 0부터 순차적으로 1씩 증가할 수 있다.In the data file, the plurality of blocks are continuously configured, the size of the data file is smaller than the size of a unit block, and the size of the block is made of a power of 2, and the first block of the data file is meta. It is data, and the database block address is located at a position set from the starting point of the block, and the number of the block can be sequentially increased from 0 to 1.

상기 데이터베이스 블록 어드레스는 상기 데이터 파일의 첫 번째 블록을 제외한 모든 블록이 동일한 오프셋 위치에 갖는 블록 위치의 식별자일 수 있다.The database block address may be an identifier of a block position where all blocks except the first block of the data file have the same offset position.

상기한 바와 같은 본 발명의 실시예에 의한 디스크 블록 패턴 분석을 통한 데이터베이스 파일 복구 방법에 의하면, 데이터 파일만을 이용하여 데이터 파일의 구조 정보를 예측할 수 있는 디스크 블록 패턴 분석을 통한 데이터베이스 파일 복구 방법을 예측할 수 있다.According to the database file recovery method through disk block pattern analysis according to the embodiment of the present invention as described above, it is possible to predict the database file recovery method through disk block pattern analysis that can predict the structure information of the data file using only the data file. Can be.

이 도면들은 본 발명의 예시적인 실시예를 설명하는데 참조하기 위함이므로, 본 발명의 기술적 사상을 첨부한 도면에 한정해서 해석하여서는 아니된다.
도 1은 본 발명의 실시예에 따른 디스크 블록 패턴 분석을 통한 데이터베이스 파일 복구 장치의 블록도이다.
도 2는 본 발명의 실시예에 따른 데이터베이스를 구성하는 데이터 파일의 구조를 설명하기 위한 도면이다.
도 3은 본 발명의 실시예에 따른 데이터베이스 블록 어드레스의 구조를 설명하기 위한 도면이다.
도 4는 본 발명의 실시예에 따른 디스크 블록 패턴 분석을 통한 데이터베이스 파일 복구 방법을 설명하기 위한 순서도이다.
Since these drawings are for reference to explain exemplary embodiments of the present invention, the technical spirit of the present invention should not be construed as being limited to the accompanying drawings.
1 is a block diagram of a database file recovery apparatus through disk block pattern analysis according to an embodiment of the present invention.
2 is a view for explaining the structure of a data file constituting a database according to an embodiment of the present invention.
3 is a view for explaining the structure of a database block address according to an embodiment of the present invention.
4 is a flowchart illustrating a database file recovery method through disk block pattern analysis according to an embodiment of the present invention.

첨부한 도면을 참고로 하여 본 발명의 실시예에 대하여 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자가 용이하게 실시할 수 있도록 상세히 설명한다. 그러나 본 발명은 여러 가지 상이한 형태로 구현될 수 있으며 여기에서 설명하는 실시예에 한정되지 않는다.The embodiments of the present invention will be described in detail with reference to the accompanying drawings so that those skilled in the art to which the present invention pertains can easily practice. However, the present invention can be implemented in many different forms and is not limited to the embodiments described herein.

본 발명을 명확하게 설명하기 위해서 설명과 관계없는 부분은 생략하였으며, 명세서 전체를 통하여 동일 또는 유사한 구성요소에 대해서는 동일한 참조 부호를 붙이도록 한다.In order to clearly describe the present invention, parts irrelevant to the description are omitted, and the same reference numerals are assigned to the same or similar elements throughout the specification.

추가적으로, 몇몇 방법들은 적어도 하나의 제어기에 의하여 실행될 수 있다.Additionally, several methods can be implemented by at least one controller.

제어기라는 용어는 메모리와, 알고리즘 구조로 해석되는 하나 이상의 단계들을 실행하도록 된 프로세서를 포함하는 하드웨어 장치를 언급한다.The term controller refers to a hardware device comprising a memory and a processor adapted to execute one or more steps interpreted as an algorithmic structure.

상기 메모리는 알고리즘 단계들을 저장하도록 되어 있고, 프로세서는 아래에서 기재하는 하나 이상의 프로세스들을 수행하기 위하여 상기 알고리즘 단계들을 특별히 실행하도록 되어 있다.The memory is adapted to store algorithmic steps, and the processor is specifically configured to execute the algorithmic steps to perform one or more of the processes described below.

더 나아가, 본 발명의 제어 로직은 프로세서, 제어기 또는 이와 유사한 것에 의하여 실행되는 실행 가능한 프로그램 명령들을 포함하는 컴퓨터가 읽을 수 있는 수단 상의 일시적이지 않고 컴퓨터가 읽을 수 있는 매체로 구현될 수 있다.Furthermore, the control logic of the present invention may be embodied in a non-transitory, computer-readable medium on a computer-readable means including executable program instructions executed by a processor, controller, or the like.

컴퓨터가 읽을 수 있는 수단의 예들은, 이에 한정되지는 않지만, ROM, RAM, CD-ROM, 자기 테이프, 플로피 디스크, 플래쉬 드라이브, 스마트 카드 및 광학 데이터 저장 장치를 포함한다.Examples of computer readable means include, but are not limited to, ROM, RAM, CD-ROM, magnetic tape, floppy disk, flash drive, smart card and optical data storage.

먼저, 본 발명의 실시 예에 따른 디스크 블록 패턴 분석을 통한 데이터베이스 파일 복구 장치에 관하여 첨부된 도면을 참조하여 상세하게 설명한다. First, a database file recovery apparatus through disk block pattern analysis according to an embodiment of the present invention will be described in detail with reference to the accompanying drawings.

도 1은 본 발명의 실시예에 따른 디스크 블록 패턴 분석을 통한 데이터베이스 파일 복구 장치의 블록도이다.1 is a block diagram of a database file recovery apparatus through disk block pattern analysis according to an embodiment of the present invention.

도 1에 도시된 바와 같이, 본 발명의 실시 예에 따른 파일 복구 장치는 데이터 파일을 입력받는 입력부(10), 및 입력부(10)를 통해 입력된 데이터 파일로부터 데이터 파일의 구조 정보를 예측하는 제어부(20)를 포함할 수 있다.오라클 데이터베이스는 제어 파일과 데이터 파일을 포함하여 구성된다. As shown in FIG. 1, a file recovery apparatus according to an embodiment of the present invention includes an input unit 10 for receiving a data file, and a control unit for predicting structure information of a data file from the data file input through the input unit 10 (20). The Oracle database is comprised of a control file and a data file.

제어 파일은 작은 크기의 바이너리 파일(binary file)이며, 오라클 데이터베이스의 구조 정보를 포함한다. 예를 들어, 데이터 파일 및 로그 파일의 블록 크기, 식별 번호, 및 경로 등 데이터 파일을 열기 위한 필요한 구조 정보를 포함하며, 오라클 데이터 베이스가 기동하기 위해 가장 먼저 참조하는 파일이다. The control file is a small binary file and contains structure information of the Oracle database. For example, it contains the necessary structure information to open the data file, such as the block size, identification number, and path of the data file and log file, and is the first file referenced by the Oracle database to start.

데이터 파일은 복수의 블록으로 구성되며, 오라클 데이터베이스가 데이터 파일을 생성할 때 한 블록의 크기는 최소 1024(1KB)부터 최대 262144(256KB)의 크기로 설정될 수 있다. 블록의 크기가 작을수록 파일 내에 빈 곳이 줄어들어 파일의 크기가 작아지며, 블록의 크기가 클수록 데이터베이스의 운용 속도가 빨라진다. 데이터 파일의 블록 크기는 제어 파일에 저장되는데, 만약 제어 파일이 손상되거나 손실되면 데이터 파일의 블록의 시작과 끝을 알 수 없기 때문에 의미 있는 데이터를 추출할 수 없다. The data file is composed of a plurality of blocks, and when the Oracle database creates a data file, the size of one block can be set from a minimum of 1024 (1 KB) to a maximum of 262144 (256 KB). The smaller the size of the block, the smaller the size of the file by reducing the empty space in the file, and the larger the size of the block, the faster the operation speed of the database. The block size of the data file is stored in the control file. If the control file is damaged or lost, meaningful data cannot be extracted because the start and end of the block of the data file are unknown.

오라클 데이터베이스의 데이터 파일의 블록은 다음과 같은 특징을 갖는다. Blocks of data files in Oracle database have the following characteristics.

도 2는 본 발명의 실시예에 따른 데이터베이스를 구성하는 데이터 파일의 구조를 설명하기 위한 도면이다.2 is a view for explaining the structure of a data file constituting a database according to an embodiment of the present invention.

도 2에 도시된 바와 같이, 데이터 파일은 블록의 연속으로 이루어진다. 그리고 데이터 파일의 크기는 단위 블록의 크기보다 크다. 또한, 가능한 블록의 크기는 2의 거듭제곱수(1KB~256KB: 1024~262144)이다. 그리고 데이터 파일의 첫 번째 블록은 오라클 데이터베이스의 데이터가 아닌 데이터 파일의 메타데이터이다. 또한, 데이터베이스 블록 어드레스(DBA: database block address)는 어느 하나의 블록의 시작점에서 Ox4 지점(DBA 오프셋)에 위치한다. 마지막으로, 블록 번호는 데이터 파일 내의 첫 번째 블록을 0으로 하여, 순서대로 1씩 증가한다. As shown in Fig. 2, a data file consists of a series of blocks. And the size of the data file is larger than the size of the unit block. In addition, the possible block size is a power of 2 (1KB to 256KB: 1024 to 262144). And the first block of the data file is the metadata of the data file, not the data in the Oracle database. In addition, the database block address (DBA) is located at the Ox4 point (DBA offset) at the starting point of any one block. Finally, the block number is incremented by 1 in order, with the first block in the data file being 0.

데이터 파일은 동일한 크기를 갖는 복수의 블록으로 구성되는데, 블록은 데이터 파일의 저장 공간을 관리하는 최소 단위로써, 데이터 파일을 생성하는 시점에 결정된다. The data file is composed of a plurality of blocks having the same size. The block is a minimum unit for managing the storage space of the data file, and is determined at the time of creating the data file.

위에서, 데이터베이스 블록 어드레스(DBA: database block address)는 데이터 파일의 첫 번째 블록을 제외한 모든 블록이 동일한 오프셋 위치(예를 들어, Ox4)에 가지는 블록 위치의 식별자를 의미한다. In the above, the database block address (DBA) means an identifier of a block position that all blocks except the first block of the data file have at the same offset position (eg, Ox4).

도 3은 본 발명의 실시예에 따른 데이터베이스 블록 어드레스의 구조를 설명하기 위한 도면이다.3 is a view for explaining the structure of a database block address according to an embodiment of the present invention.

도 3에 도시된 바와 같이, 데이터베이스 블록 어드레스는 4바이트(32비트)로 이루어지며, 상위 10비트는 파일 번호를 의미하고, 하위 22비트는 블록 번호를 의미한다. As shown in FIG. 3, the database block address is composed of 4 bytes (32 bits), the upper 10 bits mean the file number, and the lower 22 bits mean the block number.

이와 같이, 본 발명의 실시 예에 따른 파일 복구 장치는 위에서 설명한 오라클 데이터베이스의 데이터 파일과 데이터베이스 블록 어드레스(DBA)의 특성을 고려하여 제어 파일이 손상 또는 손실되었을 경우, 데이터 파일을 이용하여 데이터 파일의 구조 정보(예를 들어, 데이터 파일의 블록 크기 및 데이터 파일의 식별 번호)를 예측할 수 있다.As described above, when the control file is damaged or lost in consideration of the characteristics of the data file of the Oracle database and the database block address (DBA) described above, the file recovery apparatus according to an embodiment of the present invention uses the data file to recover the data file. The structure information (eg, the block size of the data file and the identification number of the data file) can be predicted.

이하에서는, 본 발명의 실시 예에 따른 디스크 블록 패턴 분석을 통한 데이터베이스 파일 복구 방법에 대하여 첨부된 도면을 참조하여 상세하게 설명한다. Hereinafter, a method for recovering a database file through disk block pattern analysis according to an embodiment of the present invention will be described in detail with reference to the accompanying drawings.

도 4는 본 발명의 실시예에 따른 디스크 블록 패턴 분석을 통한 데이터베이스 파일 복구 방법을 설명하기 위한 순서도이다.4 is a flowchart illustrating a database file recovery method through disk block pattern analysis according to an embodiment of the present invention.

도 4에 도시된 바와 같이, 제어 파일이 손상 또는 손실되는 경우, 입력부(10)를 통해 오라클 데이터베이스의 데이터 파일을 입력 받는다(S10). 입력부(10)를 통해 입력된 데이터 파일은 제어부(20)로 전송된다.As illustrated in FIG. 4, when the control file is damaged or lost, a data file of the Oracle database is received through the input unit 10 (S10 ). The data file input through the input unit 10 is transmitted to the control unit 20.

제어부(20)는 데이터 파일에 포함된 데이터베이스 블록 어드레스(DBA: database block address)로부터 블록의 크기를 예측한다(S20). The control unit 20 predicts the size of the block from the database block address (DBA) included in the data file (S20).

구체적으로, 제어부(20)는 데이터파일의 맨 앞에서 설정된 오프셋 지점으로부터 설정된 크기의 제1 데이터를 획득한다(S110). Specifically, the control unit 20 obtains the first data of the set size from the offset point set at the front of the data file (S110).

여기서, 데이터 파일의 맨 앞에서 설정된 오프셋 지점은 Ox40004지점을 의미하고, 설정된 크기의 제1 데이터는 Ox40004 지점으로부터 독취한 4바이트(32비트) 데이터를 의미한다. 여기서, 설정된 오프셋 지점은 데이터베이스에서 구성 가능한 최대 블록의 크기에서 데이터베이스 블록 어드레스(DBA)가 위치하는 Ox4(이하, 'DBA 오프셋'이라고 한다)를 더한 값이 된다. Here, the offset point set at the front of the data file means the Ox40004 point, and the first data of the set size means 4 bytes (32-bit) data read from the Ox40004 point. Here, the set offset point is a value obtained by adding Ox4 (hereinafter referred to as'DBA offset') in which the database block address (DBA) is located at the maximum block size that can be configured in the database.

따라서, Ox40004 지점에서 독취한 4바이트 데이터는 데이터베이스 임의의 블록의 블록 어드레스(DBA: database block address)를 의미하게 된다.Therefore, the 4-byte data read at the Ox40004 point means a database block address (DBA) of any block in the database.

앞에서 언급한 바와 같이, 오라클 데이터베이스는 블록의 크기는 1KB에서 256KB의 크기를 갖는다. 즉, 데이터베이스에서 가능한 최대 블록의 크기는 256KB(256*1026=262144)이므로, 이를 16진수로 변환하면 Ox400000이 된다. 따라서, 제1 데이터는 오라클 데이터베이스에서 설정 가능한 최대 블록의 다음 블록에서 추출된 DBA를 의미한다. As mentioned earlier, Oracle databases have block sizes ranging from 1KB to 256KB. That is, the maximum possible block size in the database is 256KB (256*1026=262144), so converting it to hexadecimal results in Ox400000. Therefore, the first data means the DBA extracted from the next block of the largest block that can be set in the Oracle database.

그리고 앞에서 설명한 바와 같이, 데이터베이스 블록 어드레서(DBA)는 각 블록의 Ox4 지점으로부터 4바이트 데이터이므로, Ox40004 지점으로부터 읽어들인 4바이트 데이터인 제2 데이터는 최대 크기의 블록의 다음 블록에서 읽어들인 데이터베이스 블록 어드레스(DBA)를 의미하게 된다.And, as described above, since the database block addresser (DBA) is 4-byte data from the Ox4 point of each block, the second data, which is 4-byte data read from the Ox40004 point, is the database block read from the next block of the largest block. It means address (DBA).

제어부(20)는 S110 단계에서 독취한 제1 데이터의 맨 뒤에서 설정된 크기의 제2 데이터를 획득한다(S120). The controller 20 acquires second data having a set size from the end of the first data read in step S110 (S120 ).

여기서, 제1 데이터(DBA)의 맨 뒤에서 설정된 크기인 22비트의 제2 데이터를 독취하면, 제2 데이터가 최대 크기 블록의 다음 블록에서 읽어들인 데이터베이스 블록 어드레스(DBA)의 블록 번호를 의미하게 된다.Here, when the second data of 22 bits, which is the size set at the end of the first data DBA, is read, the second data means the block number of the database block address DBA read from the next block of the maximum size block. .

제어부(20)는 S120 단계에서 최대 블록 크기를 S120 단계에서 획득한 제2 데이터로 나누어 블록의 크기를 계산한다(S130). The controller 20 calculates the size of the block by dividing the maximum block size in step S120 by the second data obtained in step S120 (S130).

예를 들면, 설정된 오프셋 지점인 Ox40004 지점에서 읽어들인 4바이트 데이터(제1 데이터)의 맨 뒤에서 읽어들인 22비트 데이터(제2 데이터)가 4인 경우, 이때의 블록 번호가 4이다. 따라서, 이 블록은 앞에 4개(0번째 블록~3번째 블록)의 블록이 더 존재한다는 것을 의미하고, 최대 블록 크기인 256KB를 블록 번호 4로 나누면 각 블록의 크기는 64KB임을 예측할 수 있다.For example, when the 22-bit data (second data) read from the end of the 4-byte data (first data) read from the set offset point Ox40004 is 4, the block number at this time is 4. Therefore, this block means that there are four more blocks (0th block to 3rd block) in front, and if the maximum block size of 256KB is divided by block number 4, it can be predicted that the size of each block is 64KB.

또 다른 예로써, 설정된 오프셋 지점인 Ox40004 지점에서 읽어들인 4바이트 데이터(제1 데이터)의 맨 뒤에서 읽어들인 22비트 데이터(제2 데이터)가 1인 경우, 이때의 블록 번호가 1이다. 따라서, 이 블록은 앞에 1개(0번째 블록)의 블록이 더 존재한다는 것을 의미하고, 최대 블록 크기인 256KB를 블록 번호 1로 나누면 각 블록의 크기는 256KB임을 예측할 수 있다.As another example, if the 22-bit data (second data) read from the end of the 4-byte data (first data) read from the set offset point Ox40004 is 1, the block number at this time is 1. Therefore, this block means that there is one more block (0th block) in front, and if the maximum block size of 256KB is divided by block number 1, it can be predicted that the size of each block is 256KB.

제어부(20)는 데이터베이스 블록 어드레스(DBA: database block address)로부터 블록의 크기를 예측한 후, 데이터베이스 블록 어드레스(DBA: database block address)로부터 파일 식별번호를 예측한다(S30). After predicting the size of the block from the database block address (DBA), the controller 20 predicts the file identification number from the database block address (DBA) (S30).

파일 식별 번호를 예측하기 위해서는, 블록의 크기를 먼저 예측한 후, 파일 식별 번호를 예측하는 것이 바람직하다. 즉, 블록의 크기를 정확히 예측해야 데이터베이스 블록 어드레스를 데이터 파일로부터 정확히 추출할 수 있으므로, 블록 크기를 예측하는 방법이 식별 번호를 예측하는 방법에 선행되어야 한다.In order to predict the file identification number, it is preferable to predict the size of the block first and then predict the file identification number. That is, since the size of the block must be accurately predicted, the database block address can be accurately extracted from the data file, so the method of predicting the block size should precede the method of predicting the identification number.

구체적으로, 제어부(20)는 앞에서 설명한 S20 단계를 통해 블록의 크기를 예측한다.Specifically, the controller 20 predicts the size of the block through step S20 described above.

이후, 제어부(20)는 데이터 파일의 두 번째 블록의 맨 앞에서 DBA 오프셋 지점으로부터 설정된 크기의 제3 데이터를 획득한다(S210). Thereafter, the controller 20 acquires third data having a set size from the DBA offset point at the beginning of the second block of the data file (S210).

여기서, DBA 오프셋 지점은 데이터 파일의 두 번째 블록의 맨 앞에서 Ox4 지점을 의미하고, 설정된 크기의 제3 데이터는 두 번째 블록 맨 앞의 Ox4 지점으로부터 독취한 4바이트(32비트) 데이터를 의미한다. 즉, Ox4 지점으로부터 독취한 4바이트의 제3 데이터는 데이터베이스 블록 어드레스(DBA)를 의미하게 된다. Here, the DBA offset point means the Ox4 point at the beginning of the second block of the data file, and the third data of the set size means 4 bytes (32-bit) data read from the Ox4 point at the beginning of the second block. That is, the third data of 4 bytes read from the Ox4 point means the database block address (DBA).

상기 S20 단계에서, 데이터 파일의 블록 크기를 계산하였으므로, 두 번째 블록의 시작 지점을 알 수 있다. 따라서, 두 번째 블록의 Ox4 지점에서 읽어들인 4바이트 데이터(제3 데이터)가 해당 블록의 데이터베이스 블록 어드레스(DBA)가 된다. In step S20, since the block size of the data file is calculated, the starting point of the second block can be known. Therefore, the 4-byte data (third data) read from the Ox4 point of the second block becomes the database block address (DBA) of the corresponding block.

제어부(20)는 S210 단계에서 독취한 제3 데이터의 맨 앞에서 설정된 크기의 제4 데이터를 독취하여 제4 데이터를 파일 식별 번호로 예측한다(S220). The controller 20 reads the fourth data of the size set in front of the third data read in step S210 and predicts the fourth data as the file identification number (S220).

여기서, 제3 데이터(DBA)의 맨 앞에서 설정된 크기인 10비트 데이터(제4 데이터)가 데이터 파일의 식별 번호를 의미하게 된다.Here, the 10-bit data (fourth data), which is the size set at the front of the third data DBA, means the identification number of the data file.

이상에서 설명한 바와 같은 본 발명의 실시 예에 따른 파일 복구 방법에 의하면, 오라클 데이터베이스를 구성하는 제어 파일이 손상 또는 손실되더라도, 데이터 파일만을 이용하여 데이터 파일의 구조 정보(예를 들어, 블록 크기 및 식별 번호)를 예측할 수 있다.According to the file recovery method according to an embodiment of the present invention as described above, even if the control file constituting the Oracle database is damaged or lost, the structure information (eg, block size and identification) of the data file using only the data file Number).

여기에 설명되는 다양한 실시 예는 예를 들어, 소프트웨어, 하드웨어 또는 이들의 조합된 것을 이용하여 컴퓨터 또는 이와 유사한 장치로 읽을 수 있는 기록매체 내에서 구현될 수 있다.Various embodiments described herein can be implemented in a computer- or similar device-readable recording medium using, for example, software, hardware, or a combination thereof.

하드웨어적인 구현에 의하면, 여기에 설명되는 실시 예는 ASICs (application specific integrated circuits), DSPs (digital signal processors), DSPDs (digital signal processing devices), PLDs (programmable logic devices), FPGAs (field programmable gate arrays, 프로세서(processors), 제어기(controllers), 마이크로 컨트롤러(micro-controllers), 마이크로 프로세서(microprocessors), 기타 기능 수행을 위한 전기적인 유닛 중 적어도 하나를 이용하여 구현될 수 있다.According to a hardware implementation, the embodiments described herein include application specific integrated circuits (ASICs), digital signal processors (DSPs), digital signal processing devices (DSPDs), programmable logic devices (PLDs), field programmable gate arrays (FPGAs), It may be implemented using at least one of processors, controllers, micro-controllers, microprocessors, and electrical units for performing other functions.

소프트웨어적인 구현에 의하면, 본 명세서에서 설명되는 절차 및 기능과 같은 실시 예들은 별도의 소프트웨어 모듈들로 구현될 수 있다. 상기 소프트웨어 모듈들 각각은 본 명세서에서 설명되는 하나 이상의 기능 및 작동을 수행할 수 있다. 적절한 프로그램 언어로 쓰인 소프트웨어 애플리케이션으로 소프트웨어 코드가 구현될 수 있다.According to the software implementation, embodiments such as procedures and functions described herein may be implemented as separate software modules. Each of the software modules may perform one or more functions and operations described herein. Software code can be implemented in a software application written in an appropriate programming language.

한편, 본 발명은 일 실시예에 있어서, 상술한 데이터베이스 파일 복구 장치는 방법 또는 장치를 수행하도록 하는 일련의 지시를 포함하는 컴퓨터 프로그램으로 구현될 수 있다. 즉, 본 발명은, 소정의 운영체제, 예를 들어 모바일 운영체제 내에서 구동되는 컴퓨터 프로그램일 수 있으며, 해당 프로그램은 상기 일련의 지시에 따른 프로세스를 처리하여 본 발명에 따른 방법이 실시되도록 할 수 있다. On the other hand, the present invention, in one embodiment, the above-described database file recovery apparatus may be implemented as a computer program including a series of instructions to perform a method or apparatus. That is, the present invention may be a computer program running in a predetermined operating system, for example, a mobile operating system, and the program may process the process according to the series of instructions so that the method according to the present invention is implemented.

또한, 본 발명의 다른 일 실시예에 있어서는, 상기 컴퓨터 프로그램이 저장되어 있는, 플로피디스크, CD, DVD, 하드디스크 메모리, 다양한 종류의 메모리 등 컴퓨터 또는 이와 유사한 전자 장치로 읽을 수 있는 기록 매체일 수 있으며, 상기 기록 매체 내의 상기 컴퓨터 프로그램을 읽어들인 컴퓨터 또는 이와 유사한 전자 장치, 예를 들어 스마트폰 등은 상기 컴퓨터 프로그램상의 상기 일련의 지시에 따라 본 발명에 따른 방법을 수행할 수 있다.In addition, in another embodiment of the present invention, the computer program is stored, a floppy disk, CD, DVD, hard disk memory, various types of memory, such as a computer or similar electronic device can be a recording medium that can be read In addition, a computer or similar electronic device, such as a smart phone, etc., which read the computer program in the recording medium may perform the method according to the present invention according to the series of instructions on the computer program.

이상을 통해 본 발명의 바람직한 실시 예에 대하여 설명하였지만, 본 발명은 이에 한정되는 것이 아니고 특허청구범위와 발명의 상세한 설명 및 첨부한 도면의 범위 안에서 여러 가지로 변형하여 실시하는 것이 가능하고 이 또한 본 발명의 범위에 속하는 것은 당연하다.Although the preferred embodiments of the present invention have been described through the above, the present invention is not limited thereto, and it is possible to carry out various modifications within the scope of the claims and detailed description of the invention and the accompanying drawings. Naturally, it is within the scope of the invention.

10: 입력부
20: 제어부
10: input
20: control unit

Claims (5)

입력부(10)를 통해, 데이터베이스의 데이터 파일을 입력받는 단계;
제어부(20)에 의해, 상기 데이터 파일의 데이터베이스 블록 어드레스(DBA: database block address)로부터 블록의 크기를 예측하는 단계; 및
상기 제어부(20)에 의해, 데이터베이스 블록 어드레스(DBA: database block address)로부터 파일 식별번호를 예측하는 단계;를 포함하고,
상기 블록의 크기를 예측하는 단계는
상기 데이터 파일의 맨 앞에서 설정된 오프셋 지점으로부터 설정된 크기의 제1 데이터를 획득하는 단계;
상기 제1 데이터의 맨 뒤에서 설정된 크기의 제2 데이터를 획득하는 단계; 및
상기 데이터베이스에서 구성 가능한 최대 블록 크기를 상기 제2 데이터로 나누어 상기 블록의 크기를 계산하는 단계;
를 포함하는 디스크 블록 패턴 분석을 통한 데이터베이스 파일 복구 방법.
Receiving an input data file of the database through the input unit 10;
Predicting the size of a block from a database block address (DBA) of the data file by the control unit 20; And
And predicting, by the control unit 20, a file identification number from a database block address (DBA).
The step of predicting the size of the block
Obtaining first data of a set size from an offset point set at the front of the data file;
Obtaining second data of a size set at the end of the first data; And
Calculating the size of the block by dividing the maximum block size configurable in the database by the second data;
Database file recovery method through disk block pattern analysis, including.
삭제delete 제1항에 있어서,
상기 파일 식별 번호를 예측하는 단계는
상기 데이터 파일의 두 번째 블록의 DBA 오프셋 지점으로부터 설정된 크기의 제3 데이터를 획득하는 단계; 및
상기 제3 데이터의 맨 앞에서 설정된 크기의 제4 데이터를 상기 파일 식별 번호로 예측하는 단계;
를 포함하는 디스크 블록 패턴 분석을 통한 데이터베이스 파일 복구 방법.
According to claim 1,
The step of predicting the file identification number
Obtaining third data of a set size from a DBA offset point of the second block of the data file; And
Predicting fourth data of a size set in front of the third data by the file identification number;
Database file recovery method through disk block pattern analysis, including.
제1항에 있어서,
상기 데이터 파일은
복수의 블록이 연속적으로 구성되고, 상기 데이터 파일의 크기는 단위 블록의 크기보다 작으며, 상기 블록의 크기는 2의 거듭제곱수로 이루어지고, 상기 데이터 파일의 첫 번째 블록은 메타데이터이며, 상기 블록의 시작점으로부터 설정된 위치에 상기 데이터베이스 블록 어드레스가 위치하며, 상기 블록의 번호는 0부터 순차적으로 1씩 증가하는 디스크 블록 패턴 분석을 통한 데이터베이스 파일 복구 방법.
According to claim 1,
The data file is
A plurality of blocks are continuously configured, the size of the data file is smaller than the size of a unit block, the size of the block consists of a power of 2, and the first block of the data file is metadata, and the block The database block address is located at a location set from the starting point of the, and the number of the block is sequentially increased from 0 to 1, thereby recovering a database file through disk block pattern analysis.
제1항에 있어서,
상기 데이터베이스 블록 어드레스는
상기 데이터 파일의 첫 번째 블록을 제외한 모든 블록이 동일한 오프셋 위치에 갖는 블록 위치의 식별자인 디스크 블록 패턴 분석을 통한 데이터베이스 파일 복구 방법.
According to claim 1,
The database block address
A method of restoring a database file through disk block pattern analysis, which is an identifier of a block position where all blocks except the first block of the data file have the same offset position.
KR1020180170741A 2017-12-28 2018-12-27 Method for restoring data of database through analysis of disc block pattern KR102139578B1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR1020170182811 2017-12-28
KR20170182811 2017-12-28

Publications (2)

Publication Number Publication Date
KR20190080793A KR20190080793A (en) 2019-07-08
KR102139578B1 true KR102139578B1 (en) 2020-07-29

Family

ID=67256156

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020180170741A KR102139578B1 (en) 2017-12-28 2018-12-27 Method for restoring data of database through analysis of disc block pattern

Country Status (1)

Country Link
KR (1) KR102139578B1 (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110016157A1 (en) 2009-07-14 2011-01-20 Vertica Systems, Inc. Database Storage Architecture
KR101547466B1 (en) * 2014-03-28 2015-08-26 고려대학교 산학협력단 Apparatus and method for recovering data in oracle database

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20030063620A (en) * 2002-01-23 2003-07-31 주식회사 파이널데이터 Method for recovering a damaged database data and computer readable medium storing thereof
KR101583283B1 (en) * 2014-04-24 2016-01-07 대한민국(관리부서 대검찰청) Apparatus and method for recovering data in DB2 database

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20110016157A1 (en) 2009-07-14 2011-01-20 Vertica Systems, Inc. Database Storage Architecture
KR101547466B1 (en) * 2014-03-28 2015-08-26 고려대학교 산학협력단 Apparatus and method for recovering data in oracle database

Also Published As

Publication number Publication date
KR20190080793A (en) 2019-07-08

Similar Documents

Publication Publication Date Title
US10671642B2 (en) Copying data changes to a target database
US8392423B2 (en) Data set index record preservation
US10459804B2 (en) Database rollback using WAL
US11204935B2 (en) Similarity analyses in analytics workflows
US20150310053A1 (en) Method of generating secondary index and apparatus for storing secondary index
US20190303388A1 (en) Search and analytics for storage systems
US8972338B2 (en) Sampling transactions from multi-level log file records
CN110888837B (en) Object storage small file merging method and device
US8595190B2 (en) Methods and apparatus related to completion of large objects within a DB2 database environment
CN113918658A (en) Method and device for recovering data
KR101593184B1 (en) Method and apparatus for recovering partition based on file system metadata
US9678970B2 (en) Database storage reclaiming program
CN106874399B (en) Networking backup system and backup method
US9009430B2 (en) Restoration of data from a backup storage volume
KR102139578B1 (en) Method for restoring data of database through analysis of disc block pattern
US9501369B1 (en) Partial restore from tape backup
CN111026736A (en) Data blood margin management method and device and data blood margin analysis method and device
CN112597070B (en) Object recovery method and device
US9588996B2 (en) Point in time recovery support for pending schema definition changes
CN108121719B (en) Method and device for realizing data extraction conversion loading ETL
JPWO2020065778A1 (en) Information processing equipment, control methods, and programs
Zeng et al. A Method of Recovering HBase Records from HDFS Based on Checksum File
Khan Identifying factors affecting deleted file persistence through empirical study and analysis
KR20200060970A (en) Method for Processing Data in In-Memory Database Using Snapshot and In-Memory Database
Alhussein et al. Multi-version data recovery for cluster identifier forensics filesystem with identifier integrity

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