We have multiple clients that are in, what we call, a three-tiered replicating environment. This means we have a Main Site that has Remote Sites. Once those Remote Sites are loaded, we create sites in those and extract them. So the main site never really 'knows' about the third level of remote sites.
My question is, will there be a problem with using Global Autoincrements in this type of replicating environment?
IMO the main site (the single top-level consolidated database) should control the assignment of global autoincrement partition numbers, possibly in a single-column table that simply records partition numbers that have been assigned and therefore cannot be assigned again.
The synchronization process between the top and middle levels would then make sure that each middle level database has been assigned N values that it hasn't actually used yet (for creating bottom level databases)... a kind of key pool local to the middle level where you insert the assigned-but-unused-values, delete the values as you use them, and request more from the top level when the number drops below a threshold.
The point behind "global autoincrement" is the word "global" which implies one single point of control... and the only single point is the top level consolidated database.
All this must keep in mind that the middle levels must also have their own partition numbers, as must the top level. I like assigning partition zero to the top level because that works for DBMS's like Oracle and MSS that have autoincrement but not global autoincrement.
answered 30 Jan '10, 08:42
Calvin I'm not an Replication specialist, but as I know if you have an unique GLOBAL DATABASE ID, you should have no problems.
answered 29 Jan '10, 18:30