This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
I am having this issue where the sequence in oracle is different from the value that Lightspeed reads. Does it have anything to do with the IdentityBlockSize? Right now, I have set the IdentityBlockSize to 1 and it is getting the wrong value from the sequence. The worst thing is that when I deployed my web application on the client's environment, Lightspeed seems to read the same value from a sequence over and over again (This happens only in for one sequence). I don't understand why this is happening, even though I can see the sequence number getting updated. In addition, I don't understand why the block size would affect the value that Lightspeed is getting from a sequence. Any thoughts? |
|
|
If the IdentityBlockSize and the INCREMENT BY amount are different,
then the first value read from the sequence will be different from the
sequence value. This is because LightSpeed selects the first value by
doing a select nextval from the sequenceand then subtracting the IdentityBlockSize (because we can't query for the current value, only the next value). This will be benign as long as the IdentityBlockSize is less than the INCREMENT BY amount. Could this explain what you're seeing? If not could you provide more specific details about the sequence definition, the values you are expecting to see and the actual values that LightSpeed reads? The repeated reads of the same value problem is more troubling. If you can reproduce this in your test environment, could you put a logger on it (unitOfWork.Context.Logger = new TraceLogger(), and possibly unitOfWork.Context.VerboseLogging = true) and capture the SQL that LightSpeed is generating to query the sequence please? Could you also let us know the current value of the sequence, the value that is getting read, the IdentityBlockSize and the sequence INCREMENT BY value? Thanks! |
|
|
The second issue is more troubling to me. It is OK if the sequences are off by 1 or 2, as long as they are read consistently. However, that does not seem to be the case. I will check with the client tomorrow and see if I can figure out what it is going on. |
|