KR101690282B1 - Method and apparatus of converting feature of tablespace - Google Patents

Method and apparatus of converting feature of tablespace Download PDF

Info

Publication number
KR101690282B1
KR101690282B1 KR1020140157336A KR20140157336A KR101690282B1 KR 101690282 B1 KR101690282 B1 KR 101690282B1 KR 1020140157336 A KR1020140157336 A KR 1020140157336A KR 20140157336 A KR20140157336 A KR 20140157336A KR 101690282 B1 KR101690282 B1 KR 101690282B1
Authority
KR
South Korea
Prior art keywords
logging
attribute
table space
tablespace
memory
Prior art date
Application number
KR1020140157336A
Other languages
Korean (ko)
Other versions
KR20160056694A (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 KR1020140157336A priority Critical patent/KR101690282B1/en
Publication of KR20160056694A publication Critical patent/KR20160056694A/en
Application granted granted Critical
Publication of KR101690282B1 publication Critical patent/KR101690282B1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/21Design, administration or maintenance of databases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/20Information retrieval; Database structures therefor; File system structures therefor of structured data, e.g. relational data
    • G06F16/22Indexing; Data structures therefor; Storage structures

Abstract

테이블스페이스 속성 변경 방법 및 그 장치가 개시된다. 데이터베이스 시스템은 메모리에 위치한 비-로깅 테이블스페이스의 잠금을 수행하고, 디스크에 비-로깅 테이블스페이스를 위한 저장공간을 생성하고, 비-로깅 테이블스페이스의 데이터를 상기 디스크에 생성된 저장공간에 기록한 후 비-로깅 테이블스페이스의 속성을 비-로깅에서 로깅으로 변경하고 잠금을 해제한다.A method and apparatus for changing a table space attribute are disclosed. The database system locks the non-logging tablespace located in the memory, creates storage space for the non-logging tablespace on the disk, writes the data of the non-logging tablespace to the storage space created on the disk Change the attributes of the non-logging tablespace from non-logging to logging and release the lock.

Description

테이블스페이스 속성 변경 방법 및 그 장치{Method and apparatus of converting feature of tablespace}METHOD AND APPARATUS FOR CHANGING TEXT SPACE ATTRIBUTES [0002]

본 발명은 데이터베이스 시스템의 테이블스페이스에 관한 것으로서, 보다 상세하게는 테이블스페이스의 속성을 비-로깅(no-logging)에서 로깅(logging) 또는 그 반대로 변경하는 방법 및 그 장치에 관한 것이다. The present invention relates to a table space of a database system, and more particularly, to a method and apparatus for changing attributes of a table space from no-logging to logging or vice versa.

일반적으로 데이터베이스는 적어도 하나 이상의 페이지를 포함하는 테이블스페이스에 데이터를 로딩(loading)할 때 추후 데이터 복구 등을 위하여 트랜잭션 로깅(transaction logging)을 수행한다. 여기서 트랜잭션 로깅이라고 함은 데이터베이스에 저장된 데이터를 변경(추가, 삭제, 갱신 등)하기 전에 그 변경 내용을 함께 기록하는 것을 말한다. 이하에서 혼동의 소지가 없는 한 트랜잭션 로깅 또는 로깅을 혼용하여 사용한다. Generally, when a database loads data into a table space including at least one page, transaction logging is performed for data recovery and the like. Here, the term "transaction logging" refers to the recording of a change in the data stored in the database before the change (addition, deletion, update, etc.) is made. In the following, transaction logging or logging is used in combination as long as there is no confusion.

만약 데이터베이스에 많은 양의 데이터를 로딩하는 경우 로깅 과정으로 인해 많은 시간이 소요된다. 특히 데이터베이스의 초기 구축을 위한 데이터 로딩의 경우 매우 많은 양의 데이터가 로딩되므로 시스템 구축에 많은 시간이 소요되는 문제점이 있다. If you are loading large amounts of data into the database, the logging process will take a long time. In particular, in the case of data loading for initial construction of a database, a very large amount of data is loaded, which takes a long time to construct a system.

특허공개번호 제2008-0044480호Patent Publication No. 2008-0044480

본 발명이 이루고자 하는 기술적 과제는, 비-로깅 상태에서 대용량의 데이터를 테이블스페이스에 로딩한 이후에 추후 데이터 복구 등의 문제가 생기지 않도록 테이블스페이스를 로깅 상태로 변경할 수 있는 방법 및 그 장치를 제공하는 데 있다.SUMMARY OF THE INVENTION The present invention provides a method and apparatus for changing a table space to a logging state so as to avoid problems such as data recovery after loading a large amount of data into a table space in a non- There is.

상기의 기술적 과제를 달성하기 위한, 본 발명에 따른 테이블스페이스 속성 변경 방법의 일 예는, 메모리에 위치한 비-로깅 테이블스페이스의 잠금을 수행하는 단계; 디스크에 상기 비-로깅 테이블스페이스를 위한 저장공간을 생성하는 단계; 상기 비-로깅 테이블스페이스의 데이터를 상기 디스크에 생성된 저장공간에 기록하는 단계; 상기 비-로깅 테이블스페이스의 속성을 비-로깅에서 로깅으로 변경하는 단계; 및 상기 잠금을 해제하는 단계;를 포함한다.According to an aspect of the present invention, there is provided a method for changing a table space attribute, the method comprising: performing a lock of a non-logging table space located in a memory; Creating storage space for the non-logging tablespace on the disk; Recording data of the non-logging tablespace in a storage space created on the disk; Changing an attribute of the non-logging tablespace from non-logging to logging; And releasing the lock.

상기의 기술적 과제를 달성하기 위한, 본 발명에 따른 테이블스페이스 속성 변경 방법의 다른 일 예는, 메모리에 위치한 테이블스페이스에 트랜잭션 로깅 없이 데이터를 로딩하는 제1 속성과 상기 테이블스페이스에 트랜잭션 로깅과 함께 데이터를 로딩하는 제2 속성 중 하나를 선택하는 단계; 상기 테이블스페이스는 상기 선택된 속성에 따라 데이터를 로딩하는 단계; 및 상기 제1 속성에서 상기 제2 속성으로의 변경 요청이 있으면, 상기 테이블스페이스의 데이터를 잠금 상태에서 디스크에 생성된 저장공간에 저장하고 상기 테이블스페이스의 메타정보를 제2 속성으로 변경한 후 상기 잠금을 해제하는 단계;를 포함한다.According to another aspect of the present invention, there is provided a method for changing a table space attribute, the method comprising: a first attribute for loading data into a table space located in a memory without transaction logging; Selecting one of the second attributes to load; Loading the data according to the selected attribute; And storing the data of the table space in the storage space created in the disk in the locked state, changing the meta information of the table space to the second attribute if there is a request to change from the first attribute to the second attribute, And releasing the lock.

상기의 기술적 과제를 달성하기 위한, 본 발명에 따른 데이터베이스 시스템의 일 예는, 속성이 로깅 또는 비-로깅인 테이블스페이스를 포함하는 제1 메모리; 및 상기 제1 메모리에 구현된 테이블스페이스의 속성을 메타 정보로 저장하는 메타 테이블스페이스를 포함하는 제2 메모리; 상기 메타 테이블스페이스에 저장된 속성이 로깅인 테이블스페이스를 위한 저장공간을 포함하는 디스크;를 포함하고, 상기 제1 메모리에 저장된 테이블스페이스의 속성은 상기 제2 메모리에 저장된 메타 테이블스페이스의 메타 정보에 따라 변경되고, 상기 메타 테이블스페이스의 메타 정보에 저장된 속성을 비-로깅에서 로깅으로 변경하는 경우에, 상기 제1 메모리의 테이블스페이스를 위한 저장공간이 상기 디스크에 생성되고, 상기 제1 메모리의 테이블스페이스의 데이터는 잠금 상태에서 상기 디스크의 저장공간에 저장된다.According to an aspect of the present invention, there is provided a database system comprising: a first memory including a tablespace whose attribute is logging or non-logging; A second memory including a meta tablespace for storing attributes of a table space implemented in the first memory as meta information; Wherein the attribute of the table space stored in the first memory corresponds to the meta information of the meta tablespace stored in the second memory, A storage space for the table space of the first memory is created on the disk and a table space of the first memory is created when the attribute stored in the meta information of the meta tablespace is changed from non-logging to logging, Is stored in the storage space of the disk in the locked state.

상기의 기술적 과제를 달성하기 위한, 본 발명에 따른 데이터베이스 시스템의 다른 일 예는, 트랜잭션 로깅과 함께 데이터를 로딩하는 제1 속성 및 트랜잭션 로깅없이 데이터를 로딩하는 제2 속성 중 하나를 메모리에 위치한 테이블스페이스의 속성으로 저장하는 속성 저장부; 상기 선택된 속성에 따라 상기 테이블스페이스에 데이터를 로딩하는 데이터 로딩부; 및 상기 제2 속성에서 상기 제1 속성으로 변경하고자 하는 경우에, 디스크에 상기 테이블스페이스를 위한 저장공간을 생성하고, 상기 테이블스페이스의 데이터를 잠금 상태에서 상기 디스크의 저장공간에 저장하고, 상기 테이블스페이스의 속성이 저장된 메타 테이블스페이스의 메타 정보를 상기 제2 속성에서 상기 제1 속성으로 변경하는 속성 변경부;를 포함한다.According to another aspect of the present invention, there is provided a database system including a first attribute for loading data together with transaction logging, and a second attribute for loading data without transaction logging, An attribute storage unit for storing the attributes as spaces; A data loading unit loading data into the table space according to the selected attribute; Creating a storage space for the table space on the disk and storing the data of the table space in a storage space of the disk in a locked state when the second attribute is to be changed to the first attribute, And an attribute changing unit for changing the meta information of the meta tablespace storing the attributes of the space from the second attribute to the first attribute.

본 발명에 따르면, 데이터베이스 초기 구축시와 같이 대용량의 데이터를 테이블스페이스에 로딩해야 하는 경우에 로깅 과정을 생략함으로써 로딩 시간을 절약할 수 있다. 또한 메모리에 저장된 비-로깅 상태의 테이블스페이스를 로깅 상태로 전환하여 추후 데이터 복구 등의 문제가 발생하지 않도록 할 수 있다. 또한 비-로깅 테이블스페이스를 로깅 테이블스페이스로 변경하고자 할 경우 메타 정보만의 변경만으로 가능하므로, 메모리에 별도의 로깅 테이블스페이스를 생성하거나 내부 데이터 구조 등을 변경할 필요없이 비-로깅 테이블스페이스를 그대로 활용할 수 있다. According to the present invention, loading time can be saved by omitting the logging process when a large amount of data needs to be loaded into the table space as in the initial stage of database construction. Also, the non-logging state of the tablespace stored in the memory can be switched to the logging state to prevent problems such as data recovery later. If you want to change the non-logging table space to the logging table space, you can change only the meta information. Therefore, you can create a separate logging table space in memory, or use the non-logging table space without changing the internal data structure. .

도 1은 본 발명에 따른 테이블스페이스 속성 변경 방법을 수행하는 데이터베이스 시스템의 일 예의 구성을 도시한 도면,
도 2는 본 발명에 따른 테이블스페이스 속성 변경 방법의 일 예를 도시한 흐름도,
도 3은 본 발명에 따른 메타 테이블스페이스와 비-로깅 테이블스페이스의 일 예를 도시한 도면, 그리고,
도 4는 본 발명에 따른 테이블스페이스 속성 변경을 수행하는 데이터베이스 시스템의 일 예의 구성을 도시한 도면이다.
Brief Description of Drawings Fig. 1 is a diagram showing a configuration of an example of a database system for performing a method of changing a table space attribute according to the present invention; Fig.
FIG. 2 is a flow chart showing an example of a method of changing a table space attribute according to the present invention;
FIG. 3 illustrates an example of a meta tablespace and a non-logging tablespace according to the present invention,
FIG. 4 is a diagram showing a configuration of an example of a database system for performing a change of a table space attribute according to the present invention.

이하에서, 첨부된 도면들을 참조하여 본 발명에 따른 테이블스페이스 속성 변경 방법 및 그 장치에 대해 상세히 설명한다.Hereinafter, a method and apparatus for changing a table space attribute according to the present invention will be described in detail with reference to the accompanying drawings.

도 1은 본 발명에 따른 테이블스페이스 속성 변경 방법을 수행하는 데이터베이스 시스템의 일 예의 구성을 도시한 도면이다.FIG. 1 is a diagram showing a configuration of an example of a database system for performing a method of changing a table space attribute according to the present invention.

도 1을 참조하면, 데이터베이스 시스템은 메모리(100) 및 디스크(130)를 포함한다. 물론 이외에, 데이터베이스 시스템은 사용자로부터 명령을 입력받고 결과를 보여주기 위한 사용자 인터페이스, 메모리나 디스크 등을 제어하고 각종 명령을 수행하는 중앙처리장치 등 다양한 구성을 포함할 수 있음은 물론이다. 다만 도 1에서는 본 발명의 이해를 돕기 위하여 본 발명의 특징과 관련된 구성 위주로 도시하고 설명한다.Referring to FIG. 1, a database system includes a memory 100 and a disk 130. Of course, the database system may include various configurations such as a user interface for inputting and receiving commands from a user, a central processing unit for controlling a memory or a disk, and executing various commands. However, in order to facilitate understanding of the present invention, FIG. 1 shows and describes mainly the configuration related to the features of the present invention.

메모리(100)는 메타 테이블스페이스(112)를 포함하는 제1 메모리(110)와 테이블스페이스(122)를 포함하는 제2 메모리(120)를 포함한다. 여기서 제1 메모리(110)와 제2 메모리(120)는 물리적 또는 논리적으로 구분되는 메모리일 수 있다. The memory 100 includes a first memory 110 including a meta tablespace 112 and a second memory 120 including a table space 122. [ The first memory 110 and the second memory 120 may be physically or logically separated from each other.

메타 테이블스페이스(112)는 테이블스페이스(122)에 대한 메타정보를 저장한다. 메타정보의 일 예로 테이블스페이스가 비-로깅 상태인지 로깅 상태인지를 나타내는 속성 정보가 있다.The meta tablespace 112 stores meta information about the table spaces 122. [ As an example of meta information, there is attribute information indicating whether the table space is in a non-logging state or a logging state.

테이블스페이스(122)는 메타 테이블스페이스(112)의 메타정보에 따라 비-로깅 테이블스페이스 또는 로깅 테이블스페이스가 된다. 여기서 비-로깅 테이블스페이스를 휘발성(volatile) 테이블스페이스라 하고, 로깅 테이블스페이스를 비휘발성(non-volatile) 테이블스페이스라고도 한다.The table space 122 becomes a non-logging table space or a logging table space according to the meta information of the meta tablespace 112. Here, the non-logging table space is called a volatile table space, and the logging table space is also called a non-volatile table space.

디스크(130)는 메타 테이블스페이스(132)와 로깅 테이블스페이스(134)를 포함한다. 여기서 디스크(130)는 하드 디스크 등에 한정되는 것은 아니며 SSD(Solid State Disk) 등과 같이 반도체 메모리를 이용한 저장매체 등 대용량 저장 장치를 모두 포함한다. 메타정보는 메모리의 메타 테이블스페이스(112) 및 디스크의 메타 테이블스페이스(132)에 함께 저장되고 갱신된다. The disk 130 includes a meta tablespace 132 and a logging tablespace 134. Here, the disk 130 is not limited to a hard disk and the like, and includes all the mass storage devices such as a solid-state disk (SSD) or a storage medium using a semiconductor memory. The meta information is stored and updated together in the meta tablespace 112 of the memory and the meta tablespace 132 of the disk.

디스크의 테이블스페이스(134)는 로깅 상태의 경우에 유지되며 비-로깅 상태에서는 유지되지 않는다. 예를 들어, 로깅 상태인 경우에, 데이터는 메모리의 테이블스페이스(122) 및 디스크의 테이블스페이스(134)에 트랜잭션 로깅과 함께 저장된다(140). 반면 비-로깅 상태인 경우에, 데이터는 메모리의 테이블스페이스(122)에 트랜잭션 로깅없이 저장되며 디스크(130)에는 데이터가 저장되지는 않는다.The table space 134 of the disk is maintained in the logging state and is not maintained in the non-logging state. For example, in the case of a logging state, data is stored (140) with transaction logging in the table space 122 of the memory and the table space 134 of the disk. On the other hand, in the non-logging state, the data is stored in the table space 122 of the memory without transaction logging, and no data is stored in the disk 130. [

데이터 로딩 시간을 줄이기 위하여 테이블스페이스를 비-로깅 상태로 운영하는 경우 장애 등으로 인한 데이터 손실 등의 복구가 어렵기 때문에 추후 데이터 복구를 위해 테이블스페이스를 비-로깅 상태에서 로깅 상태로 변경할 필요가 있다. 또한 반대로 데이터 로딩의 시간을 줄이기 위하여 로깅 상태에서 비-로깅 상태로 테이블스페이스의 속성을 변경할 필요가 있다. In order to reduce the data loading time, it is necessary to change the tablespace from the non-logging state to the logging state in order to recover the data, since it is difficult to recover the data loss due to the failure when the table space is operated in the non-logging state . Conversely, to reduce data loading time, it is necessary to change the attributes of the tablespace from logging to non-logging.

도 2는 본 발명에 따른 테이블스페이스 속성 변경 방법의 일 예를 도시한 흐름도이다. FIG. 2 is a flowchart illustrating an example of a method of changing a table space attribute according to the present invention.

도 2를 참조하면, 데이터베이스 시스템은 메모리에 위치한 비-로깅 테이블스페이스의 속성 변경을 위하여 우선 비-로깅 테이블스페이스의 잠금(lock)을 수행한다(S200). Referring to FIG. 2, the database system locks a non-logging table space in order to change the attribute of the non-logging tablespace located in the memory (S200).

그리고 데이터베이스 시스템은 디스크에 비-로깅 테이블스페이스의 저장을 위한 공간을 생성한다. 예를 들어, 데이터베이스 시스템은 비-로깅 테이블스페이스의 데이터를 저장할 디스크 데이터 파일을 생성한다. 디스크에 생성되는 저장공간의 크기는 비-로깅 테이블스페이스의 크기와 동일하거나 클 수 있다.The database system then creates space for storage of non-logging tablespaces on disk. For example, the database system creates a disk data file to store data for a non-logging tablespace. The size of the storage space created on the disk may be equal to or greater than the size of the non-logging tablespace.

데이터베이스 시스템은 메모리의 비-로깅 테이블스페이스의 데이터를 디스크에 생성된 저장공간에 기록한다(S220). 이때 데이터베이스 시스템은 비-로깅 테이블스페이스의 전체 데이터를 한꺼번에 디스크에 기록하므로, 순차적(sequential)으로 디스크에 쓰기(write) 동작을 수행할 수 있다. 예를 들어, 데이터베이스 시스템은 테이블스페이스의 페이지 제어 헤더(page control header)의 리스트를 참조하여 순차적으로 비-로깅 테이블스페이스의 모든 데이터를 디스크에 기록할 수 있다. The database system writes the data of the non-logging tablespace of the memory in a storage space created in the disk (S220). At this time, the database system writes the entire data of the non-logging tablespace to the disk at a time, so that the disk system can perform a write operation to the disk sequentially. For example, the database system may sequentially write all data of the non-logging tablespace to disk by referring to the list of page control headers of the table space.

비-로깅 테이블스페이스의 경우 로깅을 수행하지 않으므로 로그 시퀀스 번호(log sequence number)가 반드시 필요한 것은 아니나, 로깅 테이블스페이스의 경우 로깅을 수행하므로 로그 시퀀스 번호가 필요하다. 데이터베이스 시스템은 디스크에 생성된 저장공간에 저장하는 데이터의 페이지에 대한 로그 시퀀스 번호를 빈 값 또는 최근 로그 시퀀스 번호로 설정한다. For non-logging tablespaces, the log sequence number is not required because logging is not performed, but the log sequence number is needed for logging tablespace space. The database system sets the log sequence number for the page of data stored in the storage space created on the disk to the empty value or the latest log sequence number.

데이터베이스 시스템은 메모리의 비-로깅 테이블스페이스의 데이터가 모두 디스크에 저장되면, 비-로깅 테이블스페이스의 메타 정보를 변경한다(S230). 다시 말해, 데이터베이스 시스템은 비-로깅 테이블스페이스의 메타 정보에 현재 저장된 속성 정보인 비-로깅(즉, volatile) 상태를 로깅 상태(즉, non-volatile)로 변경한다. 이때 메모리에 로깅 테이블스페이스가 새롭게 생성되는 것이 아니라 기존의 비-로깅 테이블스페이스의 데이터 구조 등이 그대로 유지되는 등 테이블스페이스의 식별정보(ID)는 이전과 동일하게 유지된다. 다시 말해 비-로깅 테이블스페이스가 로깅-테이블스페이스로 변경되는 경우에도 각 페이지 및 레코드의 메모리 포인터가 변경되지 않으므로 인덱스에 기록되어 있는 개별 레코들에 대한 포인터를 변경하지 않아도 된다. The database system changes the meta information of the non-logging tablespace when all the data of the non-logging tablespace of the memory is stored on the disk (S230). In other words, the database system changes the non-logging (i.e., volatile) state to the logging state (i.e., non-volatile) attribute information currently stored in the meta information of the non-logging tablespace. At this time, the identification information (ID) of the table space is kept the same as the previous one, not the new logging table space is newly created in the memory but the data structure of the existing non-logging tablespace is maintained. In other words, even if the non-logging tablespace is changed to a logging-tablespace, the memory pointer of each page and record is not changed, so you do not need to change the pointer to individual records recorded in the index.

데이터베이스 시스템은 테이블스페이스의 속성 변경 후에 잠금 상태를 해제한다(S240). 이후 데이터베이스 시스템은 트랜잭션 로깅 과정과 함께 메모리와 디스크의 테이블스페이스에 데이터를 로딩한다. The database system releases the lock state after changing the attribute of the table space (S240). The database system then loads the data into the memory and disk tablespaces, along with the transaction logging process.

도 3은 본 발명에 따른 메타 테이블스페이스와 비-로깅 테이블스페이스의 일 예를 도시한 도면이다.FIG. 3 is a diagram illustrating an example of a meta tablespace and a non-logging table space according to the present invention.

도 1 및 도 3을 함께 참조하면, 제1 메모리(110)에 저장되는 메타 테이블스페이스(300)는 비-로깅 테이블스페이스를 가리키는 테이블스페이스 헤더(310)를 포함한다. 본 실시 예는 설명의 편의를 위하여 하나의 비-로깅 테이블스페이스만을 도시하였으나, 메타 테이블스페이스(300)는 복수 개의 비-로깅 및 로깅 상태의 테이블스페이스에 대한 정보를 포함할 수 있다.Referring to FIGS. 1 and 3 together, the meta tablespace 300 stored in the first memory 110 includes a table space header 310 indicating a non-logging tablespace. Although the present embodiment shows only one non-logging tablespace for convenience of explanation, the meta tablespace 300 may include information on a plurality of non-logging and logging state tablespaces.

제2 메모리(120)에 저장되는 비-로깅 테이블스페이스(350)는 데이터 페이지(360)와 인덱스(370)로 구성되며 로깅 과정을 수행하지 않으므로 각 페이지에 대한 로그 시퀀스 번호를 포함하지 않을 수 있다. 만약 로깅-테이블스페이스인 경우에는 페이지마다 로그 시퀀스 번호를 포함한다.The non-logging table space 350 stored in the second memory 120 is composed of a data page 360 and an index 370 and may not include a log sequence number for each page because it does not perform a logging process . If it is a logging-table space, it includes the log sequence number per page.

테이블스페이스가 비-로깅에서 로깅 상태로 변경되는 경우에, 해당 테이블스페이스를 가리키는 메타 테이블스페이스의 메타 정보가 변경된다. 그러나 인덱스(370)에 기록되어 있는 개별 레코드들에 대한 포인터는 변경되지 않는다. When a tablespace is changed from non-logging to logging, the meta tablespace meta information that points to the table space is changed. However, the pointer to the individual records recorded in the index 370 is not changed.

도 4는 본 발명에 따른 테이블스페이스 속성 변경을 수행하는 데이터베이스 시스템의 일 예의 구성을 도시한 도면이다.FIG. 4 is a diagram showing a configuration of an example of a database system for performing a change of a table space attribute according to the present invention.

도 4를 참조하면, 데이터베이스 시스템(400)은 속성 저장부(410), 데이터 로딩부(420) 및 속성 변경부(430)를 포함한다. Referring to FIG. 4, the database system 400 includes an attribute storage unit 410, a data loading unit 420, and an attribute changing unit 430.

속성 저장부(410)는 메모리에 구현된 적어도 하나 이상의 테이블스페이스의 속성이 로깅 또는 비-로깅 상태인지 저장한다. 속성 저장부(410)는 테이블스페이스가 저장되는 메모리와 논리적 또는 물리적으로 구분되는 메모리 영역에 테이블스페이스의 속성을 나타내는 메타 정보를 저장하고 관리할 수 있다. 예를 들어, 속성 저장부(410)는 메타 정보를 포함하는 메타 테이블스페이스를 메모리와 디스크에 저장할 수 있다.The attribute storage unit 410 stores whether attributes of at least one or more tablespaces implemented in the memory are in a logging state or a non-logging state. The attribute storage unit 410 may store and manage meta information indicating a property of the table space in a memory area logically or physically distinguished from a memory in which the table space is stored. For example, the attribute storage unit 410 may store a meta tablespace including meta information in a memory and a disk.

데이터 로딩부(420)는 속성 저장부(410)에 저장된 속성에 따라 테이블스페이스의 데이터 로딩 과정을 제어한다. 예를 들어, 테이블스페이스의 속성이 속성 저장부(410)에 비-로깅 상태로 저장되어 있는 경우, 데이터 로딩부(420)는 별도의 로깅 과정 없이 데이터를 로딩한다. 반면에 테이블스페이스의 속성이 로깅 상태로 속성 저장부(410)에 저장되어 있는 경우라면, 데이터 로딩부(420)는 메모리와 디스크에 로깅 과정과 함께 데이터를 로딩한다. The data loading unit 420 controls the data loading process of the table space according to the attributes stored in the attribute storage unit 410. [ For example, when the attribute of the table space is stored in the attribute storage unit 410 in a non-logging state, the data loading unit 420 loads data without performing a separate logging process. On the other hand, if the attribute of the table space is stored in the attribute storage unit 410 in the logging state, the data loading unit 420 loads the data along with the logging process to the memory and the disk.

속성 변경부(430)는 사용자의 요청 또는 기 설정된 일정 조건에 따라 테이블스페이스의 속성을 비-로깅에서 로깅, 또는 그 반대로 변경한다. 예를 들어, 테이블스페이스의 속성을 비-로깅에서 로깅 상태로 변경하고자 하는 경우에, 속성 변경부(430)는 메모리에 저장된 비-로깅 테이블스페이스를 잠금 상태로 만들고, 디스크에 데이터 저장 공간을 생성하고, 디스크의 저장공간에 비-로깅 테이블스페이스의 데이터를 저장한 후 속성 저장부에 저장된 테이블스페이스의 속성을 비-로깅에서 로깅으로 변경한다. 그리고 속성 변경부(430)는 비-로깅 테이블스페이스의 잠금을 해제한다.The attribute changing unit 430 changes the attribute of the table space from non-logging to vice versa, or vice versa, according to a user's request or predetermined condition. For example, when the attribute of the table space is to be changed from the non-logging state to the logging state, the attribute changing unit 430 locks the non-logging table space stored in the memory and creates a data storage space on the disk And stores the data of the non-logging tablespace in the storage space of the disk, and changes the attributes of the tablespace stored in the attribute storage unit from non-logging to logging. Then, the property changing unit 430 unlocks the non-logging tablespace.

본 발명은 또한 컴퓨터로 읽을 수 있는 기록매체에 컴퓨터가 읽을 수 있는 코드로서 구현하는 것이 가능하다. 컴퓨터가 읽을 수 있는 기록매체는 컴퓨터 시스템에 의하여 읽혀질 수 있는 데이터가 저장되는 모든 종류의 기록장치를 포함한다. 컴퓨터가 읽을 수 있는 기록매체의 예로는 다양한 형태의 ROM, RAM, CD-ROM, 자기 테이프, 플로피디스크, 광데이터 저장장치 등이 있다. 또한 컴퓨터가 읽을 수 있는 기록매체는 네트워크로 연결된 컴퓨터 시스템에 분산되어 분산방식으로 컴퓨터가 읽을 수 있는 코드가 저장되고 실행될 수 있다.The present invention can also be embodied as computer-readable codes on a computer-readable recording medium. A computer-readable recording medium includes all kinds of recording apparatuses in which data that can be read by a computer system is stored. Examples of the computer-readable recording medium include various types of ROM, RAM, CD-ROM, magnetic tape, floppy disk, optical data storage, and the like. The computer-readable recording medium may also be distributed over a networked computer system so that computer readable code can be stored and executed in a distributed manner.

이제까지 본 발명에 대하여 그 바람직한 실시예들을 중심으로 살펴보았다. 본 발명이 속하는 기술 분야에서 통상의 지식을 가진 자는 본 발명이 본 발명의 본질적인 특성에서 벗어나지 않는 범위에서 변형된 형태로 구현될 수 있음을 이해할 수 있을 것이다. 그러므로 개시된 실시예들은 한정적인 관점이 아니라 설명적인 관점에서 고려되어야 한다. 본 발명의 범위는 전술한 설명이 아니라 특허청구범위에 나타나 있으며, 그와 동등한 범위 내에 있는 모든 차이점은 본 발명에 포함된 것으로 해석되어야 할 것이다.The present invention has been described with reference to the preferred embodiments. It will be understood by those skilled in the art that various changes in form and details may be made therein without departing from the spirit and scope of the invention as defined by the appended claims. Therefore, the disclosed embodiments should be considered in an illustrative rather than a restrictive sense. The scope of the present invention is defined by the appended claims rather than by the foregoing description, and all differences within the scope of equivalents thereof should be construed as being included in the present invention.

Claims (13)

삭제delete 삭제delete 삭제delete 삭제delete 데이터베이스 시스템에서 테이블스페이스 속성을 변경하는 방법에 있어서,
상기 데이터베이스 시스템은,
메모리에 위치한 테이블스페이스에 트랜잭션 로깅 없이 데이터를 로딩하는 제1 속성과 상기 테이블스페이스에 트랜잭션 로깅과 함께 데이터를 로딩하는 제2 속성 중 하나를 선택하는 단계;
상기 테이블스페이스에 상기 선택된 속성에 따라 데이터를 로딩하는 단계; 및
상기 제1 속성에서 상기 제2 속성으로의 변경 요청이 있으면, 상기 테이블스페이스의 데이터를 잠금 상태에서 디스크에 생성된 저장공간에 저장하고 상기 테이블스페이스의 메타정보를 제2 속성으로 변경한 후 상기 잠금을 해제하는 단계;를 포함하는 것을 특징으로 하는 테이블스페이스 속성 변경 방법.
In a method for changing table space attributes in a database system,
The database system comprises:
Selecting one of a first attribute for loading data in a tablespace located in the memory without transaction logging and a second property for loading data in the table space with transaction logging;
Loading data into the table space according to the selected attributes; And
Storing the data of the table space in a storage space created in a disk in a locked state, changing meta information of the table space to a second attribute if there is a request to change from the first attribute to the second attribute, And releasing the table space attribute from the table space.
속성이 로깅 또는 비-로깅인 테이블스페이스를 포함하는 제1 메모리; 및
상기 제1 메모리에 구현된 테이블스페이스의 속성을 메타 정보로 저장하는 메타 테이블스페이스를 포함하는 제2 메모리;
상기 메타 테이블스페이스에 저장된 속성이 로깅인 테이블스페이스를 위한 저장공간을 포함하는 디스크;를 포함하고,
상기 제1 메모리에 저장된 테이블스페이스의 속성은 상기 제2 메모리에 저장된 메타 테이블스페이스의 메타 정보에 따라 변경되고,
상기 메타 테이블스페이스의 메타 정보에 저장된 속성을 비-로깅에서 로깅으로 변경하는 경우에, 상기 제1 메모리의 테이블스페이스를 위한 저장공간이 상기 디스크에 생성되고, 상기 제1 메모리의 테이블스페이스의 데이터는 잠금 상태에서 상기 디스크의 저장공간에 저장되는 것을 특징으로 하는 데이터베이스 시스템.
A first memory including a tablespace whose attributes are logging or non-logging; And
A second memory including a meta tablespace for storing an attribute of a table space implemented in the first memory as meta information;
And a disk including a storage space for a table space in which an attribute stored in the meta tablespace is logging,
The attribute of the table space stored in the first memory is changed according to the meta information of the meta tablespace stored in the second memory,
A storage space for a table space of the first memory is created on the disk when the attribute stored in the meta information of the meta tablespace is changed from non-logging to logging, and the data of the table space of the first memory is And is stored in a storage space of the disk in a locked state.
제 6항에 있어서,
상기 제1 메모리 및 제2 메모리는 물리적 또는 논리적으로 구분된 메모리인 것을 특징으로 하는 데이터베이스 시스템.
The method according to claim 6,
Wherein the first memory and the second memory are physically or logically separated memories.
제 6항에 있어서,
비-로깅에서 로깅으로 속성이 변경된 테이블스페이스의 페이지에 기록되는 로그 시퀀스 번호는 최근 로그 시퀀스 번호 또는 빈 값인 것을 특징으로 하는 데이터베이스 시스템.
The method according to claim 6,
Wherein a log sequence number recorded in a page of a table space whose attribute is changed from non-logging to logging is a latest log sequence number or an empty value.
삭제delete 삭제delete 삭제delete 삭제delete 제5항에 기재된 방법을 수행하기 위한 프로그램을 기록한 컴퓨터로 읽을 수 있는 기록매체.A computer-readable recording medium storing a program for performing the method according to claim 5.
KR1020140157336A 2014-11-12 2014-11-12 Method and apparatus of converting feature of tablespace KR101690282B1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
KR1020140157336A KR101690282B1 (en) 2014-11-12 2014-11-12 Method and apparatus of converting feature of tablespace

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
KR1020140157336A KR101690282B1 (en) 2014-11-12 2014-11-12 Method and apparatus of converting feature of tablespace

Publications (2)

Publication Number Publication Date
KR20160056694A KR20160056694A (en) 2016-05-20
KR101690282B1 true KR101690282B1 (en) 2016-12-27

Family

ID=56103817

Family Applications (1)

Application Number Title Priority Date Filing Date
KR1020140157336A KR101690282B1 (en) 2014-11-12 2014-11-12 Method and apparatus of converting feature of tablespace

Country Status (1)

Country Link
KR (1) KR101690282B1 (en)

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100390853B1 (en) * 2000-06-07 2003-07-10 차상균 A Logging Method and System for Highly Parallel Recovery Operation in Main-Memory Transaction Processing Systems
KR100862661B1 (en) 2006-11-16 2008-10-10 삼성전자주식회사 Method for deferred logging and apparatus thereof
KR20090067342A (en) * 2007-12-21 2009-06-25 (주)이글로벌시스템 Zero-downtime column-level encrypting method for database

Also Published As

Publication number Publication date
KR20160056694A (en) 2016-05-20

Similar Documents

Publication Publication Date Title
US11429641B2 (en) Copying data changes to a target database
US10642515B2 (en) Data storage method, electronic device, and computer non-volatile storage medium
US20150066857A1 (en) Replication of snapshots and clones
US8392423B2 (en) Data set index record preservation
JP5449524B2 (en) Computer, processing method thereof and computer system
US20180107402A1 (en) System and method for data storage using log-structured merge trees
US10013312B2 (en) Method and system for a safe archiving of data
US20160283501A1 (en) Posix-compatible file system, method of creating a file list and storage device
US20130013648A1 (en) Method for database storage of a table with plural schemas
US20150269071A1 (en) Flash memory file system and method using different types of storage media
US10423580B2 (en) Storage and compression of an aggregation file
JP6293709B2 (en) Storage system and storage system program
WO2014157243A1 (en) Storage control device, control method for storage control device, and control program for storage control device
KR100899147B1 (en) Method of storing meta-data and system for storing meta-data
US9898468B2 (en) Single pass file system repair with copy on write
EP2669806A1 (en) Storage system
US8745350B2 (en) Temporary VTOC locking during defragmentation
US20110099347A1 (en) Managing allocation and deallocation of storage for data objects
US20120317384A1 (en) Data storage method
KR20120082176A (en) Data processing method of database management system and system thereof
KR101690282B1 (en) Method and apparatus of converting feature of tablespace
JP2017167654A (en) Data management device and management method for database
US10303680B2 (en) Data processing apparatus and data processing method
US10740015B2 (en) Optimized management of file system metadata within solid state storage devices (SSDs)
CN109597573B (en) Management metadata reading method and device

Legal Events

Date Code Title Description
A201 Request for examination
E902 Notification of reason for refusal
E902 Notification of reason for refusal
GRNT Written decision to grant
FPAY Annual fee payment

Payment date: 20191220

Year of fee payment: 4