IP Library Granted Patent US 7,769,714
Granted Patent B2
US 7,769,714 · App. 11/935,939 · Granted Aug 3, 2010

Automatic error correction for replication and instantaneous instantiation

Assignee: Oracle International Corporation
View Patent ↗
Loading inventors, assignments & file history…
Monitor This Case
Get email alerts when status or documents change.
Order Certified Copies
Most orders are placed with the USPTO same day — all within 24 business hours.
Order via The Patent Place →
Pre-filled with this patent's details
Quick Facts
Patent No.
US 7,769,714
App. No.
11/935,939
Granted
Aug 3, 2010
Kind
B2
Abstract

An approach is provided to automatically resolve conflict between instantiation and ongoing data replication operations. In an embodiment, incremental change records that describe one or more database operations are received at a sink entity. Here, all of the one or more database operations have occurred in a second database after a particular time. A first database operation in the one or more database operations to a particular row in the first database is applied. When a conflict with a second database operation that operates on the particular row is detected, one or more compensating actions, which may, but are not limited to, be a different database operation and/or an operation that creates a conflict log entry, may be performed. Here, the second database operation has occurred in the second database prior to the particular time. When the second database operation is to be performed, an appropriate operation may be performed.

Claims (56)

1. A method for applying changes to a first database, comprising:

receiving one or more incremental change records that describe one or more database operations, wherein all of the one or more database operations have occurred in a second database after a particular time;

applying a first database operation in the one or more database operations to a particular row in the first database;

detecting a conflict with a second database operation that operates on the particular row, wherein the second database operation has occurred in the second database prior to the particular time, and wherein the conflict is of a particular conflict type; and

in response to detecting the conflict with the second database operation that operates on the particular row, performing one or more compensating actions, wherein the one or more compensating actions depend on the particular conflict type;

wherein the method is performed by one or more computing devices.

2. The method of claim 1 , wherein at least one of the one or more compensating actions is an action that stores an indication in a conflict log, wherein the indication indicates that the first database operation has occurred in the first database.

3. The method of claim 1 , wherein the particular conflict type is determined by a combination of a first operation type and a second operation type, wherein the first database operation is of the first operation type and wherein the second database operation is of the second operation type.

4. The method of claim 1 , wherein the one or more compensating actions include performance of zero or more database operations on the particular row in the first database.

5. The method of claim 1 , wherein the one or more incremental change records are captured from a transaction history that is associated with the second database.

6. The method of claim 1 , wherein the particular time is represented by an instantiation system change number that is assigned to a database operation in the second database.

7. The method of claim 1 , wherein the conflict is that the second database operation has not occurred in the first database before the first database operation in the first database.

8. The method of claim 1 , wherein at least one of the one or more incremental change records that describe the first database operation comprises a full set of values for the particular row.

9. The method of claim 1 , wherein the one or more incremental change records are received in an apply stream.

10. A method for instantiating a first database, comprising:

receiving one or more instantiation records that describe a particular database operation, wherein the particular database operation has occurred in a second database before a particular time;

extracting a particular key from the one or more instantiation records; and

determining whether a conflict entry has been created in a conflict log, wherein the conflict entry comprises a field that matches the particular key, wherein the conflict entry indicates that a second database operation has been applied at the first database, and wherein the second database operation has occurred in the second database after the particular time;

wherein the method is performed by one or more computing devices.

11. The method of claim 10 , wherein the one or more instantiation records are received in an instantiation stream.

12. The method of claim 10 , wherein the particular time is represented by an instantiation system change number that is assigned to a database operation in the second database.

13. The method of claim 10 , wherein the one or more instantiation records are captured from a transaction history that is associated with the second database.

14. A computer-readable storage medium carrying one or more sequences of instructions which, when executed by one or more processors, causes the one or more processors to perform:

receiving one or more incremental change records that describe one or more database operations, wherein all of the one or more database operations have occurred in a second database after a particular time;

applying a first database operation in the one or more database operations to a particular row in the first database;

detecting a conflict with a second database operation that operates on the particular row, wherein the second database operation has occurred in the second database prior to the particular time, and wherein the conflict is of a particular conflict type; and

in response to detecting the conflict with the second database operation that operates on the particular row, performing one or more compensating actions, wherein the one or more compensating actions depend on the particular conflict type.

15. The computer-readable storage medium of claim 14 , wherein at least one of the one or more compensating actions is an action that stores an indication in a conflict log, wherein the indication indicates that the first database operation has occurred in the first database.

16. The computer-readable storage medium of claim 14 , wherein the particular conflict type is determined by a combination of a first operation type and a second operation type, wherein the first database operation is of the first operation type and wherein the second database operation is of the second operation type.

17. The computer-readable storage medium of claim 14 , wherein the one or more compensating actions include performance of zero or more database operations on the particular row in the first database.

18. The computer-readable storage medium of claim 14 , wherein the one or more incremental change records are captured from a transaction history that is associated with the second database.

19. The computer-readable storage medium of claim 14 , wherein the particular time is represented by an instantiation system change number that is assigned to a database operation in the second database.

20. The computer-readable storage medium of claim 14 , wherein the conflict is that the second database operation has not occurred in the first database before the first database operation in the first database.

21. The computer-readable storage medium of claim 14 , wherein at least one of the one or more incremental change records that describe the first database operation comprises a full set of values for the particular row.

22. The computer-readable storage medium of claim 14 , wherein the one or more incremental change records are received in an apply stream.

23. A computer-readable storage medium carrying one or more sequences of instructions which, when executed by one or more processors, causes the one or more processors to perform:

receiving one or more instantiation records that describe a particular database operation, wherein the particular database operation has occurred in a second database before a particular time;

extracting a particular key from the one or more instantiation records; and

determining whether a conflict entry has been created in a conflict log, wherein the conflict entry comprises a field that matches the particular key, wherein the conflict entry indicates that a second database operation has been applied at the first database, and wherein the second database operation has occurred in the second database after the particular time.

24. The computer-readable storage medium of claim 23 , wherein the one or more instantiation records are received in an instantiation stream.

25. The computer-readable storage medium of claim 23 , wherein the particular time is represented by an instantiation system change number that is assigned to a database operation in the second database.

26. The computer-readable storage medium of claim 23 , wherein the one or more instantiation records are captured from a transaction history that is associated with the second database.

27. A method for applying changes to a first database, comprising:

creating a replica of one or more data objects of a second database in the first database using one or more instantiate operations, wherein the replica is updated to a particular time at the second database;

before finishing creating the replica of the one or more data objects of the second database in the first database, applying one or more incremental data change operations to the first database, wherein all of the one or more incremental data changes have occurred in the second database after the particular time; and

resolving one or more conflicts between the one or more instantiate operations and the one or more incremental data change operations;

wherein the method is performed by one or more computing devices.

28. The method of claim 27 , wherein the particular time is represented by an instantiation system change number that is assigned to a database operation in the second database.

29. The method of claim 27 , wherein at least one of the one or more incremental data change operations is described in a record that comprises a full set of values for a particular row.

30. A computer-readable storage medium carrying one or more sequences of instructions which, when executed by one or more processors, causes the one or more processors to perform:

creating a replica of one or more data objects of a second database in the first database using one or more instantiate operations, wherein the replica is updated to a particular time at the second database;

before finishing creating the replica of the one or more data objects of the second database in the first database, applying one or more incremental data change operations to the first database, wherein all of the one or more incremental data changes have occurred in the second database after the particular time; and

resolving one or more conflicts between the one or more instantiate operations and the one or more incremental data change operations;

wherein the method is performed by one or more computing devices.

31. The computer-readable storage medium of claim 30 , wherein the particular time is represented by an instantiation system change number that is assigned to a database operation in the second database.

32. The computer-readable storage medium of claim 27 , wherein at least one of the one or more incremental data change operations is described in a record that comprises a full set of values for a particular row.

Assignments (1)
ASSIGNMENT OF ASSIGNOR'S INTEREST Recorded Nov 6, 2007
From: LU, EDWINA; SUBRAMANIAM, MAHESH; WONG, LIK; STAMOS, JAMES; ARORA, NIMAR SINGH
To: ORACLE INTERNATIONAL CORPORATION
Reel/Frame 020076/0251 →
Continuity (1)
Related Publication 20090119346A1 · May 7, 2009