cancel
Showing results for 
Search instead for 
Did you mean: 

Three-Tier Replication & Global AutoIncrement

Former Member
2,716

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?

EDIT:
Will the databases be able to automatically generate the global database id themselves and have them all still be global, or do I need to hook into the extraction stored procedure and generate them myself?

Thanks,
Calvin

Accepted Solutions (1)

Accepted Solutions (1)

Breck_Carter
Participant

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.

VolkerBarth
Contributor
0 Kudos

And I would further use the GlobalAutoIncrement event to notify the consolidated when one's database ID is nearly exhausted, so that the cons can reserve the next ID for that remote.

Answers (1)

Answers (1)

Former Member

Calvin I'm not an Replication specialist, but as I know if you have an unique GLOBAL DATABASE ID, you should have no problems.

Former Member
0 Kudos

That's true. I've reworded the question a bit to explain a little more.