Oracle sequences and duplicates
I was just asked by software engineers at my customers site, if Oracle sequences can produce duplicate values.
The answer is simple:
Surely not as they are protected with a latch serializing the arriving requests and making sure the sequence is incremented each and every time.
And in RAC then?
This latch is surely not shared between nodes, no the mechanism is much simpler, each node will cache a range of values by querying and updating the $seq table.
So each node will distribute values from a non overlapping cache and again there can be no duplicate values for sequences.