×

Method for restoring a database after I/O error employing write-ahead logging protocols

  • US 4,945,474 A
  • Filed: 04/08/1988
  • Issued: 07/31/1990
  • Est. Priority Date: 04/08/1988
  • Status: Expired due to Term
First Claim
Patent Images

1. In a computerized database system including a storage medium for storing data files, index files, and a recovery log having a plurality of files, and a CPU for I/O to said storage medium, a method executed by said system for recovering a database after an I/O error, comprising the steps of:

  • (a) writing log records during normal forward processing to said recovery log on said storage medium;

    (b) traversing across said recovery log on said storage medium during RESTART routine processing after said I/O error for detecting committed and uncommitted transactions, said RESTART routine including a REDO sub-routine for redoing committed transactions recorded in said recovery log;

    (c) detecting said written log records in said recovery log which are incomplete or failed;

    (d) executing a recovery routine;

    (e) executing an UNDO routine for undoing said detected uncommitted transactions;

    (f) renaming said files on said storage medium having said I/O error;

    (g) storing in a first file on said storage medium indicators of said renamed files that identify said renamed files as error files;

    (h) accessing said first file for said indicators;

    (i) preventing a subsequent RESTART routine from accessing said identified I/O error files in response to said accessing said first file;

    (j) continuing said RESTART routine in response to said accessing said first file while preventing operations on said identified I/O error files during said continued RESTART routine;

    (k) generating a request for access to one of said data files on said storage medium having a corresponding index file;

    (l) accessing said one of said data files on said medium to determine whether said corresponding index file has been renamed thereby indicating said corresponding index file is an error index file;

    (m) rebuilding said index file in response to said determination of said error index file.

View all claims
  • 1 Assignment
Timeline View
Assignment View
    ×
    ×