×

Method and apparatus for audit trail logging and data base recovery

  • US 5,561,795 A
  • Filed: 05/13/1994
  • Issued: 10/01/1996
  • Est. Priority Date: 05/13/1994
  • Status: Expired due to Term
First Claim
Patent Images

1. In a database management system capable of having multiple transactions in process simultaneously and executing on a data processing system having a main memory, wherein a database is organized with data pages that include data records and index pages that include index records to reference other index pages or the data pages, the database management system including cache processing for caching selected portions of a database in the main memory from non-volatile storage and audit processing for maintaining an audit file of updates to the database and the status of transactions in process, wherein a cache page is the portion of main memory allocable by the cache processing for storing selected database pages, and the audit processing sequentially writes audit records to the audit file when an update is made to the database and maintains an audit file control block for use in processing the audit file when the database requires recovery, a method of operating the data processing system for maintaining an audit file comprising the steps of:

  • maintaining an oldest audit value for each page of the database that is cached in the main memory of the data processing system, wherein each said oldest audit value references the earliest written audit record resulting from a modification to the corresponding cached database page;

    maintaining a physical-redo-start value in the audit file control block, wherein said physical-redo-start value references the location in the audit file at which recovery processing may begin;

    when a database page that is cached in the main memory of the database processing system is to be written to non-volatile storage,updating said physical-redo-start value with an oldest audit value which is associated with said database page to be written to the non-volatile storage if said oldest audit value which is associated with said database page to be written to the non-volatile storage is less than all other oldest audit values which are associated with the other cached database pages;

    performing steps (a) and (b) for a completed transaction, wherein said completed transaction is a transaction for which processing is complete;

    (a) identifying the oldest transaction currently in process for which processing is incomplete, wherein said oldest transaction is the transaction for which processing began at a time which is earlier than the other transactions in process; and

    (b) writing a commit type audit record to the audit file to indicate that processing of said completed transaction is complete, wherein said commit type audit record identifies said completed transaction and said oldest transaction from said identifying step.

View all claims
  • 9 Assignments
Timeline View
Assignment View
    ×
    ×