AutoNumber if Replicated DB

  • Thread starter Thread starter David
  • Start date Start date
D

David

What is the logic behind the autonumber fields in a replicated database?

The number jumps all over the place from 1 billion to -1 billion.
 
David said:
What is the logic behind the autonumber fields in a replicated database?

The number jumps all over the place from 1 billion to -1 billion.

The "logic" is that since there can be any number of replicated copies all producing
AutoNumber values that a sequential number would be getting duplicated in all of
them. The random number reduces the odds of that to near zero.
 
If you think about it, once you replicate a database the
autonumber still has to remain unique. If there are two
sites, users at both can enter new records and the
autonumber still has to be unique. If you have a standard
autonumber which is at 233 say, and a user at site1 enters
a new record, the automnumber will be 234. If a user at
site 2 enters a new record before you synchronise, that
record will also have an autonumber of 234. You then have
a problem when you synch as there are two records with the
autonumber of 234. When you replicate a Db, autonumber
changes from (usually) incrementing by 1 to generating a
number based on a number of factors which should guarantee
that it is unique.

Dave
 
Thanks to both of you .. I understood why it started up in the billions once
replication was started but didn't know if there was any logic like the
master starts at 1 billion and the others start at other locations but from
what I've gathered here, It's simply random (perhaps based on time/date/mac
address or something like that) (so I don't need to be concerned about odd
ball autonumbers)

Thanks again...
 
Back
Top