Online page restore from a database mirror
First Claim
1. A system for restoring information comprising:
- a processor;
a module executed by the processor, the module adapted to restoring corrupted information stored in a first database from corresponding uncorrupted information stored in a second database in response to a query for information stored in the first database, the first database and the second database comprising mirrors of one another, the query directed at corrupted information, the module adapted to perform the following;
locking a portion of the database containing the corrupted information in the first database, wherein all information stored in the first database except for the corrupted information remains accessible;
sending a request to the second database for the uncorrupted information corresponding to the corrupted information in the first database, the request comprising an identifier of the corrupted information and a log sequence number associated with a time at which the corrupted information in the first database is detected;
waiting until a transaction log associated with the second database has been applied in the second database to at least the point indicated by the received log sequence number;
receiving uncorrupted information from the second database corresponding to the corrupted information;
replacing the locked corrupted information in the first database with the uncorrupted information from the second database; and
unlocking the locked portion of the database.
2 Assignments
0 Petitions
Accused Products
Abstract
A set of servers takes advantage of the existing data redundancy of a mirrored database to restore page corruptions. The page restore may occur with none of the time and/or administration costs of a restore from backup media and without the data loss associated with repair. Online page restore from a database mirror can be initiated and performed by the computer system automatically upon corruption detection. An entire file or database instead of an individual page or set(s) of pages can be restored. The mechanism can be used both to restore corrupt pages on the principal server from a mirror, or corrupt pages on a mirror from the principal server. Online page restore from a database mirror enables page data recovery without the need to find/load/scan through and apply data and log backups, allowing efficient and potentially automatic data recovery.
32 Citations
18 Claims
-
1. A system for restoring information comprising:
-
a processor; a module executed by the processor, the module adapted to restoring corrupted information stored in a first database from corresponding uncorrupted information stored in a second database in response to a query for information stored in the first database, the first database and the second database comprising mirrors of one another, the query directed at corrupted information, the module adapted to perform the following; locking a portion of the database containing the corrupted information in the first database, wherein all information stored in the first database except for the corrupted information remains accessible; sending a request to the second database for the uncorrupted information corresponding to the corrupted information in the first database, the request comprising an identifier of the corrupted information and a log sequence number associated with a time at which the corrupted information in the first database is detected; waiting until a transaction log associated with the second database has been applied in the second database to at least the point indicated by the received log sequence number; receiving uncorrupted information from the second database corresponding to the corrupted information; replacing the locked corrupted information in the first database with the uncorrupted information from the second database; and unlocking the locked portion of the database. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8)
-
-
9. A computer-implemented method for restoring corrupted information stored in a first database comprising:
-
in response to a query for information stored in the first database, the query directed at corrupted information, locking a portion of the database containing the corrupted information in the first database and initiating restoration of the corrupted information without human intervention, the first database remaining accessible except for a portion of the first database on which is stored the corrupted information; sending a request for a page or a set of pages to a second database, the first database and the second database comprising mirrors of one another, the page or the set of pages comprising uncorrupted information in the second database corresponding to the corrupted information in the first database, the request comprising an identifier of the corrupted information and a log sequence number associated with a time at which the corrupted information in the first database is detected; waiting until a transaction log associated with the second database has been applied in the second database at least the point indicated by the received log sequence number; receiving the corresponding uncorrupted information from the second database and applying the corresponding uncorrupted information to the first database; and unlocking the locked portion of the database, wherein the second database is a first mirror database of a plurality of mirror databases, wherein load balancing is performed by sending to the first mirror database a first request for a first range of pages to be restored to the first database and by sending to a second mirror database of the plurality of mirror databases a second request for a second range of pages to be restored to the first database; and wherein the first database keeps track of which of the plurality of mirror databases responds fastest and routes requests to mirror database that has responded fastest in the past. - View Dependent Claims (10, 11, 12, 13)
-
-
14. A computer-readable storage medium storing computer-executable instructions which when executed by a computing processor enable a method comprising:
-
locking a portion of a database containing corrupted information in a first database, the first database comprising a principal database; receiving user input comprising at least one of;
a page identifier of a page of the principal database to restore, the page comprising a portion of the first database on which the corrupted information is stored, a mirror database to which a request for a corresponding page of the mirror database identified by the page identifier of the user input;receiving a log sequence number associated with a time at which the corrupted information in the first database was detected; identifying the mirror database and initiating restoration of the corrupted information without human intervention, the first database remaining accessible except for the page of the first database on which is stored the corrupted information; sending a request for a page or a set of pages to a second database, the first database and the second database comprising mirrors of one another, the page or set of pages comprising uncorrupted information in the second database corresponding to the corrupted information of the first database, the request comprising the log sequence number associated with the time at which the corrupted information in the first database was detected; waiting until a transaction log associated with the second database has been applied in the second database to at least the point indicated by the received log sequence number; receiving the corresponding uncorrupted information from the second database; applying the uncorrupted information to the first database; and unlocking the locked portion of the database. - View Dependent Claims (15, 16, 17, 18)
-
Specification