WO2015104835A1 - データベースシステムの制御方法及びデータベースシステム - Google Patents

データベースシステムの制御方法及びデータベースシステム Download PDF

Info

Publication number
WO2015104835A1
WO2015104835A1 PCT/JP2014/050322 JP2014050322W WO2015104835A1 WO 2015104835 A1 WO2015104835 A1 WO 2015104835A1 JP 2014050322 W JP2014050322 W JP 2014050322W WO 2015104835 A1 WO2015104835 A1 WO 2015104835A1
Authority
WO
WIPO (PCT)
Prior art keywords
storage device
data
database
checkpoint information
log
Prior art date
Application number
PCT/JP2014/050322
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 PCT/JP2014/050322 priority Critical patent/WO2015104835A1/ja
Priority to US14/907,653 priority patent/US10078558B2/en
Publication of WO2015104835A1 publication Critical patent/WO2015104835A1/ja

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/14Error detection or correction of the data by redundancy in operation
    • G06F11/1402Saving, restoring, recovering or retrying
    • G06F11/1471Saving, restoring, recovering or retrying involving logging of persistent data for recovery
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/16Error detection or correction of the data by redundancy in hardware
    • G06F11/20Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements
    • G06F11/202Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where processing functionality is redundant
    • G06F11/2023Failover techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/16Error detection or correction of the data by redundancy in hardware
    • G06F11/20Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements
    • G06F11/2053Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where persistent mass storage functionality or persistent mass storage control functionality is redundant
    • G06F11/2056Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where persistent mass storage functionality or persistent mass storage control functionality is redundant by mirroring
    • G06F11/2064Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements where persistent mass storage functionality or persistent mass storage control functionality is redundant by mirroring while ensuring consistency
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/07Responding to the occurrence of a fault, e.g. fault tolerance
    • G06F11/16Error detection or correction of the data by redundancy in hardware
    • G06F11/20Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements
    • G06F11/2097Error detection or correction of the data by redundancy in hardware using active fault-masking, e.g. by switching out faulty elements or by switching in spare elements maintaining the standby controller/processing unit updated
    • 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/27Replication, distribution or synchronisation of data between databases or within a distributed database system; Distributed database system architectures therefor
    • 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
    • G06F2201/00Indexing scheme relating to error detection, to error correction, and to monitoring
    • G06F2201/80Database-specific techniques
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2201/00Indexing scheme relating to error detection, to error correction, and to monitoring
    • G06F2201/84Using snapshots, i.e. a logical point-in-time copy of the data

Definitions

  • the present invention relates to a database system using disaster recovery.
  • DBMS database management system
  • the remote copy function of the storage device is used to transfer and write database logs from the main system to the remote system to synchronize the database data (DB data) and
  • DB data database data
  • Patent Documents 1 and 2 A method of asynchronously transferring and writing checkpoint information to a remote site is known (for example, Patent Documents 1 and 2).
  • Patent Document 3 a technique using a log is known (for example, Patent Document 3).
  • the database when a failure occurs in the main system, the database can be recovered by the remote system.
  • the remote system there is a problem that it is difficult to recover the database when a failure occurs in the remote system after a failure occurs in the main system.
  • the present invention aims to recover the database quickly on the remote system side when a failure occurs in the main system while suppressing the influence on the processing capacity of the main system, and to ensure reliability even in the state of only the remote system. Objective.
  • the present invention provides a method for controlling a database system, comprising: a first site that provides a database; and a second site that stores a copy of the database, and the database is recovered by a management computer at the second site.
  • the first site includes a first computer that includes a processor and a memory to operate a database management unit that controls the database, a first primary storage device that stores data related to the database, and A second secondary storage device for storing a copy of the data stored in the first primary storage device, the second site including a processor and memory for restarting the database A second computer that operates the processing unit; and a second primary storage that stores the data received from the first primary storage device.
  • a second secondary storage device that stores the data received from the first secondary storage device, and the control method is such that the first computer performs processing of the database.
  • a first step of updating data in the database and a second step in which the first primary storage device transmits the data to the second primary storage device asynchronously with the database management unit;
  • the third secondary storage device is asynchronous with the database management unit and transmits the data to the second secondary storage device; and the second computer is configured to send the data at a predetermined timing.
  • the second site when a failure occurs in the main system while suppressing the influence on the processing capability of the first site (main system) by backup asynchronous with the database management unit, the second site (remote system). Can reliably recover the database and ensure the reliability of the remote system.
  • FIG. 1 is a block diagram illustrating an example of a host computer according to a first embodiment of this invention.
  • FIG. 1 is a block diagram illustrating an example of a primary storage system according to a first embodiment of this invention.
  • FIG. 6 is a diagram illustrating an example of a DB-volume mapping table according to the first embodiment of this invention. It is a figure which shows 1st Example of this invention and shows an example of DB definition information table. It is a figure which shows 1st Example of this invention and shows an example of checkpoint information management table # 1.
  • FIG. 1 is a block diagram showing an example of a database system according to the first embodiment of the present invention.
  • the database system is a computer system that backs up the database of the main system 1 with a remote system using disaster recovery and provides the database with the remote system 2 when a failure occurs in the main system.
  • the main system 1 and the remote system 2 are connected via a network 3.
  • the main system 1 and the remote system 2 can be configured similarly.
  • the main system 1 includes a host computer 10-1 that executes a database management system (database management unit) 20-1 to provide a database, and primary data (a primary DB data 310, a primary log 330, a primary checkpoint) of the provided database.
  • the primary storage system 30-1 that stores information 320) and the secondary storage system 40-1 that stores a copy of secondary data (secondary data) are connected via a network or host computer 10.
  • the remote system 2 includes a host computer 10-2 that executes the database management system 20-2, a primary storage system 30-2 that asynchronously stores a copy of the primary data stored in the primary storage system 30-1, and a secondary storage A secondary storage system 40-2 that asynchronously stores a copy of the secondary data stored in the system 40-1 is connected via a network.
  • the main system 1 and the remote system 2 can be configured similarly.
  • the host computers 10-1 and 10-2 have the same configuration, and the primary storage systems 30-1 and 30-2 and the secondary storage systems 40-1 and 40-2 have the same configuration.
  • the generic name of the host computer is indicated by reference numeral 10 without a subscript, and the other components are also indicated by reference numerals without a subscript, and it is necessary to distinguish between the main system 1 and the remote system 2. In some cases, a subscript is added.
  • the primary storage system 30-1 includes a primary DB data volume 31 that stores primary DB data 310, a primary checkpoint information volume 32 that stores primary checkpoint information 320, and a primary log volume that stores primary log 330. 33 and an access control unit 34 for controlling these volumes 31 to 33.
  • the access control unit 34 of the primary storage system 30-1 controls access to the primary DB data 310 in response to an access request from the DBMS 20-1.
  • the access control unit 34 has a remote copy function, and the contents of the primary DB data 310, the primary checkpoint information 320, and the primary log 330 are asynchronous with the access of the DBMS 20-1, and are stored in the primary storage system 30- of the remote system 2. Forward to 2.
  • the host computer 10-1 stores a copy of the data of the primary storage system 30-1 in the secondary storage system 40-1 by the mirroring function provided by the OS 300 or the I / F 13.
  • the data in the primary storage system 30-1 is replicated using the mirroring function of the primary DB data 310, and the primary checkpoint information 320 and the primary log 330 are replicated in the DBMS 20-1.
  • the secondary storage system 40-1 has the same configuration as the primary storage system, and the secondary DB data volume 41 that stores a copy of the primary DB data 310 as the secondary DB data 410 and a copy of the primary checkpoint information 320 are subchecked.
  • a secondary checkpoint information volume 42 stored as the point information 420; a secondary log volume 43 that stores a copy of the primary log 330 as the secondary log 430; and an access control unit 44 that controls these volumes 41 to 43. Including.
  • the access control unit 44 has a remote copy function, and the contents of the secondary DB data 410, the secondary checkpoint information 420, and the secondary log 430 are asynchronously synchronized with the mirroring of the host computer 10-1. Transfer to system 40-2. Since the mirroring function synchronizes the secondary storage system 40-1 with the primary storage system 30-1 due to the writing of the database management system 20-1, in other words, it synchronizes with the writing of the database management system 20-1. Thus, data is written to the secondary storage system 40-1.
  • the main system 1 functions as an active system (first site) for providing a database to a client computer (not shown), and the remote system 2 is asynchronous with the control of the database management system 20-1 and the like. It functions as a standby system (second site) that backs up data transmitted from the system 1 and recovers and takes over the database of the main system 1 when a failure occurs.
  • the host computer 10-2 of the remote system 2 only needs to execute at least the DB restart processing unit 210 in the database management system 20-2. Then, after a failure occurs in the main system 1, the database management system 20-2 may activate a function (database management unit) that provides a database. That is, in the database management system 20-1 of the main system 1, only the database management unit functions.
  • DBMS database management system
  • the DB restart processing unit 210 and the database management unit function in the DBMS 20-2 of the remote system 2.
  • FIG. 2 is a block diagram illustrating an example of the host computer 10.
  • the host computer 10 includes a processor 11 that performs arithmetic processing, a memory 12 that stores data and programs, and an interface (hereinafter referred to as I / F) connected to the primary storage system 30, the secondary storage system 40, or the outside via a network. 13 is included.
  • I / F interface
  • the DBMS 20 is loaded into the memory 12 and is executed by the processor 11.
  • the DBMS 20 includes a DB restart processing unit 210 that recovers the database (primary DB data 310) when a failure occurs in the main system 1.
  • the DB restart processing unit 210 may be operated on the host computer 10-2 of the remote system 2, and the DB restart processing unit 210 can be stopped on the host computer 10-1 of the main system 1.
  • the DB restart processing unit 210 includes a recovery start position determining unit 220 that specifies the recovery position of the primary DB data 310 from the primary checkpoint information 320, a DB recovery processing unit 260 that recovers the primary DB data 310, and various tables. .
  • the DB recovery processing unit 260 may recover the primary DB data 310 by a known or well-known method.
  • the primary DB data 310 is recovered from the secondary log 430 or the primary log 330.
  • the recovery start position determination unit 220 determines the positions of the checkpoint information mismatch determination processing unit 230 that detects a deviation between the primary checkpoint information 320 and the secondary checkpoint information 420, and the checkpoint information 420 that starts recovery of the primary DB data 310.
  • a checkpoint information determination processing unit 240 to be determined, and a checkpoint information mismatch resolution processing unit 250 to be synchronized when there is a mismatch between the primary checkpoint information 320 and the secondary checkpoint information 420 are included.
  • the table managed by the DB restart processing unit 210 includes a DB-volume mapping table 270 that stores the relationship between stored data and volumes of the primary storage system 30 or the secondary storage system 40, and a DB definition information table that stores settings of the DBMS 20. 280, and checkpoint information management table # 1 (290-1) and checkpoint information management table # 2 (290-2) for managing primary checkpoint information 320 or secondary checkpoint information 420.
  • Each function unit of the DBMS 20 is loaded into the memory 12 as a program.
  • the processor 11 operates as a functional unit that provides a predetermined function by performing processing according to a program of each functional unit.
  • the processor 11 functions as the DB restart processing unit 210 by performing processing according to the DB restart processing program.
  • the processor 11 also operates as a functional unit that provides each function of a plurality of processes executed by each program.
  • a computer and a computer system are an apparatus and a system including these functional units.
  • Information such as programs and tables for realizing each function of the DBMS 20 is stored in a storage device such as the primary storage system 30, secondary storage system 40, nonvolatile semiconductor memory, hard disk drive, SSD (Solid State Drive), IC card, SD, etc. It can be stored in a computer-readable non-transitory data storage medium such as a card or DVD.
  • a storage device such as the primary storage system 30, secondary storage system 40, nonvolatile semiconductor memory, hard disk drive, SSD (Solid State Drive), IC card, SD, etc. It can be stored in a computer-readable non-transitory data storage medium such as a card or DVD.
  • FIG. 3 is a block diagram illustrating an example of the primary storage system 30. Since the secondary storage system 40 has the same configuration, a duplicate description is omitted.
  • the primary storage system 30 includes a processor 35 that performs arithmetic processing, a memory 36 that holds data and programs, an I / F 38 that is connected to a drive that provides a plurality of volumes, and a host computer 10 or externally via a network.
  • An interface (hereinafter referred to as I / F) 37 to be connected is included.
  • Each volume 31 to 33 is a logical storage area including a nonvolatile semiconductor such as one or more disk drives or SSDs.
  • a primary DB data volume 31 that stores primary DB data 310 from the primary storage system 30-1
  • a primary checkpoint information volume 32 that stores primary checkpoint information 320
  • a primary log 330 are stored.
  • a primary log volume 33 is a logical storage area including a nonvolatile semiconductor such as one or more disk drives or SSDs.
  • a primary DB data volume 31 that stores primary DB data 310 from the primary storage system 30-1
  • a primary checkpoint information volume 32 that stores primary checkpoint information 320
  • a primary log 330 are stored.
  • a primary log volume 33 is a logical storage area including a nonvolatile semiconductor such as one or more disk drives or SSDs.
  • an access control unit 34 for controlling each of the volumes 31 to 33 is read and executed by the processor 35.
  • the access control unit 34 includes a WRITE time management table 340 that stores the time when the last write to each volume was executed. Further, the access control unit 34 has a remote copy function, and transfers the contents of each data to the remote system 2 asynchronously with the access of the DBMS 20-1 or the mirroring function.
  • the remote copy function of the access control unit 34 is asynchronous with the access of the DBMS 20-1 from the primary storage system 30-1 of the main system 1 to the primary storage system 30-2 of the remote system 2, and the primary DB data 310, the primary checkpoint A copy of the information 320 and the primary log 330 is transferred.
  • the access control unit 44 of the secondary storage system 40 is asynchronous with the mirroring function access from the secondary storage system 40-1 of the main system 1 to the secondary storage system 40-2 of the remote system 2, and the secondary DB data 410, A copy of the checkpoint information 420 and the secondary log 430 is transferred.
  • the DBMS 20-1 reads the data of the primary DB data 310 into a DB buffer (or DB cache) (not shown) secured in the memory 12 in response to a request from a client or application (not shown).
  • a DB buffer or DB cache
  • the DBMS 20-1 When the transaction is committed to the data read to the DB buffer, the DBMS 20-1 generates a log indicating the update contents of the data and stores it in the primary log 330, and the updated data is stored in the primary DB data 310.
  • the DBMS 20-1 gives a log sequence number (hereinafter referred to as LSN) to the log as an identifier for uniquely identifying the log when generating the log. Then, the DBMS 20-1 of the present invention stores the log including the LSN in the primary log 330. Next, the DBMS 20-1 stores the updated data in the primary DB data 310, and ends a series of data update processing.
  • LSN log sequence number
  • the checkpoint information 320 is generated as follows.
  • the DBMS 20-1 of the main system 1 executes a checkpoint acquisition process every time a predetermined timing is reached.
  • the predetermined timing is, for example, a preset period, when the transaction processing amount reaches a threshold, or when the amount of the primary log 330 reaches a predetermined value.
  • the DBMS 20-1 writes the data updated on the DB buffer back to the primary DB data 310 of the primary DB data volume 31.
  • the LSN of the data to be written to the primary DB data 310 is acquired and written to the checkpoint information 320.
  • a copy of the data of the primary storage system 30-1 is stored in the secondary storage system 40-1 by the mirroring function provided by the OS 300 or the I / F 13 of the host computer 10-1.
  • the data written in the primary DB data 310 is also written in the secondary DB data 410.
  • the DBMS 20-1 writes a copy of the primary log 330 to the secondary log 430, and the DBMS 20-1 writes the primary checkpoint information 320 to the secondary checkpoint information 420 for multiplexing.
  • the primary storage system 30-1 of the main system 1 is asynchronous with the update of the DBMS 20-1, and at a predetermined timing, the volumes 31 to 33 of the remote system 2 are replaced with the volumes 31 to 33 of the primary storage system 30-2. Synchronize with. That is, of the primary DB data 310, the primary checkpoint information 320, and the primary log 330, the newly updated data is transferred from the primary storage system 30-1 to the primary storage system 30-2.
  • the predetermined timing refers to a state in which the usage rate of the network 3 is below the threshold, a state in which the load on the primary storage system 30-1 is below the threshold, or a state in which the access load on each of the volumes 31 to 33 is below the threshold.
  • the secondary storage system 40-1 of the main system 1 is asynchronous with the mirroring process of the host computer 10-1, and synchronizes with the secondary storage system 40-2 of the remote system 2 at a predetermined timing. That is, the newly updated data among the secondary DB data 410, the secondary checkpoint information 420, and the secondary log 430 is transferred from the secondary storage system 40-1 to the secondary storage system 40-2.
  • the predetermined timing is the same as described above, and the usage rate of the network 3 is less than the threshold, the load of the secondary storage system 40-1 is less than the threshold, and the access load of each of the volumes 41 to 43 is the threshold.
  • the following state is a predetermined timing.
  • the DBMS 20-1 of the main system 1 When the abnormality occurs, the DBMS 20-1 of the main system 1 writes information indicating that the abnormality has occurred in the correct checkpoint information 320. For example, information such as “FAILURE” is written as shown in FIG. That is, information indicating the state of the DBMS 20-1 of the main system 1 is stored at the end or between the LSNs.
  • the DB restart processing unit 210 detects that a failure has occurred in the DBMS 20-1 of the main system 1, the DB restart processing unit 210 recovers the primary DB data 310 from the primary log 330 or the secondary log 430 of the remote system 2.
  • a database system that stores a copy of the main system 1 in the remote system 2 asynchronously with the DBMS 20-1 by determining the log recovery start position using checkpoint information. Ensure redundancy.
  • the DBMS 20-2 of the remote system 2 resumes providing the database in place of the main system 1 in which the failure has occurred.
  • a known or publicly known method can be applied.
  • the technique of Patent Document 3 shown in the above-described conventional example is applied.
  • the DBMS 20-2 starts providing the database.
  • the contents of the primary DB data 310, the primary log 330, and the primary checkpoint information 320 can be sent to the remote system 2 asynchronously with the update of the DBMS 20-1. Then, as will be described later, the database can be accurately recovered by determining the position of the log from which the primary DB data 310 is to be recovered based on the checkpoint information.
  • the monitoring of the DBMS 20-1 of the main system 1 by the DB restart processing unit 210 of the DBMS 20-2 of the remote system 2 monitors the primary checkpoint information 320 of the primary storage system 30-2, and indicates information indicating the occurrence of a failure. It is not limited to the case of reading, but the heartbeat of the host computer 10-1 or DBMS 20-1 is monitored, or the communication status of the network 3 is monitored to detect a failure on the main system 1 side. Can do.
  • FIG. 4 is a diagram showing the relationship between the primary log 330 and the primary checkpoint information 320.
  • the primary log 330 includes an LSN 331 for storing a log sequence number assigned by the main system 1, a transaction identifier 332 for storing an identifier of a transaction corresponding to the log, a log type 333 indicating the type of the log, A data identifier 334 that stores the identifier of the primary DB data 310 corresponding to the log, pre-update data 335 that stores a value before update of the data identifier, and post-update data 336 that stores a value after update of the data identifier.
  • the LSN 331 is an identifier for specifying the position of the primary log 330 when the updated database data is written to the primary storage system 30-1.
  • the primary checkpoint information 320 stores the value of the LSN 331 in the primary log 330 and the status information written by the DBMS 20-1 in the LSN 321.
  • “50” and “100” indicate the value of the LSN 331 of the primary log 330
  • “DBSTART” in the figure indicates the operation start information written in the primary log 330 by the DBMS 20-1.
  • “DBEND” in the figure indicates information on normal termination written to the primary log 330 by the DBMS 20-1. Therefore, when the information indicating the normal end is not stored in the main checkpoint information 320, it can be determined that the DBMS 20-1 has not ended normally.
  • the log type 333 is written by the DBMS 20-1 with “START” in the figure indicating a start of the transaction T1.
  • “UPDATE” means a log indicating data update
  • “COMMIT” in the figure is a log indicating that a transaction is completed.
  • CP START is a message indicating the start of the checkpoint acquisition process written by the DBMS 20-1 at a predetermined cycle.
  • CP END in the figure is a message written when the DBMS 20-1 completes the checkpoint acquisition process.
  • the DBMS 20-1 writes checkpoint information every predetermined period, so that even if there is no update or addition of the primary DB data 310, Information can be generated.
  • FIG. 5 is a diagram showing an example of the DB-volume mapping table 270.
  • the DB-volume mapping table 270 stores a DB area ID 271 that stores area names of the storage systems 30 and 40 that store the data, and a system that stores whether the storage system that stores the data belongs to the primary or the secondary. 272, a type 273 for storing the type of the data, a main storage system ID 274 for storing the identifier of the storage system for storing the data in the main system 1, and an identifier for the volume for storing the data in the main system 1.
  • the main logical volume ID 275 to be stored the remote storage system ID 276 that stores the identifier of the storage system that stores the data in the remote system 2, and the remote that stores the identifier of the volume in which the data is stored in the remote system 2. It includes a side logical volume ID277, the one of the record.
  • DB-volume mapping table 270 an asynchronous copy relationship is set between the volumes of the main system 1 and the remote system 2, and a copy of the data of each volume is transferred from the main storage system ID 274 to the remote storage system ID 276. It is shown that.
  • Each value of the DB-volume mapping table 270 is set in advance by a database system administrator or the like.
  • the main system 1 is set to “primary” and the remote system 2 is set to “secondary”.
  • the ID of the primary storage system 30-1 of the main system 1 is “CTL # A1”
  • the ID of the secondary storage system 40-1 is “CTL # A2”.
  • the ID of the primary storage system 30-2 of the remote system 2 is “CTL # B1”
  • the ID of the secondary storage system 40-2 is “CTL # B2”.
  • FIG. 6 is a diagram illustrating an example of the DB definition information table 280.
  • the DB definition information table 280 includes a parameter 281 and a value 282 in one record.
  • the DB definition information table 280 of the DBMS 20-2 of the remote system 2 is shown, and the first record acquires the WRITE time written by the storage system of the main system 1 in the remote system 2 as the parameter 281.
  • the WRITE time acquisition mode for setting whether or not to perform is set, and “N” is stored in the value 282.
  • the remote system 2 does not acquire data of the WRITE time management table 340 of the main system 1.
  • the second record is set as a parameter 281 to the synchronization function usage mode between mirrored volumes, and the value 282 stores “N”.
  • This function indicates whether to apply the function of synchronizing (copying) the contents between mirrored volumes.
  • “N” in the figure indicates a setting that does not apply the function.
  • the DBMS 20-1 of the main system 1 also has a DB definition information table 280, and can set whether to apply a function of synchronizing (copying) the contents between mirrored volumes.
  • the DB definition information table 280 includes information for identifying either the main system 1 or the remote system 2. For example, a parameter 281 called “site” and a value 282 “remote” indicate the DBMS 20-2 of the remote system 2.
  • FIG. 7 is a diagram showing an example of the checkpoint information management table # 1 (290-1).
  • the checkpoint information management table # 1 (290-1) includes a checkpoint information ID 291 that stores an identifier of the checkpoint information, and a system 292 that stores whether the checkpoint information is stored in the primary or secondary storage system.
  • a type 293 that stores the type of data
  • an LSN 294 that stores the latest LSN value of the checkpoint information
  • a checkpoint information selection flag 295 that indicates selection when restoring the primary DB data 310. Include in one record.
  • the LSN294 of the primary checkpoint information 320 (CHKPNT1) is “90” and the LSN294 of the secondary checkpoint information 420 (CHKPNT2) is Since the check point information selection flag 295 of “85” and the system 292 is “ON” is “ON”, it indicates that the secondary checkpoint information 420 is selected for recovery of the primary DB data 310.
  • FIG. 8 is a diagram showing an example of the checkpoint information management table # 2 (290-2).
  • the checkpoint information ID 291 for storing the identifier of the checkpoint information and whether the checkpoint information is stored in the “primary” or “secondary” storage system.
  • the storage system 292 the type 293 for storing the data type, the storage system ID 296 for storing the identifier of the storage system storing the checkpoint information, and the identifier of the logical volume storing the checkpoint information , A main WRITE time 298 for storing the time when the checkpoint information was written in the main system 1, and a checkpoint information selection flag indicating selection when recovering the primary DB data 310 295, and Included in the record of the convex.
  • the main WRITE time 298 of the primary checkpoint information 320 (CHKPNT1) is “14:50”, and the secondary checkpoint information 420 is displayed. Since the main side WRITE time 298 of (CHKPNT2) is “14:40” and the checkpoint information selection flag 295 for the system 292 is “secondary”, the secondary checkpoint information is used for recovery of the primary DB data 310. This indicates that 420 is selected.
  • the DBMS 20 updates the checkpoint information management tables # 1 and # 2 shown in FIGS.
  • the DBMS 20-2 of the remote system 2 updates the checkpoint information management tables # 1 (290-1) and # 2 (290-2) by processing to be described later.
  • Update of the checkpoint information management table # 1 (290-1) stores the LSN values of the primary checkpoint information 320 and the secondary checkpoint information 420 in the LSN 294, respectively.
  • the checkpoint information management table # 2 (290-2) is updated by receiving the WRITE time information on the main system 1 side by the remote system 2 at the time of asynchronous data transfer from the main system 1, and the correct checkpoint information 320. And the last write time of the sub checkpoint information 420 are stored in the main WRITE time 298, respectively.
  • FIGS. 9A to 9D are diagrams showing examples of the WRITE time management table 340 held by the storage systems 30 and 40, respectively.
  • FIG. 9A shows a WRITE time management table 340-1 held by the primary storage system 30-1 of the main system 1.
  • FIG. 9B is a WRITE time management table 340-2 held by the secondary storage system 40-1 of the main system 1.
  • FIG. 9C is a WRITE time management table 340-1 held by the primary storage system 30-2 of the remote system 2.
  • FIG. 9D is a WRITE time management table 340-1 held by the secondary storage system 40-2 of the remote system 2.
  • Each WRITE time management table 340 stores a logical volume ID 341 that stores an identifier of a logical volume that each storage system has, and a time (time stamp) when data was last written to each logical volume.
  • the access control unit 34 of each storage system sets the time when the writing is completed to the WRITE time 342 of the record of the corresponding volume when the writing is performed to each volume.
  • FIG. 10 is a flowchart showing an example of the checkpoint acquisition process. This process is executed when the DBMS 20-1 of the main system 1 reaches a predetermined timing.
  • the predetermined timing is a preset period, when the transaction processing amount reaches a threshold, or when the amount of the primary log 330 reaches a predetermined value.
  • the DBMS 20-1 first outputs “CP START” to the primary log 330 as the checkpoint acquisition start information in the primary checkpoint information 320 (S1).
  • the DBMS 20-1 adds an LSN to this checkpoint acquisition start information in the same manner as the log of the primary DB data 310.
  • the DBMS 20-1 writes all data (all DB blocks) updated in the DB buffer to the primary DB data volume 31 (S2).
  • the DBMS 20-1 outputs “CP END” to the primary log 330 as checkpoint acquisition end information (S3).
  • the DBMS 20-1 adds an LSN to the checkpoint acquisition end information in the same manner as described above.
  • the DBMS 20-1 writes the LSN added to the checkpoint acquisition end information in the correct checkpoint information 320.
  • the data updated in the DB buffer is written to the primary DB data 310 every time the predetermined timing is reached.
  • the LSN given to the checkpoint acquisition end information is the correct checkpoint information 320.
  • the check point information volume 32 is written.
  • the primary checkpoint information 320 of the main system 1 is copied to the primary checkpoint information 320 of the remote system 2 asynchronously with the writing of the DBMS 20-1.
  • the primary DB data 310 of the main system 1 is also copied asynchronously with the writing of the DBMS 20-1 and the primary DB data 310 is copied to the primary DB data 310 of the remote system 2.
  • FIG. 11 is a flowchart illustrating an example of processing performed by the DB restart processing unit 210. This process is executed when the operation is switched from the main system 1 to the remote system 2 and the DBMS 20-2 of the remote system 2 is started.
  • a well-known or publicly known technique can be adopted for switching from the main system 1 to the remote system 2.
  • the host computer 10-2 of the remote system 2 may monitor the heartbeat of the host computer 10-1 of the main system 1 and start the DBMS 20-2 when the occurrence of a failure is detected.
  • the DB restart processing unit 210 reads the primary checkpoint information 320 of the primary storage system 30-2, and determines whether or not the database of the main system 1 has ended normally. If the information indicating that the DBMS 20-1 has been normally terminated is not stored in the primary checkpoint information 320, it is determined that the DBMS 20-1 has not terminated normally and the process proceeds to step S12. If not, the process ends.
  • step S12 it is determined whether or not the system is the remote system 2 with reference to the DB definition information table 280. If the system is the remote system 2, the process proceeds to step S ⁇ b> 13 and a recovery start position determination process from the log is executed. On the other hand, when the system is the main system 1, the process proceeds to step S ⁇ b> 14, and the DB recovery processing unit 260 executes the recovery process of the primary DB data 310 based on the log.
  • the DB recovery processing unit 260 converts the primary log 330 or the secondary log 430 from the primary DB data volume 31 and the secondary DB data volume 41 from the LSN or WRITE time of the checkpoint information selected in step S13.
  • the recovery process is executed by applying to the DB data 410.
  • the log to be selected the log corresponding to the newer one of the primary checkpoint information 320 and the secondary checkpoint information 420 is selected.
  • the DB recovery processing unit 260 refers to the LSN 294 of the checkpoint information management table # 1 (290-1), selects the checkpoint information with the larger value (the correct checkpoint information 320 in the illustrated example),
  • the primary log 330 (or secondary log 430) corresponding to the checkpoint information is selected, and recovery processing is executed.
  • the value of the main WRITE time 298 in the checkpoint information management table # 2 (290-2) is Newer checkpoint information may be selected, and the primary log 330 or the secondary log 430 corresponding to the checkpoint information may be selected.
  • step S13 it is determined from which position in the log the primary DB data 310 is to be recovered (S13). The process in step S13 will be described in detail with reference to FIG.
  • the DB restart processing unit 210 of the DBMS 20-2 recovers the primary DB data 310 and the secondary DB data 410 from the determined log recovery start position, and resumes providing the database after the recovery is completed.
  • the mirroring function provided by the OS 300 or the I / F 13 is used. With this mirroring function, the primary storage system 30-2 and the secondary storage system 40-2 are synchronized to ensure the redundancy of the database system in the remote system 2.
  • FIG. 12 is a flowchart showing an example of a recovery start position determination process from a log. This process is a process performed in step S13 of FIG.
  • the DB restart processing unit 210 of the DBMS 20-2 refers to the DB definition information table 280 and acquires the value 282 of the WRITE time acquisition mode. Then, the DB restart processing unit 210 determines whether or not the value 282 of the WRITE time acquisition mode is “N”. If the WRITE time acquisition mode is “N”, the process proceeds to step S22. If not, the process proceeds to step S26. That is, when the DB restart processing unit 210 does not use the WRITE time of the DBMS 20-1 of the main system 1, the checkpoint information mismatch determination process # 1 shown in FIG. 13A is executed in step S22. On the other hand, when the DB restart processing unit 210 uses the WRITE time of the DBMS 20-1 of the main system 1, the checkpoint information mismatch determination process # 1 shown in FIG. 13B is executed in step S26.
  • step S22 the DB restart processing unit 210 executes checkpoint information mismatch determination processing # 1, and determines whether or not the LSN values of the primary checkpoint information 320 and the secondary checkpoint information 420 match.
  • the DB restart processing unit 210 ends the process if the LSNs of the primary checkpoint information 320 and the secondary checkpoint information 420 match.
  • the DB restart processing unit 210 proceeds to step S24 and executes the checkpoint information determination process # 1 shown in FIG. 14A.
  • the DB restart processing unit 210 refers to the checkpoint information management table # 1 (290-1), and the LSN 294 of the primary checkpoint information 320 and the secondary checkpoint information 420 The old (smaller) one is selected as checkpoint information for recovering the primary DB data 310.
  • step S25 the DB restart processing unit 210 executes checkpoint information mismatch resolution processing # 1 shown in FIG. 15A to clear checkpoint information that is not used for DB recovery.
  • the DB restart processing unit 210 converts the primary log 330 or the secondary log 430 corresponding to the checkpoint information with the newer LSN or main WRITE time into the primary DB data 310 in step S14. And applied to the secondary DB data 410, the primary DB data 310 and the secondary DB data 410 are recovered.
  • step S21 if the WRITE time acquisition mode of the DB definition information table 280 is “Y” in the determination in step S21, the process proceeds to step S26, and the DB restart processing unit 210 determines that the checkpoint information mismatch shown in FIG. Determination processing # 2 is executed.
  • the DB restart processing unit 210 refers to the checkpoint information management table # 2 (290-2), and the main side of the primary checkpoint information 320 and the secondary checkpoint information 420 It is determined whether or not the WRITE time 298 matches.
  • the DB restart processing unit 210 ends the process if the WRITE times of the primary checkpoint information 320 and the secondary checkpoint information 420 match. On the other hand, if the WRITE times of the primary checkpoint information 320 and the secondary checkpoint information 420 do not match, the DB restart processing unit 210 proceeds to step S28 and executes the checkpoint information determination process # 2 shown in FIG. 14B. .
  • the DB restart processing unit 210 refers to the checkpoint information management table # 1 (290-2), and among the primary checkpoint information 320 and the secondary checkpoint information 420, the WRITE time The older one is selected as checkpoint information for recovering the primary DB data 310.
  • step S29 the DB restart processing unit 210 refers to the DB definition information table 280 to determine whether or not the value 282 of the mirrored volume synchronization mode is “N”. If the primary storage system 30-2 and the secondary storage system 40-2 are “N” that is not synchronized, the DB restart processing unit 210 proceeds to step S30 and performs the checkpoint information mismatch resolution processing # 2 shown in FIG. 15B. Execute.
  • step S31 the DB restart processing unit 210 proceeds to step S31 and performs the checkpoint information mismatch resolution processing # 3 shown in FIG. 15C. Execute.
  • the volume with the older LSN or WRITE time of the primary checkpoint information 320 and the secondary checkpoint information 420 is selected, and the DB restart processing unit 210 selects the primary log 330 or secondary log 440 specified by the LSN. Is used to recover the primary DB data 310.
  • the primary DB data 310 and the secondary check data for asynchronous transfer are synchronized with the new LSN or WRITE time out of the primary checkpoint information 320 and the secondary checkpoint information 420 received from the main system 1 asynchronously with the DBMS 20-1. Even if a shift occurs between the DB data 410, both can be restored to a state in which consistency is maintained without loss of data. Thereby, redundancy can be ensured even when backup is performed from the main system 1 to the remote system 2 asynchronously with the DBMS 20-1 of the main system 1. Further, it is possible to suppress an increase in the time from when a failure occurs in the main system 1 until the database is restarted in the remote system 2.
  • FIG. 13A is a flowchart illustrating an example of checkpoint information mismatch determination processing # 1. This process is a process performed by the checkpoint information mismatch determination processing unit 230 of the recovery start position determination unit 220 in step S22 of FIG.
  • the checkpoint information mismatch determination processing unit 230 stores the last (latest) primary checkpoint information 320 stored in the volume 32 of the primary storage system 30-2 and the last (stored in the volume 42 of the secondary storage system 70-2).
  • the latest sub-checkpoint information 420 is read (S41).
  • the checkpoint information mismatch determination processing unit 230 acquires the LSN recorded last in the correct checkpoint information 320, and the LSN acquired in the LSN 294 of the record in which the system 292 of the checkpoint information management table # 1 is “correct”. Store (S42).
  • the checkpoint information mismatch determination processing unit 230 acquires the last recorded LSN in the sub-checkpoint information 420, and the system 292 of the checkpoint information management table # 1 acquires the LSN acquired in the LSN 294 of the “sub” record. Store (S43).
  • the checkpoint information mismatch determination processing unit 230 determines that the LSN of the primary checkpoint information 320 and the secondary checkpoint information 420 is It is determined that there is a mismatch (S44).
  • the checkpoint information mismatch determination processing unit 230 compares the LSNs of the primary and secondary checkpoint information to detect a shift in the primary and secondary checkpoint information that is backed up asynchronously with the DBMS 20-1 of the main system 1. be able to.
  • FIG. 13B is a flowchart illustrating an example of checkpoint information mismatch determination processing # 2. This process is a process performed by the checkpoint information mismatch determination processing unit 230 of the recovery start position determination unit 220 in step S26 of FIG.
  • the checkpoint information mismatch determination processing unit 230 refers to the DB-volume mapping table 270 to search for a remote logical volume ID in which the system 272 is “correct” and the type 273 is “checkpoint” (S51). .
  • VOL3-B1 becomes the corresponding volume ID.
  • This logical volume ID VOL3-B1 corresponds to the primary checkpoint information volume 32 of the primary storage system 30-2 shown in FIG. 1, and stores the primary checkpoint information 320.
  • the checkpoint information mismatch determination processing unit 230 inquires of the host computer 10-1 of the main system 1 about the time (WRITE time) when the main checkpoint information 320 was last written in the main system 1 (S52).
  • the DB restart processing unit 210 When the DB restart processing unit 210 receives the response of the WRITE time from the host computer 10-1 of the main system 1, the DB restart processing unit 210 accepts the system 292 of the checkpoint information management table # 2 at the main side WRITE time 298 of the “correct” record.
  • the WRITE time is stored (S53).
  • the DB restart processing unit 210 refers to the DB-volume mapping table 270 to search for a remote logical volume ID in which the system 272 is “secondary” and the type 273 is “checkpoint” (S54).
  • VOL3-B2 becomes the corresponding volume ID.
  • This logical volume ID VOL3-B2 corresponds to the secondary checkpoint information volume 42 of the secondary storage system 40-2 shown in FIG. 1, and stores the secondary checkpoint information 420.
  • the DB restart processing unit 210 inquires of the host computer 10-1 of the main system 1 about the time (WRITE time) when the correct checkpoint information 320 was last written in the main system 1 (S55).
  • the details of this inquiry processing are the same as in S52 described above, and will be described later with reference to FIG.
  • the DB restart processing unit 210 When the DB restart processing unit 210 receives the response of the WRITE time from the host computer 10-1 of the main system 1, the system 292 of the checkpoint information management table # 2 is set to the main WRITE time 298 of the “secondary” record. The accepted WRITE time is stored (S56).
  • the DB restart processing unit 210 will check the primary checkpoint information 320 and the secondary checkpoint information. It is determined that the WRITE time 420 does not match (S57).
  • FIG. 14A is a flowchart illustrating an example of checkpoint information determination processing # 1. This process is a process performed by the checkpoint information determination processing unit 240 of the recovery start position determination unit 220 in step S24 of FIG.
  • the checkpoint information determination processing unit 240 refers to the checkpoint information management table # 1 (290-1) (S61), and compares the LSN294 of the primary checkpoint information 320 with the value of the LSN294 of the secondary checkpoint information 420 ( S62).
  • the checkpoint information determination processing unit 240 determines the checkpoint information with the older (smaller) value of the LSN 294 in the checkpoint information management table # 1 for recovery of the primary DB data 310 and the secondary DB data 410 ( S63). Then, the checkpoint information determination processing unit 240 sets the checkpoint information selection flag 295 of the checkpoint information determined in the checkpoint information management table # 1 to “ON”. Note that the default value of the checkpoint information selection flag 295 is “OFF”.
  • checkpoint information having a small LSN is selected, and the checkpoint information selection flag 295 is updated to “ON”.
  • FIG. 14B is a flowchart illustrating an example of checkpoint information determination processing # 2. This process is a process performed by the checkpoint information determination processing unit 240 in step S28 of FIG.
  • the checkpoint information determination processing unit 240 refers to the checkpoint information management table # 2 (290-2) (S71), and checks the main side WRITE time 298 of the primary checkpoint information 320 and the main side WRITE of the secondary checkpoint information 420. The values at time 298 are compared (S72).
  • the checkpoint information determination processing unit 240 determines the checkpoint information with the older main WRITE time 298 in the checkpoint information management table # 2 for recovery of the primary DB data 310 and the secondary DB data 410 (S73). ). Then, the checkpoint information determination processing unit 240 sets the checkpoint information selection flag 295 of the checkpoint information determined in the checkpoint information management table # 2 to “ON” (S74). Note that the default value of the checkpoint information selection flag 295 is “OFF”.
  • the checkpoint information management table # 2 selects the checkpoint information with the older main WRITE time 298 and checks The point information selection flag 295 is updated to “ON”.
  • FIG. 15A is a flowchart illustrating an example of checkpoint information mismatch resolution processing # 1. This process is performed by the checkpoint information mismatch resolution processing unit 250 of the recovery start position determination unit 220 in step S25 of FIG.
  • the checkpoint information determination processing unit 240 refers to the checkpoint information management table # 1 (290-1) (S81), and initializes checkpoint information in which the checkpoint information selection flag 295 is “OFF” (S82).
  • the checkpoint information selection that is not used for the recovery process of the primary DB data 310 is cleared by initialization.
  • FIG. 15B is a flowchart illustrating an example of checkpoint information mismatch resolution processing # 2. This process is performed by the checkpoint information mismatch resolution processing unit 250 of the recovery start position determination unit 220 in step S30 of FIG.
  • the checkpoint information mismatch resolution processing unit 250 refers to the checkpoint information management table # 2 (290-2) (S91), and checks the checkpoint information with the checkpoint information selection flag 295 “OFF” as the checkpoint information selection flag.
  • the check point information 295 is overwritten with the “ON” checkpoint information (S92).
  • the primary checkpoint information 320 of the primary storage system 30-2 of the remote system 2 and the secondary checkpoint information 420 of the secondary storage system 40-2 are synchronized.
  • FIG. 15C is a flowchart illustrating an example of checkpoint information mismatch resolution processing # 3. This processing is performed by the checkpoint information mismatch resolution processing unit 250 of the recovery start position determination unit 220 in step S31 of FIG.
  • the checkpoint information mismatch resolution processing unit 250 of the recovery start position determination unit 220 refers to the checkpoint information management table # 2 (290-2) (S101), and checkpoint information whose checkpoint information selection flag 295 is “OFF”. Is overwritten with checkpoint information whose checkpoint information selection flag 295 is “ON” (S102).
  • the primary checkpoint information 320 of the primary storage system 30-2 of the remote system 2 and the secondary checkpoint information 420 of the secondary storage system 40-2 are synchronized.
  • FIG. 16 is a flowchart showing an example of the WRITE time inquiry process. This process is performed in steps S52 and S55 of FIG. 13B and is performed when the DBMS 20-2 of the remote system 2 is started (when the DBMS is restarted).
  • the DBMS 20-2 of the host computer 10-2 receives the logical volume ID, refers to the DB-volume mapping table 270, and acquires the remote storage system ID 276 (S111).
  • the host computer 10-2 acquires the WRITE time 342 by referring to the WRITE time management tables 340-3 to 340-4 shown in FIGS. 9C and 9D with the remote storage system ID 276 acquired in step S111. (S112).
  • the DBMS 20-2 of the remote system 2 can acquire the time (WRITE time 342) when the checkpoint information was last written from the WRITE time management tables 340-3 to 340-4.
  • the main-side WRITE time acquisition process is performed separately from this process. That is, when the primary / secondary DB data, the primary / secondary checkpoint information, and the primary / secondary log from the main system 1 are asynchronously transferred, the main WRITE time is also transferred, and the primary / secondary storage systems 30-2, 40-2 of the remote system 2 Stored in the reflection destination logical volume of the time management tables 340-3 and 340-4.
  • data of the primary / secondary storage system of the main system 1 that provides the database is copied to the primary / secondary storage system of the remote system 2 asynchronously with the DBMS 20-1.
  • checkpoint information 320, 420 generated when the DBMS 20-1 writes updated data in the DB buffer to the primary DB data 310 of the primary storage system 30-1 is included in the primary and secondary storage system data.
  • Checkpoint information 320 and 420 are LSNs attached to messages indicating the start and end of checkpoints. Further, in the checkpoint information 320 and 420, status information of the DBMS 20-1 of the main system 1 can be recorded.
  • the DB data 310 and 410 are mirrored, and the DBMS 20-1 is duplicated for checkpoint information and logs.
  • the mirroring function is stopped.
  • a copy of the primary data is transferred to the primary / secondary storage system of the remote system 2 asynchronously with the DBMS and the mirroring function.
  • the primary / secondary DB data and the primary / secondary log are not always synchronized when a failure occurs in the DBMS 20-1 of the main system 1.
  • the DBMS 20-2 of the remote system 2 detects a deviation between the primary checkpoint information 320 and the secondary checkpoint information 420 when a failure occurs in the DBMS 20-1. This deviation is detected by LSN mismatch or WRITE time mismatch.
  • the checkpoint information with the older LSN or WRITE time is determined as the recovery start position of the primary DB data 310 and secondary DB data 410.
  • the recovery start position the older one of the LSN 294 of the checkpoint information management table # 1 or the main WRITE time 298 of the checkpoint information management table # 2 is designated.
  • the recovery processing unit 260 of the DBMS 20-2 executes recovery processing of the primary DB data 310 and the secondary DB data 410 from the newer one of the primary log 330 or the secondary log 430 from the designated recovery start position. Thereby, recovery of the primary DB data 310 and the secondary DB data 410 can be realized only by the DBMS 20-2.
  • all the data of the primary and secondary storage systems of the main system 1 and the remote system 2 can be backed up asynchronously with the DBMS 20-1, and the recovery process in the event of a failure can be performed quickly.
  • the network bandwidth and processing capacity of the main system 1 can be suppressed from being consumed by disaster recovery, and data replication can be performed when the network bandwidth and processing capacity are sufficient. Can be done asynchronously. Therefore, when processing such as big data in the main system 1, the processing capability of the host computer 10-1 and the bandwidth of the network can be used efficiently.
  • the primary storage system 30-2 and the secondary storage system 40-2 are made redundant to be provided by the remote system 2. Database redundancy can be ensured.
  • FIG. 17 is a block diagram illustrating an example of the host computer 10 according to the second embodiment.
  • the DB restart processing unit 210 of the DBMS 20-2 refers to the update time (WRITE time) of the primary / secondary DB data volume (or primary / secondary DB data), and for the DB data with the newest update time. Select checkpoint information in the volume system.
  • the primary / secondary DB data volume is synchronized with the DB data volume with the newest update time.
  • the recovery process of the primary DB data 310 in the remote system 2 is accelerated by executing the recovery process of the primary DB data 310 from the selected checkpoint information.
  • the configuration of the host computer 10 is different from that of the first embodiment in that a DB data volume mismatch resolution processing unit 255 is added. Other configurations are the same as those of the first embodiment.
  • FIG. 18 is a flowchart illustrating an example of processing performed by the DB restart processing unit 210. 18 is different from the first embodiment in that step S120 is added to the flowchart shown in FIG. 11 of the first embodiment. Others are the same as in the first embodiment.
  • the DB restart processing unit 210 of the DBMS 20-2 of the remote system 2 will be described.
  • Steps S11 and S12 as in the first embodiment, if a failure has occurred in the main system 1, the system is determined to be the remote system 2, and the process proceeds to Step S120.
  • step S120 the DB restart processing unit 210 performs the primary DB data volume 31 of the primary storage system 30-2 of the remote system 2 and the secondary DB data of the secondary storage system 40-2 as shown in FIG.
  • the WRITE time (update time) of the volume 41 is compared, and the primary and secondary DB data volumes 31 and 41 are synchronized with the DB data volume with the newest update time.
  • the process of step S120 will be described in detail with reference to FIG.
  • the DB restart processing unit 210 executes a recovery start position determination process from the log (S13A). This process is different in that the first embodiment selects checkpoint information with an old LSN or WRITE time, whereas the second embodiment selects WRITE time or new checkpoint information. That is, check point information of the same system (primary / secondary) as the DB data volume with the newest update time is selected for recovery.
  • step S13A the process in step S24 in FIG. 12 of the first embodiment is executed in place of FIG. 14A, the process in FIG. 23 is executed, and the process in step S28 in FIG. Instead, the process of FIG. 24 may be executed.
  • the process of FIG. 23 is different from the first embodiment in that the DB restart processing unit 210 selects checkpoint information with a newer LSN in step S63A.
  • 24 is different from the first embodiment in that the DB restart processing unit 210 selects checkpoint information having a new WRITE time in step S73A.
  • step S14 the DB recovery processing unit 260 converts the primary log 330 or the secondary log 430 from the LSN or WRITE time of the checkpoint information selected in step S13A to the primary DB data 310 and the secondary DB of the primary DB data volume 31.
  • Recovery processing is executed by applying to the secondary DB data 410 of the data volume 41.
  • the log to be selected may be the primary log volume 33 or the secondary log volume 43 of the same system as the checkpoint information selected in step S13A.
  • FIG. 19 is a flowchart showing an example of processing performed by the DB data volume mismatch resolution processing unit 255. This process is a process executed by the DB data volume mismatch resolution processing unit 255 of the recovery start position determination unit 220 in step S120 of FIG.
  • the DB data volume mismatch resolution processing unit 255 determines whether the primary DB data 310 of the primary DB data volume 31 of the remote system 2 matches the secondary DB data 410 of the secondary DB data volume 41 ( S121). In step S122, if the primary DB data 310 and the secondary DB data 410 do not match, the process proceeds to step S123. If they match, the process ends and returns to the process of FIG.
  • step S123 the DB data volume mismatch resolution processing unit 255 refers to the update time (WRITE time) of the primary DB data 310 and the secondary DB data 410, and selects the DB data volume with the newest update time for recovery. Determine as volume. This process will be described in detail with reference to FIG.
  • step S124 the DB data volume mismatch resolution processing unit 255 synchronizes the primary DB data volume 31 and the secondary DB data volume 41 with the contents of the DB data volume determined in step S123. That is, the primary DB data 310 and the secondary DB data 410 are synchronized.
  • the primary / secondary DB data volumes 31 and 41 have the DB data volume mismatch resolution processing unit 255 refer to the update time (WRITE time) of the DB data volume, and for the DB data with the newest update time.
  • the primary and secondary DB data volumes are synchronized with the volume.
  • FIG. 20 is a flowchart showing an example of the DB data volume discriminating process. This process is a process executed in step S121 of the DB data volume mismatch resolution processing unit 255 shown in FIG.
  • the recovery start position determining unit 220 refers to the DB-volume mapping table 270 and searches for a remote logical volume ID in which the system 272 is “normal” and the type 273 is “DB data” (S1211).
  • VOL1-B1 in FIG. 5 becomes the corresponding volume ID.
  • This logical volume ID VOL1-B1 corresponds to the primary DB data volume 31 of the primary storage system 30-2 shown in FIG. 1, and stores the primary DB data 310.
  • the recovery start position determination unit 220 inquires of the primary storage system 30-2 storing the primary checkpoint information 320 about the time (WRITE time) at which the primary DB data 310 was last written by the main system 1 (S1212).
  • the recovery start position determination unit 220 receives the response of the WRITE time from the primary storage system 30-2, the WRITE time that the system 292 of the checkpoint information management table # 2 has received at the main WRITE time 298 of the “primary” record Is stored (S1213).
  • the recovery start position determination unit 220 refers to the DB-volume mapping table 270 and searches for a remote logical volume ID in which the system 272 is “secondary” and the type 273 is “DB data” (S1214).
  • VOL1-B2 becomes the corresponding volume ID.
  • This logical volume ID VOL1-B2 corresponds to the secondary checkpoint information volume 42 of the secondary storage system 40-2 shown in FIG. 1, and stores the secondary checkpoint information 420.
  • the recovery start position determination unit 220 inquires of the primary storage system 30-2 about the time (WRITE time) at which the primary checkpoint information 320 was last written in the main system 1 (S1215).
  • the recovery start position determination unit 220 When receiving the response of the WRITE time from the secondary storage system 40-2, the recovery start position determination unit 220 receives the received WRITE at the main WRITE time 298 of the record in which the system 292 of the checkpoint information management table # 2 is “secondary”. The time is stored (S1216).
  • the recovery start position determination unit 220 determines that the primary DB data 310 and the secondary DB data 410 are It is determined that there is a mismatch (S1217).
  • FIG. 21 is a flowchart showing an example of DB data volume determination processing. This process is a process executed by the recovery start position determination unit 220 in step S123 shown in FIG.
  • the recovery start position determining unit 220 refers to the checkpoint information management table # 2 (290-2) (S1221), and the main WRITE time 298 when the system 292 is “primary” and the main WRITE when the system 292 is “secondary”. The values at time 298 are compared (S1222).
  • the recovery start position determination unit 220 determines the checkpoint information at the main WRITE time 298 in the checkpoint information management table # 2 as the recovery volume of the primary DB data 310 (S1223). Then, the recovery start position determination unit 220 sets the checkpoint information selection flag 295 of the checkpoint information determined in the checkpoint information management table # 1 to “ON”. Note that the default value of the checkpoint information selection flag 295 is “OFF”.
  • the DB data volume of the newer WRITE time 298 or LSN is selected, and the checkpoint information selection flag 295 is updated to “ON”.
  • FIG. 22 is a flowchart showing an example of DB data volume synchronization processing. This process is a process performed by the recovery start position determination unit 220 in step S31 of FIG.
  • the recovery start position determination unit 220 refers to the checkpoint information management table # 2 (290-2) (S1241), and selects the DB data volume for which the checkpoint information selection flag 295 is “OFF” as the checkpoint information selection flag 295. Is overwritten with the contents of the DB data volume with "ON” (S1242).
  • the primary DB data 310 of the primary storage system 30-2 of the remote system 2 and the secondary DB data 410 of the secondary storage system 40-2 are synchronized with the contents of the newer WRITE time.
  • the DB restart processing unit 210 acquires the update time (WRITE time) of the DB data volumes 31 and 41 of the remote system 2 from the storage system of the main system 1, and the update time is Checkpoint information is selected in the new DB data volume system. Further, the DB restart processing unit 210 synchronizes the primary and secondary DB data volumes 31 and 41 with the DB data volume with the newest update time.
  • the recovery process of the primary DB data 310 in the remote system 2 can be speeded up by executing the recovery process of the primary DB data 310 from the primary log 330 or the secondary log 430 based on the selected checkpoint information. it can.
  • FIG. 25 is a block diagram illustrating an example of the host computer 10 according to the third embodiment.
  • the DB restart processing unit 210 of the DBMS 20-2 uses the checkpoint information volume system whose update time (WRITE time) of the primary / secondary checkpoint information volume (or primary / secondary checkpoint information) is newer. Is an update system. If the update times of the primary / secondary DB checkpoint information volume (or primary / secondary checkpoint information) match, the system of the primary / secondary log volume with the newest update time (WRITE time) of the primary / secondary log volumes 33 and 43 is updated. System. Then, after the other system is overwritten with the update system as the synchronization source, the recovery of the primary DB data 310 is executed. This speeds up the DB data recovery process.
  • the configuration of the host computer 10 differs from the first embodiment in that a primary / secondary volume mismatch resolution processing unit 256, a system determination result management table 510, and a volume synchronization information table 520 are added.
  • Other configurations are the same as those of the first embodiment.
  • FIG. 29 is a diagram showing an example of the system determination result management table 510.
  • the system determination result management table 510 managed by the DB restart processing unit 210 includes a synchronization source storage system ID 511 and a synchronization destination storage system ID 512 in one record.
  • ID "CTL # B1”
  • CTL # B2 "CTL # B2”
  • FIG. 30 is a diagram illustrating an example of the volume synchronization information table 520.
  • the volume synchronization information table 520 managed by the DB restart processing unit 210 includes a type 521 for storing data types, a synchronization source storage system ID 522 that serves as a copy source identifier, and a synchronization source volume ID 523 that serves as a copy source volume identifier. And a synchronization destination storage system ID 524 that becomes an identifier to be overwritten and a synchronization destination volume ID 525 that becomes a volume identifier to be overwritten.
  • FIG. 26 is a flowchart illustrating an example of processing performed by the DB restart processing unit 210.
  • the recovery start position determination process from the log in step S13 is replaced with the primary / secondary volume mismatch resolution process in step S130 with respect to the flowchart shown in FIG. 11 of the first embodiment. The same as in the first embodiment.
  • an example of the DB restart processing unit 210 of the DBMS 20-2 of the remote system 2 will be described.
  • steps S11 and S12 as in the first embodiment, if a failure has occurred in the main system 1, the system is determined to be the remote system 2, and the process proceeds to step S130.
  • step S130 the primary / secondary volume mismatch resolution processing unit 256 of the DB restart processing unit 210 determines that the update time (WRITE time) of the primary / secondary checkpoint information volume (or primary / secondary checkpoint information) is newer or the primary / secondary log volume.
  • the update time (WRITE time) is determined as the synchronization source system (storage system), and the other system is determined as the synchronization destination.
  • the primary / secondary volume mismatch resolution processing unit 256 overwrites the contents of the synchronization destination system with the contents of the synchronization source system.
  • the primary / secondary volume mismatch resolution processing unit 256 synchronizes the primary / secondary volume with the contents of the DB data update time that is newer or the log update time that is newer.
  • step S14 the DB recovery processing unit 260 applies the primary log 330 to the primary DB data 310 of the primary DB data volume 31 from the latest LSN or WRITE time of the checkpoint information synchronized in step S130. Execute the process.
  • the primary / secondary volume is synchronized in a system with a new checkpoint information update time or a new log update time, and then the primary / secondary DB data 310 is recovered by applying the log from the most recent LSN or WRITE time.
  • the scope of log application can be narrowed down to speed up the recovery process.
  • FIG. 27 is a flowchart showing an example of the primary / secondary volume mismatch resolution processing unit 256. This process is a process executed by the primary / secondary volume mismatch resolution processing unit 256 in step S130 of FIG.
  • the primary / secondary volume mismatch resolution processing unit 256 determines whether the LSN or update time (WRITE time) of the primary checkpoint information 320 and the secondary checkpoint information 420 match (S131). For this process, either the checkpoint information mismatch determination process # 1 by the LSN shown in FIG. 13A of the first embodiment or the checkpoint information mismatch determination process # 2 by the WRITE time shown in FIG. 13B may be executed. .
  • step S132 the primary / secondary volume mismatch resolution processing unit 256 determines whether the primary checkpoint information 320 and the secondary checkpoint information 420 match from the result of step S131. If they match, the process proceeds to step S135, and if they do not match, the process proceeds to step S133.
  • step S133 the primary / secondary volume mismatch resolution processing unit 256 determines the system of the volume with the newer checkpoint information as the synchronization source, and determines the other system as the synchronization destination.
  • the determination of the volume with the newer checkpoint information may be performed by executing the flowchart of FIG. 23 or FIG. 24 of the second embodiment.
  • step S137 the primary / secondary volume mismatch resolution processing unit 256 determines the system of the volume with the newer log as the synchronization source and the other system as the synchronization destination. In determining the volume with the newer log, the volume with the newest update time (main WRITE time) of the primary log 330 or the secondary log 430 is synchronized with the checkpoint information of FIG. Determine as the original.
  • step S137 the primary / secondary volume mismatch resolution processing unit 256 overwrites the contents of the synchronization destination system with the contents of the synchronization source system determined in step S133 or S137, and synchronizes the primary and secondary volumes.
  • FIG. 28 is a flowchart showing an example of primary and secondary volume synchronization processing.
  • the primary / secondary volume mismatch resolution processing unit 256 refers to the DB-volume mapping table 270, acquires the storage system ID of the synchronization destination system, stores it in the synchronization source storage system ID 511 of the system determination result management table 510, and stores the other The system storage system ID is stored in the synchronization destination storage system ID 512. Further, the primary / secondary volume mismatch resolution processing unit 256 sets a logical volume ID in the volume synchronization information table 520 for each type of data in the synchronization source and synchronization destination storage systems (S1341).
  • the primary / secondary volume mismatch resolution processing unit 256 transmits the information in the volume synchronization information table 520 to the access control units 34 and 44 of the primary and secondary storage systems 30-2 and 40-2, respectively, and synchronizes with the contents of the synchronization source logical volume. Perform synchronization by overwriting the contents of the previous logical volume.
  • the system with the newer checkpoint information or log is used as the update system, and the recovery system is executed after the other system is synchronized with the update system.
  • the recovery system is executed after the other system is synchronized with the update system.
  • the various software exemplified in the present embodiment can be stored in various recording media (for example, non-transitory storage media) such as electromagnetic, electronic, and optical, and through a communication network such as the Internet. It can be downloaded to a computer.
  • recording media for example, non-transitory storage media
  • a communication network such as the Internet. It can be downloaded to a computer.
  • the present invention is not limited to the above-described embodiments, and includes various modifications.
  • the above-described embodiments have been described in detail for easy understanding of the present invention, and are not necessarily limited to those having all the configurations described.
  • the restart processing unit 210 of the DBMS 20-2 of the remote system 2 detects the data shift of the primary and secondary storage systems of the remote system 2 at a predetermined cycle.
  • the DBMS 20-1 notifies the occurrence of a failure to the remote system 2
  • a data shift in the primary / secondary storage system of the remote system 2 may be detected.
  • the restart processing unit 210 of the DBMS 20-2 may start the recovery process.

Landscapes

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

Abstract

 データベースを提供する第1のサイトと、前記データベースの複製を格納する第2のサイトと、を有し、第1のサイトの第1の計算機が、データベースの処理を行って、データベースのデータを更新し、第1のサイトの第1の正ストレージがデータベース管理部とは非同期でデータを第2のサイトの第2の正ストレージへ送信し、第1のサイトの第1の副ストレージがデータベース管理部とは非同期でデータを第2のサイトの第2の副ストレージへ送信し、第2のサイトの第2の計算機が、所定のタイミングで第2の正ストレージのデータと、第2の副ストレージのデータを比較した結果、第2の正ストレージのデータと第2の副ストレージのデータが一致しない場合にはデータベースを回復する。

Description

データベースシステムの制御方法及びデータベースシステム
 本発明は、ディザスタリカバリを利用したデータベースシステムに関する。
 ディザスタリカバリを利用するデータベース管理システム(以下、DBMS)では、ストレージ装置のリモートコピー機能を使用し、データベースのログをメインシステムからリモートシステムへ転送及び書き込んで同期させ、データベースのデータ(DBデータ)およびチェックポイント情報については非同期でリモートサイトへ転送及び書き込みする方法が知られている(例えば、特許文献1、2)。
 また、データベースシステムに障害が発生した後に回復する手法としては、ログを用いる技術が知られている(例えば、特許文献3)。
特許第4301849号公報 特開2005-267301号公報 米国特許第5640561号公報
 しかしながら、上記従来例では、データベースのログをリモートシステムと同期させるため、ログの生成、格納及び転送の処理が必要となる。このログの同期処理に計算機のリソースが使用されるため、メインシステムのDBMSのオンライン性能等の処理能力が低下する場合があった。特に、ビッグデータなどの大量のデータを処理する場合には、メインシステムのDBMSではログを処理するために処理能力が低下する。
 さらに、上記従来例では、メインシステムで障害が発生したときには、リモートシステムでデータベースを回復することができる。しかし、メインシステムに障害が発生した後にリモートシステムで障害が発生した場合はデータベースの回復が難しい、という問題があった。
 そこで本発明は、メインシステムの処理能力への影響を抑制しながら、メインシステムで障害が発生したときにはリモートシステム側で迅速にデータベースを回復し、リモートシステムのみの状態でも信頼性を確保することを目的とする。
 本発明は、データベースを提供する第1のサイトと、前記データベースの複製を格納する第2のサイトと、を有して第2のサイトの管理計算機で前記データベースを回復するデータベースシステムの制御方法であって、前記第1のサイトは、プロセッサとメモリを含んで前記データベースを制御するデータベース管理部を稼働させる第1の計算機と、前記データベースに関連するデータを格納する第1の正ストレージ装置と、前記第1の正ストレージ装置に格納される前記データの複製を格納する第1の副ストレージ装置と、を有し、前記第2のサイトは、プロセッサとメモリを含んで前記データベースを回復する再開始処理部を稼働させる第2の計算機と、前記第1の正ストレージ装置から受信した前記データを格納する第2の正ストレージ装置と、前記第1の副ストレージ装置から受信した前記データを格納する第2の副ストレージ装置と、を有し、前記制御方法は、前記第1の計算機が、前記データベースの処理を行って、前記データベースのデータを更新する第1のステップと、前記第1の正ストレージ装置が、前記データベース管理部とは非同期で、前記データを前記第2の正ストレージ装置へ送信する第2のステップと、前記第1の副ストレージ装置が、前記データベース管理部とは非同期で、前記データを前記第2の副ストレージ装置へ送信する第3のステップと、前記第2の計算機が、所定のタイミングで前記第2の正ストレージ装置のデータと、前記第2の副ストレージ装置のデータを比較する第4のステップと、前記第2の計算機が、前記比較の結果、前記第2の正ストレージ装置のデータと、前記第2の副ストレージ装置のデータが一致しない場合には、前記データベースを回復する第5のステップと、を含む。
 本発明によれば、データベース管理部とは非同期のバックアップによって第1のサイト(メインシステム)の処理能力への影響を抑制しながら、メインシステムで障害が発生したときには第2のサイト(リモートシステム)で確実にデータベースを回復することができ、リモートシステムの信頼性を確保できる。
本発明の第1の実施例を示し、データベースシステムの一例を示すブロック図である。 本発明の第1の実施例を示し、ホストコンピュータの一例を示すブロック図である。 本発明の第1の実施例を示し、正ストレージシステムの一例を示すブロック図である。 本発明の第1の実施例を示し、正ログ及び正チェックポイント情報の関係を示す図である。 本発明の第1の実施例を示し、DB-ボリュームマッピングテーブルの一例を示す図である。 本発明の第1の実施例を示し、DB定義情報テーブルの一例を示す図である。 本発明の第1の実施例を示し、チェックポイント情報管理テーブル#1の一例を示す図である。 本発明の第1の実施例を示し、チェックポイント情報管理テーブル#2の一例を示す図である。 本発明の第1の実施例を示し、WRITE時刻管理テーブル(メイン側正ストレージシステム)の一例を示す図である。 本発明の第1の実施例を示し、WRITE時刻管理テーブル(メイン側副ストレージシステム)の一例を示す図である。 本発明の第1の実施例を示し、WRITE時刻管理テーブル(リモート側正ストレージシステム)の一例を示す図である。 本発明の第1の実施例を示し、WRITE時刻管理テーブル(リモート側副ストレージシステム)の一例を示す図である。 本発明の第1の実施例を示し、チェックポイント取得処理の一例を示すフローチャートである。 本発明の第1の実施例を示し、データベースシステム再開始処理の一例を示すフローチャートである。 本発明の第1の実施例を示し、ログからの回復開始位置決定処理の一例を示すフローチャートである。 本発明の第1の実施例を示し、チェックポイント情報不一致判別処理#1の一例を示すフローチャートである。 本発明の第1の実施例を示し、チェックポイント情報不一致判別処理#2の一例を示すフローチャートである。 本発明の第1の実施例を示し、チェックポイント情報決定処理#1の一例を示すフローチャートである。 本発明の第1の実施例を示し、チェックポイント情報決定処理#2の一例を示すフローチャートである。 本発明の第1の実施例を示し、チェックポイント情報不一致解消処理#1の一例を示すフローチャートである。 本発明の第1の実施例を示し、チェックポイント情報不一致解消処理#2の一例を示すフローチャートである。 本発明の第1の実施例を示し、チェックポイント情報不一致解消処理#3の一例を示すフローチャートである。 本発明の第1の実施例を示し、WRITE時刻問合せ処理の一例を示すフローチャートである。 本発明の第2の実施例を示し、ホストコンピュータの一例を示すブロック図である。 本発明の第2の実施例を示し、データベースシステム再開始処理の一例を示すフローチャートである。 本発明の第2の実施例を示し、DBデータ用ボリューム不一致解消処理の一例を示すフローチャートである。 本発明の第2の実施例を示し、DBデータ用ボリューム不一判別処理の一例を示すフローチャートである。 本発明の第2の実施例を示し、DBデータ用ボリューム決定処理の一例を示すフローチャートである。 本発明の第2の実施例を示し、DBデータ用ボリューム同期処理の一例を示すフローチャートである。 本発明の第2の実施例を示し、チェックポイント情報決定処理#1の一例を示すフローチャートである。 本発明の第2の実施例を示し、チェックポイント情報決定処理#2の一例を示すフローチャートである。 本発明の第3の実施例を示し、ホストコンピュータの一例を示すブロック図である。 本発明の第3の実施例を示し、データベースシステム再開始処理の一例を示すフローチャートである。 本発明の第3の実施例を示し、正副ボリューム不一致解消処理の一例を示すフローチャートである。 本発明の第3の実施例を示し、正副ボリューム同期処理の一例を示すフローチャートである。 本発明の第3の実施例を示し、系決定結果管理テーブルの一例を示す図である。 本発明の第3の実施例を示し、ボリューム同期情報テーブルの一例を示す図である。
 以下、本発明の一実施形態について添付図面を用いて説明する。
 図1は、本発明の第1の実施例を示し、データベースシステムの一例を示すブロック図である。データベースシステムは、ディザスタリカバリを利用してメインシステム1のデータベースをリモートシステムでバックアップし、メインシステムで障害が発生したときにリモートシステム2でデータベースを提供する計算機システムである。
 <システム構成>
 メインシステム1とリモートシステム2は、ネットワーク3を介して接続される。メインシステム1とリモートシステム2は、同様に構成することができる。メインシステム1は、データベース管理システム(データベース管理部)20-1を実行してデータベースを提供するホストコンピュータ10-1と、提供するデータベースの正データ(正DBデータ310、正ログ330、正チェックポイント情報320)を格納する正ストレージシステム30-1と、正データの複製(副データ)を格納する副ストレージシステム40-1がネットワークまたはホストコンピュータ10を介して接続される。
 リモートシステム2は、データベース管理システム20-2を実行するホストコンピュータ10-2と、正ストレージシステム30-1に格納された正データの複製を非同期で格納する正ストレージシステム30-2と、副ストレージシステム40-1に格納された副データの複製を非同期で格納する副ストレージシステム40-2がネットワークを介して接続される。
 メインシステム1とリモートシステム2は、同様に構成することができる。ホストコンピュータ10-1、10-2は同様の構成であり、また、正ストレージシステム30-1、30-2、副ストレージシステム40-1、40-2も同様の構成である。
 なお、以下の説明では、ホストコンピュータの総称は添え字のない符号10で示し、他の構成要素についても総称については添え字無しの符号で示し、メインシステム1とリモートシステム2の区別が必要な場合には添え字を付与する。
 正ストレージシステム30-1は、正DBデータ310を格納する正DBデータ用ボリューム31と、正チェックポイント情報320を格納する正チェックポイント情報用ボリューム32と、正ログ330を格納する正ログ用ボリューム33と、これらのボリューム31~33を制御するアクセス制御部34を含む。
 正ストレージシステム30-1のアクセス制御部34は、DBMS20-1からのアクセス要求に応じて正DBデータ310へのアクセスを制御する。そして、アクセス制御部34は、リモートコピー機能を有し、DBMS20-1のアクセスとは非同期で正DBデータ310、正チェックポイント情報320及び正ログ330の内容をリモートシステム2の正ストレージシステム30-2へ転送する。
 ホストコンピュータ10-1は、OS300またはI/F13が提供するミラーリング機能によって正ストレージシステム30-1のデータの複製を副ストレージシステム40-1に格納する。なお、正ストレージシステム30-1のデータの複製は、正DBデータ310をミラーリング機能によっての複製し、正チェックポイント情報320と正ログ330の複製はDBMS20-1で実施する。
 副ストレージシステム40-1は、正ストレージシステムと同様の構成であり、正DBデータ310の複製を副DBデータ410として格納する副DBデータ用ボリューム41と、正チェックポイント情報320の複製を副チェックポイント情報420として格納する副チェックポイント情報用ボリューム42と、正ログ330の複製を副ログ430として格納する副ログ用ボリューム43と、これらのボリューム41~43を制御するアクセス制御部44と、を含む。
 そして、アクセス制御部44は、リモートコピー機能を有し、ホストコンピュータ10-1のミラーリングとは非同期で副DBデータ410、副チェックポイント情報420及び副ログ430の内容を、リモートシステム2の副ストレージシステム40-2へ転送する。なお、ミラーリング機能は、データベース管理システム20-1の書き込みを起因として正ストレージシステム30-1に副ストレージシステム40-1を同期させるので、換言すれば、データベース管理システム20-1の書き込みに同期して副ストレージシステム40-1にデータが書き込まれることになる。
 なお、実施例1では、メインシステム1が図示しないクライアント計算機へデータベースを提供する現用系(第1のサイト)として機能し、リモートシステム2はデータベース管理システム20-1等の制御とは非同期でメインシステム1から送信されたデータをバックアップし、障害発生時にはメインシステム1のデータベースを回復して引き継ぐ待機系(第2のサイト)として機能する。
 また、本実施例1では、リモートシステム2のホストコンピュータ10-2では、データベース管理システム20-2のうち、少なくともDB再開始処理部210が実行されていれば良い。そして、メインシステム1で障害が発生した後にデータベース管理システム20-2でデータベースを提供する機能(データベース管理部)を起動するようにしてもよい。すなわち、メインシステム1のデータベース管理システム20-1では、データベース管理部のみが機能する。そして、メインシステム1のデータベース管理システム(以下、DBMS)20-1に障害が発生すると、リモートシステム2のDBMS20-2では、DB再開始処理部210とデータベース管理部が機能する。
 <ホストコンピュータ>
 図2は、ホストコンピュータ10の一例を示すブロック図である。ホストコンピュータ10は、演算処理を行うプロセッサ11と、データやプログラムを保持するメモリ12と、ネットワークを介して正ストレージシステム30、副ストレージシステム40あるいは外部に接続されるインターフェース(以下、I/F)13を含む。
 メモリ12には、DBMS20がロードされ、プロセッサ11によって実行される。DBMS20は、正DBデータ310へのアクセスを処理するのに加え、メインシステム1に障害が発生したときにデータベース(正DBデータ310)を回復するDB再開始処理部210を有する。なお、DB再開始処理部210は、リモートシステム2のホストコンピュータ10-2で稼働させれば良く、メインシステム1のホストコンピュータ10-1ではDB再開始処理部210を停止させることができる。
 DB再開始処理部210は、正チェックポイント情報320から正DBデータ310の回復位置を特定する回復開始位置決定部220と、正DBデータ310を回復するDB回復処理部260と、各種テーブルを含む。
 DB回復処理部260は、公知または周知の手法によって正DBデータ310を回復すれば良い。本実施例では、例えば、前記特許文献3のように、副ログ430または正ログ330から正DBデータ310を回復する例を示す。
 回復開始位置決定部220は、正チェックポイント情報320と副チェックポイント情報420のずれを検出するチェックポイント情報不一致判別処理部230と、正DBデータ310の回復を開始するチェックポイント情報420の位置を決定するチェックポイント情報決定処理部240と、正チェックポイント情報320と副チェックポイント情報420不一致がある場合には同期させるチェックポイント情報不一致解消処理部250と、を含む。
 DB再開始処理部210が管理するテーブルは、格納するデータと正ストレージシステム30または副ストレージシステム40のボリュームの関係を格納するDB-ボリュームマッピングテーブル270と、DBMS20の設定を格納するDB定義情報テーブル280と、正チェックポイント情報320または副チェックポイント情報420を管理するチェックポイント情報管理テーブル#1(290-1)及びチェックポイント情報管理テーブル#2(290-2)を含む。
 DBMS20の各機能部はプログラムとしてメモリ12にロードされる。プロセッサ11は、各機能部のプログラムに従って処理することによって、所定の機能を提供する機能部として稼働する。例えば、プロセッサ11は、DB再開処理プログラムに従って処理することでDB再開始処理部210として機能する。他のプログラムについても同様である。さらに、プロセッサ11は、各プログラムが実行する複数の処理のそれぞれの機能を提供する機能部としても稼働する。計算機及び計算機システムは、これらの機能部を含む装置及びシステムである。
 DBMS20の各機能を実現するプログラム、テーブル等の情報は、正ストレージシステム30、副ストレージシステム40や不揮発性半導体メモリ、ハードディスクドライブ、SSD(Solid State Drive)等の記憶デバイス、または、ICカード、SDカード、DVD等の計算機読み取り可能な非一時的データ記憶媒体に格納することができる。
 <ストレージシステム>
 図3は、正ストレージシステム30の一例を示すブロック図である。なお、副ストレージシステム40も同様の構成であるので重複した説明は省略する。
 正ストレージシステム30は、演算処理を行うプロセッサ35と、データやプログラムを保持するメモリ36と、複数のボリュームを提供するドライブに接続されるI/F38と、ネットワークを介してホストコンピュータ10あるいは外部に接続されるインターフェース(以下、I/F)37を含む。
 各ボリューム31~33は、1以上のディスクドライブまたはSSD等の不揮発性半導体を含む論理的な記憶領域である。図示の例では、正ストレージシステム30-1から正DBデータ310を格納する正DBデータ用ボリューム31と、正チェックポイント情報320を格納する正チェックポイント情報用ボリューム32と、正ログ330を格納する正ログ用ボリューム33と、を含む。
 メモリ36には、各ボリューム31~33を制御するアクセス制御部34が読み込まれ、プロセッサ35によって実行される。アクセス制御部34は、各ボリュームへ書き込みを最後に実行した時刻を格納するWRITE時刻管理テーブル340を含む。また、アクセス制御部34は、リモートコピー機能を有し、DBMS20-1やミラーリング機能のアクセスとは非同期で各データの内容をリモートシステム2へ転送する。
 アクセス制御部34のリモートコピー機能は、メインシステム1の正ストレージシステム30-1からリモートシステム2の正ストレージシステム30-2へDBMS20-1のアクセスとは非同期で、正DBデータ310、正チェックポイント情報320、正ログ330の複製を転送する。
 また、副ストレージシステム40のアクセス制御部44では、メインシステム1の副ストレージシステム40-1からリモートシステム2の副ストレージシステム40-2へミラーリング機能のアクセスとは非同期で、副DBデータ410、副チェックポイント情報420、副ログ430の複製を転送する。
 <処理の概要>
 まず、メインシステム1のDBMS20-1の処理について説明する。DBMS20-1は、図示しないクライアントやアプリケーションからの要求に応じて、正DBデータ310のデータをメモリ12に確保した図示しないDBバッファ(またはDBキャッシュ)に読み込む。DBバッファに読み出されたデータは、トランザクションがコミットすると、DBMS20-1は、データの更新内容を示すログを生成して正ログ330に格納し、更新されたデータが正DBデータ310に格納される。
 DBMS20-1は、ログを生成する際に、ログを一意に識別するための識別子としてログ・シーケンス・ナンバー(以下、LSNとする)をログに付与する。そして、本発明のDBMS20-1は、LSNを含むログを正ログ330に格納する。次に、DBMS20-1は、更新されたデータを正DBデータ310に格納し、一連のデータ更新の処理を終了する。
 チェックポイント情報320は、次のように生成される。メインシステム1のDBMS20-1は、所定のタイミングとなるたびに、チェックポイント取得処理を実行する。所定のタイミングは、例えば、予め設定した周期や、トランザクションの処理量が閾値に達したときや、正ログ330の量が所定値に達したときなどである。
 チェックポイント取得処理では、DBMS20-1がDBバッファ上で更新されたデータを正DBデータ用ボリューム31の正DBデータ310へ書き戻す。このとき、正DBデータ310へ書き込むデータのLSNを取得してチェックポイント情報320に書き込む。
 ホストコンピュータ10-1のOS300またはI/F13が提供するミラーリング機能によって正ストレージシステム30-1のデータの複製を副ストレージシステム40-1に格納する。これにより、正DBデータ310に書き込まれたデータが副DBデータ410にも書き込まれる。また、DBMS20-1は、正ログ330の複製を副ログ430に書き込み、また、DBMS20-1は、正チェックポイント情報320を副チェックポイント情報420に書き込んで多重化する。
 メインシステム1の正ストレージシステム30-1は、DBMS20-1の更新とは非同期で、所定のタイミングになるとリモートシステム2の各ボリューム31~33を、正ストレージシステム30-2の各ボリューム31~33と同期する。すなわち、正DBデータ310、正チェックポイント情報320、正ログ330のうち、新たに更新されたデータが正ストレージシステム30-1から正ストレージシステム30-2へ転送される。なお、所定のタイミングとは、ネットワーク3の使用率が閾値以下の状態や、正ストレージシステム30-1の負荷が閾値以下の状態や、各ボリューム31~33のアクセス負荷が閾値以下の状態を所定のタイミングとする。
 メインシステム1の副ストレージシステム40-1は、ホストコンピュータ10-1のミラーリング処理とは非同期で、所定のタイミングになると、リモートシステム2の副ストレージシステム40-2と同期する。すなわち、副DBデータ410、副チェックポイント情報420、副ログ430のうち、新たに更新されたデータが副ストレージシステム40-1から副ストレージシステム40-2へ転送される。なお、所定のタイミングは、上記と同様であり、ネットワーク3の使用率が閾値以下の状態や、副ストレージシステム40-1の負荷が閾値以下の状態や、各ボリューム41~43のアクセス負荷が閾値以下の状態を所定のタイミングとする。
 メインシステム1のDBMS20-1は、異常が発生すると、正チェックポイント情報320に、異常が発生したことを示す情報を書き込む。例えば、図4で示すように“FAILURE”等の情報を書き込む。すなわち、LSNの最後または間にメインシステム1のDBMS20-1の状態を示す情報が格納される。
 DB再開始処理部210は、メインシステム1のDBMS20-1に障害が発生したことを検知すると、リモートシステム2の正ログ330または副ログ430から正DBデータ310を回復する。
 ここで、本発明では、後述するように、チェックポイント情報を用いてログの回復開始位置を決定することで、メインシステム1の複製をDBMS20-1とは非同期でリモートシステム2に格納するデータベースシステムの冗長性を確保する。
 そして、リモートシステム2のDBMS20-2では、障害が発生したメインシステム1に代わって、データベースの提供を再開する。なお、ログに基づいて正DBデータ310を回復する手法としては、周知または公知の手法を適用することができ、例えば、前記従来例に示した特許文献3の技術を適用するものとする。
 ホストコンピュータ10-2では、DBMS20-2がデータベースの提供を開始する。
 以上の処理により、正DBデータ310、正ログ330、正チェックポイント情報320の内容をDBMS20-1の更新とは非同期でリモートシステム2に複製を送ることができる。そして、後述するように、チェックポイント情報に基づいて、正DBデータ310を回復すべきログの位置を決定することにより、正確にデータベースの回復を行うことができる。
 なお、リモートシステム2のDBMS20-2のDB再開始処理部210によるメインシステム1のDBMS20-1の監視は、正ストレージシステム30-2の正チェックポイント情報320を監視し、障害の発生を示す情報を読み込んだときに限定されるものではなく、ホストコンピュータ10-1やDBMS20-1のハートビートを監視したり、ネットワーク3の通信状態を監視して、メインシステム1側の障害発生として検知することができる。
 図4は、正ログ330及び正チェックポイント情報320の関係を示す図である。正ログ330は、メインシステム1が付与したログ・シーケンス・番号を格納するLSN331と、当該ログに対応するトランザクションの識別子を格納するトランザクション識別子332と、当該ログの種類を示すログ種別333と、当該ログに対応する正DBデータ310の識別子を格納するデータ識別子334と、当該データ識別子の更新前の値を格納する更新前データ335と、当該データ識別子の更新後の値を格納する更新後データ336と、をひとつのレコードに含む。なお、LSN331は、更新されたデータベースのデータが正ストレージシステム30-1へ書き込まれたときの正ログ330の位置を特定するための識別子である。
 正チェックポイント情報320は、正ログ330のうち、LSN331の値と、DBMS20-1が書き込んだ状態情報と、をLSN321に格納する。図中“50”、“100”は、正ログ330のLSN331の値を示し、図中“DBSTART”は、DBMS20-1が正ログ330に書き込んだ稼働開始の情報を示す。また、図中“DBEND”は、DBMS20-1が正ログ330に書き込んだ正常終了の情報を示す。したがって、正常終了したことを示す情報が正チェックポイント情報320に格納されていない場合には、DBMS20-1が正常終了していないと判定することができる。
 また、ログ種別333は、図中“START”がトランザクションT1の開始を示すメッセージで、DBMS20-1によって書き込まれる。そして、図中“UPDATE”はデータの更新を示すログを意味し、図中“COMMIT”は、トランザクションが完了したことを示すログである。
 図中“CP START”はDBMS20-1が、所定の周期で書き込むチェックポイント取得処理の開始を示すメッセージである。また、図中“CP END”はDBMS20-1がチェックポイント取得処理を完了したときに書き込んだメッセージである。
 データの更新や追加あるいはトランザクションの完了がない時間帯であっても、DBMS20-1が所定の周期毎にチェックポイント情報を書き込むことにより、正DBデータ310の更新や追加がない期間でも、チェックポイント情報を生成することが可能となる。
 図5は、DB-ボリュームマッピングテーブル270の一例を示す図である。DB-ボリュームマッピングテーブル270は、当該データを格納するストレージシステム30、40の領域名を格納するDB領域ID271と、当該データを格納するストレージシステムが正と副の何れに所属するかを格納する系272と、当該データの種別を格納する種別273と、当該データをメインシステム1で格納するストレージシステムの識別子を格納するメイン側ストレージシステムID274と、当該データをメインシステム1で格納するボリュームの識別子を格納するメイン側論理ボリュームID275と、当該データをリモートシステム2で格納するストレージシステムの識別子を格納するリモート側ストレージシステムID276と、当該データをリモートシステム2で格納するボリュームの識別子を格納するリモート側論理ボリュームID277と、をひとつのレコードに含む。
 DB-ボリュームマッピングテーブル270では、メインシステム1とリモートシステム2のボリューム間で非同期のコピーの関係が設定され、メイン側ストレージシステムID274からリモート側ストレージシステムID276へ各ボリュームのデータの複製が転送されることを示している。
 DB-ボリュームマッピングテーブル270の各値は、データベースシステムの管理者などが予め設定しておく。図中、系272は、メインシステム1は“正”に設定され、リモートシステム2は“副”に設定される。
 図示の例では、メインシステム1の正ストレージシステム30-1のIDが“CTL#A1”で、副ストレージシステム40-1のIDが“CTL#A2”であることを示す。また、リモートシステム2の正ストレージシステム30-2のIDが“CTL#B1”で、副ストレージシステム40-2のIDが“CTL#B2”であることを示す。
 図6は、DB定義情報テーブル280の一例を示す図である。DB定義情報テーブル280は、パラメータ281と、値282と、をひとつのレコードに含む。
 図示の例では、リモートシステム2のDBMS20-2のDB定義情報テーブル280を示しており、第1のレコードが、パラメータ281として、リモートシステム2でメインシステム1のストレージシステムが書き込んだWRITE時刻を取得するか否かを設定するWRITE時刻取得モードが設定され、値282には“N”が格納されている。この例では、リモートシステム2ではメインシステム1のWRITE時刻管理テーブル340のデータを取得しないことを示す。
 また、図示の例では、第2のレコードが、パラメータ281として、ミラー化ボリューム間の同期機能利用モードが設定され、値282には“N”が格納されている。この機能は、ミラーリングしたボリューム間の内容を同期(コピー)する機能を適用するか否かを示す。図示の“N”は当該機能を適用しない設定を示す。
 図示はしないが、メインシステム1のDBMS20-1も同様にDB定義情報テーブル280を有し、ミラーリングしたボリューム間の内容を同期(コピー)する機能を適用するか否かを設定することができる。
 また、図示はしないが、DB定義情報テーブル280には、メインシステム1またはリモートシステム2の何れであるかを識別する情報を含む。例えば、サイトというパラメータ281と、“リモート”という値282であればリモートシステム2のDBMS20-2を示す。
 図7は、チェックポイント情報管理テーブル#1(290-1)の一例を示す図である。チェックポイント情報管理テーブル#1(290-1)は、チェックポイント情報の識別子を格納するチェックポイント情報ID291と、チェックポイント情報が正と副の何れのストレージシステムに格納されているかを格納する系292と、データの種類を格納する種別293と、チェックポイント情報の最新のLSNの値を格納するLSN294と、正DBデータ310を回復する際に選択することを示すチェックポイント情報選択フラグ295と、をひとつのレコードに含む。
 図示の例では、リモートシステム2において、DBMS20-2のチェックポイント情報管理テーブル#1では、正チェックポイント情報320(CHKPNT1)のLSN294が“90”で、副チェックポイント情報420(CHKPNT2)のLSN294が“85”で、系292が“副”のチェックポイント情報選択フラグ295が“ON”であることから、正DBデータ310の回復に副チェックポイント情報420を選択されたことを示している。
 図8は、チェックポイント情報管理テーブル#2(290-2)の一例を示す図である。チェックポイント情報管理テーブル#2(290-2)は、チェックポイント情報の識別子を格納するチェックポイント情報ID291と、チェックポイント情報が“正”と“副”の何れのストレージシステムに格納されているかを格納する系292と、データの種類を格納する種別293と、当該チェックポイント情報が格納されているストレージシステムの識別子を格納するストレージシステムID296と、当該チェックポイント情報が格納されている論理ボリュームの識別子を格納する論理ボリュームID297と、メインシステム1で当該チェックポイント情報が書き込まれた時刻を格納するメイン側WRITE時刻298と、正DBデータ310を回復する際に選択することを示すチェックポイント情報選択フラグ295と、をひとつのレコードに含む。
 図示の例では、リモートシステム2において、DBMS20-2のチェックポイント情報管理テーブル#2では、正チェックポイント情報320(CHKPNT1)のメイン側WRITE時刻298が“14:50”で、副チェックポイント情報420(CHKPNT2)のメイン側WRITE時刻298が“14:40”で、系292が“副”のチェックポイント情報選択フラグ295が“ON”であることから、正DBデータ310の回復に副チェックポイント情報420を選択されたことを示している。
 上記図7、図8に示したチェックポイント情報管理テーブル#1、#2は、DBMS20が更新する。リモートシステム2のDBMS20-2は、後述する処理によってチェックポイント情報管理テーブル#1(290-1)、#2(290-2)を更新する。
 チェックポイント情報管理テーブル#1(290-1)の更新は、正チェックポイント情報320、副チェックポイント情報420のLSNの値をLSN294にそれぞれ格納する。
 一方、チェックポイント情報管理テーブル#2(290-2)の更新は、メインシステム1からのデータ非同期転送時に、メインシステム1側でのWRITE時刻の情報もリモートシステム2で受け取り、正チェックポイント情報320と副チェックポイント情報420の最終書き込み時刻をメイン側WRITE時刻298にそれぞれ格納する。
 図9A~図9Dは、各ストレージシステム30、40がそれぞれ保持するWRITE時刻管理テーブル340の一例を示す図である。図9Aは、メインシステム1の正ストレージシステム30-1が保持するWRITE時刻管理テーブル340-1である。図9Bは、メインシステム1の副ストレージシステム40-1が保持するWRITE時刻管理テーブル340-2である。図9Cは、リモートシステム2の正ストレージシステム30-2が保持するWRITE時刻管理テーブル340-1である。図9Dは、リモートシステム2の副ストレージシステム40-2が保持するWRITE時刻管理テーブル340-1である。
 各WRITE時刻管理テーブル340は、各ストレージシステムが有する論理ボリュームの識別子を格納する論理ボリュームID341と、各論理ボリュームへ最後に書き込みを行った時刻(タイムスタンプ)が格納される。
 各ストレージシステムのアクセス制御部34は、各ボリュームに書き込みが行われると、書き込みが完了した時刻を該当ボリュームのレコードのWRITE時刻342に設定する。
 図10は、チェックポイント取得処理の一例を示すフローチャートである。この処理は、メインシステム1のDBMS20-1が所定のタイミングとなったときに実行する。なお、所定のタイミングは、上述したように、予め設定した周期や、トランザクションの処理量が閾値に達したときや、正ログ330の量が所定値に達したときなどである。
 DBMS20-1は、まず、正チェックポイント情報320にチェックポイント取得開始情報として“CP START”を正ログ330に出力する(S1)。DBMS20-1は、このチェックポイント取得開始情報に、正DBデータ310のログと同様にLSNを付与する。
 次に、DBMS20-1は、DBバッファ上で更新された全てのデータ(全てのDBブロック)を正DBデータ用ボリューム31に書き込む(S2)。
 DBMS20-1は、チェックポイント取得終了情報として“CP END”を正ログ330に出力する(S3)。DBMS20-1は、このチェックポイント取得終了情報に、上記と同様にLSNを付与する。
 最後に、DBMS20-1は、チェックポイント取得終了情報に付与したLSNを正チェックポイント情報320に書き込む。
 以上の処理により、所定のタイミングとなるたびに、DBバッファ上で更新されたデータが正DBデータ310に書き込まれ、このとき、チェックポイント取得終了情報に付与したLSNが正チェックポイント情報320として正チェックポイント情報用ボリューム32に書き込まれる。そして、DBMS20-1の書き込みとは非同期で、メインシステム1の正チェックポイント情報320は、リモートシステム2の正チェックポイント情報320へ複写される。
 メインシステム1の正DBデータ310も、DBMS20-1の書き込みとは非同期で、正DBデータ310をリモートシステム2の正DBデータ310へ複写される。
 図11は、DB再開始処理部210で行われる処理の一例を示すフローチャートである。この処理は、メインシステム1からリモートシステム2へ運用の切り替えが行われ、リモートシステム2のDBMS20-2が開始されると実行される。なお、メインシステム1からリモートシステム2への切り替えは、周知または公知の技術を採用することができる。例えば、リモートシステム2のホストコンピュータ10-2がメインシステム1のホストコンピュータ10-1のハートビートを監視し、障害の発生を検知するとDBMS20-2を起動するようにしてもよい。
 DB再開始処理部210は、正ストレージシステム30-2の正チェックポイント情報320を読み込んで、メインシステム1のデータベースが正常に終了したか否かを判定する。正チェックポイント情報320にDBMS20-1が正常終了したことを示す情報が格納されていない場合には、DBMS20-1が正常終了していないと判定してステップS12へ進む。そうでない場合には処理を終了する。
 ステップS12では、DB定義情報テーブル280を参照して、当該システムがリモートシステム2であるか否かを判定する。当該システムがリモートシステム2であればステップS13へ進んで、ログからの回復開始位置の決定処理を実行する。一方、当該システムがメインシステム1の場合には、ステップS14へ進んで、DB回復処理部260が、ログに基づいて正DBデータ310の回復処理を実行する。
 DB回復処理部260は、ステップS13で選択されたチェックポイント情報のLSNまたはWRITE時刻から正ログ330または副ログ430を正DBデータ用ボリューム31の正DBデータ310及び副DBデータ用ボリューム41の副DBデータ410に適用して回復処理を実行する。なお、選択するログは、正チェックポイント情報320と副チェックポイント情報420のうち新しい方に対応するログを選択する。 例えば、DB回復処理部260は、チェックポイント情報管理テーブル#1(290-1)のLSN294を参照し、値が大きい方(図示の例では正チェックポイント情報320)のチェックポイント情報を選択し、当該チェックポイント情報に対応する正ログ330(または副ログ430)を選択し、回復処理を実行する。また、回復処理をストレージ層(正ストレージシステム30-2及び副ストレージシステム40-2)で制御する場合には、チェックポイント情報管理テーブル#2(290-2)のメイン側WRITE時刻298の値が新しい方のチェックポイント情報を選択し、当該チェックポイント情報に対応する正ログ330または副ログ430を選択すればよい。
 すなわち、リモートシステム2のDBMS20-2が、メインシステム1の異常発生を検知したときには、ログとチェックポイント情報及びDBデータが正副ともにメインシステム1のDBMS20-1とは非同期で、メインシステム1からリモートシステム2へコピーされていたので、まず、ログのどの位置から正DBデータ310を回復するかを決定する(S13)。なお、ステップS13の処理については、図12で詳述する。
 そして、DBMS20-2のDB再開始処理部210は、決定したログの回復開始位置から正DBデータ310及び副DBデータ410を回復し、回復が完了した後にはデータベースの提供を再開する。
 データベースの再開始時には、OS300またはI/F13が提供するミラーリング機能を利用する。このミラーリング機能によって、正ストレージシステム30-2と副ストレージシステム40-2を同期させて、リモートシステム2におけるデータベースシステムの冗長性を確保する。
 図12は、ログからの回復開始位置決定処理の一例を示すフローチャートである。この処理は、図11のステップS13で行われる処理である。
 DBMS20-2のDB再開始処理部210は、DB定義情報テーブル280を参照して、WRITE時刻取得モードの値282を取得する。そして、DB再開始処理部210は、WRITE時刻取得モードの値282が“N”であるか否かを判定する。WRITE時刻取得モードが“N”の場合にはステップS22へ進み、そうでない場合にはステップS26へ進む。すなわち、DB再開始処理部210がメインシステム1のDBMS20-1のWRITE時刻を使用しない場合には、ステップS22で図13Aに示すチェックポイント情報不一致判別処理#1を実行する。一方、DB再開始処理部210がメインシステム1のDBMS20-1のWRITE時刻を使用する場合には、ステップS26で図13Bに示すチェックポイント情報不一致判別処理#1を実行する。
 ステップS22では、DB再開始処理部210がチェックポイント情報不一致判別処理#1を実行し、正チェックポイント情報320と副チェックポイント情報420のLSNの値が一致しているか否かを判定する。DB再開始処理部210は、正チェックポイント情報320と副チェックポイント情報420のLSNが一致していれば処理を終了する。一方、DB再開始処理部210は、正チェックポイント情報320と副チェックポイント情報420のLSNが一致していなければステップS24へ進んで、図14Aに示すチェックポイント情報決定処理#1を実行する。
 ステップS24のチェックポイント情報決定処理#1では、DB再開始処理部210が、チェックポイント情報管理テーブル#1(290-1)を参照し、正チェックポイント情報320と副チェックポイント情報420うちLSN294の古い(小さい)方を、正DBデータ310を回復するためのチェックポイント情報として選択する。
 次に、ステップS25では、DB再開始処理部210が図15Aに示すチェックポイント情報不一致解消処理#1を実行して、DBの回復に使用しないチェックポイント情報をクリアする。
 そして、図11の処理に戻り、DB再開始処理部210は、ステップS14で、LSNまたはメイン側WRITE時刻が新しい方のチェックポイント情報に対応する正ログ330または副ログ430を、正DBデータ310と副DBデータ410に適用して、正DBデータ310と副DBデータ410を回復させる。
 一方、上記ステップS21の判定で、DB定義情報テーブル280のWRITE時刻取得モードが“Y”の場合には、ステップS26へ進んで、DB再開始処理部210は、図13Bに示すチェックポイント情報不一致判別処理#2を実行する。
 ステップS26のチェックポイント情報決定処理#2では、DB再開始処理部210が、チェックポイント情報管理テーブル#2(290-2)を参照し、正チェックポイント情報320と副チェックポイント情報420のメイン側WRITE時刻298が一致しているか否かを判定する。
 DB再開始処理部210は、正チェックポイント情報320と副チェックポイント情報420のWRITE時刻が一致していれば処理を終了する。一方、DB再開始処理部210は、正チェックポイント情報320と副チェックポイント情報420のWRITE時刻が一致していなければステップS28へ進んで、図14Bに示すチェックポイント情報決定処理#2を実行する。
 ステップS28のチェックポイント情報決定処理#2では、DB再開始処理部210が、チェックポイント情報管理テーブル#1(290-2)を参照し、正チェックポイント情報320と副チェックポイント情報420うちWRITE時刻古い方を、正DBデータ310を回復するためのチェックポイント情報として選択する。
 次に、ステップS29では、DB再開始処理部210がDB定義情報テーブル280を参照して、ミラー化ボリューム間同期モードの値282が“N”であるか否かを判定する。正ストレージシステム30-2と副ストレージシステム40-2が同期されていない“N”の場合、DB再開始処理部210は、ステップS30へ進んで、図15Bに示すチェックポイント情報不一致解消処理#2を実行する。
 一方、メインシステム1とリモートシステム2の正副ストレージシステムが同期されている“Y”の場合、DB再開始処理部210は、ステップS31へ進んで、図15Cに示すチェックポイント情報不一致解消処理#3を実行する。
 以上の処理により、正チェックポイント情報320と副チェックポイント情報420のLSNまたはWRITE時刻が古い方のボリュームが選択されて、DB再開始処理部210はLSNで指定される正ログ330または副ログ440を用いて正DBデータ310の回復を実施する。
 このように、DBMS20-1とは非同期でメインシステム1から受信した正チェックポイント情報320と副チェックポイント情報420のうち、新しい方のLSNまたはWRITE時刻によって、非同期転送のため正DBデータ310と副DBデータ410の間にずれが発生していても、双方をデータの損失なく整合性を保った状態に回復できる。これにより、メインシステム1のDBMS20-1とは非同期でメインシステム1からリモートシステム2へバックアップを行う場合でも、冗長性を確保することができる。また、メインシステム1で障害が発生してからリモートシステム2でデータベースを再開するまでの時間が増大するのを抑制できる。
 図13Aは、チェックポイント情報不一致判別処理#1の一例を示すフローチャートである。この処理は、図12のステップS22で回復開始位置決定部220のチェックポイント情報不一致判別処理部230によって行われる処理である。
 チェックポイント情報不一致判別処理部230は、正ストレージシステム30-2のボリューム32に格納された最後(最新)の正チェックポイント情報320と、副ストレージシステム70-2のボリューム42に格納された最後(最新)の副チェックポイント情報420と、をそれぞれ読み込む(S41)。
 チェックポイント情報不一致判別処理部230は、正チェックポイント情報320のうち最後に記録されたLSNを取得し、チェックポイント情報管理テーブル#1の系292が“正”のレコードのLSN294に取得したLSNを格納する(S42)。
 チェックポイント情報不一致判別処理部230は、副チェックポイント情報420のうち最後に記録されたLSNを取得し、チェックポイント情報管理テーブル#1の系292が“副”のレコードのLSN294に取得したLSNを格納する(S43)。
 チェックポイント情報不一致判別処理部230は、系292が“正”のLSN294と、系292が“副”のLSN294の値が一致しなければ、正チェックポイント情報320と副チェックポイント情報420のLSNは不一致と判定する(S44)。
 以上の処理により、チェックポイント情報不一致判別処理部230が、正副チェックポイント情報のLSNを比較することで、メインシステム1のDBMS20-1とは非同期でバックアップされる正副チェックポイント情報のずれを検出することができる。
 図13Bは、チェックポイント情報不一致判別処理#2の一例を示すフローチャートである。この処理は、図12のステップS26で回復開始位置決定部220のチェックポイント情報不一致判別処理部230によって行われる処理である。
 チェックポイント情報不一致判別処理部230は、DB-ボリュームマッピングテーブル270を参照して、系272が“正”で、かつ、種別273が“チェックポイント”のリモート側論理ボリュームIDを検索する(S51)。図5に示すリモート側論理ボリュームID277でVOL3-B1が該当するボリュームIDとなる。この論理ボリュームID=VOL3-B1は、図1に示した正ストレージシステム30-2の正チェックポイント情報用ボリューム32に対応し、正チェックポイント情報320を格納する。
 チェックポイント情報不一致判別処理部230は、当該正チェックポイント情報320をメインシステム1で最後に書き込んだ時刻(WRITE時刻)を、メインシステム1のホストコンピュータ10-1に問い合わせる(S52)。
 すなわち、チェックポイント情報不一致判別処理部230は、上記ステップS51で検索した論理ボリュームID=VOL3-B1のレコードで、当該メイン側論理ボリュームID275(この例では、VOL3-A1)を取得して、ホストコンピュータ10-1にWRITE時刻を問い合わせる。この問合せ処理の詳細については、図16で後述する。
 DB再開始処理部210は、メインシステム1のホストコンピュータ10-1からWRITE時刻の応答を受け付けると、チェックポイント情報管理テーブル#2の系292が“正”のレコードのメイン側WRITE時刻298に受け付けたWRITE時刻を格納する(S53)。
 DB再開始処理部210は、DB-ボリュームマッピングテーブル270を参照して、系272が“副”で、かつ、種別273が“チェックポイント”のリモート側論理ボリュームIDを検索する(S54)。図5に示すリモート側論理ボリュームID277でVOL3-B2が該当するボリュームIDとなる。この論理ボリュームID=VOL3-B2は、図1に示した副ストレージシステム40-2の副チェックポイント情報用ボリューム42に対応し、副チェックポイント情報420を格納する。
 DB再開始処理部210は、当該正チェックポイント情報320をメインシステム1で最後に書き込んだ時刻(WRITE時刻)を、メインシステム1のホストコンピュータ10-1に問い合わせる(S55)。
 すなわち、DB再開始処理部210は、上記ステップS55で検索した論理ボリュームID=VOL3-B2のレコードで、当該メイン側論理ボリュームID275(この例では、VOL3-A2)を取得して、ホストコンピュータ10-1にWRITE時刻を問い合わせる。この問合せ処理の詳細については、上記S52と同様であり、図16で後述する。
 DB再開始処理部210は、メインシステム1のホストコンピュータ10-1からWRITE時刻の応答を受け付けると、チェックポイント情報管理テーブル#2の系292が“副”のレコードのメイン側WRITE時刻298に、受け付けたWRITE時刻を格納する(S56)。
 DB再開始処理部210は、系292が“正”のメイン側WRITE時刻298と、系292が“副”のメイン側WRITE時刻298が一致しなければ、正チェックポイント情報320と副チェックポイント情報420のWRITE時刻は不一致と判定する(S57)。
 以上の処理により、正副チェックポイント情報が最後に書き込まれたWRITE時刻を比較することで、メインシステム1のDBMS20-1とは非同期でバックアップされる正副チェックポイント情報のずれを検出することができる。
 図14Aは、チェックポイント情報決定処理#1の一例を示すフローチャートである。この処理は、図12のステップS24で回復開始位置決定部220のチェックポイント情報決定処理部240で行われる処理である。
 チェックポイント情報決定処理部240は、チェックポイント情報管理テーブル#1(290-1)を参照し(S61)、正チェックポイント情報320のLSN294と、副チェックポイント情報420のLSN294の値を比較する(S62)。
 そして、チェックポイント情報決定処理部240は、チェックポイント情報管理テーブル#1のLSN294の値が古い(小さい)方のチェックポイント情報を、正DBデータ310及び副DBデータ410の回復用に決定する(S63)。そして、チェックポイント情報決定処理部240は、チェックポイント情報管理テーブル#1で決定したチェックポイント情報のチェックポイント情報選択フラグ295を“ON”に設定する。なお、チェックポイント情報選択フラグ295のデフォルト値は“OFF”である。
 以上の処理によりLSNの小さいチェックポイント情報が選択されて、チェックポイント情報選択フラグ295が“ON”に更新される。
 図14Bは、チェックポイント情報決定処理#2の一例を示すフローチャートである。この処理は、図12のステップS28でチェックポイント情報決定処理部240によって行われる処理である。
 チェックポイント情報決定処理部240は、チェックポイント情報管理テーブル#2(290-2)を参照し(S71)、正チェックポイント情報320のメイン側WRITE時刻298と、副チェックポイント情報420のメイン側WRITE時刻298の値を比較する(S72)。
 そして、チェックポイント情報決定処理部240は、チェックポイント情報管理テーブル#2のメイン側WRITE時刻298が古い方のチェックポイント情報を、正DBデータ310及び副DBデータ410の回復用に決定する(S73)。そして、チェックポイント情報決定処理部240は、チェックポイント情報管理テーブル#2で決定したチェックポイント情報のチェックポイント情報選択フラグ295を“ON”に設定する(S74)。なお、チェックポイント情報選択フラグ295のデフォルト値は“OFF”である。
 以上の処理により、DB定義情報テーブル280のWRITE時刻取得モードが“Y”の場合には、チェックポイント情報管理テーブル#2でメイン側WRITE時刻298の古い方のチェックポイント情報が選択されて、チェックポイント情報選択フラグ295が“ON”に更新される。
 図15Aは、チェックポイント情報不一致解消処理#1の一例を示すフローチャートである。この処理は、図12のステップS25で回復開始位置決定部220のチェックポイント情報不一致解消処理部250によって行われる。
 チェックポイント情報決定処理部240は、チェックポイント情報管理テーブル#1(290-1)を参照し(S81)、チェックポイント情報選択フラグ295が“OFF”のチェックポイント情報を初期化する(S82)。
 上記処理により、正DBデータ310の回復処理に使用されないチェックポイント情報選択は初期化によってクリアされる。
 図15Bは、チェックポイント情報不一致解消処理#2の一例を示すフローチャートである。この処理は、図12のステップS30で回復開始位置決定部220のチェックポイント情報不一致解消処理部250によって行われる処理である。
 チェックポイント情報不一致解消処理部250で、チェックポイント情報管理テーブル#2(290-2)を参照し(S91)、チェックポイント情報選択フラグ295が“OFF”のチェックポイント情報を、チェックポイント情報選択フラグ295が“ON”のチェックポイント情報で上書きする(S92)。
 上記処理により、リモートシステム2の正ストレージシステム30-2の正チェックポイント情報320と、副ストレージシステム40-2の副チェックポイント情報420は同期する。
 図15Cは、チェックポイント情報不一致解消処理#3の一例を示すフローチャートである。この処理は、図12のステップS31で回復開始位置決定部220のチェックポイント情報不一致解消処理部250によって行われる処理である。
 回復開始位置決定部220のチェックポイント情報不一致解消処理部250は、チェックポイント情報管理テーブル#2(290-2)を参照し(S101)、チェックポイント情報選択フラグ295が“OFF”のチェックポイント情報を、チェックポイント情報選択フラグ295が“ON”のチェックポイント情報で上書きする(S102)。
 上記処理により、リモートシステム2の正ストレージシステム30-2の正チェックポイント情報320と、副ストレージシステム40-2の副チェックポイント情報420は同期する。
 図16は、WRITE時刻問合せ処理の一例を示すフローチャートである。この処理は、図13BのステップS52、S55で行われる処理で、リモートシステム2のDBMS20-2の開始時(DBMSの再開時)に行われる処理である。
 ホストコンピュータ10-2のDBMS20-2は論理ボリュームIDを受け付け、DB-ボリュームマッピングテーブル270を参照して、リモート側ストレージシステムID276を取得する(S111)。
 ホストコンピュータ10-2は、ステップS111で取得したリモート側ストレージシステムID276で、図9C、図9Dに示したWRITE時刻管理テーブル340-3~340-4を参照してWRITE時刻342を取得する。(S112)。
 以上の処理によって、リモートシステム2のDBMS20-2は、チェックポイント情報が最後に書き込まれた時刻(WRITE時刻342)をWRITE時刻管理テーブル340-3~340-4から取得することができる。なお、メイン側WRITE時刻の取得処理は、本処理とは別に行われる。すなわち、メインシステム1からの正副DBデータ、正副チェックポイント情報、正副ログの非同期転送時に、メイン側WRITE時刻も一緒に転送され、リモートシステム2の正副ストレージシステム30-2、40-2は、WRITE時刻管理テーブル340-3、340-4の反映先論理ボリュームに格納する。
 以上のように本実施例1によれば、データベースを提供するメインシステム1の正副ストレージシステムのデータを、リモートシステム2の正副ストレージシステムへDBMS20-1とは非同期で複写する。正副ストレージシステムのデータには、DBデータとログに加え、DBMS20-1がDBバッファの更新済みデータを正ストレージシステム30-1の正DBデータ310へ書き込んだときに生成するチェックポイント情報320、420を含む。チェックポイント情報320、420は、チェックポイントの開始及び終了を示すメッセージに付与したLSNである。また、チェックポイント情報320、420には、メインシステム1のDBMS20-1の状態情報を記録できる。
 そして、メインシステム1の正副ストレージシステムではDBデータ310、410についてミラーリングを行い、チェックポイント情報とログについてはDBMS20-1が2重化する。リモートシステム2の正副ストレージシステムでは、ミラーリング機能を停止しておく。メインシステム1では、DBMSやミラーリング機能とは非同期でリモートシステム2の正副ストレージシステムへ正データの複製を転送する。
 リモートシステム2の正副ストレージシステムでは、ミラーリング機能を停止しているため、メインシステム1のDBMS20-1に障害が発生した時点で、正副DBデータや正副ログは同期しているとは限らない。
 そこで、リモートシステム2のDBMS20-2では、DBMS20-1に障害が発生すると、正チェックポイント情報320と副チェックポイント情報420のずれを検出する。このずれの検出は、LSNの不一致や、WRITE時刻の不一致などで検出する。
 そして、正副チェックポイント情報が不一致の場合には、LSNまたはWRITE時刻が古い方のチェックポイント情報を、正DBデータ310及び副DBデータ410の回復開始位置として決定する。回復開始位置は、チェックポイント情報管理テーブル#1のLSN294、またはチェックポイント情報管理テーブル#2のメイン側WRITE時刻298の古い方が指定される。
 DBMS20-2の回復処理部260は、指定された回復開始位置から正ログ330または副ログ430のうち新しい方から正DBデータ310及び副DBデータ410の回復処理を実行する。これによりDBMS20-2のみで正DBデータ310及び副DBデータ410の回復を実現できる。
 そして、メインシステム1とリモートシステム2の正副ストレージシステムの全てのデータをDBMS20-1とは非同期でバックアップしながらも、障害発生時の回復処理を迅速に行うことができるのである。これにより、メインシステム1のネットワークの帯域や、処理能力がディザスタリカバリで消費されるのを抑制することができ、ネットワークの帯域や処理能力に余裕があるときにデータの複製をDBMS20-1とは非同期で行うことができる。したがって、メインシステム1でビッグデータなどの処理を行う際には、ホストコンピュータ10-1の処理能力及びネットワークの帯域を効率よく利用することができる。
 そして、リモートシステム2で正DBデータ310及び副DBデータ410の回復処理が完了した後には、正ストレージシステム30-2と副ストレージシステム40-2を冗長化することによって、リモートシステム2で提供するデータベースの冗長性を確保できるのである。
 図17は、第2の実施例を示し、ホストコンピュータ10の一例を示すブロック図である。第2の実施例では、DBMS20-2のDB再開始処理部210は、正副DBデータ用ボリューム(または正副DBデータ)の更新時刻(WRITE時刻)を参照し、更新時刻が新しい方のDBデータ用ボリュームの系でチェックポイント情報を選択する。また、更新時刻が新しい方のDBデータ用ボリュームで正副DBデータ用ボリュームを同期させておく。そして、選択したチェックポイント情報から正DBデータ310の回復処理を実行することで、リモートシステム2での正DBデータ310の回復処理の高速化を図るものである。図17において、ホストコンピュータ10の構成としては、DBデータ用ボリューム不一致解消処理部255を加えた点が、前記実施例1と異なる点である。その他の構成は、前記実施例1と同様である。
 図18は、DB再開始処理部210で行われる処理の一例を示すフローチャートである。図18では、前記実施例1の図11に示したフローチャートに対して、ステップS120を追加した点が前記実施例1とは異なる。その他については、前記実施例1と同様である。以下では、リモートシステム2のDBMS20-2のDB再開始処理部210の例について説明する。
 ステップS11、S12では、前記実施例1と同様に、メインシステム1に障害が発生していれば、当該システムがリモートシステム2と判定し、ステップS120へ進む。
 ステップS120では、DB再開始処理部210が、後述する図19のように、リモートシステム2の正ストレージシステム30-2の正DBデータ用ボリューム31と、副ストレージシステム40-2の副DBデータ用ボリューム41のWRITE時刻(更新時刻)を比較して、更新時刻が新しい方のDBデータ用ボリュームで正副DBデータ用ボリューム31、41を同期させておく。なお、ステップS120の処理については図19で詳述する。
 次に、DB再開始処理部210は、ログからの回復開始位置の決定処理を実行する(S13A)。この処理は、実施例1がLSNまたはWRITE時刻が古いチェックポイント情報を選択したのに対して、本実施例2では、WRITE時刻または新しいチェックポイント情報を選択する点が相違する。すなわち、更新時刻が新しい方のDBデータ用ボリュームと同じ系(正副)のチェックポイント情報を回復用に選択する。
 具体的には、ステップS13Aの処理は、前記実施例1の図12のステップS24の処理を、図14Aに代わって図23の処理を実行し、図12のステップS28の処理を、図14Bに代わって図24の処理を実行すればよい。図23の処理では、ステップS63Aで、DB再開始処理部210が、LSNが新しい方のチェックポイント情報を選択する点が前記実施例1と相違する。また、図24の処理では、ステップS73Aで、DB再開始処理部210が、WRITE時刻が新しい方のチェックポイント情報を選択する点が前記実施例1と相違する。
 そして、ステップS14では、DB回復処理部260が、ステップS13Aで選択されたチェックポイント情報のLSNまたはWRITE時刻から正ログ330または副ログ430を正DBデータ用ボリューム31の正DBデータ310と副DBデータ用ボリューム41の副DBデータ410に適用して回復処理を実行する。なお、選択するログは、ステップS13Aで選択されたチェックポイント情報と同一の系の正ログ用ボリューム33または副ログ用ボリューム43を用いればよい。
 図19は、DBデータ用ボリューム不一致解消処理部255で行われる処理の一例を示すフローチャートである。この処理は、図18のステップS120で回復開始位置決定部220のDBデータ用ボリューム不一致解消処理部255が実行する処理である。
 DBデータ用ボリューム不一致解消処理部255は、リモートシステム2の正DBデータ用ボリューム31の正DBデータ310と、副DBデータ用ボリューム41の副DBデータ410が一致しているか否かを判定する(S121)。ステップS122では、正DBデータ310と副DBデータ410が一致していない場合にはステップS123へ進み、一致している場合には処理を終了して図18の処理に復帰する。
 ステップS123では、DBデータ用ボリューム不一致解消処理部255が、正DBデータ310と副DBデータ410の更新時刻(WRITE時刻)を参照し、更新時刻が新しい方のDBデータ用ボリュームを、回復用のボリュームとして決定する。この処理については図21で詳述する。
 ステップS124では、DBデータ用ボリューム不一致解消処理部255が、上記ステップS123で決定したDBデータ用ボリュームの内容で、正DBデータ用ボリューム31と副DBデータ用ボリューム41を同期させる。すなわち、正DBデータ310と副DBデータ410を同期させる。
 以上の処理によって、正副DBデータ用ボリューム31、41は、DBデータ用ボリューム不一致解消処理部255が、DBデータ用ボリュームの更新時刻(WRITE時刻)を参照し、更新時刻が新しい方のDBデータ用ボリュームで正副DBデータ用ボリュームを同期させる。
 図20は、DBデータ用ボリューム不一判別処理の一例を示すフローチャートである。この処理は、図19に示したDBデータ用ボリューム不一致解消処理部255のステップS121で実行される処理である。
 回復開始位置決定部220は、DB-ボリュームマッピングテーブル270を参照して、系272が“正”で、かつ、種別273が“DBデータ”のリモート側論理ボリュームIDを検索する(S1211)。
 図5に示すリモート側論理ボリュームID277で図5のVOL1-B1が該当するボリュームIDとなる。この論理ボリュームID=VOL1-B1は、図1に示した正ストレージシステム30-2の正DBデータ用ボリューム31に対応し、正DBデータ310を格納する。
 回復開始位置決定部220は、当該正DBデータ310をメインシステム1で最後に書き込んだ時刻(WRITE時刻)を、正チェックポイント情報320を格納した正ストレージシステム30-2に問い合わせる(S1212)。
 すなわち、回復開始位置決定部220は、上記ステップS1211で検索した論理ボリュームID=VOL1-B1を制御する正ストレージシステム30-2に、図9Cに示したWRITE時刻管理テーブル340-3の値を問い合わせる。
 回復開始位置決定部220は、正ストレージシステム30-2からWRITE時刻の応答を受け付けると、チェックポイント情報管理テーブル#2の系292が“正”のレコードのメイン側WRITE時刻298に受け付けたWRITE時刻を格納する(S1213)。
 回復開始位置決定部220は、DB-ボリュームマッピングテーブル270を参照して、系272が“副”で、かつ、種別273が“DBデータ”のリモート側論理ボリュームIDを検索する(S1214)。図5に示すリモート側論理ボリュームID277でVOL1-B2が該当するボリュームIDとなる。この論理ボリュームID=VOL1-B2は、図1に示した副ストレージシステム40-2の副チェックポイント情報用ボリューム42に対応し、副チェックポイント情報420を格納する。
 回復開始位置決定部220は、当該正チェックポイント情報320をメインシステム1で最後に書き込んだ時刻(WRITE時刻)を、正ストレージシステム30-2に問い合わせる(S1215)。
 すなわち、回復開始位置決定部220は、上記ステップS1215で検索した論理ボリュームID=VOL1-B2について、副ストレージシステム40-2にWRITE時刻を問い合わせる。
 回復開始位置決定部220は、副ストレージシステム40-2からWRITE時刻の応答を受け付けると、チェックポイント情報管理テーブル#2の系292が“副”のレコードのメイン側WRITE時刻298に、受け付けたWRITE時刻を格納する(S1216)。
 回復開始位置決定部220は、系292が“正”のメイン側WRITE時刻298と、系292が“副”のメイン側WRITE時刻298が一致しなければ、正DBデータ310と副DBデータ410は不一致と判定する(S1217)。
 以上の処理により、正副DBデータ310、410で情報が最後に書き込まれたWRITE時刻を比較することで、非同期でバックアップされる正副DBデータのずれを検出することができる。
 図21は、DBデータ用ボリューム決定処理の一例を示すフローチャートである。この処理は、図19に示したステップS123で回復開始位置決定部220によって実行される処理である。
 回復開始位置決定部220は、チェックポイント情報管理テーブル#2(290-2)を参照し(S1221)、系292が“正”のメイン側WRITE時刻298、系292が“副”のメイン側WRITE時刻298の値を比較する(S1222)。
 そして、回復開始位置決定部220は、チェックポイント情報管理テーブル#2のメイン側WRITE時刻298のチェックポイント情報を、正DBデータ310の回復用のボリュームとして決定する(S1223)。そして、回復開始位置決定部220は、チェックポイント情報管理テーブル#1で決定したチェックポイント情報のチェックポイント情報選択フラグ295を“ON”に設定する。なお、チェックポイント情報選択フラグ295のデフォルト値は“OFF”である。
 以上の処理によりメイン側WRITE時刻298やLSNの新しい方のDBデータ用ボリュームが選択されて、チェックポイント情報選択フラグ295が“ON”に更新される。
 図22は、DBデータ用ボリューム同期処理の一例を示すフローチャートである。この処理は、図19のステップS31で回復開始位置決定部220によって行われる処理である。
 回復開始位置決定部220は、チェックポイント情報管理テーブル#2(290-2)を参照し(S1241)、チェックポイント情報選択フラグ295が“OFF”のDBデータ用ボリュームを、チェックポイント情報選択フラグ295が“ON”のDBデータ用ボリュームの内容で上書きする(S1242)。
 上記処理により、リモートシステム2の正ストレージシステム30-2の正DBデータ310と、副ストレージシステム40-2の副DBデータ410は、WRITE時刻が新しい方の内容に同期される。
 以上の処理によって、実施例2では、DB再開始処理部210が、リモートシステム2のDBデータ用ボリューム31、41の更新時刻(WRITE時刻)をメインシステム1のストレージシステムから取得し、更新時刻が新しい方のDBデータ用ボリュームの系でチェックポイント情報を選択する。また、DB再開始処理部210は、更新時刻が新しい方のDBデータ用ボリュームで正副DBデータ用ボリューム31、41を同期させておく。そして、選択したチェックポイント情報に基づいて正ログ330または副ログ430から正DBデータ310の回復処理を実行することで、リモートシステム2での正DBデータ310の回復処理の高速化を図ることができる。
 図25は、第3の実施例を示し、ホストコンピュータ10の一例を示すブロック図である。第3の実施例では、DBMS20-2のDB再開始処理部210は、正副チェックポイント情報用ボリューム(または正副チェックポイント情報)の更新時刻(WRITE時刻)が新しい方のチェックポイント情報用ボリュームの系を、更新用の系とする。正副DBチェックポイント情報用ボリューム(または正副チェックポイント情報)の更新時刻が一致する場合は、正副ログ用ボリューム33、43の更新時刻(WRITE時刻)が新しい方の正副ログ用ボリュームの系を、更新用の系とする。そして、更新用の系を同期元として他方の系を上書きしてから、正DBデータ310の回復を実行する。これにより、DBデータ回復処理の高速化を図るものである。
 図25において、ホストコンピュータ10の構成としては、正副ボリューム不一致解消処理部256と、系決定結果管理テーブル510と、ボリューム同期情報テーブル520を加えた点が、前記実施例1と異なる点である。その他の構成は、前記実施例1と同様である。
 図29は、系決定結果管理テーブル510の一例を示す図である。DB再開始処理部210が管理する系決定結果管理テーブル510は、同期元ストレージシステムID511と、同期先ストレージシステムID512と、をひとつのレコードに含む。図示の例では、リモートシステム2の副ストレージシステム40-2(ID=“CTL#B2”)の内容で、正ストレージシステム30-2(ID=“CTL#B1”)を上書きすることを示唆している。
 図30は、ボリューム同期情報テーブル520の一例を示す図である。DB再開始処理部210が管理するボリューム同期情報テーブル520は、データの種類を格納する種別521と、コピー元の識別子となる同期元ストレージシステムID522と、コピー元のボリューム識別子となる同期元ボリュームID523と、上書き対象の識別子となる同期先ストレージシステムID524と、上書き対象のボリューム識別子となる同期先ボリュームID525と、をひとつのレコードに含む。
 図26は、DB再開始処理部210で行われる処理の一例を示すフローチャートである。図26では、前記実施例1の図11に示したフローチャートに対して、ステップS13のログからの回復開始位置決定処理を、ステップS130の正副ボリューム不一致解消処理に置き換えたもので、その他については、前記実施例1と同様である。以下では、リモートシステム2のDBMS20-2のDB再開始処理部210の例について説明する。
 ステップS11、S12では、前記実施例1と同様に、メインシステム1に障害が発生していれば、当該システムがリモートシステム2と判定し、ステップS130へ進む。
 ステップS130では、DB再開始処理部210の正副ボリューム不一致解消処理部256が、正副チェックポイント情報用ボリューム(または正副チェックポイント情報)の更新時刻(WRITE時刻)が新しい方、あるいは、正副ログ用ボリュームの更新時刻(WRITE時刻)が新しい方を同期元の系(ストレージシステム)として決定し、他方の系を同期先として決定する。そして、正副ボリューム不一致解消処理部256は、同期元の系の内容で、同期先となる系の内容を上書きする。これにより、正副ボリューム不一致解消処理部256は、DBデータの更新時刻が新しい、または、ログの更新時刻が新しい方の内容に正副ボリュームを同期する。
 そして、ステップS14では、DB回復処理部260が、ステップS130で同期されたチェックポイント情報の直近のLSNまたはWRITE時刻から正ログ330を正DBデータ用ボリューム31の正DBデータ310に適用して回復処理を実行する。
 以上の処理により、チェックポイント情報の更新時刻が新しいか、ログの更新時刻が新しい系で正副ボリュームを同期させてから、直近のLSNまたはWRITE時刻からログを適用して正副DBデータ310を回復することで、ログ適用の範囲を絞って、回復処理の高速化を計ることができる。
 図27は、正副ボリューム不一致解消処理部256の一例を示すフローチャートである。この処理は、図26のステップS130で、正副ボリューム不一致解消処理部256が実行する処理である。
 正副ボリューム不一致解消処理部256は、正チェックポイント情報320と副チェックポイント情報420のLSNまたは更新時刻(WRITE時刻)が一致するかを判別する(S131)。この処理は、前記実施例1の図13Aに示したLSNによるチェックポイント情報不一致判別処理#1、または図13Bに示したWRITE時刻によるチェックポイント情報不一致判別処理#2の何れかを実行すればよい。
 ステップS132で、正副ボリューム不一致解消処理部256は、ステップS131の結果から正チェックポイント情報320と副チェックポイント情報420が一致するか否かを判定する。一致する場合はステップS135へ進み、一致しない場合にはステップS133へ進む。
 ステップS133では、正副ボリューム不一致解消処理部256が、チェックポイント情報が新しい方のボリュームの系を同期元として決定し、他方の系を同期先として決定する。チェックポイント情報が新しい方のボリュームの決定は、前記実施例2の図23または図24のフローチャートを実行すれば良い。
 ステップS137では、正副ボリューム不一致解消処理部256が、ログが新しい方のボリュームの系を同期元として決定し、他方の系を同期先として決定する。ログが新しい方のボリュームの決定は、前記実施例2の図24のチェックポイント情報と同様にして、正ログ330または副ログ430の更新時刻(メイン側WRITE時刻)が新しい方のボリュームを、同期元として決定する。
 ステップS137では、正副ボリューム不一致解消処理部256が、上記ステップS133またはS137で決定した同期元の系の内容で、同期先の系の内容を上書きし、正副のボリュームを同期させる。
 図28は、正副ボリューム同期処理の一例を示すフローチャートである。正副ボリューム不一致解消処理部256は、DB-ボリュームマッピングテーブル270を参照し、同期先の系のストレージシステムIDを取得して、系決定結果管理テーブル510の同期元ストレージシステムID511に格納し、他方の系のストレージシステムIDを同期先ストレージシステムID512に格納する。また、正副ボリューム不一致解消処理部256は、同期元と同期先のストレージシステムのデータの種類毎に、論理ボリュームIDをボリューム同期情報テーブル520に設定する(S1341)。
 正副ボリューム不一致解消処理部256は、ボリューム同期情報テーブル520の情報を、正副ストレージシステム30-2、40-2のアクセス制御部34、44にそれぞれ送信し、同期元の論理ボリュームの内容で、同期先の論理ボリュームの内容を上書きして同期を実行する。
 以上のように、実施例3では、チェックポイント情報またはログが新しい方の系を、更新用の系とする、更新用の系で他方の系を同期してからログからの回復を実行することで、ログの適用範囲を絞り込んでDBデータの回復処理の高速化を図ることができる。
 <まとめ>
 なお、本発明において説明した計算機等の構成、処理部及び処理手段等は、それらの一部又は全部を、専用のハードウェアによって実現してもよい。
 また、本実施例で例示した種々のソフトウェアは、電磁的、電子的及び光学式等の種々の記録媒体(例えば、非一時的な記憶媒体)に格納可能であり、インターネット等の通信網を通じて、コンピュータにダウンロード可能である。
 また、本発明は上記した実施例に限定されるものではなく、様々な変形例が含まれる。例えば、上記した実施例は本発明をわかりやすく説明するために詳細に説明したものであり、必ずしも説明した全ての構成を備えるものに限定されるものではない。
 また、上記各実施例では、所定の周期でリモートシステム2のDBMS20-2の再開始処理部210が、リモートシステム2の正副ストレージシステムのデータのずれを検出する例を示したが、メインシステム1のDBMS20-1が障害の発生をリモートシステム2に通知したとき等に、リモートシステム2の正副ストレージシステムのデータのずれを検出するようにしてもよい。あるいは、リモートシステム2のホストコンピュータ10-2が、メインシステム1と通信できなくなったとき、あるいは、ホストコンピュータ10-2がメインシステム1のホストコンピュータ10-2のハートビートを検出できなくなったとき等にDBMS20-2の再開始処理部210が回復処理を開始してもよい。

Claims (15)

  1.  データベースを提供する第1のサイトと、前記データベースの複製を格納する第2のサイトと、を有して第2のサイトの管理計算機で前記データベースを回復するデータベースシステムの制御方法であって、
     前記第1のサイトは、
     プロセッサとメモリを含んで前記データベースを制御するデータベース管理部を稼働させる第1の計算機と、
     前記データベースに関連するデータを格納する第1の正ストレージ装置と、
     前記第1の正ストレージ装置に格納される前記データの複製を格納する第1の副ストレージ装置と、を有し、
     前記第2のサイトは、
     プロセッサとメモリを含んで前記データベースを回復する再開始処理部を稼働させる第2の計算機と、
     前記第1の正ストレージ装置から受信した前記データを格納する第2の正ストレージ装置と、
     前記第1の副ストレージ装置から受信した前記データを格納する第2の副ストレージ装置と、を有し、
     前記制御方法は、
     前記第1の計算機が、前記データベースの処理を行って、前記データベースのデータを更新する第1のステップと、
     前記第1の正ストレージ装置が、前記データベース管理部とは非同期で、前記データを前記第2の正ストレージ装置へ送信する第2のステップと、
     前記第1の副ストレージ装置が、前記データベース管理部とは非同期で、前記データを前記第2の副ストレージ装置へ送信する第3のステップと、
     前記第2の計算機が、所定のタイミングで前記第2の正ストレージ装置のデータと、前記第2の副ストレージ装置のデータを比較する第4のステップと、
     前記第2の計算機が、前記比較の結果、前記第2の正ストレージ装置のデータと、前記第2の副ストレージ装置のデータが一致しない場合には、前記データベースを回復する第5のステップと、
    を含むことを特徴とするデータベースシステムの制御方法。
  2.  請求項1に記載のデータベースシステムの制御方法であって、
     前記データベースに関連するデータは、前記データベースのデータと、前記データベースの更新時に生成されたログと、所定のタイミングで生成されたチェックポイント情報と、を含み、
     前記第1のステップは、
     前記第1の計算機が、前記データベースのデータを更新する際に、前記更新するデータのログを生成して前記ログを前記第1の正ストレージ装置に格納するステップと、
     前記第1の計算機が、前記更新されたデータベースのデータを前記第1の正ストレージ装置へ書き込む際に、前記ログの位置を示すチェックポイント情報を生成し、前記更新されたデータと前記チェックポイント情報とを前記第1の正ストレージ装置に格納するステップと、を含み
     前記第4のステップは、
     前記第2の計算機が、前記第2の正ストレージ装置のチェックポイント情報と、前記第2の副ストレージ装置のチェックポイント情報とを比較し、
     前記第5のステップは、
     前記第2の計算機が、前記比較の結果、前記第2の正ストレージ装置と前記第2の副ストレージ装置のチェックポイント情報が一致しない場合には、何れか一方のチェックポイント情報を選択してログの回復開始位置を決定し、当該回復開始位置から前記ログを前記データベースに適用してデータを回復することを特徴とするデータベースシステムの制御方法。
  3.  請求項2に記載のデータベースシステムの制御方法であって、
     前記第5のステップは、
     前記第2の計算機が、前記第2の正ストレージ装置と前記第2の副ストレージ装置のうち古い方のチェックポイント情報を選択し、前記選択したチェックポイント情報に対応するログから回復開始位置を決定し、当該回復開始位置から前記ログを前記データベースに適用してデータを回復することを特徴とするデータベースシステムの制御方法。
  4.  請求項1に記載のデータベースシステムの制御方法であって、
     前記データベースに関連するデータは、前記データベースのデータと、前記データベースの更新時に生成されたログと、所定のタイミングで生成されたチェックポイント情報と、を含み、
     前記第1のステップは、
     前記第1の計算機が、前記データベースのデータを更新する際に、前記更新するデータのログを生成して前記ログを前記第1の正ストレージ装置に格納するステップと、
     前記第1の計算機が、前記更新されたデータベースのデータを前記第1の正ストレージ装置へ書き込む際に、前記ログの位置を示すチェックポイント情報を生成し、前記更新されたデータと前記チェックポイント情報とを前記第1の正ストレージ装置に格納するステップと、
     前記第1の正ストレージ装置が、前記チェックポイント情報を前記第1の正ストレージ装置に格納した第1の書き込み時刻を保持するステップと、
     前記第1の副ストレージ装置が、前記チェックポイント情報を前記第1の副ストレージ装置に格納した第2の書き込み時刻を保持するステップと、を含み
     前記第4のステップは、
     前記第2の計算機が、前記第2の正ストレージ装置のチェックポイント情報について、前記第1の計算機が前記第1の正ストレージ装置に格納した第1の書き込み時刻を取得し、前記第2の副ストレージ装置のチェックポイント情報について、前記第1の計算機が前記第1の副ストレージ装置に格納した第2の書き込み時刻を取得し、これら第1の書き込み時刻と第2の書き込み時刻とを比較し、
     前記第5のステップは、
     前記第2の計算機は、前記比較の結果、前記第1の書き込み時刻と前記第2の書き込み時刻が一致しない場合には、何れか一方のチェックポイント情報を選択してログの回復開始位置を決定し、当該回復開始位置から前記ログを前記データベースに適用してデータを回復することを特徴とするデータベースシステムの制御方法。
  5.  請求項4に記載のデータベースシステムの制御方法であって、
     前記第5のステップは、
     前記第2の計算機は、前記第1の書き込み時刻と前記第2の書き込み時刻が一致しない場合には、前記第1の書き込み時刻と前記第2の書き込み時刻のうち古い方を選択し、当該選択した書き込み時刻に対応するチェックポイント情報からログの回復開始位置を決定し、当該回復開始位置から前記ログを前記データベースに適用してデータを回復することを特徴とするデータベースシステムの制御方法。
  6.  請求項2に記載のデータベースシステムの制御方法であって、
     前記第5のステップは、
     前記第2の計算機が、前記比較の結果、前記第2の正ストレージ装置と前記第2の副ストレージ装置のチェックポイント情報が一致しない場合には、何れか一方のチェックポイント情報を選択し、当該選択したチェックポイント情報の内容で前記選択されなかったチェックポイント情報を上書き、または選択されなかったチェックポイント情報を初期化するステップをさらに含むことを特徴とするデータベースシステムの制御方法。
  7.  請求項1に記載のデータベースシステムの制御方法であって、
     前記データベースに関連するデータは、前記データベースのデータと、前記データベースの更新時に生成されたログと、所定のタイミングで生成されたチェックポイント情報と、を含み、
     前記第1のステップは、
     前記第1の計算機が、前記データベースのデータを更新する際に、前記更新するデータのログを生成して前記ログを前記第1の正ストレージ装置に格納するステップと、
     前記第1の計算機が、前記更新されたデータベースのデータを前記第1の正ストレージ装置へ書き込む際に、前記ログの位置を示すチェックポイント情報を生成し、前記更新されたデータと前記チェックポイント情報とを前記第1の正ストレージ装置に格納するステップと、を含み
     前記第4のステップは、
     前記第2の計算機が、前記第2の正ストレージ装置のデータベースのデータと、前記第2の副ストレージ装置のデータベースのデータとを比較し、
     前記第5のステップは、
     前記第2の計算機が、前記比較の結果、前記第2の正ストレージ装置と前記第2の副ストレージ装置のデータベースのデータが一致しない場合には、何れか一方のデータベースのデータを選択するステップと、
     前記第2の計算機が、前記選択したデータベースのデータで、前記選択されなかったデータベースのデータを上書きするステップと、
     前記第2の計算機が、前記選択したデータベースのデータを格納する第2の正ストレージ装置または第2の副ストレージ装置を特定し、前記特定したストレージ装置のチェックポイント情報からログの回復開始位置を決定し、当該回復開始位置から前記ログを前記データベースに適用してデータを回復することを特徴とするデータベースシステムの制御方法。
  8.  請求項1に記載のデータベースシステムの制御方法であって、
     前記データベースに関連するデータは、前記データベースのデータと、前記データベースの更新時に生成されたログと、所定のタイミングで生成されたチェックポイント情報と、を含み、
     前記第1のステップは、
     前記第1の計算機が、前記データベースのデータを更新する際に、前記更新するデータのログを生成して前記ログを前記第1の正ストレージ装置に格納するステップと、
     前記第1の計算機が、前記更新されたデータベースのデータを前記第1の正ストレージ装置へ書き込む際に、前記ログの位置を示すチェックポイント情報を生成し、前記更新されたデータと前記チェックポイント情報とを前記第1の正ストレージ装置に格納するステップと、
     前記第1の正ストレージ装置が、前記チェックポイント情報を前記第1の正ストレージ装置に格納した第1の書き込み時刻を保持するステップと、
     前記第1の副ストレージ装置が、前記チェックポイント情報を前記第1の副ストレージ装置に格納した第2の書き込み時刻を保持するステップと、
     前記第1の正ストレージ装置が、前記ログを前記第1の正ストレージ装置に格納した第3の書き込み時刻を保持するステップと、
     前記第1の副ストレージ装置が、前記ログを前記第1の副ストレージ装置に格納した第4の書き込み時刻を保持するステップと、を含み
     前記第4のステップは、
     前記第2の計算機が、前記第2の正ストレージ装置のチェックポイント情報について、前記第1の計算機が前記第1の正ストレージ装置に格納した第1の書き込み時刻を取得し、前記第2の副ストレージ装置のチェックポイント情報について、前記第1の計算機が前記第1の副ストレージ装置に格納した第2の書き込み時刻を取得し、これら第1の書き込み時刻と第2の書き込み時刻とを比較し、前記第1の書き込み時刻と第2の書き込み時刻が等しい場合には、前記第3の書き込み時刻と第4の書き込み時刻を比較し、
     前記第5のステップは、
     前記第2の計算機は、前記比較の結果、前記第3の書き込み時刻と前記第4の書き込み時刻が一致しない場合には、何れか一方のログを選択し、当該選択したログを格納する前記第2の正ストレージ装置または第2の副ストレージ装置を特定し、前記特定したストレージ装置の内容で他方のストレージ装置を上書きし、前記選択したログから回復開始位置を決定し、当該回復開始位置から前記ログを前記データベースに適用してデータを回復することを特徴とするデータベースシステムの制御方法。
  9.  データベースを提供する第1のサイトと、
     前記データベースの複製を格納する第2のサイトと、を有して第2のサイトの管理計算機で前記データベースを回復するデータベースシステムであって、
     前記第1のサイトは、
     プロセッサとメモリを含んで前記データベースを制御するデータベース管理部を稼働させる第1の計算機と、
     前記データベースに関連するデータを格納する第1の正ストレージ装置と、
     前記第1の正ストレージ装置に格納される前記データの複製を格納する第1の副ストレージ装置と、を有し、
     前記第2のサイトは、
     プロセッサとメモリを含んで前記データベースを回復する再開始処理部を稼働させる第2の計算機と、
     前記第1の正ストレージ装置から受信した前記データを格納する第2の正ストレージ装置と、
     前記第1の副ストレージ装置から受信した前記データを格納する第2の副ストレージ装置と、を有し、
     前記第1の計算機の前記データベース管理部は、
     前記第1の計算機が、前記データベースの処理を行って、前記データベースのデータを更新し、
     前記第1の正ストレージ装置が、前記データベース管理部とは非同期で、前記データを前記第2の正ストレージ装置へ送信し、
     前記第1の副ストレージ装置が、前記データベース管理部とは非同期で、前記データを前記第2の副ストレージ装置へ送信し、
     前記第2の計算機の前記再開始処理部は、
     所定のタイミングで前記第2の正ストレージ装置のデータと、前記第2の副ストレージ装置のデータを比較して、前記第2の正ストレージ装置のデータと、前記第2の副ストレージ装置のデータが一致しない場合には、前記データベースを回復することを特徴とするデータベースシステム。
  10.  請求項9に記載のデータベースシステムであって、
     前記データベースに関連するデータは、前記データベースのデータと、前記データベースの更新時に生成されたログと、所定のタイミングで生成されたチェックポイント情報と、を含み、
     前記第1の計算機の前記データベース管理部は、
     前記データベースのデータを更新する際に、前記更新するデータのログを生成して前記ログを前記第1の正ストレージ装置に格納し、前記更新されたデータベースのデータを前記第1の正ストレージ装置へ書き込む際に、前記ログの位置を示すチェックポイント情報を生成し、前記更新されたデータと前記チェックポイント情報とを前記第1の正ストレージ装置に格納し、
     前記第2の計算機の前記再開始処理部は、
     前記第2の計算機が、前記第2の正ストレージ装置のチェックポイント情報と、前記第2の副ストレージ装置のチェックポイント情報とを比較した結果、前記第2の正ストレージ装置と前記第2の副ストレージ装置のチェックポイント情報が一致しない場合には、何れか一方のチェックポイント情報を選択してログの回復開始位置を決定し、当該回復開始位置から前記ログを前記データベースに適用してデータを回復することを特徴とするデータベースシステム。
  11.  請求項10に記載のデータベースシステムであって、
     前記第2の計算機の前記再開始処理部は、
     前記第2の正ストレージ装置と前記第2の副ストレージ装置のうち古い方のチェックポイント情報を選択し、前記選択したチェックポイント情報に対応するログから回復開始位置を決定し、当該回復開始位置から前記ログを前記データベースに適用してデータを回復することを特徴とするデータベースシステム。
  12.  請求項9に記載のデータベースシステムであって、
     前記データベースに関連するデータは、前記データベースのデータと、前記データベースの更新時に生成されたログと、所定のタイミングで生成されたチェックポイント情報と、を含み、
     前記第1の計算機の前記データベース管理部は、
     前記データベースのデータを更新する際に、前記更新するデータのログを生成して前記ログを前記第1の正ストレージ装置に格納し、前記更新されたデータベースのデータを前記第1の正ストレージ装置へ書き込む際に、前記ログの位置を示すチェックポイント情報を生成し、前記更新されたデータと前記チェックポイント情報とを前記第1の正ストレージ装置に格納し、
     前記第1の正ストレージ装置が、前記チェックポイント情報を前記第1の正ストレージ装置に格納した第1の書き込み時刻を保持し、
     前記第1の副ストレージ装置が、前記チェックポイント情報を前記第1の副ストレージ装置に格納した第2の書き込み時刻を保持し、
     前記第2の計算機の前記再開始処理部は、
     前記第2の正ストレージ装置のチェックポイント情報について、前記第1の計算機が前記第1の正ストレージ装置に格納した第1の書き込み時刻を取得し、前記第2の副ストレージ装置のチェックポイント情報について、前記第1の計算機が前記第1の副ストレージ装置に格納した第2の書き込み時刻を取得し、これら第1の書き込み時刻と第2の書き込み時刻とを比較した結果、前記第1の書き込み時刻と前記第2の書き込み時刻が一致しない場合には、何れか一方のチェックポイント情報を選択してログの回復開始位置を決定し、当該回復開始位置から前記ログを前記データベースに適用してデータを回復することを特徴とするデータベースシステム。
  13.  請求項12に記載のデータベースシステムであって、
     前記第2の計算機の前記再開始処理部は、
     前記第1の書き込み時刻と前記第2の書き込み時刻が一致しない場合には、前記第1の書き込み時刻と前記第2の書き込み時刻のうち古い方を選択し、当該選択した書き込み時刻に対応するチェックポイント情報からログの回復開始位置を決定し、当該回復開始位置から前記ログを前記データベースに適用してデータを回復することを特徴とするデータベースシステム。
  14.  請求項10に記載のデータベースシステムであって、
     前記第2の計算機の前記再開始処理部は、
     前記比較の結果、前記第2の正ストレージ装置と前記第2の副ストレージ装置のチェックポイント情報が一致しない場合には、何れか一方のチェックポイント情報を選択し、当該選択したチェックポイント情報の内容で前記選択されなかったチェックポイント情報を上書き、または選択されなかったチェックポイント情報を初期化することを特徴とするデータベースシステム。
  15.  請求項9に記載のデータベースシステムであって、
     前記データベースに関連するデータは、前記データベースのデータと、前記データベースの更新時に生成されたログと、所定のタイミングで生成されたチェックポイント情報と、を含み、
     前記第1の計算機の前記データベース管理部は、
     前記データベースのデータを更新する際に、前記更新するデータのログを生成して前記ログを前記第1の正ストレージ装置に格納し、前記更新されたデータベースのデータを前記第1の正ストレージ装置へ書き込む際に、前記ログの位置を示すチェックポイント情報を生成し、前記更新されたデータと前記チェックポイント情報とを前記第1の正ストレージ装置に格納し、
     前記第2の計算機の前記再開始処理部は、
     前記第2の正ストレージ装置のデータベースのデータと、前記第2の副ストレージ装置のデータベースのデータとを比較した結果、前記第2の正ストレージ装置と前記第2の副ストレージ装置のデータベースのデータが一致しない場合には、何れか一方のデータベースのデータを選択し、前記選択したデータベースのデータで、前記選択されなかったデータベースのデータを上書きし、前記第2の計算機が、前記選択したデータベースのデータを格納する第2の正ストレージ装置または第2の副ストレージ装置を特定し、前記特定したストレージ装置のチェックポイント情報からログの回復開始位置を決定し、当該回復開始位置から前記ログを前記データベースに適用してデータを回復することを特徴とするデータベースシステム。
PCT/JP2014/050322 2014-01-10 2014-01-10 データベースシステムの制御方法及びデータベースシステム WO2015104835A1 (ja)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/JP2014/050322 WO2015104835A1 (ja) 2014-01-10 2014-01-10 データベースシステムの制御方法及びデータベースシステム
US14/907,653 US10078558B2 (en) 2014-01-10 2014-01-10 Database system control method and database system

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/JP2014/050322 WO2015104835A1 (ja) 2014-01-10 2014-01-10 データベースシステムの制御方法及びデータベースシステム

Publications (1)

Publication Number Publication Date
WO2015104835A1 true WO2015104835A1 (ja) 2015-07-16

Family

ID=53523683

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/JP2014/050322 WO2015104835A1 (ja) 2014-01-10 2014-01-10 データベースシステムの制御方法及びデータベースシステム

Country Status (2)

Country Link
US (1) US10078558B2 (ja)
WO (1) WO2015104835A1 (ja)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109753389A (zh) * 2019-01-03 2019-05-14 Oppo广东移动通信有限公司 保证数据一致性的方法、装置、存储介质及服务器

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6508648B2 (ja) * 2014-11-27 2019-05-08 インターナショナル・ビジネス・マシーンズ・コーポレーションInternational Business Machines Corporation データベースを管理するシステム及び方法
JP2017091456A (ja) * 2015-11-17 2017-05-25 富士通株式会社 制御装置、制御プログラムおよび制御方法
JP6686762B2 (ja) * 2016-07-22 2020-04-22 富士通株式会社 情報処理システム、情報処理装置、情報処理方法及びプログラム
JP7242744B2 (ja) * 2021-04-13 2023-03-20 株式会社日立製作所 マイグレーション支援方法及びシステム

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003099306A (ja) * 2001-09-25 2003-04-04 Hitachi Ltd 計算機システムおよび計算機システムにおけるバックアップ方法
JP2004303025A (ja) * 2003-03-31 2004-10-28 Hitachi Ltd 情報処理方法及びその実施システム並びにその処理プログラム並びにディザスタリカバリ方法およびシステム並びにその処理を実施する記憶装置およびその制御処理方法
JP2004348701A (ja) * 2003-03-27 2004-12-09 Hitachi Ltd 計算機システム間のデータ二重化制御方法
JP2005267301A (ja) * 2004-03-19 2005-09-29 Hitachi Ltd ログ同期dbデータ非同期転送によるリカバリ方式および装置

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5530855A (en) 1992-10-13 1996-06-25 International Business Machines Corporation Replicating a database by the sequential application of hierarchically sorted log records
JP2000163344A (ja) * 1998-11-27 2000-06-16 Nec Corp ネットワーク管理システムのデータベース復旧方式
US7383264B2 (en) 2003-03-27 2008-06-03 Hitachi, Ltd. Data control method for duplicating data between computer systems

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2003099306A (ja) * 2001-09-25 2003-04-04 Hitachi Ltd 計算機システムおよび計算機システムにおけるバックアップ方法
JP2004348701A (ja) * 2003-03-27 2004-12-09 Hitachi Ltd 計算機システム間のデータ二重化制御方法
JP2004303025A (ja) * 2003-03-31 2004-10-28 Hitachi Ltd 情報処理方法及びその実施システム並びにその処理プログラム並びにディザスタリカバリ方法およびシステム並びにその処理を実施する記憶装置およびその制御処理方法
JP2005267301A (ja) * 2004-03-19 2005-09-29 Hitachi Ltd ログ同期dbデータ非同期転送によるリカバリ方式および装置

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109753389A (zh) * 2019-01-03 2019-05-14 Oppo广东移动通信有限公司 保证数据一致性的方法、装置、存储介质及服务器

Also Published As

Publication number Publication date
US10078558B2 (en) 2018-09-18
US20160170845A1 (en) 2016-06-16

Similar Documents

Publication Publication Date Title
US10346253B2 (en) Threshold based incremental flashcopy backup of a raid protected array
JP4833734B2 (ja) データベースシステム、ストレージ装置、初期コピー方法及びログ適用方法
US9940205B2 (en) Virtual point in time access between snapshots
US7779295B1 (en) Method and apparatus for creating and using persistent images of distributed shared memory segments and in-memory checkpoints
US7607037B1 (en) SAR restart and going home procedures
US8028192B1 (en) Method and system for rapid failback of a computer system in a disaster recovery environment
US7822715B2 (en) Data mirroring method
US7657718B1 (en) Storage automated replication processing
US9600375B2 (en) Synchronized flashcopy backup restore of a RAID protected array
US7353335B2 (en) Storage control method for database recovery in logless mode
JP4581500B2 (ja) ディザスタリカバリシステム、プログラム及びデータベースのリカバリ方法
US7577788B2 (en) Disk array apparatus and disk array apparatus control method
US7761732B2 (en) Data protection in storage systems
EP1455275B1 (en) Data restoring apparatus using journal data and identification information
EP2161661B1 (en) Computer system and backup method therefor
JP2006023889A (ja) リモートコピーシステム及び記憶装置システム
KR20090099529A (ko) 페일오버 및 페일백 환경에서 버추얼 카피의 사용
KR19980024086A (ko) 컴퓨터 시스템 및 화일 관리 방법
JP2009505280A (ja) データベースミラーからのオンラインページリストア
US20170235652A1 (en) Method and system for star replication using multiple replication technologies
WO2015104835A1 (ja) データベースシステムの制御方法及びデータベースシステム
US6934805B2 (en) Method and apparatus for managing computer storage devices for improved operational availability
US9141495B2 (en) Automatic failure recovery using snapshots and replicas
US20090177916A1 (en) Storage system, controller of storage system, control method of storage system
JP4898609B2 (ja) ストレージ装置、データ回復方法及び計算機システム

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: 14877762

Country of ref document: EP

Kind code of ref document: A1

WWE Wipo information: entry into national phase

Ref document number: 14907653

Country of ref document: US

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 14877762

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: JP