System and method for purging database update image files after completion of associated transactions for a database replication system with multiple audit logs
First Claim
1. A method of operating a backup system so as to replicate database updates performed on a primary system, the method comprising:
- receiving a first stream of first audit records from the primary system, the first audit records including first audit update records indicating database updates generated by transactions executing on the primary system and control point records defining control time frames at which the first audit update records were generated by the primary system;
upon receiving each of the control point records, generating a system transaction record representing a range of transaction identifiers for transactions executed in the primary system during the control time frame associated with the control point record, the system transaction record further having a control point count representative of the control time frame;
storing the first audit update records in one or more first image trails, and storing each first image trail in first image trail files;
storing in each first image trail file a control point count for identifying the control time frame at which the first image trail file is created;
concurrently for each of the first image trails, applying the first audit records to a backup database in the sequence of the first image trail files; and
periodically executing a file purge procedure for purging image trail files no longer needed, including;
building a composite system transaction record to identify a maximum span of transaction identifiers corresponding to control time frames associated with the first audit records currently applied to the backup database, selecting one of the first image trail files and identifying the control point count stored in the selected first image trail file;
retrieving a first one of the system transaction records that corresponds to the identified control point count; and
comparing a first set of transaction identifiers in the first system transaction record to second set of transaction identifiers in the composite system transaction record, and purging the accessed first image trail file provided all of the transaction identifiers in the first set are older than corresponding transaction identifiers in the second set.
7 Assignments
0 Petitions
Accused Products
Abstract
A method and system for purging database update image files after completion of associated transactions for a database replication system with multiple audit logs. Audit update records and audit backout records are generated by the primary system, and are transmitted to the backup system in multiple streams in parallel. The backup system stores the received audit records as audit image trails, and applies the audit updates and audit backouts to the backup database without regard to whether the associated transactions committed or aborted. Because audit updates and audit backouts are applied without regard to whether the associated transactions committed or aborted, image files containing audit records associated with transactions that have not yet committed or aborted must not be purged. The present invention provides for a method for determining whether an image trail file contains audit records that can be purged such that image trail files can be safely deleted.
18 Citations
18 Claims
-
1. A method of operating a backup system so as to replicate database updates performed on a primary system, the method comprising:
-
receiving a first stream of first audit records from the primary system, the first audit records including first audit update records indicating database updates generated by transactions executing on the primary system and control point records defining control time frames at which the first audit update records were generated by the primary system;
upon receiving each of the control point records, generating a system transaction record representing a range of transaction identifiers for transactions executed in the primary system during the control time frame associated with the control point record, the system transaction record further having a control point count representative of the control time frame;
storing the first audit update records in one or more first image trails, and storing each first image trail in first image trail files;
storing in each first image trail file a control point count for identifying the control time frame at which the first image trail file is created;
concurrently for each of the first image trails, applying the first audit records to a backup database in the sequence of the first image trail files; and
periodically executing a file purge procedure for purging image trail files no longer needed, including;
building a composite system transaction record to identify a maximum span of transaction identifiers corresponding to control time frames associated with the first audit records currently applied to the backup database, selecting one of the first image trail files and identifying the control point count stored in the selected first image trail file;
retrieving a first one of the system transaction records that corresponds to the identified control point count; and
comparing a first set of transaction identifiers in the first system transaction record to second set of transaction identifiers in the composite system transaction record, and purging the accessed first image trail file provided all of the transaction identifiers in the first set are older than corresponding transaction identifiers in the second set. - View Dependent Claims (2, 3, 4, 5, 6)
-
-
7. A computer program product for use in conjunction with a backup computer system so as to replicate database updates performed on a primary system, the computer program product comprising a computer readable storage medium and a computer program mechanism embedded therein, the computer program mechanism comprising:
-
a Master Receiver Module that receives and stores in one or more first image trails a stream of first audit records received from the primary system, the first audit records including audit update records indicating database updates generated by transactions executing on the primary system and control point records defining control time frames at which the first audit update records were generated by the primary system;
the Master Receiver Module, upon receiving each of the control point records, generating a system transaction record representing a range of transaction identifiers for transactions executed in the primary system during the control time frame associated with the control point record, each system transaction record further having a control point count representative of the control time frame;
the Master Receiver Module storing each first image trail in a sequence of first image trail files and storing in each first image trail file a control point count associated with a last audit record stored in a previous one of the first image trail files;
an Updater Module for each first image trail that sequentially applies to a backup database the database updates indicated by the audit update records, in the order the audit update records are stored in the first image trails; and
a Purger Module for periodically executing a file purge procedure for purging image trail files no longer needed, the Purger Module including instructions for;
building a composite system transaction record to identify a maximum span of transaction identifiers corresponding to control time frames associated with the first audit records currently applied to the backup database, selecting one of the first image trail files and identifying the control point count stored in the selected first image trail file;
retrieving a first one of the system transaction records that corresponds to the identified control point count; and
comparing a first set of transaction identifiers in the first system transaction record to second set of transaction identifiers in the composite system transaction record, and purging the accessed first image trail file provided all of the transaction identifiers in the first set are older than corresponding transaction identifiers in the second set. - View Dependent Claims (8, 9, 10, 11, 12, 14, 15, 16, 17, 18)
-
-
13. A backup computer system for replicating database updates performed on a primary system, comprising:
-
a backup database;
a Master Receiver Module that receives and stores in one or more first image trails a stream of first audit records received from the primary system, the first audit records including audit update records indicating database updates generated by transactions executing on the primary system and control point records defining control time frames at which the first audit update records were generated by the primary system;
the Master Receiver Module, upon receiving each of the control point records, generating a system transaction record representing a range of transaction identifiers for transactions executed in the primary system during the control time frame associated with the control point record, each system transaction record further having a control point count representative of the control time frame;
the Master Receiver Module storing each first image trail in a sequence of first image trail files and storing in each first image trail file a control point count associated with a last audit record stored in a previous one of the first image trail files;
an Updater Module for each first image trail that sequentially applies to the backup database the database updates indicated by the audit update records, in the order the audit update records are stored in the first image trails; and
a Purger Module for periodically executing a file purge procedure for purging image trail files no longer needed, the Purger Module including instructions for;
building a composite system transaction record to identify a maximum span of transaction identifiers corresponding to control time frames associated with the first audit records currently applied to the backup database, selecting one of the first image trail files and identifying the control point count stored in the selected first image trail file;
retrieving a first one of the system transaction records that corresponds to the identified control point count; and
comparing a first set of transaction identifiers in the first system transaction record to second set of transaction identifiers in the composite system transaction record, and purging the accessed first image trail file provided all of the transaction identifiers in the first set are older than corresponding transaction identifiers in the second set.
-
Specification