EP0097239A2

Method and apparatus for restoring data in a computing system.

Abstract

Method and apparatus for assuring atomicity of user requested multi-row update operations to tables such as in a relation database (24), guaranteeing that for any update operation that succeeds all stated effects will have occurred and that for any update operation that fails the system state as perceived by the user remains unchaged. This is accomplished by establishing, in response to a multi-row update operation request, an execution module containing machine language code instructions implementing the update operation request with a savepoint request at the beginning of the execution module. For each set of instruction in or called by the execution module which modified the user perceived system state, undo information is logged to a soft log (20). Upon completing the execution module, the savepoint is dropped, causing all soft log information recorded since the savepoint to be deleted and releasing all resources held to guarantee restoration of the user perceived system state at the time of the savepoint request. Responsive to the detection of an error during execution of the module, the soft logged undo information is used to restore the user perceived state to that existing at the time of the savepoint request.

EP0097239A2, drawing sheet 1
Sheet 1 of 12

Term

Term ended

Projected expiry passed 6 May 2003, 23.4 years ago.

  1. Priority
  2. Filed
  3. Published
  4. Projected expiry
  5. Today

11 claims: 3 independent, 8 dependent

  1. 1
    A method for restoring data in a computing system including a database management system which provides for multi-row operations with respect to data objects, characterized by the steps of:logging selectively to a soft log (20) in main storage and to a hard log (22) in non-volatile storage changes made to said data objects;responsive to an error (42) not involving loss of information in the soft log, restoring said data objects to their state at the beginning (40) of the current multi-row operation (38);and responsive to an error (42) involving loss of information in the soft log, restoring said data objects to their state at the beginning (32) of the unit of recovery (30) including the current multi-row operation (38).
  2. 10
    The method according to any of the claims 1-9 wherein user requested multi-row update operations to tables of the type including UPDATE, INSERT, and DELETE that fails, are generating the operation steps of:in response to an update operation request, establishing an execution module containing machine language code instructions implementing the update operation request with a savepoint request at the beginning of said execution module;for each set of instructions in or called by the execution module which modifies the user perceived system state, selectively recording undo information in a soft or hard log;upon completing an execution module, dropping the savepoint, causing all soft log information recorded since the savepoint to be deleted and releasing all resources held to guarantee restoration of the user perceived system state at the time of the savepoint request;upon detecting an error and responsive to undo information recorded in the soft and/or hard log, restoring the user perceived state to that at the time of the savepoint request.
  3. 11
    Apparatus for restoring data in a computing system executing user requested multi-row update operations of the type including UPDATE, DELETE, and INSERT . to tables in a relational database, characterized by:means (16) responsive to an update operation request for establishing an execution module containing machine language code instructions implementing the update operation request with a savepoint request at the beginning of said execution module;means for recording undo information in a soft log (20) for each set of instructions in or called by the execution module which modifies the user perceived system state;means for dropping the savepoint upon completing an execution module, thereby causing all soft log information recorded since the savepoint to be deleted and releasing all resources held to guarantee restoration of the user perceived system state at the time of the savepoint request;and means responsive to undo information recorded in the soft log and operative upon detecting an error for restoring the user perceived state to that at the time of the savepoint request;said means quaranteeing that for any update operation that succeeds all stated effects will have occurred and that for any update operation that fails the system state as perceived by the usor remains unchanged.