This content has been marked as final. Show 5 replies
one way to do it is to write down the latest window that each sequences gave to the latest user and then when you remake the sequences just set the starting value to that. for example dont start the sequence from value=1 but from value=x equals to the latest value given to a client. if you are using wince client through msql you can see the sequences there and their windows.
This is my case:
In 2008, a user had the sequence 6500.
During that time information has been deleted from repository central database.
But now the same sequence, OLITE, has become assigned to another user.
My questions are:
¿OLITE has the ability to assign windows of sequences that have already been used?
¿OLITE should not continue forward in the windows of sequences assigned to users?
we had user a with sequence 1. user a gets deleted.
if we assign user b in sequence 2 then the user b will take a new window because sequence 1 "remembers" the last window it gave. it will not give the same window as it did with the user a so we will NOThave overlapping values and NO pk violation.
we had user a with sequence 1. sequence 1 gets deleted (user a gets deleted or not is irelevant)
we create new sequence 1a same as the old sequence 1 and assign user b. this is a new sequence and it will give windows to the users based on the settings. so will have overlapping values and user b will get the same window as user 1.
if we want to avoid it we simply set the sequence 1a to start in a value larger than the last value sequence 1 gave.
generally:olite sequences give a window only once in their lifetime.olite sequences move forward always and give new windows to users every time it is needed.
for bed time reading:
sequences are in mobileadmin schema->C$ALL_SEQUENCES (all sequences) and C$SEQ_CLIENTS (sequences per user assigned)
be aware that if you force a complete refresh or build a new device for a user, sequences will sometimes rollback, giving overlapping ranges and PK issues (there is a bit of a bug in the way that Oracle lite processes sequences if only some are used/changed during a sync.
Always do a user reset (cut, paste and save a data subsetting parameter is the best way) before building replacement client devices to prevent the problem