WO2018093094A1 - 데이터베이스 관리 시스템에서의 데이터 복제 기법 - Google Patents

데이터베이스 관리 시스템에서의 데이터 복제 기법 Download PDF

Info

Publication number
WO2018093094A1
WO2018093094A1 PCT/KR2017/012686 KR2017012686W WO2018093094A1 WO 2018093094 A1 WO2018093094 A1 WO 2018093094A1 KR 2017012686 W KR2017012686 W KR 2017012686W WO 2018093094 A1 WO2018093094 A1 WO 2018093094A1
Authority
WO
WIPO (PCT)
Prior art keywords
group
log records
database
transactions
source database
Prior art date
Application number
PCT/KR2017/012686
Other languages
English (en)
French (fr)
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 US16/461,726 priority Critical patent/US11182404B2/en
Publication of WO2018093094A1 publication Critical patent/WO2018093094A1/ko

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/17Details of further file system functions
    • G06F16/178Techniques for file synchronisation in file systems
    • 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/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • G06F16/273Asynchronous replication or reconciliation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/14Details of searching files based on file metadata
    • G06F16/156Query results presentation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/182Distributed file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/182Distributed file systems
    • G06F16/184Distributed file systems implemented as replicated file system
    • G06F16/1844Management specifically adapted to replicated file systems
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/10File systems; File servers
    • G06F16/18File system types
    • G06F16/1858Parallel file systems, i.e. file systems supporting multiple processors
    • 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
    • G06F16/211Schema design and management
    • G06F16/213Schema design and management with details for schema evolution support
    • 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/23Updating
    • G06F16/2358Change logging, detection, and notification
    • 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/23Updating
    • G06F16/2365Ensuring data consistency and integrity

Definitions

  • the present invention relates to a database, and more particularly, to an efficient change data capture (CDC) technique.
  • CDC change data capture
  • Data managed within an enterprise often needs to be migrated or replicated from a source location to a target location.
  • a database system for implementing banking can be classified into a database that can be accessed by multiple external customers simultaneously and a database that internal employees can access, depending on the nature of the client accessing.
  • synchronization between the two databases is required to maintain data consistency.
  • implementing such synchronization can incur overhead for database resources.
  • Data warehouse a company's analytical database, typically updates data generated during business hours by batch at the end of the day. For this reason, the existing DW structure had no choice but to analyze data from yesterday. For example, when a bank reviews a customer's loan, they have looked at the data from yesterday and evaluated it. Because of this, the customer information that was changed today was missed during the loan review.
  • CDC technology is a data replication solution that captures change data from a data source and sends it to a target system.
  • Such CDC can be used to monitor and track transactions in database systems, and in particular to monitor and track changes to data committed in the database system.
  • Change data capture technology can capture data changes in the source database and transfer the captured data changes to the target system to allow data replication between the source database and the target database. have.
  • This CDC technology can extract the data of the entire table with only a few sessions.
  • the CDC technology since the CDC technology does not directly access a data file, the CDC technology has an advantage of reducing resource utilization in a database management system (DBMS).
  • DBMS database management system
  • CDC technology is used in many other areas. It is used to prevent service interruption when migrating the system. Mission-critical systems can't be easily upgraded because services should not be interrupted for a while. However, using CDC in this situation prevents downtime because the database can be synchronized and the old equipment shut down. In addition, CDC technology can be usefully used even when the system is redundant to ensure high availability.
  • this CDC technique may cause delays in synchronizing data at runtime in the case of large data generation.
  • the CDC technology has a drawback that a problem related to the consistency of data synchronization may occur when a table structure is changed or the like.
  • the present disclosure presents technical features for reducing the delay for data synchronization between a source database and a target database.
  • the present disclosure is intended to propose a CDC technique that does not cause a problem for data synchronization even when a change of the table structure occurs.
  • a computer program stored on a computer readable medium including encoded instructions according to one exemplary embodiment of the present disclosure is disclosed.
  • the computer program when executed by one or more processors of a computer system, may cause the one or more processors to perform the following steps for change data capture (CDC) between a source database and a target database.
  • the steps comprise: obtaining a plurality of log records comprising information about transactions processed in the source database; Grouping the plurality of log records into a plurality of groups based on a predetermined condition, wherein the log records belonging to each of the plurality of groups are sorted within the group based on the order according to their occurrence time; And determining that the obtained plurality of log records are replicated from the source database to the target database in parallel in group units.
  • a server for performing change data capture (CDC) between a source database and a target database comprises: a log record acquisition and analysis module for obtaining a plurality of log records including information about transactions processed in the source database; A grouping module for grouping the plurality of log records into a plurality of groups based on a predetermined condition, wherein the log records belonging to each of the plurality of groups are sorted within the group based on the order according to their occurrence time ; And a control module for determining that the obtained plurality of log records are replicated from the source database to the target database in parallel in a group unit.
  • CDC change data capture
  • a method for performing change data capture (CDC) between a source database and a target database includes: obtaining a plurality of log records comprising information about transactions processed in the source database; Grouping the plurality of log records into a plurality of groups based on a predetermined condition, wherein the log records belonging to each of the plurality of groups are sorted within the group based on the order according to their occurrence time; And determining that the obtained plurality of log records are replicated from the source database to the target database in parallel in group units.
  • technical features are disclosed for reducing delays in data synchronization between a source database and a target database.
  • the present disclosure can provide a CDC technique that does not cause a problem for data synchronization even when a change in the table structure occurs.
  • FIG 1 illustrates an example database system, according to one embodiment of the disclosure.
  • FIG 2 illustrates an example agent server, according to one embodiment of the disclosure.
  • FIG. 3 illustrates an example method for data replication from a source database server to a target database server in accordance with one embodiment of the present disclosure.
  • FIG. 4 illustrates an example for multi-group apply in a CDC process, in accordance with an embodiment of the present disclosure.
  • FIG. 5 illustrates an example for group reconfiguration in a CDC process, in accordance with an embodiment of the present disclosure.
  • FIG. 6 shows a block diagram of an example computing device for implementing a CDC solution in accordance with one embodiment of the present disclosure.
  • an embodiment may not be construed as having any aspect or design described being better or advantageous than other aspects or designs.
  • the terms “component”, “module”, “system”, “interface”, etc., used below generally mean a computer-related entity, for example, hardware, a combination of hardware and software, And software.
  • Computer-readable media herein can include any kind of storage media on which programs and data are stored so that they can be read by a computer system.
  • a medium may include a read only memory (ROM), a random access memory (RAM), a compact disc (CD) -ROM, a digital video disc (DVD) -ROM, a magnetic tape, a floppy disk, and optical data.
  • ROM read only memory
  • RAM random access memory
  • CD compact disc
  • DVD digital video disc
  • Storage device and the like Additionally, such media may be distributed over networked systems, storing computer readable codes and / or instructions in a distributed fashion.
  • log records herein may be used interchangeably with transaction logs.
  • FIG. 1 shows a schematic diagram of a database system 100 according to an embodiment of the present invention.
  • the database system 100 may include a source database server 110, a target database server 120, and / or an agent server 130.
  • database system 100 may include a client, which may refer to a node (s) in a system having a mechanism for communicating with database servers.
  • a client may include a PC, laptop computer, workstation, terminal, and / or any electronic device having network connectivity.
  • the client may include any server implemented by at least one of an agent, an application programming interface (API), and a plug-in.
  • API application programming interface
  • operations to be described below of the source database server 110, the target database server 120, and / or the agent server 130 may be performed according to a query issued from a client.
  • Database servers 110 and 120 may include any type of computer system or computer device, such as, for example, a microprocessor, mainframe computer, digital single processor, portable device and device controller, and the like. Each of these database servers 110 and 120, although not shown, may include a Database Management System (DBMS) and / or persistent storage.
  • DBMS Database Management System
  • the source database server 110 and the target database server 120 in the present specification may refer to nodes in the database system 100.
  • the source database server 110 and the target database server 120 may be integrated into one database server and managed and / or clustered.
  • the source database server 110 and the target database server 120 may be integrated into one database server to configure multiple databases linked to each other.
  • the source database server 110 and the target database server 120 may refer to heterogeneous database servers located remotely from each other.
  • two database servers are shown in FIG. 1, more database servers may be included in the scope of the present invention.
  • database servers 110 and 120 may include one or more memories including a buffer cache.
  • the database servers 110 and 120 may include one or more processors.
  • the DBMS in the database server can be operated by the processor on the memory.
  • the memory is a main storage device directly accessed by the processor, such as dynamic random access memory (DRAM), random random memory (SRAM), and the like, and stored information when the power is turned off. May mean, but is not limited to, volatile storage devices that are instantaneously erased.
  • DRAM dynamic random access memory
  • SRAM random random memory
  • the memory may temporarily store data tables containing data values and log records according to transactions. For example, log records may be stored in a separate transaction log store in memory.
  • a transaction may typically mean a continuous processing unit for a series of tasks such as exchanging information or updating a database. Such a transaction represents the basic unit of work for accomplishing the requested work while ensuring the integrity of the database.
  • data values and / or log records of a data table may be written from a memory to a persistent storage medium.
  • the memory includes a buffer cache, and such data and / or log records may be stored in a block of the buffer cache.
  • the data and / or log records may be written to the persistent storage medium by a background process.
  • Persistent storage media in a database server may be, for example, storage devices based on flash memory and / or battery-backed memory as well as magnetic disks, optical disks and magneto-optical storage devices. It means a non-volatile storage medium that can keep any data persistent.
  • Such persistent storage media may communicate with the processor and memory of the database servers 110 and 120 through various communication means. In further embodiments, such persistent storage media may be located external to the database servers 110 and 120 and communicate with the database servers 110 and 120.
  • the DBMS is a program for allowing the database servers 110 and 120 to perform operations such as searching for, inserting, modifying, deleting, and / or managing log records, and the like, as described above. May be implemented by a processor in memory.
  • the client and database servers 110 and 120 or database servers 110 and 120 can communicate with each other via a network (not shown).
  • the network is a Public Switiched Telephone Network (PSTN), x Digital Subscriber Line (xDSL), Rate Adaptive DSL (RADSL), Multi Rate DSL (MDSL), and Very High Speed DSL (VDSL). ), Various wired communication systems such as Universal Asymmetric DSL (UDASL), High Bit Rate DSL (HDSL), and Local Area Network (LAN).
  • PSTN Public Switiched Telephone Network
  • xDSL Digital Subscriber Line
  • RADSL Rate Adaptive DSL
  • MDSL Multi Rate DSL
  • VDSL Very High Speed DSL
  • UDASL Universal Asymmetric DSL
  • HDSL High Bit Rate DSL
  • LAN Local Area Network
  • the networks presented herein include Code Division Multi Access (CDMA), Time Division Multi Access (TDMA), Frequency Division Multi Access (FDMA), Orthogonal Frequency Division Multi Access (OFDMA), and Single Carrier-FDMA (SC-FDMA).
  • CDMA Code Division Multi Access
  • TDMA Time Division Multi Access
  • FDMA Frequency Division Multi Access
  • OFDMA Orthogonal Frequency Division Multi Access
  • SC-FDMA Single Carrier-FDMA
  • the network herein may include a database link (dblink) so that the database servers (110, 120) communicate with each other over such a database link to data from or from another database server. You can also import log records.
  • the techniques described herein may be used in the networks mentioned above as well as in other networks.
  • the source database server 110 may be located remotely from the target database server 120. Also, the source database server 110 and the target database server 120 may refer to heterogeneous database servers that are servers of the same type or are not compatible with each other.
  • source database server 110 may include, but is not limited to, a device including a processor and a memory for executing and storing instructions as any type of database. That is, the source database may include software, firmware and hardware or a combination thereof.
  • the software may include application (s) for creating, deleting and modifying database tables, schemas, indexes and / or data.
  • Source database server 110 may receive transactions from a client or other computing device, and example transactions retrieve, add, modify, and / or retrieve data, tables and / or indexes, etc., at source database server 110. May include deleting.
  • the target database server 120 refers to a database server to which data changes generated in the source database server 110 are replicated or synchronized, and may include at least a portion of the features of the source database server 110 described above.
  • target database server 120 may store a copy of data, data types, tables, indexes, and / or log records of source database server 110.
  • the log record herein may refer to a data record capable of identifying the structure of the data in the database, changes to the organization, and / or changes related to tables, columns, data types, indexes, data, and the like.
  • the agent server 130 may mean a separate entity for implementing the CDC between the source database server 110 and the target database server 120.
  • agent server 130 may perform any operations to implement CDC features.
  • the agent server 130 may include, but is not limited to, a device including a processor and a memory for executing and storing instructions as any type of server.
  • Agent server 130 may include software, firmware and hardware or a combination thereof.
  • software that implements operations of agent server 130 may be installed in source database 110 and / or target database 120.
  • agent server 130 may be integrated in part into the source database server 110 and / or the target database server 120.
  • the CDC function of agent server 130 may be replaced by target database server 120.
  • FIG. 2 illustrates an example agent server 130 according to one embodiment of the disclosure.
  • FIG. 2 illustrates the agent server 130 as an example, as described above, the agent server 130 may be replaced with the source database server 110 and / or the target database server 120 or a combination thereof.
  • the agent server 130 may include a log record acquisition and analysis module 210, a grouping module 220, a control module 230, a transmit / receive module 240, and a storage module 250. Can be.
  • the components of the agent server 130 described above are exemplary, and additional components may be present or some of them may be omitted.
  • the log record acquisition and analysis module 210 may obtain a plurality of log records including information about transactions processed in the source database. When a change is made to data, tables and / or indexes in the source database according to a transaction initiated by the client, a log record for the transaction may be recorded in the source database.
  • the agent server 130 may acquire and analyze log record (s) for change data by analyzing the log buffer and / or the transaction log recorded in the log file at the source database server 110. .
  • the log record acquisition and analysis module 210 may obtain only changed data by analyzing the transaction log. Additionally, agent server 130 may simply receive log records determined by source database server 110 from source database 110.
  • the source database server 110 may include, for example, a change table including change data for the corresponding source table.
  • Agent server 130 may obtain a log record by analyzing the change table.
  • the agent server 130 may obtain a log record by extracting a series of transactions from the log using the transaction log.
  • Each of the plurality of log records may include information for uniquely identifying a transaction and information for identifying a data record changed according to the transaction.
  • the grouping module 220 may generate a plurality of groups by grouping the plurality of log records obtained by the log record acquisition and analysis module 210 based on the predetermined condition. For example, the grouping module 220 may perform grouping based on database object identification information associated with each of the transactions. For example, if the database object is a table, grouping will be performed on a table-by-table basis, and transactions performed on the same table will be in one group.
  • the predetermined condition may be determined according to object criteria.
  • the predetermined condition includes a condition as to whether or not there is a dependency between objects, and the dependency may be determined based on whether a reference is made between a primary key and a foreign key.
  • the primary key may include a key that uniquely identifies data stored in an object (eg, a table), and the foreign key is a primary key column referenced by another object in a particular object to create a link between each table. It may include.
  • a primary key in one table can be associated with a foreign key in another table to establish connectivity between the tables.
  • the grouping module 220 may group the objects into one group when there is a dependency (primary key-foreign key reference relationship) between the objects.
  • the grouping module 220 may sort the log records in the group based on an order (eg, a system change number (SCN)) according to when the log records in the group occur when generating the group.
  • an order eg, a system change number (SCN)
  • the control module 230 may control overall operations of the agent server 130. That is, the control module 230 may be configured to capture a log record according to a transaction performed in the source database, an assembly operation for properly reflecting the captured log record to the target database (eg, converting it into a format suitable for the target database) , Generation of a query (DML and / or DDL, etc.) recognized by the target database, and a reflection operation for copying the log records assembled in a specific region of the target database.
  • DML and / or DDL, etc. a query for copying the log records assembled in a specific region of the target database.
  • the control module 230 may determine that replication of the obtained plurality of log records from the source database to the target database is performed in parallel in group units grouped by the grouping module 220. Each group may correspond to a respective thread, and replication processes may proceed in parallel by each thread. Further, in a further embodiment, one thread may process a plurality of groups.
  • the agent server 130 in response to receiving a commit command, replicates from the source database to the target database for one or more log records associated with the commit command in the group unit. Can be performed independently.
  • each of the plurality of log records may include information for uniquely identifying a transaction and / or information for identifying a data record changed according to the transaction.
  • Technical features according to an embodiment of the present invention can significantly reduce the overhead due to database replication or database synchronization by reflecting the log records extracted in time series to the target database in parallel.
  • control module 230 may perform group reconstruction for one or more groups associated with the transactions included in the query in response to the transmission / reception module 240 receiving a query defining a relationship between the transactions.
  • a query may include a Data Definition Language (DDL) that defines a relationship and / or structure between the transactions.
  • DDL Data Definition Language
  • the control module 230 may determine whether the relationship defined in the DDL is included in a predetermined relationship (or condition) (eg, when a change in dependency relationship between objects occurs).
  • control module 230 may determine to perform group reconfiguration dynamically when the dependencies between objects (see primary key-foreign key) are changed or created. For example, if a primary key (for example, a first object) and a foreign key (for example, a second object) exist, when performing an insert operation in DML, the second object is performed after the first object is performed. For a delete operation in DML, a primary key-foreign key constraint is generated, which must be performed on the second object first and then on the first object.
  • a primary key for example, a first object
  • a foreign key for example, a second object
  • a primary key-foreign key constraint is generated, which must be performed on the second object first and then on the first object.
  • the control module 230 dynamically reconfigures the group (i.e., the first object and the second object into one). Group into groups). That is, the control module 230 determines whether or not consistency is maintained for the grouped groups by analyzing the query received from the client, and if it is determined that the consistency is not maintained, the transactions included in the received query. It may be determined to perform group reconstruction for one or more groups associated with. The determination of whether this consistency is maintained may be determined based on whether dependency relationships between objects are maintained.
  • the control module 230 may determine whether transactions belonging to the predetermined relationship are included in one group. In other words, since transactions belonging to a parent / child relationship are dependent on each other in the processing order of transactions, when they belong to one group, the time order within a group (for example, a system change number (SCN)) in a group unit is included. The problem of consistency will not arise in performing the replication reflected on the basis of. However, if transactions belonging to a parent / child relationship do not belong to one group, the control module 230 determines to perform group reorganization so that transactions belonging to this relationship are included in one group, thereby ensuring consistency in database synchronization. Can be guaranteed.
  • SCN system change number
  • Group reconfiguration herein may include moving transaction (s) belonging to one group into another group.
  • the control module 230 upon receiving a query that defines a relationship between transactions and / or a relationship between objects, the control module 230 includes a plurality of log records obtained until the group reconstruction is completed. You can decide to stop replication from the source database to the target database. In such a case, when the control module 230 receives a query defining a relationship between the transactions and / or a relationship between the objects, the control module 230 until the group reconstruction is completed, the plurality of logs obtained based on the SCN Origination time information of the query among the obtained plurality of log records while allowing replication of log records associated with the transaction committed before the query origination time information among the records from the source database to the target database. It may then be determined to stop replication of log records associated with a committed transaction from the source database to the target database. This is because, for example, there is no problem in consistency even if the replication is performed for transactions committed before the DDL is issued.
  • control module 230 may determine to resume the replication of the obtained plurality of log records from the source database to the target database based on the reconstructed groups. In this case, replication will be performed in units of reconstructed groups.
  • replication to the target database may be performed based on meta information (eg, SCN information, table information, data identification information, etc.) related to the transaction included in the log record.
  • the target database server 120 or the agent server 130 analyzes the obtained log records, and the corresponding log records in a form that can be reflected to the target database server 120 (for example, in the form of data recognizable by processes in the target database). Can be assembled. For example, if the first transaction performed in the source database is associated with the first table, the first transaction will be reflected in the first table of the target database.
  • the control module 130 may monitor the hit rate for one or more groups configured (or reconfigured). The control module 130 may determine to perform group reconstruction for one or more groups associated with the transactions included in the query based on the monitored hit rate and the received query.
  • the hit rate herein may include any information that may represent quantitative information of log records processed / generated within each group, including information on the number of occurrences of log records in each group. In this case, the control module 130 may move the log records belonging to the group with the high number of occurrence of log records to the group with the low number of occurrence.
  • control module 130 or the grouping module 120 may increase the efficiency of the database replication speed by dividing the first group into a first subgroup and a second subgroup.
  • control module 130 or grouping module 120 may increase the efficiency for database replication by moving log records of the first group to the second group.
  • the transceiving module 240 may provide a communication function with database servers and / or a client.
  • the transmission / reception module 240 may receive the extracted log records from the source database server.
  • the transmit / receive module 240 may communicate with database servers and / or clients using any of the networks and / or database links described above.
  • the transmission / reception module 240 may store, change, query and index build, change, and query requests from the client. And the like.
  • the transmit / receive module 240 may deliver information from the source database server 120 to the target database server 130 in a manner that calls the procedure to the target database server 120.
  • the transmission / reception module 240 may provide a function of transmitting / receiving any data / information transmitted between servers in relation to database replication.
  • the storage module 250 may store any data stored in connection with performing the CDC, such as storing the extracted log record.
  • storage module 250 may be stored in connection with performing tasks of database servers 110, 120. Data can be stored.
  • the storage module 245 may be included in a DBMS and / or persistent storage medium.
  • the storage module 250 at the target database server 120 may store log records generated at the source database server in the target database server 120 according to grouping (or reorganized grouping).
  • storage module 250 may process and manage requests associated with the storage (including updates) of data at the server.
  • the storage module 250 may determine to store data and an index table.
  • the storage module 250 may determine a storage location for the data and / or index tables. For example, storage module 250 may determine a storage location on the data table for the data. As another example, the storage module 250 can determine a storage location on the persistent storage medium for the data.
  • FIG. 3 illustrates an example method for data replication from a source database server to a target database server in accordance with one embodiment of the present disclosure.
  • the order of the method shown in FIG. 3 is exemplary and additional steps may be added or some of the steps shown may be omitted.
  • the method presented in FIG. 3 will be described below as being performed by the agent server 130 for convenience of description, but as described above, according to an implementation aspect, the source database server 110 or the target database 120 Or a combination thereof.
  • the agent server 130 may obtain a plurality of log records including information about transactions processed in the source database (310).
  • a log record for the transaction may be recorded in the source database.
  • the agent server 130 may obtain log record (s) for change data by analyzing a log buffer and / or a transaction log recorded in the log file at the source database server 110.
  • agent server 130 may simply receive log records from source database 110 for change data determined by source database server 110.
  • the agent server 130 may change the newly changed data after the most recently acquired / extracted change data when DML (Data Manipulation Language) occurs in the source table of the source database server 110. Can be obtained. Log records for such changed data may be stored and recorded in a separate table.
  • DML Data Manipulation Language
  • the agent server 130 may group the obtained plurality of log records into a plurality of groups based on the predetermined condition (320).
  • the agent server 130 may generate groups in units of object identification information included in metadata of log records. Transactions (log records) belonging to each group may be aligned with each other in the group based on the SCN. For example, the log record for the transaction that precedes the SCN may be reflected to the target database server before the log record for the subsequent transaction.
  • the agent server 130 may perform grouping based on whether there is a dependency (primary key-foreign key reference relationship) between the objects.
  • the agent server 130 may group the objects in which there are dependencies into one group.
  • the agent server 130 may determine that the plurality of log records obtained are transferred or replicated from the source database to the target database in parallel in a group unit (330).
  • Agent server 130 may receive a query that defines a relationship between transactions (340). Relationships or objects between transactions after acquired log records have been allocated to each group, and while log records obtained by the thread associated with each group are reflected by the thread associated with each group according to the commit command A query may be issued (eg, such as DDL) that defines the relationship between the two. In such a case, dependency relationships between specific transactions or dependency relationships (or changes to such dependent relationships) between objects may be formed. In this case, to maintain consistency with data replication, log records related to transactions associated with the query will need to be in a group.
  • a query that defines a relationship between transactions (340). Relationships or objects between transactions after acquired log records have been allocated to each group, and while log records obtained by the thread associated with each group are reflected by the thread associated with each group according to the commit command
  • a query may be issued (eg, such as DDL) that defines the relationship between the two.
  • DDL dependency relationships between specific transactions or dependency relationships (or changes to such dependent relationships) between objects may be formed.
  • the agent server 130 may determine to perform group reconstruction for one or more groups associated with the transactions and / or objects included in the query (350).
  • the agent server 130 determines whether the relationship defined by the query is included in a predetermined relationship (eg, when a change of dependency between objects occurs or when a dependency between objects occurs newly). You can decide. If it is determined to be included in the predetermined relationship, it may be further determined whether transactions belonging to the predetermined relationship are included in one group. For example, transactions in which parent / child relationships and / or objects belong to primary and foreign key reference relationships are dependent on each other in the order in which transactions are processed (i.e., the order of deletion is dependent). In the case of belonging to the group of, the problem of consistency will not occur in performing the replication reflected based on the time order (eg, SCN) within the group on a group basis.
  • a predetermined relationship eg, when a change of dependency between objects occurs or when a dependency between objects occurs newly. You can decide. If it is determined to be included in the predetermined relationship, it may be further determined whether transactions belonging to the predetermined relationship are included in one group. For example, transactions in which parent / child relationships and
  • Group reorganization may include moving transaction (s) belonging to one group into another group.
  • the agent server 130 when the agent server 130 receives a query defining a relationship between transactions, the agent server 130, from the source database of the obtained plurality of log records to the target database until the group reorganization is completed You can decide to stop replication.
  • the agent server 130 when the agent server 130 receives the query defining the relationship between the transactions, generation of the query among the obtained plurality of log records based on SCN until the group reconstruction is completed.
  • One of the obtained plurality of log records associated with a transaction committed after the originating time information of the query, while allowing the replication of log records associated with the transaction committed before the scheduled time information from the source database to the target database. It may be determined to stop the replication of log records from the source database to the target database. This is because, for example, there is no problem in consistency even if the replication is performed for transactions committed before the DDL is issued.
  • the agent server 130 may then determine to resume replication of the obtained plurality of log records from the source database to the target database based on the reconstructed groups when the group reconstruction is complete. In this case, replication to the target database will be performed in units of reconstructed groups.
  • there may be various methods such as a method in which a transaction related to a corresponding log record is reflected in a corresponding object of a target database, a method reflected in a separate view, and the like. It is not.
  • replication to the target database may be performed based on meta information (eg, SCN information, table information, data identification information, etc.) related to the transaction included in the log record.
  • the target database server 120 or the agent server 130 analyzes the obtained log records, and the corresponding log records in a form that can be reflected to the target database server 120 (for example, in the form of data recognizable by the processes of the target database). Can be assembled. For example, if the first transaction performed in the source database is associated with the first table, the first transaction will be reflected in the first table of the target database.
  • the group reconfiguration configuration of step 350 may be further performed by monitoring the hit rate for one or more groups. That is, the agent server 130 may determine to perform group reconstruction for one or more groups associated with the transactions included in the query, based in addition to the monitored hit rate as well as the DDL information in the received query. have.
  • the agent server 130 may perform group reconfiguration, such as group splitting or moving to another group, for groups having a high hit rate (that is, a high number of log records) to improve the efficiency of parallel processing. have.
  • FIG. 4 illustrates an example for multi-group apply in a CDC process, in accordance with an embodiment of the present disclosure.
  • the first transaction T1, the second transaction T2, the third transaction T3, the fourth transaction T4, and the fifth transaction T5 were performed at the source database server, and according to the order of their occurrence, FIG. 4. As shown in FIG. 2, corresponding log records are recorded in a log file / log buffer and the like.
  • the first transaction T1, third transaction T3, and fifth transaction T5 are transactions for the first object. Thus, the transactions can be grouped into a first group G1. Also, the second transaction T2 and the fourth transaction T4 are transactions for the second object. Thus, the transactions can be grouped into a second group G2.
  • the first group G1 and the second group G2 may be reflected in parallel to the target database server 120 independently of each other.
  • FIG. 5 illustrates an example for group reconfiguration in a CDC process, in accordance with an embodiment of the present disclosure.
  • FIG. 5 assumes a case where a DDL is received indicating that a predetermined relationship between T4 and T5 exists after grouping is performed in the multi-group application situation shown in FIG. 4. Also, commits to T4 and T5 will be performed after the corresponding DDL is received.
  • T4 and T5 which have dependencies between each other, defined in the DDL, currently belong to different groups, a problem of consistency between databases may occur when using a multi-group application technique. have.
  • T5 can be moved from G1 to G2.
  • T4 and T5 eventually belong to the same group. Therefore, as T4 and T5 having mutually dependent relations belong to the same group, the problem of database consistency in the CDC can be solved even by using a multi-group application technique.
  • T4 may be moved from G2 to G1 without T5 moving from G1 to G2.
  • T4 and T5 may come out of G2 and G1, respectively, to form a new group called G3.
  • an embodiment of the present disclosure may be grouped and reflected in parallel between objects in order to improve synchronization speed between databases, and without interruption because the consistency is broken when the group is dynamically changed. Group redistribution can be performed.
  • FIG. 6 shows a block diagram of an example computing device for implementing a CDC solution in accordance with one embodiment of the present disclosure.
  • program modules include routines, programs, components, data structures, etc. that perform particular tasks or implement particular abstract data types.
  • methods of the present invention may be used in uniprocessor or multiprocessor computer systems, minicomputers, mainframe computers, as well as personal computers, handheld computing devices, microprocessor-based or programmable consumer electronics, and the like (each of which And other computer system configurations, including one or more associated devices, which may operate in conjunction with one or more associated devices.
  • the described embodiments of the invention can also be practiced in distributed computing environments where certain tasks are performed by remote processing devices that are linked through a communications network.
  • program modules may be located in both local and remote memory storage devices.
  • Computers typically include a variety of computer readable media. Any medium that can be accessed by a computer can be a computer readable medium, which can be volatile and nonvolatile media, transitory and non-transitory media, removable and non-transitory media. Removable media.
  • computer readable media may comprise computer storage media.
  • Computer storage media includes volatile and nonvolatile media, temporary and non-transitory media, removable and non-removable media implemented in any method or technology for storing information such as computer readable instructions, data structures, program modules or other data. Include.
  • Computer storage media may include RAM, ROM, EEPROM, flash memory or other memory technology, CD-ROMs, digital video disks or other optical disk storage devices, magnetic cassettes, magnetic tapes, magnetic disk storage devices or other magnetic storage devices, Or any other medium that can be accessed by a computer and used to store desired information.
  • a transmit / receive medium typically implements computer readable instructions, data structures, program modules or other data in a modulated data signal, such as a carrier wave or other transport mechanism. Includes all information delivery media.
  • modulated data signal means a signal that has one or more of its characteristics set or changed to encode information in the signal.
  • transmission and reception (communication) media include wired media such as a wired network or direct-wired connection, and wireless media such as acoustic, RF, infrared, and other wireless media.
  • FIG. 6 illustrates an exemplary environment 600 for implementing various aspects of the present invention, including a computing device 602 for implementing the CDC features of the present invention, wherein the computing device 602 is a processing device 604. , System memory 606, and system bus 608.
  • the system bus 608 connects system components, including but not limited to system memory 606, to the processing unit 604.
  • Processing unit 604 may be any of a variety of commercial processors. Dual processor and other multiprocessor architectures may also be used as the processing unit 604.
  • the system bus 608 may be any of several types of bus structures that may be further interconnected to a memory bus, a peripheral bus, and a local bus using any of a variety of commercial bus architectures.
  • System memory 606 includes read only memory (ROM) 610 and random access memory (RAM) 612.
  • BIOS Basic Input / Output System
  • BIOS is stored in non-volatile memory 610, such as ROM, EPROM, EEPROM, etc., which helps to transfer information between components within computing device 602, such as during startup. Contains basic routines.
  • RAM 612 may also include high speed RAM, such as static RAM for caching data.
  • the computing device 602 also includes an internal hard disk drive (HDD) 614 (eg, EIDE, SATA).
  • the internal hard disk drive 614 may also be configured for external use within a suitable chassis (not shown).
  • Magnetic floppy disk drive (FDD) 616 eg, for reading from or writing to removable diskette 618
  • optical disk drive 620 eg, CD- ROM disk 622, for reading from or writing to other high capacity optical media such as DVD.
  • the hard disk drive 614, the magnetic disk drive 616, and the optical disk drive 620 are connected to the system bus 608 by the hard disk drive interface 624, the magnetic disk drive interface 626, and the optical drive interface 628, respectively. ) Can be connected.
  • the interface 624 for external drive implementation includes at least one or both of Universal Serial Bus (USB) and IEEE 1394 interface technologies.
  • drives and their associated computer readable media provide nonvolatile storage of data, data structures, computer executable instructions, and the like.
  • drives and media correspond to storing any data in a suitable digital format.
  • computer readable media refers to HDDs, removable magnetic disks, and removable optical media such as CDs or DVDs, those skilled in the art will appreciate zip drives, magnetic cassettes, flash memory cards, cartridges, and the like.
  • Other types of computer readable media may also be used in the exemplary operating environment and it will be appreciated that any such media may include computer executable instructions for performing the methods of the present invention.
  • Program modules may be stored in the drive and RAM 612, including operating system 630, one or more application programs 632, other program modules 634, and program data 636. All or a portion of the operating system, applications, modules and / or data may also be cached in RAM 612. It will be appreciated that the present invention may be implemented in various commercially available operating systems or combinations of operating systems.
  • a user may enter commands and information into the computing device 602 through one or more wired / wireless input devices, such as a keyboard 638 and a mouse 640.
  • Other input devices may include a microphone, IR remote control, joystick, game pad, stylus pen, touch screen, and the like. While these and other input devices are often connected to the processing unit 604 through an input device interface 642 that is connected to the system bus 608, the parallel port, IEEE 1394 serial port, game port, USB port, IR interface, Etc. can be connected by other interfaces.
  • a monitor 644 or other type of display device is also connected to the system bus 608 via an interface such as a video adapter 646.
  • the computer generally includes other peripheral output devices (not shown) such as speakers, printers, and the like.
  • Computing device 602 may operate in a networked environment using logical connections to one or more remote computers, such as remote computer (s) 648, via wired and / or wireless communications.
  • Remote computer (s) 648 may be a workstation, server computer, router, personal computer, portable computer, microprocessor-based entertainment device, peer device, or other conventional network node, and generally is coupled to computing device 602.
  • the logical connections shown include wired / wireless connections to a local area network (LAN) 652 and / or a larger network, such as a telecommunications network (WAN) 654.
  • LAN and WAN networking environments are commonplace in offices and businesses, facilitating enterprise-wide computer networks such as intranets, all of which may be connected to worldwide computer networks, such as the Internet.
  • computing device 602 When used in a LAN networking environment, computing device 602 is connected to local network 652 via a wired and / or wireless communication network interface or adapter 656. Adapter 656 may facilitate wired or wireless communication to LAN 652, which also includes a wireless access point installed therein for communicating with wireless adapter 656.
  • computing device 602 When used in a WAN networking environment, computing device 602 may include a modem 658, connect to a communication server on WAN 654, or establish communications over WAN 654, such as over the Internet. Other means.
  • the modem 658 which may be an internal or external and wired or wireless device, is connected to the system bus 608 via the serial port interface 642.
  • program modules or portions thereof described with respect to computing device 602 may be stored in remote memory / storage device 650. It will be appreciated that the network connections shown are exemplary and other means of establishing a communications link between the computers can be used.
  • Computing device 602 may be any wireless device or entity disposed and operating in wireless communication, such as a printer, scanner, desktop and / or portable computer, portable data assistant, communications satellite, wireless detectable tag, and the like. Communicate with any associated equipment or location and telephone. This includes at least Wi-Fi and Bluetooth wireless technology. Thus, the communication can be a predefined structure as in a conventional network or simply an ad hoc communication between at least two devices.
  • Wi-Fi Wireless Fidelity
  • Wi-Fi is a wireless technology such as a cell phone that allows such a device, for example, a computer, to transmit and receive data indoors and outdoors, ie anywhere within the coverage area of a base station.
  • Wi-Fi networks use a wireless technology called IEEE 802.6 (a, b, g, etc.) to provide secure, reliable, high-speed wireless connectivity.
  • Wi-Fi may be used to connect computers to each other, to the Internet, and to a wired network (using IEEE 802.3 or Ethernet).
  • Wi-Fi networks can operate in unlicensed 2.4 and 5 GHz wireless bands, for example, at 6 Mbps (802.6a) or 54 Mbps (802.6b) data rates, or in products that include both bands (dual band). have.
  • the various embodiments presented herein may be embodied in a method, apparatus, or article of manufacture using standard programming and / or engineering techniques.
  • article of manufacture includes a computer program, carrier, or media accessible from any computer-readable device.
  • computer-readable media may include magnetic storage devices (eg, hard disks, floppy disks, magnetic strips, etc.), optical discs (eg, CDs, DVDs, etc.), smart cards, and flash memory. Devices, such as, but not limited to, EEPROM, cards, sticks, key drives, and the like.
  • various storage media presented herein include one or more devices and / or other machine-readable media for storing information.
  • machine-readable medium includes, but is not limited to, various other media capable of storing and retaining instruction (s) and / or data.
  • the present invention relates to a database, and more particularly, to provide an effective change data capture (CDC) technique.
  • CDC change data capture

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Databases & Information Systems (AREA)
  • Data Mining & Analysis (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • Computing Systems (AREA)
  • Library & Information Science (AREA)
  • Computer Security & Cryptography (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

본 개시내용의 일 실시예에 따라, 인코딩된 명령들을 포함하는 컴퓨터 판독가능 매체에 저장된 컴퓨터 프로그램이 개시된다. 상기 컴퓨터 프로그램은 컴퓨터 시스템의 하나 이상의 프로세서들에 의해 실행되는 경우, 상기 하나 이상의 프로세서들로 하여금 소스 데이터베이스와 타겟 데이터베이스 간의 변경 데이터 캡쳐(CDC:Change Data Capture)를 위한 이하의 단계들을 수행하도록 한다. 여기서 상기 단계들은: 상기 소스 데이터베이스에서 처리되는 트랜잭션들에 대한 정보를 포함하는 복수의 로그 레코드들을 획득하는 단계; 사전결정된 조건에 기초하여, 상기 복수의 로그 레코드들을 복수의 그룹들로 그룹화하는 단계 ― 상기 복수의 그룹들 각각에 속하는 로그 레코드들은 이들의 발생 시점에 따른 순서에 기초하여 그룹 내에서 정렬됨 ―; 및 상기 획득된 복수의 로그 레코드들이 상기 소스 데이터베이스로부터 상기 타겟 데이터베이스로 복제되는 것이 그룹 단위로 병렬적으로 수행될 것을 결정하는 단계를 포함할 수 있다.

Description

데이터베이스 관리 시스템에서의 데이터 복제 기법
본 발명은 데이터베이스에 관한 것으로서, 보다 구체적으로 효율적인 변경 데이터 캡쳐(CDC:Change Data Capture) 기법에 관한 것이다.
기업의 비즈니스는 폭발적인 데이터의 증가와 다양한 환경 및 플랫폼의 등장으로 빠르게 확장되고 있다. 새로운 비즈니스 환경이 도래함에 따라서, 보다 더 효율적이고 유연한 데이터 서비스와 정보의 처리, 데이터 관리 기능이 필요하게 되었다. 이러한 변화에 맞춰서 기업 비즈니스 구현의 기반이 되는 고성능, 고가용성 및 확장성의 문제를 해결하기 위한 데이터베이스에 대한 연구가 계속되고 있다.
기업 내에서 관리되는 데이터는 종종 소스(source) 위치로부터 타겟(target) 위치로 마이그레이션 또는 복제되어 관리할 필요가 있다. 예를 들어, 은행 업무를 구현하기 위한 데이터베이스 시스템은, 액세스하는 클라이언트의 특성에 따라서 다수의 외부 고객들이 동시에 액세스할 수 있는 데이터베이스 및 내부 직원들이 액세스할 수 있는 데이터베이스로 분류될 수 있다. 하나의 데이터베이스 시스템에서 이러한 2개의 데이터베이스를 사용하는데 있어서 데이터의 정합성을 유지하기 위해서는 양 데이터베이스들 간에 동기화가 이루어져야 한다. 하지만, 이러한 동기화를 구현하기 위해서는 데이터베이스 리소스들에 대한 오버헤드를 초래할 수 있다.
최근들어, 실시간 데이터 분석에 대한 기업들의 요구가 거세지면서 특정 DB에서 데이터가 변경되면 이를 캡처해 다른 DB로 옮겨주는 역할을 하는 기술에 대한 필요성이 부각되고 있다. 기업의 분석용 DB인 데이터웨어하우스(DW)는 전날까지 업무 시간에 발생한 데이터를 업무가 끝난 야간 시간에 배치(Batch)를 통해 업데이트 하는 것이 일반적이었다. 이 때문에 기존의 DW 구조에서는 어제까지의 데이터를 분석 대상으로 할 수밖에 없었다. 예를 들어, 은행에서 고객의 대출을 심사할 때 어제까지의 데이터를 보고 평가를 해왔다. 이 때문에 오늘 변경된 고객 정보는 대출 심사에서 놓칠 수 밖에 없었다.
이러한 데이터베이스들 간의 동기화를 실시간으로 구현하기 위한 수단으로서, 변경 데이터 캡쳐(CDC:Change Data Capture) 기술이 각광받고 있다. CDC 기술은 데이터 소스로부터 변경 데이터를 캡쳐하여 타겟 시스템에 전송하는 데이터 복제 솔루션이다. 이러한 CDC는 데이터베이스 시스템들에서 트랜잭션들을 모니터링 및 추적하는데 이용될 수 있으며, 특히 데이터베이스 시스템에서 커밋(commit)되는 데이터에 대한 변경들을 모니터링 및 추적하는데 이용될 수 있다. 변경 데이터 캡쳐 기술은, 소스 데이터베이스의 데이터 변경 내용을 캡쳐(capture)하고 캡쳐된 데이터 변경 내용을 타겟 시스템에 전달(transfer)하여, 소스 데이터베이스와 타겟 데이터베이스의 데이터 복제(replication)가 이루어지도록 허용할 수 있다.
이러한 CDC 기술은 적은 세션만으로 전체 테이블의 데이터를 추출할 수 있다. 또한, CDC 기술은 데이터 파일에 직접적으로 접근하지 않기 때문에, 데이터베이스 관리 시스템(DBMS:DataBase Management System) 내의 자원(resource) 사용률을 줄일 수 있다는 장점을 가지고 있다.
CDC 기술은 이 외에도 다양한 분야에서 사용된다. 시스템을 마이그레이션할 때 서비스가 중단되는 것을 막기 위해서 활용된다. 미션크리티컬한 시스템은 잠시라도 서비스가 중단되면 안되기 때문에 함부로 업그레이드 하기가 쉽지 않다. 하지만, 이러한 상황에서 CDC를 이용하면, 데이터베이스의 싱크를 맞춰놓고 옛날 장비를 셧다운 할 수 있기 때문에 다운타임을 막을 수 있다. 더불어, 고가용성 확보를 위해 시스템을 이중화하는 경우에도 CDC 기술이 유용하게 사용될 수 있다.
하지만, 이러한 CDC 기술은 대량 데이터의 발생의 경우 데이터를 런타임에 동기화하는데 있어서 지연이 발생할 수 있다. 또한, CDC 기술은 테이블 구조의 변경 등이 수반되는 경우 데이터 동기화의 정합성관련 문제가 발생될 수도 있다는 단점을 보유하고 있다.
따라서, 소스 데이터베이스와 타겟 데이터베이스 간의 데이터 동기화에 대한 지연을 줄일 수 있고 나아가 테이블 구조의 변경이 발생되는 경우에도 데이터 동기화에 대한 문제를 유발시키지 않는 CDC 기술에 대한 필요성이 존재한다.
본 개시내용은, 소스 데이터베이스와 타겟 데이터베이스 간의 데이터 동기화에 대한 지연을 줄이기 위한 기술적 특징들을 제시한다.
나아가, 본 개시내용은 테이블 구조의 변경이 발생되는 경우에도 데이터 동기화에 대한 문제를 유발시키지 않는 CDC 기술을 제시하고자 하기 위함이다.
본 개시내용의 예시적인 일 실시예에 따라 인코딩된 명령들을 포함하는 컴퓨터 판독가능 매체에 저장된 컴퓨터 프로그램이 개시된다. 상기 컴퓨터 프로그램은 컴퓨터 시스템의 하나 이상의 프로세서들에 의해 실행되는 경우, 상기 하나 이상의 프로세서들로 하여금 소스 데이터베이스와 타겟 데이터베이스 간의 변경 데이터 캡쳐(CDC:Change Data Capture)를 위한 이하의 단계들을 수행하도록 할 수 있다. 여기서, 상기 단계들은: 상기 소스 데이터베이스에서 처리되는 트랜잭션들에 대한 정보를 포함하는 복수의 로그 레코드들을 획득하는 단계; 사전결정된 조건에 기초하여, 상기 복수의 로그 레코드들을 복수의 그룹들로 그룹화하는 단계 ― 상기 복수의 그룹들 각각에 속하는 로그 레코드들은 이들의 발생 시점에 따른 순서에 기초하여 그룹 내에서 정렬됨 ―; 및 상기 획득된 복수의 로그 레코드들이 상기 소스 데이터베이스로부터 상기 타겟 데이터베이스로 복제되는 것이 그룹 단위로 병렬적으로 수행될 것을 결정하는 단계;를 포함할 수 있다.
본 개시내용의 예시적인 다른 일 실시예에 따라 소스 데이터베이스와 타겟 데이터베이스 간의 변경 데이터 캡쳐(CDC)를 수행하기 위한 서버가 개시된다. 상기 서버는: 상기 소스 데이터베이스에서 처리되는 트랜잭션들에 대한 정보를 포함하는 복수의 로그 레코드들을 획득하는 로그 레코드 획득 및 분석 모듈; 사전결정된 조건에 기초하여, 상기 복수의 로그 레코드들을 복수의 그룹들로 그룹화하는 그룹화 모듈 ― 상기 복수의 그룹들 각각에 속하는 로그 레코드들은 이들의 발생 시점에 따른 순서에 기초하여 그룹 내에서 정렬됨 ―; 및 상기 획득된 복수의 로그 레코드들이 상기 소스 데이터베이스로부터 상기 타겟 데이터베이스로 복제되는 것이 그룹 단위로 병렬적으로 수행될 것을 결정하는 제어 모듈;을 포함할 수 있다.
본 개시내용의 예시적인 다른 일 실시예에 따라, 소스 데이터베이스와 타겟 데이터베이스 간의 변경 데이터 캡쳐(CDC)를 수행하기 위한 방법이 개시된다. 상기 방법은: 상기 소스 데이터베이스에서 처리되는 트랜잭션들에 대한 정보를 포함하는 복수의 로그 레코드들을 획득하는 단계; 사전결정된 조건에 기초하여, 상기 복수의 로그 레코드들을 복수의 그룹들로 그룹화하는 단계 ― 상기 복수의 그룹들 각각에 속하는 로그 레코드들은 이들의 발생 시점에 따른 순서에 기초하여 그룹 내에서 정렬됨 ―; 및 상기 획득된 복수의 로그 레코드들이 상기 소스 데이터베이스로부터 상기 타겟 데이터베이스로 복제되는 것이 그룹 단위로 병렬적으로 수행될 것을 결정하는 단계;를 포함할 수 있다.
본 개시내용의 일 실시예에 따라, 소스 데이터베이스와 타겟 데이터베이스 간의 데이터 동기화에 대한 지연을 줄이기 위한 기술적 특징들이 개시된다.
나아가, 본 개시내용은 테이블 구조의 변경이 발생되는 경우에도 데이터 동기화에 대한 문제를 유발시키지 않는 CDC 기술을 제공할 수 있다.
다양한 양상들이 이제 도면들을 참조로 기재되며, 여기서 유사한 참조 번호들은 총괄적으로 유사한 구성요소들을 지칭하는데 이용된다. 이하의 실시예에서, 설명 목적을 위해, 다수의 특정 세부사항들이 하나 이상의 양상들의 총체적 이해를 제공하기 위해 제시된다. 그러나, 그러한 양상(들)이 이러한 특정 세부사항들 없이 실시될 수 있음은 명백할 것이다. 다른 예시들에서, 공지의 구조들 및 장치들이 하나 이상의 양상들의 기재를 용이하게 하기 위해 블록도 형태로 도시된다.
도 1은 본 개시내용의 일 실시예에 따른 예시적인 데이터베이스 시스템을 도시한다.
도 2는 본 개시내용의 일 실시예에 따른 예시적인 에이전트 서버를 도시한다.
도 3은 본 개시내용의 일 실시예에 따라 소스 데이터베이스 서버로부터 타겟 데이터베이스 서버로의 데이터 복제에 대한 예시적인 방법을 도시한다.
도 4는 본 개시내용의 일 실시예에 따라, CDC 프로세스에서의 멀티 그룹 적용(multi-group apply)에 대한 일례를 도시한다.
도 5는 본 개시내용의 일 실시예에 따라, CDC 프로세스에서의 그룹 재구성에 대한 일례를 도시한다.
도 6은 본 개시내용의 일 실시예에 따라 CDC 솔루션을 구현하기 위한 예시적인 컴퓨팅 장치에 대한 블록도를 도시한다.
다양한 실시예들 및/또는 양상들이 이제 도면들을 참조하여 개시된다. 하기 설명에서는 설명을 목적으로, 하나 이상의 양상들의 전반적 이해를 돕기 위해 다수의 구체적인 세부사항들이 개시된다. 그러나, 이러한 양상(들)은 이러한 구체적인 세부사항들 없이도 실행될 수 있다는 점 또한 본 발명의 기술 분야에서 통상의 지식을 가진 자에게 인식될 수 있을 것이다. 이후의 기재 및 첨부된 도면들은 하나 이상의 양상들의 특정한 예시적인 양상들을 상세하게 기술한다. 하지만, 이러한 양상들은 예시적인 것이고 다양한 양상들의 원리들에서의 다양한 방법들 중 일부가 이용될 수 있으며, 기술되는 설명들은 그러한 양상들 및 그들의 균등물들을 모두 포함하고자 하는 의도이다.
또한, 다양한 양상들 및 특징들이 다수의 디바이스들, 컴포넌트들 및/또는 모듈들 등을 포함할 수 있는 시스템에 의하여 제시될 것이다. 다양한 시스템들이, 추가적인 장치들, 컴포넌트들 및/또는 모듈들 등을 포함할 수 있다는 점 그리고/또는 도면들과 관련하여 논의된 장치들, 컴포넌트들, 모듈들 등 전부를 포함하지 않을 수도 있다는 점 또한 이해되고 인식되어야 한다.
본 명세서에서 사용되는 "실시예", "예", "양상", "예시" 등은 기술되는 임의의 양상 또는 설계가 다른 양상 또는 설계들보다 양호하다거나, 이점이 있는 것으로 해석되지 않을 수도 있다. 아래에서 사용되는 용어들 '컴포넌트', '모듈', '시스템', '인터페이스' 등은 일반적으로 컴퓨터 관련 엔티티(computer-related entity)를 의미하며, 예를 들어, 하드웨어, 하드웨어와 소프트웨어의 조합, 및 소프트웨어를 의미할 수 있다.
더불어, 용어 "또는"은 배타적 "또는"이 아니라 내포적 "또는"을 의미하는 것으로 의도된다. 즉, 달리 특정되지 않거나 문맥상 명확하지 않은 경우에, "X는 A 또는 B를 이용한다"는 자연적인 내포적 치환 중 하나를 의미하는 것으로 의도된다. 즉, X가 A를 이용하거나; X가 B를 이용하거나; 또는 X가 A 및 B 모두를 이용하는 경우, "X는 A 또는 B를 이용한다"가 이들 경우들 어느 것으로도 적용될 수 있다. 또한, 본 명세서에 사용된 "및/또는"이라는 용어는 열거된 관련 아이템들 중 하나 이상의 아이템의 가능한 모든 조합을 지칭하고 포함하는 것으로 이해되어야 한다.
또한, "포함한다" 및/또는 "포함하는"이라는 용어는, 해당 특징 및/또는 구성요소가 존재함을 의미하지만, 하나 이상의 다른 특징, 구성요소 및/또는 이들의 그룹의 존재 또는 추가를 배제하지 않는 것으로 이해되어야 한다. 또한, 달리 특정되지 않거나 단수 형태를 지시하는 것으로 문맥상 명확하지 않은 경우에, 본 명세서와 청구범위에서 단수는 일반적으로 "하나 또는 그 이상"을 의미하는 것으로 해석되어야 한다.
본 명세서에서의 컴퓨터 판독가능 매체는 컴퓨터 시스템에 의해서 판독될 수 있도록 프로그램 및 데이터가 저장되는 모든 종류의 저장 매체를 포함할 수 있다. 본 발명의 일 양상에 따르면, 이러한 매체는 ROM(판독 전용 메모리), RAM(랜덤 액세스 메모리), CD(컴팩트 디스크)-ROM, DVD(디지털 비디오 디스크)-ROM, 자기 테이프, 플로피 디스크, 광 데이터 저장장치 등을 포함할 수 있다. 추가적으로, 이러한 매체는 네트워크로 연결된 시스템에 분산되어, 분산 방식으로 컴퓨터가 판독가능한 코드들 및/또는 명령들을 저장할 수도 있다.
본 발명의 실시를 위한 구체적인 내용을 설명하기에 앞서, 본 발명의 기술적 요지와 직접적 관련이 없는 구성에 대해서는 본 발명의 기술적 요지를 흩뜨리지 않는 범위 내에서 생략하였음에 유의하여야 할 것이다. 또한, 본 명세서 및 청구범위에 사용된 용어 또는 단어는 발명자가 자신의 발명을 최선의 방법으로 설명하기 위해 적절한 용어의 개념을 정의할 수 있다는 원칙에 입각하여 본 발명의 기술적 사상에 부합하는 의미와 개념으로 해석되어야 할 것이다.
본 명세서에서의 데이터베이스와 데이터베이스 서버는 서로 상호교환가능하게 사용될 수 있다. 또한, 본 명세서에서의 로그 레코드는 트랜잭션 로그와 상호교환가능하게 사용될 수 있다.
도 1은 본 발명의 일 실시예에 따른 데이터베이스 시스템(100)에 대한 개략도를 도시한다.
도 1에서 도시되는 바와 같이, 데이터베이스 시스템(100)은 소스 데이터베이스 서버(110), 타겟 데이터베이스 서버(120) 및/또는 에이전트 서버(130)를 포함할 수 있다.
도 1에서 도시되지는 않았지만, 데이터베이스 시스템(100)은 클라이언트를 포함할 수 있으며, 상기 클라이언트는 데이터베이스 서버들과 통신하기 위한 매커니즘을 갖는 시스템에서의 노드(들)를 의미할 수 있다. 예를 들어, 이러한 클라이언트는 PC, 랩탑 컴퓨터, 워크스테이션, 단말 및/또는 네트워크 접속성을 갖는 임의의 전자 디바이스를 포함할 수 있다. 또한, 클라이언트는 에이전트, API(Application Programming Interface) 및 플러그-인(Plug-in) 중 적어도 하나에 의해 구현되는 임의의 서버를 포함할 수도 있다.
본 발명의 일 실시예에서, 클라이언트로부터 발행된 쿼리에 따라서, 소스 데이터베이스 서버(110), 타겟 데이터베이스 서버(120) 및/또는 에이전트 서버(130)의 후술될 동작들이 수행될 수 있다.
데이터베이스 서버들(110 및 120)은, 예를 들어, 마이크로프로세서, 메인프레임 컴퓨터, 디지털 싱글 프로세서, 휴대용 디바이스 및 디바이스 제어기 등과 같은 임의의 타입의 컴퓨터 시스템 또는 컴퓨터 디바이스를 포함할 수 있다. 이러한 데이터베이스 서버들(110 및 120) 각각은, 도시되지는 않았지만, DBMS(Database Management System) 및/또는 영구 저장 매체(persistent storage)를 포함할 수 있다.
본 명세서에서의 소스 데이터베이스 서버(110) 및 타겟 데이터베이스 서버(120)는 데이터베이스 시스템(100)에서의 노드(node)들을 의미할 수 있다. 추가적인 실시예로서, 소스 데이터베이스 서버(110) 및 타겟 데이터베이스 서버(120)는 하나의 데이터베이스 서버에 통합되어 관리 및/또는 클러스터링될 수도 있다. 소스 데이터베이스 서버(110) 및 타겟 데이터베이스 서버(120)는 하나의 데이터베이스 서버에 통합되어 서로 연계된 다중 데이터베이스를 구성할 수도 있다.
본 발명의 일 실시예에서, 소스 데이터베이스 서버(110) 및 타겟 데이터베이스 서버(120)는 서로 원격에 위치한 이종의 데이터베이스 서버를 의미할 수도 있다. 더불어, 도 1에서는 2개의 데이터베이스 서버들을 도시하고 있으나, 이보다 많은 데이터베이스 서버들 또한 본 발명의 범위에 포함될 수도 있다.
도 1에서는 도시되지 않았지만, 데이터베이스 서버들(110 및 120)은 버퍼 캐시를 포함하는 하나 이상의 메모리를 포함할 수 있다. 또한, 도 1에서는 도시되지 않았지만, 데이터베이스 서버(110 및 120)는 하나 이상의 프로세서를 포함할 수 있다. 따라서, 데이터베이스 서버 내의 DBMS는 상기 메모리 상에서 상기 프로세서에 의하여 동작될 수 있다.
여기서, 메모리는 동적 램(DRAM, dynamic random access memory), 정적 램(SRAM, static random access memory) 등의 랜덤 액세스 메모리(RAM)와 같은, 프로세서가 직접 접근하는 주된 저장 장치로서 전원이 꺼지면 저장된 정보가 순간적으로 지워지는 휘발성(volatile) 저장 장치를 의미할 수 있지만, 이들로 한정되는 것은 아니다. 이러한 메모리는 프로세서에 의하여 동작 될 수 있다. 메모리는 데이터 값을 포함하는 데이터 테이블 및 트랜잭션에 따른 로그 레코드들을 임시로 저장할 수 있다. 예를 들어, 로그 레코드들을 메모리의 별도의 트랜잭션 로그 저장부에 저장될 수도 있다. 본 명세서에서의 트랜잭션이란, 통상적으로 정보의 교환이나 데이타베이스 업데이트 등과 같은 일련의 작업들에 대한 연속적인 처리단위를 의미할 수 있다. 이러한 트랜잭션은, 데이타베이스의 무결성(integrity)이 보장되는 상태에서 요청된 작업을 완수하기 위한 작업의 기본 단위를 나타낸다.
본 발명의 일 실시예에서 데이터 테이블의 데이터 값 및/또는 로그 레코드들은 메모리로부터 영구 저장 매체에 기록될 수 있다. 추가적인 양상에서, 메모리는 버퍼 캐시를 포함하며, 상기 버퍼 캐시의 블록에는 이러한 데이터 및/또는 로그 레코드들이 저장될 수 있다. 상기 데이터 및/또는 로그 레코드들은 백그라운드 프로세스에 의하여 영구 저장 매체에 기록될 수 있다.
데이터베이스 서버 내의 영구 저장 매체는, 예를 들어 자기(magnetic) 디스크, 광학(optical) 디스크 및 광자기(magneto-optical) 저장 디바이스뿐만 아니라 플래시 메모리 및/또는 배터리-백업 메모리에 기초한 저장 디바이스와 같은, 임의의 데이터를 지속적으로 할 수 있는 비-휘발성(non-volatile) 저장 매체를 의미한다. 이러한 영구 저장 매체는 다양한 통신 수단을 통하여 데이터베이스 서버들(110 및 120)의 프로세서 및 메모리와 통신할 수 있다. 추가적인 실시예에서, 이러한 영구 저장 매체는 데이터베이스 서버(110 및 120) 외부에 위치하여 데이터베이스 서버(110 및 120)와 통신가능할 수도 있다.
DBMS는 데이터베이스 서버(110 및 120)에서 필요한 데이터를 검색, 삽입, 수정, 삭제 및/또는 로그 레코드 관리 등과 같은 동작들을 수행하는 것을 허용하기 위한 프로그램으로서, 전술한 바와 같이, 데이터베이스 서버(110 및 120)의 메모리에서 프로세서에 의하여 구현될 수 있다.
클라이언트와 데이터베이스 서버들(110 및 120) 또는 데이터베이스 서버들(110 및 120)은 네트워크(미도시)를 통하여 서로 통신할 수 있다. 본 발명의 일 실시예에 따른 네트워크는 공중전화 교환망(PSTN:Public Switiched Telephone Network), xDSL(x Digital Subscriber Line), RADSL(Rate Adaptive DSL), MDSL(Multi Rate DSL), VDSL(Very High Speed DSL), UADSL(Universal Asymmetric DSL), HDSL(High Bit Rate DSL) 및 근거리 통신망(LAN) 등과 같은 다양한 유선 통신 시스템들을 사용할 수 있다.
또한, 본 명세서에서 제시되는 네트워크는 CDMA(Code Division Multi Access), TDMA(Time Division Multi Access), FDMA(Frequency Division Multi Access), OFDMA(Orthogonal Frequency Division Multi Access), SC-FDMA(Single Carrier-FDMA) 및 다른 시스템들과 같은 다양한 무선 통신 시스템들을 사용할 수 있다. 추가적인 실시예로서, 본 명세서에서의 네트워크는 데이터베이스 링크(dblink)를 포함할 수도 있으며, 이에 따라 데이터베이스 서버들(110, 120)은 이러한 데이터베이스 링크를 통해 서로 통신하여 이로부터 또는 다른 데이터베이스 서버로부터의 데이터/로그 레코드들을 가져올 수도 있다. 본 명세서에서 설명된 기술들은 위에서 언급된 네트워크들뿐만 아니라, 다른 네트워크들에서도 사용될 수 있다.
도 1에서 도시되는 바와 같이, 소스 데이터베이스 서버(110)는 타겟 데이터베이스 서버(120)의 원격에 위치할 수 있다. 또한, 소스 데이터베이스 서버(110) 및 타겟 데이터베이스 서버(120)는 동일 타입의 서버들이거나 또는 서로 호환되지 않는 이기종의(heterogeneous) 데이터베이스 서버를 의미할 수 있다.
추가적으로, 소스 데이터베이스 서버(110)는 임의의 타입의 데이터베이스로서 명령들을 실행 및 저장하기 위한 프로세서 및 메모리를 포함하는 디바이스를 포함할 수 있으나 이로 한정되지는 않는다. 즉, 소스 데이터베이스는 소프트웨어, 펌웨어 및 하드웨어 또는 이들의 조합을 포함할 수도 있다. 소프트웨어는 데이터베이스 테이블, 스키마, 인덱스 및/또는 데이터를 생성, 삭제 및 수정하기 위한 애플리케이션(들)을 포함할 수 있다. 소스 데이터베이스 서버(110)는 클라이언트 또는 다른 컴퓨팅 디바이스로부터의 트랜잭션들을 수신할 수 있으며, 예시적인 트랜잭션들은 소스 데이터베이스 서버(110)에서의 데이터, 테이블 및/또는 인덱스 등을 검색, 추가, 수정 및/또는 삭제하는 것을 포함할 수 있다.
타겟 데이터베이스 서버(120)는 소스 데이터베이스 서버(110)에서 발생된 데이터 변경 내용이 복제 또는 동기화되는 데이터베이스 서버를 의미하며, 전술한 소스 데이터베이스 서버(110)의 특징의 적어도 일부분을 포함할 수 있다. 예를 들어, 타겟 데이터베이스 서버(120)는 소스 데이터베이스 서버(110)의 데이터, 데이터 타입들, 테이블들, 인덱스들 및/또는 로그 레코드들에 대한 복사본을 저장할 수 있다.
본 명세서에서의 로그 레코드는 데이터베이스 내의 데이터의 구조, 조직에 대한 변경내용 및/또는 테이블, 컬럼, 데이터 타입, 인덱스, 데이터 등과 관련된 변경 내용을 식별할 수 있는 데이터 레코드를 의미할 수 있다.
본 발명의 일 실시예에서, 에이전트 서버(130)는 소스 데이터베이스 서버(110)와 타겟 데이터베이스 서버(120)간의 CDC를 구현하기 위한 별도의 엔티티를 의미할 수 있다. 따라서, 에이전트 서버(130)는 CDC 특징들을 구현하기 위한 임의의 동작들을 수행할 수 있다.
*에이전트 서버(130)는 임의의 타입의 서버로서 명령들을 실행 및 저장하기 위한 프로세서 및 메모리를 포함하는 디바이스를 포함할 수 있으나 이로 한정되지는 않는다. 에이전트 서버(130)는 소프트웨어, 펌웨어 및 하드웨어 또는 이들의 조합을 포함할 수도 있다. 예를 들어, 에이전트 서버(130)의 동작들을 구현하는 소프트웨어는 소스 데이터베이스(110) 및/또는 타겟 데이터베이스(120)에 설치될 수 있다.
도 1에서 도시되는 에이전트 서버(130)의 기능들은 소스 데이터베이스 서버(110) 및/또는 타겟 데이터베이스 서버(120)에 일부분으로 통합될 수도 있다. 예를 들어, 에이전트 서버(130)의 CDC 기능은 타겟 데이터베이스 서버(120)에 의해 대체될 수 있다.
도 2는 본 개시내용의 일 실시예에 따른 예시적인 에이전트 서버(130)를 도시한다. 도 2에서는 에이전트 서버(130)를 예로서 도시하였으나, 전술한 바와 같이, 에이전트 서버(130)는 소스 데이터베이스 서버(110) 및/또는 타겟 데이터베이스 서버(120) 또는 이들의 조합으로 대체될 수 있다.
도 2에서 도시되는 바와 같이, 에이전트 서버(130)는 로그 레코드 획득 및 분석 모듈(210), 그룹화 모듈(220), 제어 모듈(230), 송수신 모듈(240) 및 저장 모듈(250)을 포함할 수 있다. 전술한 에이전트 서버(130)의 컴포넌트들은 예시적인 것으로서, 추가적인 컴포넌트들이 존재하거나 이들 중 일부는 생략될 수도 있다.
로그 레코드 획득 및 분석 모듈(210)은 소스 데이터베이스에서 처리되는 트랜잭션들에 대한 정보를 포함하는 복수의 로그 레코드들을 획득할 수 있다. 클라이언트에 의해 개시된 트랜잭션에 따라 소스 데이터베이스에서 데이터, 테이블 및/또는 인덱스 등에 대한 변경이 발생되는 경우, 해당 트랜잭션에 대한 로그 레코드가 소스 데이터베이스에 기록될 수 있다. 이러한 경우, 에이전트 서버(130)는 소스 데이터베이스 서버(110)에서의 로그 버퍼 및/또는 로그 파일에 기록된 트랜잭션 로그 등을 분석함으로써 변경 데이터에 대한 로그 레코드(들)를 획득하고 이를 분석할 수 있다. 이러한 로그 레코드 획득 및 분석 모듈(210)은 트랜잭션 로그를 분석함으로써 변경된 데이터만을 획득할 수도 있다. 추가적으로, 에이전트 서버(130)는 소스 데이터베이스 서버(110)에 의해 결정된 로그 레코드를 소스 데이터베이스(110)로부터 단순히 수신할 수도 있다.
본 발명의 일 실시예에서, 소스 데이터베이스 서버(110)는 예컨대, 대응되는 소스 테이블에 대한 변경 데이터를 포함하는 변경 테이블을 포함할 수 있다. 에이전트 서버(130)는 상기 변경 테이블을 분석함으로써 로그 레코드를 획득할 수 있다. 다른 실시예로서, 에이전트 서버(130)는 트랜잭션 로그를 이용하여 일련의 트랜잭션을 로그로부터 추출함으로써 로그 레코드를 획득할 수 있다. 상기 복수의 로그 레코드들 각각은, 트랜잭션을 고유하게 식별하기 위한 정보 및 상기 트랜잭션에 따라 변경된 데이터 레코드를 식별하기 위한 정보를 포함할 수 있다.
그룹화 모듈(220)은 사전결정된 조건에 기초하여, 로그 레코드 획득 및 분석 모듈(210)에 의해 획득된 복수의 로그 레코드들을 그룹화함으로써 복수의 그룹들을 생성할 수 있다. 예를 들어, 그룹화 모듈(220)은 트랜잭션들 각각과 관련된 데이터베이스 오브젝트(object) 식별 정보에 기초하여 그룹화를 수행할 수 있다. 예를 들어, 데이터베이스 오브젝트가 테이블인 경우, 그룹화는 테이블 단위로 수행될 것이며, 동일한 테이블에 대해서 수행된 트랜잭션들은 하나의 그룹 내에 속하게 될 것이다.
본 발명의 일 양상에서, 사전결정된 조건은 오브젝트(object) 기준에 따라 결정될 수 있다. 또한, 사전결정된 조건은 오브젝트들 간의 종속성(dependency)이 존재하는지 여부에 대한 조건을 포함하며, 상기 종속성은 기본 키(primary key)와 외래 키(foreign key)간의 참조(reference) 여부에 기초하여 결정될 수 있다. 여기서, 기본 키는 오브젝트(예컨대, 테이블)에 저장된 데이터를 유일하게 식별하는 키를 포함할 수 있으며, 그리고 외래 키는 각 테이블 간의 연결을 생성하기 위하여 특정 오브젝트에서 다른 오브젝트에 의해 참조되는 기본 키 칼럼을 포함할 수 있다. 예를 들어, 특정 테이블에서의 기본 키는 다른 테이블에서의 외래 키와 연결되어 테이블 간을 연결성을 확립할 수 있다. 본 발명의 일 양상에서, 그룹화 모듈(220)은 오브젝트들간의 종속성(기본 키 - 외래 키 참조 관계)이 존재하는 경우, 해당 오브젝트들에 대해서는 하나의 그룹으로 그룹화할 수 있다.
그룹화 모듈(220)은 그룹을 생성하는데 있어서 그룹 내의 로그 레코드들의 발생 시점에 따른 순서(예컨대, SCN(System Change Number))에 기초하여 로그 레코드들을 그룹 내에서 정렬시킬 수 있다.
제어 모듈(230)은 에이전트 서버(130)의 전반적인 동작들을 제어할 수 있다. 즉, 제어 모듈(230)은 소스 데이터베이스에서 수행된 트랜잭션에 따른 로그 레코드에 대한 캡쳐 동작, 캡쳐된 로그 레코드가 타겟 데이터베이스로 적절하게 반영되도록 하기 위한 조립 동작(예컨대, 타겟 데이터베이스에 적합한 포맷으로의 변환, 타겟 데이터베이스에서 인식할 수 있는 쿼리(DML 및/또는 DDL 등)의 생성 등), 및 타겟 데이터베이스의 특정 영역에 조립된 로그 레코드를 복제 완료시키기 위한 반영 동작 등을 수행할 수 있다.
제어 모듈(230)은 획득된 복수의 로그 레코드들이 소스 데이터베이스로부터 타겟 데이터베이스로 복제되는 것이, 그룹화 모듈(220)에 의해 그룹화된 그룹 단위로 병렬적으로 수행될 것을 결정할 수 있다. 각각의 그룹은 각각의 스레드와 대응될 수 있으며, 각각의 스레드에 의해 병렬적으로 복제 프로세스들이 진행될 수 있다. 또한, 추가적인 실시예에서, 하나의 스레드가 복수의 그룹들을 처리할 수도 있다.
본 발명의 일 실시예에서, 에이전트 서버(130)는, 커밋(commit) 커맨드의 수신에 응답하여, 상기 커밋 커맨드와 연관된 하나 이상의 로그 레코드들에 대한 소스 데이터베이스로부터 타겟 데이터베이스로의 복제를 상기 그룹 단위로 독립적으로 수행할 수 있다.
본 발명의 일 실시예에서, 복수의 로그 레코드들 각각은, 트랜잭션을 고유하게 식별하기 위한 정보 및/또는 상기 트랜잭션에 따라 변경된 데이터 레코드를 식별하기 위한 정보를 포함할 수 있다.
따라서, 원칙적으로 시계열적으로 기록되는 소스 데이터베이스의 트랜잭션 로그들이 그룹 단위로 각각의 스레드(thread)에 의해 타겟 데이터베이스에 병렬적으로 반영되기 때문에, 데이터베이스들 간의 동기화에 대한 효율성이 달성될 수 있다.
본 발명의 일 실시예에 따른 기술적 특징들은, 시계열적으로 추출된 로그 레코드들을 그룹화함으로써 병렬적으로 타겟 데이터베이스에 반영함으로써, 데이터베이스 복제 또는 데이터베이스 동기화에 의한 오버헤드를 현저히 줄일 수 있다.
또한, 제어 모듈(230)은 송수신 모듈(240)이 트랜잭션들 간의 관계를 정의하는 쿼리를 수신하는 것에 응답하여, 상기 쿼리에 포함된 트랜잭션들과 연관되는 하나 이상의 그룹들에 대한 그룹 재구성을 수행할 것을 결정할 수 있다. 예를 들어, 쿼리는 상기 트랜잭션들 간의 관계 및/또는 구조를 정의하는 DDL(Data Definition Language)을 포함할 수 있다. 이러한 경우, 제어 모듈(230)은 DDL에서 정의된 관계가 사전결정된 관계(또는 조건)(예컨대, 오브젝트들 간의 종속성 관계의 변경이 발생되는 경우)에 포함되는지 여부를 결정할 수 있다.
본 발명의 일 양상에서, 제어 모듈(230)은 오브젝트들간의 종속성(기본 키 - 외래 키 참조)이 변경 또는 생성되는 경우, 동적으로 그룹 재구성을 수행할 것을 결정할 수 있다. 예를 들어, 기본 키(예컨대, 제 1 오브젝트)와 외래 키(예컨대, 제 2 오브젝트)가 존재하는 경우, DML에서의 삽입(insert) 동작 시, 제 1 오브젝트부터 수행이 이루어진 다음에 제 2 오브젝트에 대한 수행이 이루어져야 하며, 그리고 DML에서의 삭제(delete) 동작 시, 제 2 오브젝트에 대한 수행이 먼저 이루어진 다음에 제 1 오브젝트에 대한 수행이 이루어져야 하는, 기본 키 - 외래 키 제한 조건이 생성된다. 이러한 경우에는, 전술한 순서 보장을 위하여(즉, 기본 키 - 외래 키 제한 조건을 만족시키기 위하여), 제어 모듈(230)은 동적으로 그룹을 재구성(즉, 제 1 오브젝트와 제 2 오브젝트를 하나의 그룹으로 그룹화)할 것을 결정할 수 있다. 즉, 제어 모듈(230)은 클라이언트로부터 수신된 쿼리를 분석함으로써, 그룹화된 그룹들에 대한 정합성이 유지되는지 여부를 결정하고, 정합성이 유지되지 않는다고 결정되는 경우, 상기 수신된 쿼리에 포함된 트랜잭션들과 연관되는 하나 이상의 그룹들에 대한 그룹 재구성을 수행할 것을 결정할 수 있다. 이러한 정합성이 유지되는지 여부에 대한 결정은 오브젝트들 간의 종속성 관계가 유지되는지 여부에 기초하여 결정될 수 있다.
사전결정된 관계에 포함된다고 결정되는 경우, 제어 모듈(230)은 사전결정된 관계에 속하는 트랜잭션들이 하나의 그룹 내에 포함되는지 여부를 결정할 수 있다. 즉, 부모/자식 관계에 속하는 트랜잭션들은 트랜잭션의 처리 순서에 있어서 서로 종속적인 관계를 갖기 때문에, 이들이 하나의 그룹 내에 속해 있는 경우에는 그룹 단위로 그룹 내의 시간 순서(예컨대, SCN(system change number))에 기초하여 반영되는 복제를 수행하는데 있어서 정합성의 문제가 발생되지는 않을 것이다. 하지만, 부모/자식 관계에 속하는 트랜잭션들이 하나의 그룹 내에 속하지 않는 경우, 제어 모듈(230)은 이러한 관계에 속하는 트랜잭션들이 하나의 그룹 내에 포함되도록 그룹 재구성을 수행할 것을 결정함으로써, 데이터베이스 동기화에 있어서 정합성을 보장할 수 있다.
본 명세서에서의 그룹 재구성은, 특정 그룹 내의 속하는 트랜잭션(들)을 다른 그룹 내로 이동시키는 것을 포함할 수 있다.
본 발명의 일 실시예에서, 제어 모듈(230)은, 트랜잭션들 간의 관계 및/또는 오브젝트들 간의 관계를 정의하는 쿼리를 수신하는 경우, 그룹 재구성이 완료될 때까지, 획득된 복수의 로그 레코드들의 소스 데이터베이스로부터 타겟 데이터베이스로의 복제를 중지할 것을 결정할 수 있다. 이러한 경우, 제어 모듈(230)은, 상기 트랜잭션들 간의 관계 및/또는 오브젝트들 간의 관계를 정의하는 쿼리를 수신하는 경우, 상기 그룹 재구성이 완료될 때까지, SCN에 기초하여 상기 획득된 복수의 로그 레코드들 중 상기 쿼리의 발생된 시점 정보 이전에 커밋된 트랜잭션과 연관된 로그 레코드들의 상기 소스 데이터베이스로부터 상기 타겟 데이터베이스로의 복제를 허용하면서, 상기 획득된 복수의 로그 레코드들 중 상기 쿼리의 발생된 시점 정보 이후에 커밋된 트랜잭션과 연관된 로그 레코드들의 상기 소스 데이터베이스로부터 상기 타겟 데이터베이스로의 복제를 중지할 것을 결정할 수 있다. 이는, 예컨대, DDL이 발행되기 이전에 커밋된 트랜잭션들에 대해서는 복제를 수행하여도 정합성에 문제가 없기 때문이다.
그리고나서, 제어 모듈(230)은, 그룹 재구성이 완료되는 경우, 재구성된 그룹들에 기초하여 상기 획득된 복수의 로그 레코드들의 소스 데이터베이스로부터 타겟 데이터베이스로의 복제를 재개할 것을 결정할 수 있다. 이러한 경우, 재구성된 그룹 단위로 복제가 수행될 것이다.
본 발명의 일 실시예에서, 타겟 데이터베이스로의 복제는 로그 레코드에 포함된 트랜잭션과 관련된 메타 정보(예컨대, SCN 정보, 테이블 정보, 데이터 식별 정보 등)을 기초로 하여 수행될 수 있다. 타겟 데이터베이스 서버(120) 또는 에이전트 서버(130)는 획득된 로그 레코드들을 분석하여, 타겟 데이터베이스 서버(120)에 반영될 수 있는 형태(예컨대, 타겟 데이터베이스의 프로세스들이 인식가능한 데이터 형태)로 해당 로그 레코드들을 조립할 수 있다. 예를 들어, 소스 데이터베이스에서 수행된 제 1 트랜잭션이 제 1 테이블과 관련된 경우, 타겟 데이터베이스의 제 1 테이블에 제 1 트랜잭션이 반영될 것이다.
본 발명의 추가적인 실시예에서, 제어 모듈(130)은, 구성된(또는 재구성된) 하나 이상의 그룹들에 대한 히트 레이트(hit rate)를 모니터링할 수 있다. 제어 모듈(130)은, 모니터링된 히트 레이트 및 수신된 쿼리에 기초하여, 쿼리에 포함된 트랜잭션들과 연관되는 하나 이상의 그룹들에 대한 그룹 재구성을 수행할 것을 결정할 수 있다. 여기서의 히트 레이트는, 각각의 그룹에서의 로그 레코드들의 발생 횟수 정보를 포함하는, 각각의 그룹 내에서 처리/발생되는 로그 레코드들의 정량적 정보를 나타낼 수 있는 임의의 정보를 포함할 수 있다. 이러한 경우, 제어 모듈(130)은 로그 레코드들의 발생 횟수가 많은 그룹에 속하는 로그 레코드들을 발생 횟수가 적은 그룹으로 이동시킬 수 있다.
예를 들어, 제 1 그룹에 대응되는 제 1 테이블과 관련된 트랜잭션들이 과도하게 빈번하게 발생되는 경우, 제 1 그룹에 속하는 로그 레코드들의 수가 다른 그룹에 속하는 로그 레코드들의 수보다 많아지기 때문에, 제 1 그룹에 대한 복제가 상대적으로 지연될 수 밖에 없다. 본 발명의 일 실시예는, 이러한 경우 그룹 재구성을 수행할 수 있다. 예를 들어, 제어 모듈(130) 또는 그룹화 모듈(120)은 제 1 그룹을 제 1 서브 그룹 및 제 2 서브 그룹으로 분할함으로써, 데이터베이스 복제 속도에 대한 효율성을 증대시킬 수 있다. 다른 예시로, 제어 모듈(130) 또는 그룹화 모듈(120)은 제 1 그룹의 로그 레코드들을 제 2 그룹으로 이동시킴으로써 데이터베이스 복제에 대한 효율성을 증대시킬 수도 있다.
송수신 모듈(240)은, 데이터베이스 서버들과 및/또는 클라이언트와의 통신 기능을 제공할 수 있다. 예를 들어, 송수신 모듈(240)은 추출된 로그 레코드들을 소스 데이터베이스 서버로부터 수신할 수 있다. 또한, 송수신 모듈(240)은 앞서 설명된 임의의 네트워크 및/또는 데이터베이스 링크를 사용하여, 데이터베이스 서버들 및/또는 클라이언트와 통신할 수 있다.
또한, 도 2가 에이전트 서버(130)가 아닌 소스/타겟 데이터베이스 서버(110, 120)로 해석되는 경우, 송수신 모듈(240)은 클라이언트로부터의 데이터 저장, 변경, 조회 및 인덱스 빌드, 변경, 조회 요청 등을 수신할 수 있다. 대안적인 실시예로서, 송수신 모듈(240)은 타겟 데이터베이스 서버(120)로 프로시저를 호출하는 방식으로 소스 데이터베이스 서버(120)로부터의 정보를 타겟 데이터베이스 서버(130)로 전달할 수도 있다. 더불어, 송수신 모듈(240)은 데이터베이스 복제와 관련하여 서버들 간에 전달되는 임의의 데이터/정보를 송수신하는 기능을 제공할 수 있다.
저장 모듈(250)은 추출된 로그 레코드를 저장하는 등 CDC를 수행하는 것과 관련되어 저장되는 임의의 데이터를 저정할 수 있다.
또한, 도 2가 에이전트 서버(130)가 아닌 소스/타겟 데이터베이스 서버(110, 120)로 해석되는 경우, 저장 모듈(250)은 데이터베이스 서버들(110, 120)의 테스크 수행과 관련하여 저장되는 임의의 데이터를 저장할 수 있다. 저장 모듈(245)은 DBMS 및/또는 영구저장매체에 포함될 수 있다. 추가적으로, 타겟 데이터베이스 서버(120)에서의 저장 모듈(250)은 그룹화(또는 재구성된 그룹화)에 따라 소스 데이터베이스서버에서 생성된 로그 레코드들을 타겟 데이터베이스 서버(120)에 저장할 수 있다. 또한, 저장 모듈(250)은 서버에서의 데이터의 저장(업데이트 포함)과 관련된 요청을 처리 및 관리할 수 있다. 이러한 저장 모듈(250)은 데이터 및 인덱스 테이블 등을 저장할 것을 결정할 수 있다. 또한, 저장 모듈(250)은 데이터 및/또는 인덱스 테이블에 대한 저장 위치를 결정할 수 있다. 예를 들어, 저장 모듈(250)은 데이터에 대하여 데이터 테이블 상에서의 저장 위치를 결정할 수 있다. 다른 예시로, 저장 모듈(250)은 데이터에 대하여 영구 저장 매체 상의 저장 위치를 결정할 수 있다.
도 3은 본 개시내용의 일 실시예에 따라 소스 데이터베이스 서버로부터 타겟 데이터베이스 서버로의 데이터 복제에 대한 예시적인 방법을 도시한다.
도 3에서 도시되는 방법의 순서들은 예시적인 것이며, 추가적인 단계들이 부가될 수 있거나 또는 도시된 단계들 중 일부는 생략될 수 있다.
도 3 에서 제시되는 방법은 설명의 편의를 위해 이하에서는 에이전트 서버(130)에 의해 수행되는 것으로 기재될 것이나, 앞서 설명된 바와 같이, 구현 양태에 따라서, 소스 데이터베이스 서버(110) 또는 타겟 데이터베이스(120) 또는 이들의 조합에 의해 구현될 수도 있다.
에이전트 서버(130)는 소스 데이터베이스에서 처리되는 트랜잭션들에 대한 정보를 포함하는 복수의 로그 레코드를 획득할 수 있다(310).
클라이언트에 의해 개시된 트랜잭션에 따라 소스 데이터베이스에서 데이터, 테이블 및/또는 인덱스 등에 대한 변경이 발생되는 경우, 해당 트랜잭션에 대한 로그 레코드가 소스 데이터베이스에 기록될 수 있다. 이러한 경우, 에이전트 서버(130)는 소스 데이터베이스 서버(110)에서의 로그 버퍼 및/또는 로그 파일에 기록된 트랜잭션 로그 등을 분석함으로써 변경 데이터에 대한 로그 레코드(들)를 획득할 수 있다.
대안적인 실시예로서, 에이전트 서버(130)는 소스 데이터베이스 서버(110)에 의해 결정된 변경 데이터에 대한 로그 레코드를 소스 데이터베이스(110)로부터 단순히 수신할 수도 있다.
다른 대안적인 실시예로서, 예를 들어, 에이전트 서버(130)는 소스 데이터베이스 서버(110)의 소스 테이블에 DML(Data Manipulation Language)이 발생하는 경우 가장 최근에 획득/추출한 변경 데이터 이후의 신규 변경된 데이터를 획득할 수 있다. 이러한 변경된 데이터에 대한 로그 레코드는 별도의 테이블에 저장되어 기록될 수 있다.
에이전트 서버(130)는 사전결정된 조건에 기초하여, 획득된 복수의 로그 레코드들을 복수의 그룹들로 그룹화할 수 있다(320).
예를 들어, 에이전트 서버(130)는 로그 레코드들의 메타 데이터에 포함된 오브젝트 식별정보 단위로 그룹들을 생성할 수 있다. 각각의 그룹 내에 속해 있는 트랜잭션(로그 레코드)들은 SCN에 기초하여 그룹 내에서 서로 정렬될 수 있다. 예를 들어, SCN이 가장 앞선 트랜잭션에 대한 로그 레코드가 그보다 후속하는 트랜잭션에 대한 로그 레코드보다 먼저 타겟 데이터베이스 서버로 반영될 수 있다.
본 발명의 일 양상에서, 에이전트 서버(130)는 오브젝트들간의 종속성(기본 키 - 외래 키 참조 관계)이 존재하는지 여부에 기초하여, 그룹화를 수행할 수 있다. 에이전트 서버(130)는 종속성이 존재하는 오브젝트들에 대해서는 하나의 그룹으로 그룹화할 수 있다.
에이전트 서버(130)는 획득된 복수의 로그 레코드들이 소스 데이터베이스로부터 타겟 데이터베이스로 전달 또는 복제되는 것이 그룹 단위로 병렬적으로 수행될 것을 결정할 수 있다(330).
기존의 로그 레코드들(예컨대, 리두(redo) 로그 등)은 하나의 큐에 (SCN 등에 기초하여) 순차적으로 배열되어 있기 때문에, 기존의 데이터베이스 로그 레코드 배열 구조에 따른 CDC를 수행하는 경우에는, 데이터 복제/동기화에 있어서 지연이 필수적으로 존재할 수 밖에 없었다. 하지만, 전술한 바와 같이, 본 발명의 일 실시예에 따라 그룹들 각각은 서로 다른 오브젝트에 대한 트랜잭션에 따른 로그 레코드를 포함하고 있기 때문에, 소스 데이터베이스 서버에서 수행된 트랜잭션들의 정합성 문제가 발생되지 않고 병렬적으로 타겟 데이터베이스 서버에서의 해당 오브젝트들 각각에 해당 레코드들이 빠르게 복제될 수 있다.
에이전트 서버(130)는 트랜잭션들 간의 관계를 정의하는 쿼리를 수신할 수 있다(340). 획득된 로그 레코드들이 각각의 그룹으로 할당된 이후에, 그리고 커밋 커맨드에 따라 각각의 그룹과 관련된 스레드에 의해 타겟 데이터베이스 서버의 해당 오브젝트로 획득된 로그 레코드들이 반영되는 도중에, 트랜잭션들 간의 관계 또는 오브젝트들 간의 관계를 정의하는 (예컨대, DDL과 같은) 쿼리가 발행될 수 있다. 이러한 경우, 특정 트랜잭션들 간의 종속적인 관계 또는 오브젝트들 간의 종속성 관계(또는 이러한 종속적 관계에 대한 변경)가 형성될 수 있다. 이러한 경우, 데이터 복제에 대한 정합성을 유지하기 위해서는 해당 쿼리와 연관된 트랜잭션들과 관련된 로그 레코드들이 하나의 그룹 내에 속해야 할 것이다.
따라서, 에이전트 서버(130)는 수신된 쿼리에 응답하여, 쿼리에 포함된 트랜잭션들 및/또는 오브젝트들과 연관되는 하나 이상의 그룹들에 대한 그룹 재구성을 수행할 것을 결정할 수 있다(350).
이러한 경우, 에이전트 서버(130)는 해당 쿼리에 의해 정의된 관계가 사전결정된 관계(예컨대, 오브젝트들 간의 종속성의 변경이 발생되는 경우 또는 오브젝트들 간의 종속성이 새롭게 발생되는 경우 등)에 포함되는지 여부를 결정할 수 있다. 사전결정된 관계에 포함된다고 결정되는 경우, 사전결정된 관계에 속하는 트랜잭션들이 하나의 그룹 내에 포함되는지 여부가 추가로 결정될 수 있다. 예컨대, 부모/자식 관계 및/또는 오브젝트들이 기본키와 외래키 참조 관계에 속하는 트랜잭션들은 트랜잭션의 처리 순서에 있어서 서로 종속적인 관계를 갖기 때문에(즉, 삭제에 대한 순서 등이 종속적임), 이들이 하나의 그룹 내에 속해 있는 경우에는 그룹 단위로 그룹 내의 시간 순서(예컨대, SCN)에 기초하여 반영되는 복제를 수행하는데 있어서 정합성의 문제가 발생되지는 않을 것이다. 하지만, 이러한 관계들에 속하는 트랜잭션들이 하나의 그룹 내에 속하지 않는 경우, 에이전트 서버(130)는 이러한 관계에 속하는 트랜잭션들이 하나의 그룹 내에 포함되도록 그룹 재구성을 수행할 것을 결정함으로써, 데이터베이스 동기화에 있어서 정합성을 보장할 수 있다. 여기에서의 그룹 재구성은, 특정 그룹 내의 속하는 트랜잭션(들)을 다른 그룹 내로 이동시키는 것을 포함할 수 있다.
본 발명의 일 실시예에서, 에이전트 서버(130)는, 트랜잭션들 간의 관계를 정의하는 쿼리를 수신하는 경우, 그룹 재구성이 완료될 때까지, 획득된 복수의 로그 레코드들의 소스 데이터베이스로부터 타겟 데이터베이스로의 복제를 중지할 것을 결정할 수 있다. 이러한 경우, 에이전트 서버(130)는, 상기 트랜잭션들 간의 관계를 정의하는 쿼리를 수신하는 경우, 상기 그룹 재구성이 완료될 때까지, SCN에 기초하여 상기 획득된 복수의 로그 레코드들 중 상기 쿼리의 발생된 시점 정보 이전에 커밋된 트랜잭션과 연관된 로그 레코드들의 상기 소스 데이터베이스로부터 상기 타겟 데이터베이스로의 복제를 허용하면서, 상기 획득된 복수의 로그 레코드들 중 상기 쿼리의 발생된 시점 정보 이후에 커밋된 트랜잭션과 연관된 로그 레코드들의 상기 소스 데이터베이스로부터 상기 타겟 데이터베이스로의 복제를 중지할 것을 결정할 수 있다. 이는, 예컨대, DDL이 발행되기 이전에 커밋된 트랜잭션들에 대해서는 복제를 수행하여도 정합성에 문제가 없기 때문이다.
그리고나서, 에이전트 서버(130)는, 그룹 재구성이 완료되는 경우, 재구성된 그룹들에 기초하여 상기 획득된 복수의 로그 레코드들의 소스 데이터베이스로부터 타겟 데이터베이스로의 복제를 재개할 것을 결정할 수 있다. 이러한 경우, 재구성된 그룹 단위로 타겟 데이터베이스로의 복제가 수행될 것이다. 본 명세서에서의 복제는 예를 들어, 타겟 데이터베이스의 해당 오브젝트에 해당 로그 레코드와 관련된 트랜잭션이 반영되는 방식, 별도의 뷰(view)를 통하여 반영되는 방식 등 다양한 방식이 존재할 수 있으며, 이들로 한정되는 것은 아니다.
본 발명의 일 실시예에서, 타겟 데이터베이스로의 복제는 로그 레코드에 포함된 트랜잭션과 관련된 메타 정보(예컨대, SCN 정보, 테이블 정보, 데이터 식별 정보 등)을 기초로 하여 수행될 수 있다. 타겟 데이터베이스 서버(120) 또는 에이전트 서버(130)는 획득된 로그 레코드들을 분석하여, 타겟 데이터베이스 서버(120)에 반영될 수 있는 형태(예컨대, 타겟 데이터베이스의 프로세스들이 인식가능한 데이터 형태)로 해당 로그 레코드들을 조립할 수 있다. 예를 들어, 소스 데이터베이스에서 수행된 제 1 트랜잭션이 제 1 테이블과 관련된 경우, 타겟 데이터베이스의 제 1 테이블에 제 1 트랜잭션이 반영될 것이다.
본 발명의 추가적인 실시예에서, 단계 350의 그룹 재구성 구성은, 하나 이상의 그룹들에 대한 히트 레이트를 모니터링함으로써 추가적으로 수행될 수 있다. 즉, 에이전트 서버(130)는, 수신된 쿼리에서의 DDL 정보 뿐만 아니라 모니터링된 히트 레이트에 추가적으로 기초하여, 쿼리에 포함된 트랜잭션들과 연관되는 하나 이상의 그룹들에 대한 그룹 재구성을 수행할 것을 결정할 수 있다. 에이전트 서버(130)는 병렬 처리에 대한 효율성을 증진시키기 위하여 히트 레이트가 높은(즉, 로그 레코드의 발생 횟수가 많은) 그룹들에 대해서는 그룹 분할, 타그룹으로의 이동 등과 같은 그룹 재구성을 수행할 수 있다.
도 4는 본 개시내용의 일 실시예에 따라, CDC 프로세스에서의 멀티 그룹 적용(multi-group apply)에 대한 일례를 도시한다.
제 1 트랜잭션(T1), 제 2 트랜잭션(T2), 제 3 트랜잭션(T3), 제 4 트랜잭션(T4) 및 제 5 트랜잭션(T5)이 소스 데이터베이스 서버에서 수행되었으며, 이들의 발생순서에 따라 도 4에서 도시되는 바와 같이 로그 파일/로그 버퍼 등에 해당 로그 레코드들이 기록된다.
제 1 트랜잭션(T1), 제 3 트랜잭션(T3) 및 제 5 트랜잭션(T5)은 제 1 오브젝트에 대한 트랜잭션들이다. 따라서, 상기 트랜잭션들은 제 1 그룹(G1)으로 그룹화될 수 있다. 또한, 제 2 트랜잭션(T2) 및 제 4 트랜잭션(T4)는 제 2 오브젝트에 대한 트랜잭션들이다. 따라서, 상기 트랜잭션들은 제 2 그룹(G2)으로 그룹화될 수 있다.
제 1 그룹(G1)과 제 2 그룹(G2)는 서로 독립적으로 타겟 데이터베이스 서버(120)로 병렬적으로 반영될 수 있다.
따라서, 기존의 데이터베이스 로그 레코드들의 1차원적 시계열적인 배열에 따라 CDC를 구현하는 경우, 처리 속도가 느리다는 문제가 발생되어 왔다. 하지만, 본 발명의 실시예에 따른 멀티 그룹 적용 기법을 사용하는 경우, 전술한 바와 같이, CDC를 구현하는데 있어서 빠른 속도가 달성될 수 있다.
도 5는 본 개시내용의 일 실시예에 따라, CDC 프로세스에서의 그룹 재구성에 대한 일례를 도시한다.
도 5는 도 4에서 도시되는 멀티 그룹 적용 상황에서 그룹화가 이루어진 후 T4와 T5 간의 사전결정된 관계가 존재한다는 것을 나타내는 DDL이 수신된 경우를 상정한다. 또한, 해당 DDL이 수신된 이후에 T4 및 T5에 대한 커밋이 수행될 것이다.
도 5에서 도시되는 바와 같이, DDL에서 규정된, 서로 간의 종속성이 존재하는 T4 및 T5는 현재 서로 다른 그룹 내에 속해 있기 때문에, 멀티 그룹 적용 기법을 사용하는 경우, 데이터베이스 간의 정합성의 문제가 발생될 수 있다. 따라서, 이러한 경우, 도 5에서 도시되는 바와 같이, T5가 G1에서 G2로 이동될 수 있다. T5의 그룹간 이동에 따라, 종국적으로 T4와 T5가 동일한 그룹 내에 속하게 된다. 따라서, 서로 종속적인 관계를 갖는 T4 및 T5가 동일한 그룹에 속하게 됨에 따라, 멀티 그룹 적용 기법을 사용하더라도 CDC에서의 데이터베이스 정합성의 문제점은 해결될 수 있다.
도 4 및 도 5에서 도시되는 실시예는 예시적인 것에 불과하며, 다른 구현예시들 또한 본 발명의 권리범위에 속할 수 있다. 예를 들어, T5가 G1에서 G2로 이동하지 않고 T4가 G2에서 G1으로 이동될 수 있다. 다른 예시로, T4 및 T5가 각각 G2 및 G1으로부터 나와, G3라는 새로운 그룹을 형성할 수도 있다.
전술한 바와 같이, 본 개시내용의 일 실시예는, 데이터베이스들 간의 동기화 속도의 향상을 위해 오브젝트간 관계로 그룹화 시켜 병렬 반영시킬 수 있으며, 그리고 해당 그룹이 동적으로 변경되는 경우 정합성이 깨지기 때문에 중단없이 그룹 재분배를 수행할 수 있다.
도 6은 본 개시내용의 일 실시예에 따라 CDC 솔루션을 구현하기 위한 예시적인 컴퓨팅 장치에 대한 블록도를 도시한다.
본 발명이 일반적으로 하나 이상의 서버 내의 컴퓨터 또는 프로세서 상에서 실행될 수 있는 특징들과 관련하여 전술되었지만, 당업자라면 본 발명이 기타 프로그램 모듈들과 결합되어 및/또는 하드웨어와 소프트웨어의 조합으로서 구현될 수 있다는 것을 잘 알 것이다.
일반적으로, 프로그램 모듈은 특정의 태스크를 수행하거나 특정의 추상 데이터 유형을 구현하는 루틴, 프로그램, 컴포넌트, 데이터 구조, 기타 등등을 포함한다. 또한, 당업자라면 본 발명의 방법이 단일-프로세서 또는 멀티프로세서 컴퓨터 시스템, 미니컴퓨터, 메인프레임 컴퓨터는 물론 퍼스널 컴퓨터, 핸드헬드 컴퓨팅 장치, 마이크로프로세서-기반 또는 프로그램가능 가전 제품, 기타 등등(이들 각각은 하나 이상의 연관된 장치와 연결되어 동작할 수 있음)을 비롯한 다른 컴퓨터 시스템 구성으로 실시될 수 있다는 것을 잘 알 것이다.
본 발명의 설명된 실시예들은 또한 어떤 태스크들이 통신 네트워크를 통해 연결되어 있는 원격 처리 장치들에 의해 수행되는 분산 컴퓨팅 환경에서 실시될 수 있다. 분산 컴퓨팅 환경에서, 프로그램 모듈은 로컬 및 원격 메모리 저장 장치 둘다에 위치할 수 있다.
컴퓨터는 통상적으로 다양한 컴퓨터 판독가능 매체를 포함한다. 컴퓨터에 의해 액세스 가능한 매체는 그 어떤 것이든지 컴퓨터 판독가능 매체가 될 수 있고, 이러한 컴퓨터 판독가능 매체는 휘발성 및 비휘발성 매체, 일시적(transitory) 및 비일시적(non-transitory) 매체, 이동식 및 비-이동식 매체를 포함한다. 제한이 아닌 예로서, 컴퓨터 판독가능 매체는 컴퓨터 저장 매체를 포함할 수 있다. 컴퓨터 저장 매체는 컴퓨터 판독가능 명령어, 데이터 구조, 프로그램 모듈 또는 기타 데이터와 같은 정보를 저장하는 임의의 방법 또는 기술로 구현되는 휘발성 및 비휘발성 매체, 일시적 및 비-일시적 매체, 이동식 및 비이동식 매체를 포함한다. 컴퓨터 저장 매체는 RAM, ROM, EEPROM, 플래시 메모리 또는 기타 메모리 기술, CD-ROM, DVD(digital video disk) 또는 기타 광 디스크 저장 장치, 자기 카세트, 자기 테이프, 자기 디스크 저장 장치 또는 기타 자기 저장 장치, 또는 컴퓨터에 의해 액세스될 수 있고 원하는 정보를 저장하는 데 사용될 수 있는 임의의 기타 매체를 포함하지만, 이에 한정되지 않는다.
송수신(통신) 매체는 통상적으로 반송파(carrier wave) 또는 기타 전송 메커니즘(transport mechanism)과 같은 피변조 데이터 신호(modulated data signal)에 컴퓨터 판독가능 명령어, 데이터 구조, 프로그램 모듈 또는 기타 데이터등을 구현하고 모든 정보 전달 매체를 포함한다. 피변조 데이터 신호라는 용어는 신호 내에 정보를 인코딩하도록 그 신호의 특성들 중 하나 이상을 설정 또는 변경시킨 신호를 의미한다. 제한이 아닌 예로서, 송수신(통신) 매체는 유선 네트워크 또는 직접 배선 접속(direct-wired connection)과 같은 유선 매체, 그리고 음향, RF, 적외선, 기타 무선 매체와 같은 무선 매체를 포함한다.
도 6에서는 본 발명의 CDC 특징들을 구현하기 위한 컴퓨팅 장치(602)를 포함하는 본 발명의 여러가지 측면들을 구현하는 예시적인 환경(600)이 나타내어져 있으며, 컴퓨팅 장치(602)는 처리 장치(604), 시스템 메모리(606) 및 시스템 버스(608)를 포함한다. 시스템 버스(608)는 시스템 메모리(606)(이에 한정되지 않음)를 비롯한 시스템 컴포넌트들을 처리 장치(604)에 연결시킨다. 처리 장치(604)는 다양한 상용 프로세서들 중 임의의 프로세서일 수 있다. 듀얼 프로세서 및 기타 멀티프로세서 아키텍처도 역시 처리 장치(604)로서 이용될 수 있다.
시스템 버스(608)는 메모리 버스, 주변장치 버스, 및 다양한 상용 버스 아키텍처 중 임의의 것을 사용하는 로컬 버스에 추가적으로 상호 연결될 수 있는 몇가지 유형의 버스 구조 중 임의의 것일 수 있다. 시스템 메모리(606)는 판독 전용 메모리(ROM)(610) 및 랜덤 액세스 메모리(RAM)(612)를 포함한다. 기본 입/출력 시스템(BIOS)은 ROM, EPROM, EEPROM 등의 비휘발성 메모리(610)에 저장되며, 이 BIOS는 시동 중과 같은 때에 컴퓨팅 장치(602) 내의 구성요소들 간에 정보를 전송하는 일을 돕는 기본적인 루틴을 포함한다. RAM(612)은 또한 데이터를 캐싱하기 위한 정적 RAM 등의 고속 RAM을 포함할 수 있다.
컴퓨팅 장치(602)는 또한 내장형 하드 디스크 드라이브(HDD)(614)(예를 들어, EIDE, SATA)?이 내장형 하드 디스크 드라이브(614)는 또한 적당한 섀시(도시 생략) 내에서 외장형 용도로 구성될 수 있음?, 자기 플로피 디스크 드라이브(FDD)(616)(예를 들어, 이동식 디스켓(618)으로부터 판독을 하거나 그에 기록을 하기 위한 것임), 및 광 디스크 드라이브(620)(예를 들어, CD-ROM 디스크(622)를 판독하거나 DVD 등의 기타 고용량 광 매체로부터 판독을 하거나 그에 기록을 하기 위한 것임)를 포함한다. 하드 디스크 드라이브(614), 자기 디스크 드라이브(616) 및 광 디스크 드라이브(620)는 각각 하드 디스크 드라이브 인터페이스(624), 자기 디스크 드라이브 인터페이스(626) 및 광 드라이브 인터페이스(628)에 의해 시스템 버스(608)에 연결될 수 있다. 외장형 드라이브 구현을 위한 인터페이스(624)는 USB(Universal Serial Bus) 및 IEEE 1394 인터페이스 기술 중 적어도 하나 또는 그 둘다를 포함한다.
이들 드라이브 및 그와 연관된 컴퓨터 판독가능 매체는 데이터, 데이터 구조, 컴퓨터 실행가능 명령어, 기타 등등의 비휘발성 저장을 제공한다. 컴퓨팅 장치(602)의 경우, 드라이브 및 매체는 임의의 데이터를 적당한 디지털 형식으로 저장하는 것에 대응한다. 상기에서의 컴퓨터 판독가능 매체에 대한 설명이 HDD, 이동식 자기 디스크, 및 CD 또는 DVD 등의 이동식 광 매체를 언급하고 있지만, 당업자라면 집 드라이브(zip drive), 자기 카세트, 플래쉬 메모리 카드, 카트리지, 기타 등등의 컴퓨터에 의해 판독가능한 다른 유형의 매체도 역시 예시적인 운영 환경에서 사용될 수 있으며 또 임의의 이러한 매체가 본 발명의 방법들을 수행하기 위한 컴퓨터 실행가능 명령어를 포함할 수 있다는 것을 잘 알 것이다.
운영 체제(630), 하나 이상의 애플리케이션 프로그램(632), 기타 프로그램 모듈(634) 및 프로그램 데이터(636)을 비롯한 다수의 프로그램 모듈이 드라이브 및 RAM(612)에 저장될 수 있다. 운영 체제, 애플리케이션, 모듈 및/또는 데이터의 전부 또는 그 일부분이 또한 RAM(612)에 캐싱될 수 있다. 본 발명이 여러가지 상업적으로 이용가능한 운영 체제 또는 운영 체제들의 조합에서 구현될 수 있다는 것을 잘 알 것이다.
사용자는 하나 이상의 유선/무선 입력 장치, 예를 들어, 키보드(638) 및 마우스(640) 등의 포인팅 장치를 통해 컴퓨팅 장치(602)에 명령 및 정보를 입력할 수 있다. 기타 입력 장치(도시 생략)로는 마이크, IR 리모콘, 조이스틱, 게임 패드, 스타일러스 펜, 터치 스크린, 기타 등등이 있을 수 있다. 이들 및 기타 입력 장치가 종종 시스템 버스(608)에 연결되어 있는 입력 장치 인터페이스(642)를 통해 처리 장치(604)에 연결되지만, 병렬 포트, IEEE 1394 직렬 포트, 게임 포트, USB 포트, IR 인터페이스, 기타 등등의 기타 인터페이스에 의해 연결될 수 있다.
모니터(644) 또는 다른 유형의 디스플레이 장치도 역시 비디오 어댑터(646) 등의 인터페이스를 통해 시스템 버스(608)에 연결된다. 모니터(644)에 부가하여, 컴퓨터는 일반적으로 스피커, 프린터, 기타 등등의 기타 주변 출력 장치(도시 생략)를 포함한다.
컴퓨팅 장치(602)는 유선 및/또는 무선 통신을 통한 원격 컴퓨터(들)(648) 등의 하나 이상의 원격 컴퓨터로의 논리적 연결을 사용하여 네트워크화된 환경에서 동작할 수 있다. 원격 컴퓨터(들)(648)는 워크스테이션, 서버 컴퓨터, 라우터, 퍼스널 컴퓨터, 휴대용 컴퓨터, 마이크로프로세서-기반 오락 기기, 피어 장치 또는 기타 통상의 네트워크 노드일 수 있으며, 일반적으로 컴퓨팅 장치(602)에 대해 기술된 구성요소들 중 다수 또는 그 전부를 포함하지만, 간략함을 위해, 메모리 저장 장치(650)만이 도시되어 있다. 도시되어 있는 논리적 연결은 근거리 통신망(LAN)(652) 및/또는 더 큰 네트워크, 예를 들어, 원거리 통신망(WAN)(654)에의 유선/무선 연결을 포함한다. 이러한 LAN 및 WAN 네트워킹 환경은 사무실 및 회사에서 일반적인 것이며, 인트라넷 등의 전사적 컴퓨터 네트워크(enterprise-wide computer network)를 용이하게 해주며, 이들 모두는 전세계 컴퓨터 네트워크, 예를 들어, 인터넷에 연결될 수 있다.
LAN 네트워킹 환경에서 사용될 때, 컴퓨팅 장치(602)는 유선 및/또는 무선 통신 네트워크 인터페이스 또는 어댑터(656)를 통해 로컬 네트워크(652)에 연결된다. 어댑터(656)는 LAN(652)에의 유선 또는 무선 통신을 용이하게 해줄 수 있으며, 이 LAN(652)은 또한 무선 어댑터(656)와 통신하기 위해 그에 설치되어 있는 무선 액세스 포인트를 포함하고 있다. WAN 네트워킹 환경에서 사용될 때, 컴퓨팅 장치(602)는 모뎀(658)을 포함할 수 있거나, WAN(654) 상의 통신 서버에 연결되거나, 또는 인터넷을 통하는 등, WAN(654)을 통해 통신을 설정하는 기타 수단을 갖는다. 내장형 또는 외장형 및 유선 또는 무선 장치일 수 있는 모뎀(658)은 직렬 포트 인터페이스(642)를 통해 시스템 버스(608)에 연결된다. 네트워크화된 환경에서, 컴퓨팅 장치(602)에 대해 설명된 프로그램 모듈들 또는 그의 일부분이 원격 메모리/저장 장치(650)에 저장될 수 있다. 도시된 네트워크 연결이 예시적인 것이며 컴퓨터들 사이에 통신 링크를 설정하는 기타 수단이 사용될 수 있다는 것을 잘 알 것이다.
컴퓨팅 장치(602)는 무선 통신으로 배치되어 동작하는 임의의 무선 장치 또는 개체, 예를 들어, 프린터, 스캐너, 데스크톱 및/또는 휴대용 컴퓨터, PDA(portable data assistant), 통신 위성, 무선 검출가능 태그와 연관된 임의의 장비 또는 장소, 및 전화와 통신을 하는 동작을 한다. 이것은 적어도 Wi-Fi 및 블루투스 무선 기술을 포함한다. 따라서, 통신은 종래의 네트워크에서와 같이 미리 정의된 구조이거나 단순하게 적어도 2개의 장치 사이의 애드혹 통신(ad hoc communication)일 수 있다.
Wi-Fi(Wireless Fidelity)는 유선 없이도 인터넷 등으로의 연결을 가능하게 해준다. Wi-Fi는 이러한 장치, 예를 들어, 컴퓨터가 실내에서 및 실외에서, 즉 기지국의 통화권 내의 아무 곳에서나 데이터를 전송 및 수신할 수 있게 해주는 셀 전화와 같은 무선 기술이다. Wi-Fi 네트워크는 안전하고 신뢰성있으며 고속인 무선 연결을 제공하기 위해 IEEE 802.6(a,b,g, 기타)이라고 하는 무선 기술을 사용한다. 컴퓨터를 서로에, 인터넷에 및 유선 네트워크(IEEE 802.3 또는 이더넷을 사용함)에 연결시키기 위해 Wi-Fi가 사용될 수 있다. Wi-Fi 네트워크는 비인가 2.4 및 5 GHz 무선 대역에서, 예를 들어, 6Mbps(802.6a) 또는 54 Mbps(802.6b) 데이터 레이트로 동작하거나, 양 대역(듀얼 대역)을 포함하는 제품에서 동작할 수 있다.
본 발명의 기술 분야에서 통상의 지식을 가진 자는 여기에 개시된 실시예들과 관련하여 설명된 다양한 예시적인 논리 블록들, 모듈들, 프로세서들, 수단들, 회로들 및 알고리즘 단계들이 전자 하드웨어, (편의를 위해, 여기에서 "소프트웨어"로 지칭되는) 다양한 형태들의 프로그램 또는 설계 코드 또는 이들 모두의 결합에 의해 구현될 수 있다는 것을 이해할 것이다. 하드웨어 및 소프트웨어의 이러한 상호 호환성을 명확하게 설명하기 위해, 다양한 예시적인 컴포넌트들, 블록들, 모듈들, 회로들 및 단계들이 이들의 기능과 관련하여 위에서 일반적으로 설명되었다. 이러한 기능이 하드웨어 또는 소프트웨어로서 구현되는지 여부는 특정한 애플리케이션 및 전체 시스템에 대하여 부과되는 설계 제약들에 따라 좌우된다. 본 발명의 기술 분야에서 통상의 지식을 가진 자는 각각의 특정한 애플리케이션에 대하여 다양한 방식들로 설명된 기능을 구현할 수 있으나, 이러한 구현 결정들은 본 발명의 범위를 벗어나는 것으로 해석되어서는 안 될 것이다.
여기서 제시된 다양한 실시예들은 방법, 장치, 또는 표준 프로그래밍 및/또는 엔지니어링 기술을 사용한 제조 물품(article)으로 구현될 수 있다. 용어 "제조 물품"은 임의의 컴퓨터-판독가능 장치로부터 액세스 가능한 컴퓨터 프로그램, 캐리어, 또는 매체(media)를 포함한다. 예를 들어, 컴퓨터-판독가능 매체는 자기 저장 장치(예를 들면, 하드 디스크, 플로피 디스크, 자기 스트립, 등), 광학 디스크(예를 들면, CD, DVD, 등), 스마트 카드, 및 플래쉬 메모리 장치(예를 들면, EEPROM, 카드, 스틱, 키 드라이브, 등)를 포함하지만, 이들로 제한되는 것은 아니다. 또한, 여기서 제시되는 다양한 저장 매체는 정보를 저장하기 위한 하나 이상의 장치 및/또는 다른 기계-판독가능한 매체를 포함한다. 용어 "기계-판독가능 매체"는 명령(들) 및/또는 데이터를 저장, 보유할 수 있는 다양한 다른 매체를 포함하지만, 이들로 제한되는 것은 아니다.
제시된 프로세스들에 있는 단계들의 특정한 순서 또는 계층 구조는 예시적인 접근들의 일례임을 이해하도록 한다. 설계 우선순위들에 기반하여, 본 발명의 범위 내에서 프로세스들에 있는 단계들의 특정한 순서 또는 계층 구조가 재배열될 수 있다는 것을 이해하도록 한다. 첨부된 방법 청구항들은 샘플 순서로 다양한 단계들의 엘리먼트들을 제공하지만 제시된 특정한 순서 또는 계층 구조에 한정되는 것을 의미하지는 않는다.
제시된 실시예들에 대한 설명은 임의의 본 발명의 기술 분야에서 통상의 지식을 가진 자가 본 발명을 이용하거나 또는 실시할 수 있도록 제공된다. 이러한 실시예들에 대한 다양한 변형들은 본 발명의 기술 분야에서 통상의 지식을 가진 자에게 명백할 것이며, 여기에 정의된 일반적인 원리들은 본 발명의 범위를 벗어남이 없이 다른 실시예들에 적용될 수 있다. 그리하여, 본 발명은 여기에 제시된 실시예들로 한정되는 것이 아니라, 여기에 제시된 원리들 및 신규한 특징들과 일관되는 최광의의 범위에서 해석되어야 할 것이다.
상기와 같이 발명의 실시를 위한 최선의 형태에서 관련 내용을 기술하였다.
본 발명은 데이터베이스에 관한 것으로서, 보다 구체적으로 효율적인 변경 데이터 캡쳐(CDC:Change Data Capture) 기법을 제공할 수 있다.

Claims (16)

  1. 인코딩된 명령들을 포함하는 컴퓨터 판독가능 매체에 저장된 컴퓨터 프로그램으로서, 상기 컴퓨터 프로그램은 컴퓨터 시스템의 하나 이상의 프로세서들에 의해 실행되는 경우, 상기 하나 이상의 프로세서들로 하여금 소스 데이터베이스와 타겟 데이터베이스 간의 변경 데이터 캡쳐(CDC:Change Data Capture)를 위한 이하의 단계들을 수행하도록 하며, 상기 단계들은:
    상기 소스 데이터베이스에서 처리되는 트랜잭션들에 대한 정보를 포함하는 복수의 로그 레코드들을 획득하는 단계;
    사전결정된 조건에 기초하여, 상기 획득된 복수의 로그 레코드들을 복수의 그룹들로 그룹화하는 단계 ― 상기 복수의 그룹들 각각에 속하는 로그 레코드들은 이들의 발생 시점에 따른 순서에 기초하여 그룹 내에서 정렬됨 ―; 및
    상기 획득된 복수의 로그 레코드들이 상기 소스 데이터베이스로부터 상기 타겟 데이터베이스로 복제되는 것이 그룹 단위로 병렬적으로 수행될 것을 결정하는 단계;
    를 포함하는,
    컴퓨터 판독가능 매체에 저장 컴퓨터 프로그램.
  2. 제 1 항에 있어서,
    트랜잭션들 간의 관계를 정의하는 쿼리를 수신하는 단계; 및
    상기 수신된 쿼리에 응답하여, 상기 쿼리에 포함된 트랜잭션들과 연관되는 하나 이상의 그룹들에 대한 그룹 재구성을 수행할 것을 결정하는 단계;
    를 더 포함하는,
    컴퓨터 판독가능 매체에 저장 컴퓨터 프로그램.
  3. 제 2 항에 있어서,
    상기 쿼리는 상기 트랜잭션들 또는 오브젝트들 간의 관계를 정의하는 DDL(Data Definition Language)을 포함하며,
    상기 그룹 재구성을 수행할 것을 결정하는 단계는:
    상기 DDL에서 정의된 관계가 사전결정된 관계에 포함되는지 여부를 결정하는 단계;
    상기 사전결정된 관계에 포함된다고 결정되는 경우, 상기 사전결정된 관계에 속하는 트랜잭션들이 하나의 그룹 내에 포함되는지 여부를 결정하는 단계; 및
    상기 하나의 그룹 내에 포함되지 않는다고 결정되는 경우, 상기 사전결정된 관계에 속하는 트랜잭션들이 하나의 그룹 내에 포함되도록 그룹 재구성을 수행할 것을 결정하는 단계;
    를 포함하는,
    컴퓨터 판독가능 매체에 저장된 컴퓨터 프로그램.
  4. 제 2 항에 있어서,
    상기 트랜잭션들 또는 오브젝트들 간의 관계를 정의하는 쿼리를 수신하는 경우, 상기 그룹 재구성이 완료될 때까지, 상기 획득된 복수의 로그 레코드들의 상기 소스 데이터베이스로부터 상기 타겟 데이터베이스로의 복제를 중지할 것을 결정하는 단계; 및
    상기 그룹 재구성이 완료되는 경우, 재구성된 그룹들에 기초하여 상기 획득된 복수의 로그 레코드들의 상기 소스 데이터베이스로부터 상기 타겟 데이터베이스로의 복제를 재개할 것을 결정하는 단계;
    를 포함하는,
    컴퓨터 판독가능 매체에 저장된 컴퓨터 프로그램.
  5. 제 4 항에 있어서,
    상기 타겟 데이터베이스로의 복제를 중지할 것을 결정하는 단계는,
    상기 트랜잭션들 또는 오브젝트들 간의 관계를 정의하는 쿼리를 수신하는 경우, 상기 그룹 재구성이 완료될 때까지, 상기 획득된 복수의 로그 레코드들 중 상기 쿼리의 발생된 시점 정보 이전에 커밋된 트랜잭션과 연관된 로그 레코드들의 상기 소스 데이터베이스로부터 상기 타겟 데이터베이스로의 복제를 허용하면서, 상기 획득된 복수의 로그 레코드들 중 상기 쿼리의 발생된 시점 정보 이후에 커밋된 트랜잭션과 연관된 로그 레코드들의 상기 소스 데이터베이스로부터 상기 타겟 데이터베이스로의 복제를 중지할 것을 결정하는 단계;
    를 포함하는,
    컴퓨터 판독가능 매체에 저장된 컴퓨터 프로그램.
  6. 제 2 항에 있어서,
    상기 하나 이상의 그룹들에 대한 히트 레이트(hit rate)를 모니터링하는 단계를 더 포함하며,
    상기 그룹 재구성을 수행할 것을 결정하는 단계는,
    상기 모니터링된 히트 레이트 및 상기 수신된 쿼리에 기초하여, 상기 쿼리에 포함된 트랜잭션들과 연관되는 하나 이상의 그룹들에 대한 그룹 재구성을 수행할 것을 결정하는 단계;
    를 포함하는,
    컴퓨터 판독가능 매체에 저장 컴퓨터 프로그램.
  7. 제 6 항에 있어서,
    상기 히트 레이트는, 그룹 내에서의 로그 레코드들의 발생 횟수 정보를 포함하는,
    컴퓨터 판독가능 매체에 저장된 컴퓨터 프로그램.
  8. 제 7 항에 있어서,
    상기 그룹 재구성은:
    로그 레코드들의 발생 횟수가 많은 그룹에 속하는 로그 레코드를 로그 레코드들의 발생 횟수가 적은 그룹으로 이동시키는 것을 포함하는,
    컴퓨터 판독가능 매체에 저장된 컴퓨터 프로그램.
  9. 제 1 항에 있어서,
    상기 사전결정된 조건은, 상기 트랜잭션들 각각과 관련된 데이터베이스 오브젝트(object) 식별 정보를 포함하는,
    컴퓨터 판독가능 매체에 저장된 컴퓨터 프로그램.
  10. 제 1 항에 있어서,
    상기 사전결정된 조건은, 오브젝트들 간의 종속성(dependency)에 대한 조건을 포함하며, 상기 종속성은 기본 키(primary key)와 외래 키(foreign key)간의 참조(reference)에 기초하여 결정되며, 그리고
    상기 그룹화하는 단계는, 종속성이 존재하는 오브젝트들을 하나의 그룹으로 그룹화하는 단계를 포함하는,
    컴퓨터 판독가능 매체에 저장된 컴퓨터 프로그램.
  11. 제 1 항에 있어서,
    클라이언트로부터의 쿼리를 수신하는 단계; 및
    상기 수신된 쿼리를 분석함으로써, 그룹화된 그룹들에 대한 정합성이 유지되는지 여부를 결정하는 단계; 및
    상기 정합성이 유지되지 않는다고 결정되는 경우, 상기 수신된 쿼리에 포함된 트랜잭션들과 연관되는 하나 이상의 그룹들에 대한 그룹 재구성을 수행할 것을 결정하는 단계;
    를 더 포함하는,
    컴퓨터 판독가능 매체에 저장 컴퓨터 프로그램.
  12. 제 11 항에 있어서,
    상기 정합성이 유지되는지 여부를 결정하는 단계는:
    상기 수신된 쿼리에 의해 오브젝트들 간의 종속성이 변경되는 경우, 상기 그룹화된 그룹에 대한 정합성이 유지되지 않는다고 결정하는 단계;
    를 포함하는,
    컴퓨터 판독가능 매체에 저장 컴퓨터 프로그램.
  13. 제 1 항에 있어서,
    커밋(commit) 커맨드의 수신에 응답하여, 상기 커밋 커맨드와 연관된 하나 이상의 로그 레코드들에 대한 상기 소스 데이터베이스로부터 상기 타겟 데이터베이스로의 복제를 상기 그룹 단위로 독립적으로 수행하는 단계;
    를 더 포함하는,
    컴퓨터 판독가능 매체에 저장된 컴퓨터 프로그램.
  14. 제 1 항에 있어서,
    상기 복수의 로그 레코드들 각각은,
    트랜잭션을 고유하게 식별하기 위한 정보 및 상기 트랜잭션에 따라 변경된 데이터 레코드를 식별하기 위한 정보를 포함하는,
    컴퓨터 판독가능 매체에 저장된 컴퓨터 프로그램.
  15. 소스 데이터베이스와 타겟 데이터베이스 간의 변경 데이터 캡쳐(CDC)를 수행하기 위한 서버로서,
    상기 소스 데이터베이스에서 처리되는 트랜잭션들에 대한 정보를 포함하는 복수의 로그 레코드들을 획득하는 로그 레코드 획득 및 분석 모듈;
    사전결정된 조건에 기초하여, 상기 복수의 로그 레코드들을 복수의 그룹들로 그룹화하는 그룹화 모듈 ― 상기 복수의 그룹들 각각에 속하는 로그 레코드들은 이들의 발생 시점에 따른 순서에 기초하여 그룹 내에서 정렬됨 ―; 및
    상기 획득된 복수의 로그 레코드들이 상기 소스 데이터베이스로부터 상기 타겟 데이터베이스로 복제되는 것이 그룹 단위로 병렬적으로 수행될 것을 결정하는 제어 모듈;
    을 포함하는,
    서버.
  16. 소스 데이터베이스와 타겟 데이터베이스 간의 변경 데이터 캡쳐(CDC)를 수행하기 위한 방법으로서,
    상기 소스 데이터베이스에서 처리되는 트랜잭션들에 대한 정보를 포함하는 복수의 로그 레코드들을 획득하는 단계;
    사전결정된 조건에 기초하여, 상기 복수의 로그 레코드들을 복수의 그룹들로 그룹화하는 단계 ― 상기 복수의 그룹들 각각에 속하는 로그 레코드들은 이들의 발생 시점에 따른 순서에 기초하여 그룹 내에서 정렬됨 ―; 및
    상기 획득된 복수의 로그 레코드들이 상기 소스 데이터베이스로부터 상기 타겟 데이터베이스로 복제되는 것이 그룹 단위로 병렬적으로 수행될 것을 결정하는 단계;
    를 포함하는,
    방법.
PCT/KR2017/012686 2016-11-16 2017-11-09 데이터베이스 관리 시스템에서의 데이터 복제 기법 WO2018093094A1 (ko)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US16/461,726 US11182404B2 (en) 2016-11-16 2017-11-09 Data replication technique in database management system

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR1020160152454A KR101956236B1 (ko) 2016-11-16 2016-11-16 데이터베이스 관리 시스템에서의 데이터 복제 기법
KR10-2016-0152454 2016-11-16

Publications (1)

Publication Number Publication Date
WO2018093094A1 true WO2018093094A1 (ko) 2018-05-24

Family

ID=62146647

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/KR2017/012686 WO2018093094A1 (ko) 2016-11-16 2017-11-09 데이터베이스 관리 시스템에서의 데이터 복제 기법

Country Status (3)

Country Link
US (1) US11182404B2 (ko)
KR (1) KR101956236B1 (ko)
WO (1) WO2018093094A1 (ko)

Cited By (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110209730A (zh) * 2019-04-25 2019-09-06 深圳壹账通智能科技有限公司 变更数据的同步方法、装置、计算机设备及计算机存储介质
CN110287187A (zh) * 2019-06-04 2019-09-27 华自科技股份有限公司 多个服务器中数据表同步更新方法、系统和存储介质
CN110647421A (zh) * 2018-06-27 2020-01-03 阿里巴巴集团控股有限公司 数据库处理方法、装置、系统以及电子设备
CN112181937A (zh) * 2019-07-04 2021-01-05 北京京东振世信息技术有限公司 一种结转数据的方法和装置
CN113032408A (zh) * 2019-12-24 2021-06-25 阿里巴巴集团控股有限公司 数据处理方法、系统及设备
CN113326247A (zh) * 2021-04-28 2021-08-31 上海淇馥信息技术有限公司 云端数据的迁移方法、装置及电子设备
CN114969200A (zh) * 2022-04-18 2022-08-30 中移互联网有限公司 数据同步方法、装置、电子设备及存储介质

Families Citing this family (20)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR102119258B1 (ko) 2018-11-14 2020-06-05 주식회사 실크로드소프트 데이터베이스 관리 시스템에서의 변경 데이터 캡쳐 구현 기법
US11249983B2 (en) * 2019-04-02 2022-02-15 International Business Machines Corporation Transaction change data forwarding
CN109947855B (zh) * 2019-04-03 2023-11-24 上海中商网络股份有限公司 数据同步处理方法、装置、服务器及存储介质
KR102225258B1 (ko) 2019-04-18 2021-03-10 주식회사 실크로드소프트 데이터베이스 시스템에서 효율적인 변경 데이터 캡쳐를 제공하기 위한 컴퓨터 프로그램
US11487714B2 (en) * 2019-05-15 2022-11-01 International Business Machines Corporation Data replication in a data analysis system
US11269925B2 (en) 2019-05-15 2022-03-08 International Business Machines Corporation Data synchronization in a data analysis system
US11893041B2 (en) 2019-05-15 2024-02-06 International Business Machines Corporation Data synchronization between a source database system and target database system
CN110990365A (zh) * 2019-12-03 2020-04-10 北京奇艺世纪科技有限公司 一种数据同步方法、装置、服务器及存储介质
CN113051278B (zh) * 2019-12-27 2023-04-07 中国移动通信集团湖北有限公司 一种数据复制进程延时的处理方法和系统
CN111177433B (zh) * 2019-12-31 2021-07-20 北京百度网讯科技有限公司 用于并行处理信息的方法和装置
US20210248162A1 (en) * 2020-02-12 2021-08-12 Roblox Corporation Parallel data transfer from one database to another database
CN111858505B (zh) * 2020-06-04 2024-04-16 武汉达梦数据库股份有限公司 一种基于日志解析同步的并行执行方法和数据同步系统
CN113760845A (zh) * 2020-08-17 2021-12-07 北京沃东天骏信息技术有限公司 一种日志处理方法、系统、装置、客户端及存储介质
US11514020B2 (en) 2020-11-13 2022-11-29 International Business Machines Corporation Tracking change data capture log history
US11423017B2 (en) 2020-12-11 2022-08-23 Sap Se Look-ahead staging for accelerated data extraction
US11416259B2 (en) 2020-12-11 2022-08-16 Sap Se Look-ahead staging for time-travel reconstruction
KR102669856B1 (ko) * 2021-05-25 2024-05-29 손철규 서버간 네트워크가 단절된 망분리 환경에서의 dbms 테이블 정합성 검증 및 보정 시스템
KR20220159523A (ko) * 2021-05-25 2022-12-05 (주)알투비솔루션 서버간 네트워크가 단절된 망분리 환경에서의 cdc 방식의 db 복제 시스템
CN114297295A (zh) * 2021-12-24 2022-04-08 北京京东拓先科技有限公司 数据同步方法及装置、电子设备和计算机可读存储介质
US20240061863A1 (en) * 2022-08-19 2024-02-22 Mastercard International Incorporated Systems and methods for use in replicating data

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20040088397A (ko) * 2003-04-01 2004-10-16 마이크로소프트 코포레이션 트랜잭션적으로 일관성있는 트리거 기반 데이터베이스변경 추적 방법 및 시스템
US7076508B2 (en) * 2002-08-12 2006-07-11 International Business Machines Corporation Method, system, and program for merging log entries from multiple recovery log files
US7647354B2 (en) * 2002-05-24 2010-01-12 Oracle International Corporation High-performance change capture for data warehousing
US7668884B2 (en) * 2005-11-28 2010-02-23 Commvault Systems, Inc. Systems and methods for classifying and transferring information in a storage network
US20110302136A1 (en) * 2005-10-10 2011-12-08 Oracle International Corporation Recoverable execution

Family Cites Families (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5758149A (en) * 1995-03-17 1998-05-26 Unisys Corporation System for optimally processing a transaction and a query to the same database concurrently
JP3763992B2 (ja) * 1999-03-30 2006-04-05 富士通株式会社 データ処理装置及び記録媒体
US7548898B1 (en) * 2001-02-28 2009-06-16 Teradata Us, Inc. Parallel migration of data between systems
US7111023B2 (en) 2001-05-24 2006-09-19 Oracle International Corporation Synchronous change data capture in a relational database
US7062516B2 (en) * 2001-09-18 2006-06-13 Sun Microsystems, Inc. Methods, systems, and articles of manufacture for implementing a runtime logging service storage infrastructure
US8606744B1 (en) * 2001-09-28 2013-12-10 Oracle International Corporation Parallel transfer of data from one or more external sources into a database system
US6999977B1 (en) 2002-05-09 2006-02-14 Oracle International Corp Method and apparatus for change data capture in a database system
US6889231B1 (en) * 2002-08-01 2005-05-03 Oracle International Corporation Asynchronous information sharing system
JP4575762B2 (ja) * 2004-06-03 2010-11-04 株式会社日立製作所 データ処理方法および装置並びにストレージ装置およびその処理プログラム
WO2012130277A1 (en) * 2011-03-28 2012-10-04 Telefonaktiebolaget L M Ericsson (Publ) Data management in a data virtualization environment
US8938420B1 (en) * 2012-07-26 2015-01-20 Symantec Corporation Systems and methods for natural batching of I/O operations on a replication log
US9519695B2 (en) * 2013-04-16 2016-12-13 Cognizant Technology Solutions India Pvt. Ltd. System and method for automating data warehousing processes
US10169169B1 (en) * 2014-05-08 2019-01-01 Cisco Technology, Inc. Highly available transaction logs for storing multi-tenant data sets on shared hybrid storage pools
US10417257B2 (en) * 2015-10-21 2019-09-17 Oracle International Corporation Non-blocking database table alteration
US10275911B2 (en) * 2016-06-30 2019-04-30 Salesforce.Com, Inc. Dynamically adjusted scale labels for displayed chart

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7647354B2 (en) * 2002-05-24 2010-01-12 Oracle International Corporation High-performance change capture for data warehousing
US7076508B2 (en) * 2002-08-12 2006-07-11 International Business Machines Corporation Method, system, and program for merging log entries from multiple recovery log files
KR20040088397A (ko) * 2003-04-01 2004-10-16 마이크로소프트 코포레이션 트랜잭션적으로 일관성있는 트리거 기반 데이터베이스변경 추적 방법 및 시스템
US20110302136A1 (en) * 2005-10-10 2011-12-08 Oracle International Corporation Recoverable execution
US7668884B2 (en) * 2005-11-28 2010-02-23 Commvault Systems, Inc. Systems and methods for classifying and transferring information in a storage network

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110647421A (zh) * 2018-06-27 2020-01-03 阿里巴巴集团控股有限公司 数据库处理方法、装置、系统以及电子设备
CN110647421B (zh) * 2018-06-27 2022-11-25 阿里巴巴集团控股有限公司 数据库处理方法、装置、系统以及电子设备
CN110209730A (zh) * 2019-04-25 2019-09-06 深圳壹账通智能科技有限公司 变更数据的同步方法、装置、计算机设备及计算机存储介质
CN110287187A (zh) * 2019-06-04 2019-09-27 华自科技股份有限公司 多个服务器中数据表同步更新方法、系统和存储介质
CN110287187B (zh) * 2019-06-04 2021-06-08 华自科技股份有限公司 多个服务器中数据表同步更新方法、系统和存储介质
CN112181937A (zh) * 2019-07-04 2021-01-05 北京京东振世信息技术有限公司 一种结转数据的方法和装置
CN112181937B (zh) * 2019-07-04 2023-11-03 北京京东振世信息技术有限公司 一种结转数据的方法和装置
CN113032408A (zh) * 2019-12-24 2021-06-25 阿里巴巴集团控股有限公司 数据处理方法、系统及设备
CN113032408B (zh) * 2019-12-24 2024-05-07 阿里巴巴集团控股有限公司 数据处理方法、系统及设备
CN113326247A (zh) * 2021-04-28 2021-08-31 上海淇馥信息技术有限公司 云端数据的迁移方法、装置及电子设备
CN114969200A (zh) * 2022-04-18 2022-08-30 中移互联网有限公司 数据同步方法、装置、电子设备及存储介质
CN114969200B (zh) * 2022-04-18 2023-09-19 中移互联网有限公司 数据同步方法、装置、电子设备及存储介质

Also Published As

Publication number Publication date
US11182404B2 (en) 2021-11-23
KR101956236B1 (ko) 2019-03-11
US20190361913A1 (en) 2019-11-28
KR20180055952A (ko) 2018-05-28

Similar Documents

Publication Publication Date Title
WO2018093094A1 (ko) 데이터베이스 관리 시스템에서의 데이터 복제 기법
CN110209726B (zh) 分布式数据库集群系统、数据同步方法及存储介质
US10552287B2 (en) Performance metrics for diagnosing causes of poor performing virtual machines
WO2020101343A1 (ko) 데이터베이스 관리 시스템에서의 변경 데이터 캡쳐 구현 기법
US20060047713A1 (en) System and method for database replication by interception of in memory transactional change records
KR101922044B1 (ko) 데이터베이스 이중화 무중단 정합성 복구 기법
CN110990432B (zh) 一种跨机房同步分布式缓存集群的装置和方法
JPWO2013018808A1 (ja) 分散ストレージシステムおよび方法
US20210216502A1 (en) System and method for synchronizing delete operations between primary and secondary databases
KR20200056357A (ko) 데이터베이스 관리 시스템에서의 변경 데이터 캡쳐 구현 기법
KR20080102622A (ko) Dbms에서의 데이터 복제 방법 및 시스템
CN109325016B (zh) 数据迁移方法、装置、介质及电子设备
CN104050276A (zh) 一种分布式数据库的缓存处理方法及系统
US11226878B1 (en) Accelerator-based database recovery
CN109977170A (zh) 一种政务内外网数据同步的方法及系统
KR20190022600A (ko) 데이터베이스 관리 시스템에서의 데이터 복제 기법
US11210212B2 (en) Conflict resolution and garbage collection in distributed databases
WO2021141292A1 (ko) 하이브리드 클라우드 기반의 실시간 데이터 아카이빙 방법 및 시스템
WO2018097522A1 (ko) 데이터베이스의 이중화를 위한 기법
CN115934417A (zh) 一种数据备份方法、系统和设备
WO2022252322A1 (zh) 基于特征标记的电网监控系统内存库关系库同步方法
KR102085608B1 (ko) 복구 서버 및 컴퓨터 프로그램
US11698911B2 (en) System and methods for performing updated query requests in a system of multiple database engine
US11360866B2 (en) Updating stateful system in server cluster
KR20180126431A (ko) 데이터베이스 이중화 무중단 정합성 복구 기법

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17871095

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17871095

Country of ref document: EP

Kind code of ref document: A1