EP1522032B1

Avoiding data loss when refreshing a data warehouse

Abstract

The Invention relates to a method for replicating and processing data objects by means of one or more processes running in a computer system having one or more electronic data elements, which are settable to a first, second and third state, comprising: a) replicating the data objects, the assigned electronic data elements of which are set to the third state, to a target system. By using this method and the inventive electronic data elements, it is assured that no further data objects can be assigned to that particular electronic data element in the third state after a replication process using this electronic data element has been started or finished. Thus, no data object can be omitted by the replication process.

EP1522032B1, drawing sheet 1
Sheet 1 of 9

Term

Term ended

Expired 24 November 2023, 2.8 years ago.

  1. Priority
  2. Filed
  3. Granted
  4. Expired
  5. Today

30 claims: 21 independent, 9 dependent

  1. 1
    A computer-implemented method for processing one or more data objects in a source computer system (108) and replicating the one or more data objects to a target computer system (107), comprising online transaction processes (110) performing amending, deleting, changing or inserting operations on the one or more data objects and replication processes (109) replicating the thus operated one or more data objects, characterized by - using one or more data elements (106, 200), which allow an identification of a data object or a set of data objects to be processed and which can be set to three possible states, a first state, in which a data element (106, 200) can be accessed by one or more of the online transaction processes (110) and in which this data element (106, 200) is assignable to one or more of the data objects, a second state, in which a data element (106, 200) can not be accessed by the online transaction processes (110) but is still assignable to one or more of the data objects by said one or more online transaction processes (110) having already accessed the data element (106, 200) at a time in which it has been in the first state, and a third state, in which a data element (106, 200) can not be accessed by the online transaction processes (110) and is not assignable to the one or more data objects, whereby one of the one or more data elements (106, 200) is definable as a default data element (207), - defining a data element (106, 200) as the default data element and - a) setting the default data element to the first state (207), - performing by means of the online transaction processes (110) the amending, deleting changing or inserting operations on the one or more data objects, - b) checking by means of the online transaction processes (110) one or more of the data elements (106, 200), whether a default data element is accessible, and if yes, assigning that data element (106, 200) to the one or more data objects, - storing by means of the online transaction processes (110) the one or more data objects having that data element assigned on the source computer system (108), - c) changing, after commit of the storing processes of all data objects having that data element assigned (106, 200), the state of the data element to the third state, - replicating by means of the replicating processes such (109) data objects to the target computer system (107), which have a data element(106, 200) of the third state assigned and - changing the state of the data element (106, 200) from the first state to the second state if another data element (106, 200) is defined as the default data element.
  2. 2
    The method of one claim 1, further comprising:dependent or independent of steps a) to c), - d) creating a further electronic data element (106, 200) and setting it to the first state.
  3. 4
    The method of one or more of claims 1 to 3, further comprising:in step b): setting a block having a reference to the process, which sets the block, on the electronic data element (106, 200), the block preventing the change of the state of the electronic data element to the third state if the state is the first or second state.
  4. 6
    The method of one or more of claims 1 to 5, further comprising:- irreversibly blocking the change of the state of the electronic data element (106, 200) if the state is the third state.
  5. 7
    The method of one of claims 4 to 6, wherein the blocking is implemented by setting a shared lock on the selected electronic data element.
  6. 11
    The method of one or more of claims 4 to 10, wherein the blocking is implemented in step b) by setting a shared lock on the electronic data element previous to assignment of the electronic data element to that data object.
  7. 12
    The method of one of claims 5 to 11, wherein the deblocking is implemented in step b) by deleting the shared lock as soon as the storing is committed.
  8. 13
    The method of one of claims 1 to 12, further comprising:preceding step c): - f) checking whether a shared lock is set on the electronic data element and in case no shared lock is set, performing step c).
  9. 16
    The method of one of claims 13 to 15, wherein the checking is implemented by trying to set an exclusive lock on the electronic data element and in case the exclusive lock has been set, returning that no shared lock is set on the electronic data element.
  10. 17
    The method of one or more of claims 1 to 16, further comprising:steps a and/or b and/or c) being performed independently by independent processes.
  11. 18
    The method of one or more of claims 1 to 17, further comprising:after creating an data element in the first state: - h) creating a predefinable number of sub processes for processing the correspondent number of data objects, - i) performing step b) for each data object in the corresponding sub process - j) in the process which created the sub processes: waiting until the corresponding number of shared locks has been set on the data element before changing the state of the data element to the second state, - k) processing and storing the data objects in the respective sub processes.
  12. 19
    The method of one or more of claims 1 to 18, wherein the electronic data element comprises a GUID or a time stamp.
  13. 20
    The method of one or more of claims 1 to 19, wherein the electronic data elements in the third state are numbered consecutively.
  14. 21
    The method of one or more of claims 7 to 20, wherein the shared locks are logical read locks.
  15. 22
    The method of one of claims 1 to 21, for use in an enterprise resource planning software.
  16. 23
    The method of one of claims 1 to 7, wherein the electronic data element is implemented as one or more first fields and a second field of a table, whereby the one or more first fields contain an identifier and the second field contains information on the state for the identifier in the one or more first field.
  17. 24
    The method of one of claims 1 to 7, wherein the electronic data element is implemented as one or more first fields in a first table and a second field in a second table, whereby the one or more first fields in the first table contain an identifier and the second field in the second table contains information on the state for the identifier in the one or more first fields of the first table.
  18. 25
    The method of one of claims 1 to 7, wherein the electronic data element is implemented in object oriented programming as an instance of a class.
  19. 26
    The method of one of claims 1 to 25, wherein a change of the state of the electronic data element from the third state to the second or first state is forbidden.
  20. 27
    A computer system comprising code means adapted to carry out each of the steps of the methods according to one or more of claims 1 to 26.
  21. 28
    A computer program comprising code means adapted to perform a method according to one or more of claims 1 to 26, when said program is run on a computer system.
Independent claims21