Method of automatically synchronizing mirrored database objects
First Claim
Patent Images
1. A method of synchronizing databases, wherein actions applied to a first database are logged, the method comprising the steps of:
- reading data contained in the first database;
loading a second database with the data read from the first database;
determining a set of logged actions to be applied to the second database from a data log received from the first database;
applying the set of logged actions to the second database;
receiving a real time data log from the first database;
before applying the real time data log, determining whether additional logged actions were logged in the data log subsequent to applying the set of logged action, and if additional logged actions were logged, receiving the data log having the additional logged actions while buffering the real time data log and continuing to receive the real time data log, and applying the additional logged actions to the second database;
applying a set of real time logged actions in the real time data log to the second database.
5 Assignments
0 Petitions
Accused Products
Abstract
A method of automatically synchronizing a database with a backup database. The method automatically detects whether the backup database has fallen out of sync with the primary database which it mirrors. In response, a resynchronization process is automatically initiated in which the starting point for reading a redo log of the primary database is automatically determined and in which the backup database is automatically synchronized with the primary dataset.
262 Citations
21 Claims
-
1. A method of synchronizing databases, wherein actions applied to a first database are logged, the method comprising the steps of:
-
reading data contained in the first database;
loading a second database with the data read from the first database;
determining a set of logged actions to be applied to the second database from a data log received from the first database;
applying the set of logged actions to the second database;
receiving a real time data log from the first database;
before applying the real time data log, determining whether additional logged actions were logged in the data log subsequent to applying the set of logged action, and if additional logged actions were logged, receiving the data log having the additional logged actions while buffering the real time data log and continuing to receive the real time data log, and applying the additional logged actions to the second database;
applying a set of real time logged actions in the real time data log to the second database. - View Dependent Claims (2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13)
determining a starting log point from the data contained in the first database; and
determining an ending log point as a function of the last action to be logged, and wherein the set of logged actions includes logged actions from the starting log point to the ending log point.
-
-
3. The method of claim 2, wherein the starting log point is the last point at which the first database was in a consistent state.
-
4. The method of claim 3, wherein the starting log point is determined from data in a header page contained in the first database.
-
5. The method of synchronizing databases according to claim 1, the method further including:
-
receiving log data indicative of the logged actions;
determining whether the second database is invalid and is so, performing the steps of;
the reading data, the loading the second database, the determining a set of logged actions, the applying the set of logged actions, the determining whether additional logged actions were logged, and the applying a set of real time logged actions.
-
-
6. The method of claim 5, wherein the step of determining if the second database is invalid includes receiving the log data and determining from the log data whether one or more actions have been applied to the first database but not logged.
-
7. The method of claim 6, wherein the second database is invalid if the log data received indicates that at least one of a point in time recovery operation, a reorganization without log operation and a load without log operation has been performed on the first database.
-
8. The method of claim 7, further including:
applying the buffered set of real time logged actions to the second database, after the applying a set of logged actions in the second data log to the second database.
-
9. The method of claim 1, further including:
detecting an occurrence of a predetermined condition that causes a first database to be out of sync with a second database.
-
10. The method of claim 9, wherein the detecting includes receiving the log data and determining from the log data whether one or more actions have been applied to the first database but not logged.
-
11. The method of claim 9, wherein the detecting includes:
monitoring the real time data log for an occurrence of a predetermined condition.
-
12. The method of claim 11, wherein the predetermined condition includes any one of point-in-time recovery, reorganization without log operation, and load without log operation.
-
13. The method of claim 1, wherein the determining whether additional logged actions were logged in the data log subsequent to applying the set of logged action includes determining whether a gap exists between an end point of the data log and a starting point of the real time log record.
-
14. A method of automatically synchronizing mirrored databases, comprising:
-
loading a second database with data read from a first database;
determining a set of logged actions to be applied to the second database from a data log received from the first database;
determining from the set of logged actions whether the second database is invalid, and if the second database is determined to be invalid, automatically returning to the step of loading the data contained in the first database;
applying the set of logged actions to the second database;
receiving a real time log record from the first database;
determining from the real time log record whether the second database is invalid, and if the second database is determined to be invalid, automatically returning to the step of reading the data contained in the first database;
applying the real time log record to the second database. - View Dependent Claims (16)
-
-
15. The method of 14, further including:
before applying the real time log record, determining whether additional logged actions were logged in the data log subsequent to applying the set of logged action, and if additional logged actions were logged, receiving the data log having the additional logged actions while buffering the real time log record and continuing to receive the real time log record, and applying the additional logged actions to the second database.
-
17. A method of automatically synchronizing a target database with a source database, comprising:
-
monitoring log data to automatically determine if a target database having a mirror copy of a source database is invalid;
if the target database is determined to be invalid, loading the target database with data contained in the source database;
automatically determining if one or more updates to the source database which have not yet been loaded in the target database are logged in the log data;
if the one or more updates are logged, automatically determining from the log data whether the target database is invalid, if the target database is invalid, returning to the step of loading the target database;
automatically applying the log data to the target database, the applied log data starting from a starting logpoint to an end of file indicator of the log data;
automatically determining from a real time log data whether one or more additional updates are contained in the log data, and if one or more additional updates are contained in the log data, determining if the one or more additional updates indicate that the target database is invalid, and if the target database is determined to be invalid, returning to the step of loading the target database;
applying the one or more additional updates in the log data to the target database and simultaneously buffering the real time log data and receiving additional real time log data while applying the additional updates;
automatically determining from the buffered real time log data whether the target database is invalid, and if the target database is determined to be invalid, returning to the step of loading the target database;
applying the buffered real time log data to the target database;
automatically determining from the received additional real time log data whether the target database is invalid, and if the target database is determined to be invalid, returning to the step of loading the target database; and
applying the received additional real time log data. - View Dependent Claims (18, 19, 20, 21)
determining whether any one of point-in-time recovery, reorganization without log operation, and load without log operation was performed on a source database.
-
-
19. The method of claim 17, wherein the automatically determining from a real time log data whether additional updates are contained in the log data includes:
determining whether there exists a time gap between the end of indicator and a starting logpoint of the real time log data.
-
20. The method of claim 17 wherein the method further includes:
-
receiving the log data via a first communication channel; and
receiving the real time log data via a second communication channel, wherein the log data is received and applied to the target database while the real time log data is received and buffered.
-
-
21. The method of claim 17, further including:
automatically returning to the monitoring when the source database and the target database are synchronized.
Specification