Method and apparatus for data rollback
First Claim
1. A method comprising:
- detecting a failover event for a primary database, where the primary database includes an associated data dictionary;
performing a failover by transferring database responsibilities from the primary database to a secondary database and includes causing a delay for capturing a snapshot of the data dictionary until a subsequent time to the failover;
storing, in a redo log, database operations performed on the secondary database from a time of the failover;
subsequent to the failover, capturing the snapshot of the data dictionary; and
generating a recreated data dictionary representing a state of the data dictionary at the time of the failover, where the generating includes performing redo operations from the redo log from a time of the capture of the snapshot back to the time of the failover.
1 Assignment
0 Petitions
Accused Products
Abstract
A database rollback processor allows rollback, or rewind, of the data and metadata to a point at which a failover or other metadata change occurred, therefore “rewinding” the metadata to a previous consistent point. The rollback processor identifies transaction entries in a redo log resulting in changes to the metadata. The changes are identified backward to a target recovery time. Transactions affecting the metadata are stored in a stack. The transactions are then backed out of the metadata according to the stack to restore the metadata to the state at the target recovery time. Data changes from the redo log may then be applied to the corresponding metadata as it existed at the target recovery time. Since the target recovery time is not bound by the timing of the snapshots, but rather may be at an arbitrary point chosen as the target recovery time, a failover, replication or recovery operation need not rely on the snapshot time.
-
Citations
11 Claims
-
1. A method comprising:
-
detecting a failover event for a primary database, where the primary database includes an associated data dictionary; performing a failover by transferring database responsibilities from the primary database to a secondary database and includes causing a delay for capturing a snapshot of the data dictionary until a subsequent time to the failover; storing, in a redo log, database operations performed on the secondary database from a time of the failover; subsequent to the failover, capturing the snapshot of the data dictionary; and generating a recreated data dictionary representing a state of the data dictionary at the time of the failover, where the generating includes performing redo operations from the redo log from a time of the capture of the snapshot back to the time of the failover. - View Dependent Claims (2, 3, 4)
-
-
5. A computer system, comprising:
-
a primary database and a data dictionary that stores data that defines a structure of the primary database and an arrangement of content stored in the primary database; a stand-by database configured as a backup to the primary database; at least one processor configured to execute instructions stored in a memory that when executed cause the computer system to; in response to a failover event associated with the primary database, perform failover operations including making the stand-by database function as a new primary database; during the failover operations, delay capturing a snapshot of the data dictionary; store, in a redo log, database operations performed with the stand-by database from a time of the failover; subsequent to the failover, capture a current snapshot of the data dictionary; and recreate the data dictionary in a state at the time of the failover by performing redo operations from the redo log from a time of the current snapshot back to the time of the failover. - View Dependent Claims (6, 7, 8)
-
-
9. A non-transitory computer-readable storage medium storing instructions that when executed by a processor cause the computer system to perform a method, the method comprising:
-
detecting a failover event for a primary database, where the primary database includes an associated data dictionary; performing a failover by reassigning a secondary database to function as a new primary database where performing the failover includes delaying the capture of the snapshot of the data dictionary until a subsequent time; storing, in a redo log, database operations performed on the secondary database from a time of the failover; subsequent to the failover, capturing the snapshot of the data dictionary; and recreating the data dictionary in a state at the time of the failover by performing redo operations from the redo log from the capture of the snapshot back to the time of the failover. - View Dependent Claims (10, 11)
-
Specification