Replicating a database by the sequential application of hierarchically sorted log records
First Claim
1. In a transaction processing system including at least one active computer system in communication with a backup computer system, the backup computer system having a processor (CPU), memory, and a data storage device having a backup database stored therein, each active computer system having a processor, memory, at least one data storage device having an active database stored as a plurality of data records organized by offset location within blocks in the active system storage device, and redo log records representing changes to be made to a database as part of a database transaction when the database transaction is committed, a computer implemented tracking method for updating the backup database to make it consistent with the active database, comprising the steps of:
- a) receiving redo records transmitted from the active system into a dataspace work area in the backup system memory;
b) grouping redo records in the work area from an uncommitted database transaction together;
c) when a transaction becomes a committed transaction, sorting the redo records for the committed transaction with redo records for other committed transactions in the work area according to database, block number within a database, offset location within a block, and sequence of occurrence;
d) reading into a buffer in the backup system memory, a plurality of update blocks from the backup database;
e) sequentially applying sorted committed redo records to corresponding data records in the update blocks; and
f) immediately writing the update blocks back to the backup database after the sorted committed redo records for the update blocks have been applied to the corresponding data records in the update blocks.
1 Assignment
0 Petitions
Accused Products
Abstract
A method and system are provided for continuously maintaining replicas of an active database in a backup system for disaster recovery purposes. Redo records transmitted from an active system are received into a dataspace work area in a backup system memory. Redo records in the work area for an uncommitted database transaction are grouped together. When a transaction becomes a committed transaction, the redo records for the transaction are sorted with redo records from other committed transactions according to database, block number within a database, offset location within a block, and sequence of occurrence. A plurality of update blocks from a backup database are read into a buffer in the backup system memory. The sorted redo records are sequentially applied to corresponding data records in the update blocks. The update blocks are then immediately written back to the database.
-
Citations
10 Claims
-
1. In a transaction processing system including at least one active computer system in communication with a backup computer system, the backup computer system having a processor (CPU), memory, and a data storage device having a backup database stored therein, each active computer system having a processor, memory, at least one data storage device having an active database stored as a plurality of data records organized by offset location within blocks in the active system storage device, and redo log records representing changes to be made to a database as part of a database transaction when the database transaction is committed, a computer implemented tracking method for updating the backup database to make it consistent with the active database, comprising the steps of:
-
a) receiving redo records transmitted from the active system into a dataspace work area in the backup system memory; b) grouping redo records in the work area from an uncommitted database transaction together; c) when a transaction becomes a committed transaction, sorting the redo records for the committed transaction with redo records for other committed transactions in the work area according to database, block number within a database, offset location within a block, and sequence of occurrence; d) reading into a buffer in the backup system memory, a plurality of update blocks from the backup database; e) sequentially applying sorted committed redo records to corresponding data records in the update blocks; and f) immediately writing the update blocks back to the backup database after the sorted committed redo records for the update blocks have been applied to the corresponding data records in the update blocks. - View Dependent Claims (2, 3, 4, 5)
-
-
6. In a transaction processing system including at least one active computer system in communication with a backup computer system, the backup computer system having a processor (CPU), memory, and a data storage device having a backup database stored therein, each active computer system having a processor, memory, at least one data storage device having an active database stored as a plurality of records organized by offset location within blocks in the active system storage device, and redo log records representing changes to be made to a database as part of a database transaction when the database transaction is committed, a computerized tracking system for updating the backup database to make it consistent with the active database, comprising:
-
log record processor means, coupled to the backup computer memory, for grouping together in the backup computer memory, redo records for each separate transaction in sequence of occurrence until the transaction is committed; sorting means, coupled to the backup computer memory, for sorting committed redo records for committed transactions according to a database name, a block number within a database, and an offset within a block, in sequence of occurrence; means, coupled to the backup computer memory, for reading a plurality of update blocks from a database into a buffer in the backup computer memory; means, coupled to the backup computer memory, for applying committed redo records to the update blocks; and means, coupled to the backup computer memory, for writing the update blocks back to the backup database. - View Dependent Claims (7)
-
-
8. In a transaction processing system including a database stored in a data storage device and a log for recording database transactions stored in auxiliary storage device containing a sequence of records including redo records representing changes to be made to the database as part of a committed transaction and a commit record indicating that a transaction is a committed transaction, a system for updating the database comprising:
-
record processor means, coupled to a memory associated with said auxiliary storage device, for storing in said memory committed redo records in sequence of occurrence until a commit record is received for the transaction; log accumulator means, coupled to said memory, for storing in said memory a plurality of sorted redo records for committed transactions, wherein sorted redo records are redo records sorted according to a database, a block number in a database, an offset location within a block and sequence of occurrence; means, coupled to said memory, for periodically sequentially reading a plurality of update blocks from a database into a buffer in said memory; means, coupled to said memory, for sequentially applying the sorted redo records to the update blocks in the buffer; and means, coupled to said memory, for writing the blocks back to the auxiliary storage device.
-
-
9. A system, comprising:
-
at least one active computer system comprising at least one active data storage device having an active database stored as a plurality of records organized by offset location within blocks in the active storage device; a backup computer system, in communication with said active computer system, said backup computer system comprising a processor, a memory, at least one backup data storage device having a backup database stored as a plurality of records organized by offset location within blocks in the backup storage device, and redo log records representing changes to be made to a database as part of a database transaction when the database transaction is committed; control means for enabling said processor to update the backup database to make it consistent with the active database, comprising; log record processor means, coupled to the backup computer memory, for enabling said processor to group together in the backup computer memory, redo records for each separate transaction in sequence of occurrence until the transaction is committed; sorting means, coupled to the backup computer memory, for enabling said processor to sort committed redo records for committed transactions according to a database name, a block number within a database, and an offset within a block, in sequence of occurrence; means, coupled to the backup computer memory, for enabling said processor to read a plurality of update blocks from a database into a buffer in the backup computer memory; means, coupled to the backup computer memory, for enabling said processor to apply committed redo records to the update blocks; and means, coupled to the backup computer memory, for enabling said processor to write the update blocks back to the database.
-
-
10. A controller for use in a system comprising at least one active computer system comprising at least one active data storage device having an active database stored as a plurality of records organized by offset location within blocks in the active storage device, the system also comprising a backup computer system, in communication with the active computer system, the backup computer system comprising a processor, a memory, at least one backup data storage device having a backup database stored as a plurality of records organized by offset location within blocks in the backup storage device, and redo log records representing changes to be made to a database as part of a database transaction when the database transaction is committed, the controller for enabling the processor to update the backup database to make it consistent with the active database, the controller comprising:
-
log record processor means, coupled to the backup computer memory, for enabling the processor to group together in the backup computer memory, redo records for each separate transaction in sequence of occurrence until the transaction is committed; sorting means, coupled to the backup computer memory, for enabling the processor to sort committed redo records for committed transactions according to a database name, a block number within a database, and an offset within a block, in sequence of occurrence; means, coupled to the backup computer memory, for enabling the processor to read a plurality of update blocks from a database into a buffer in the backup computer memory; means, coupled to the backup computer memory, for enabling the processor to apply committed redo records to the update blocks; and means, coupled to the backup computer memory, for enabling the processor to write the update blocks back to the database.
-
Specification