Sequences [message #52256] |
Thu, 11 July 2002 02:59 |
la_fouine
Messages: 4 Registered: July 2002
|
Junior Member |
|
|
Hi there !
Here's my problem : I have 3 PL/SQL programms running in parrallel and analyzing a file in order to load data in a table. I access a sequence, the same in the three progs defined before starting them, in order to identify my lines.
The surprinsing thing is that I have holes in the column my sequence updates : the sequence seems to "jump" from a number to another. What's wrong with that ?
|
|
|
Re: Sequences [message #52259 is a reply to message #52256] |
Thu, 11 July 2002 05:23 |
christopher
Messages: 25 Registered: September 2000
|
Junior Member |
|
|
your sequence number keeps jumping becuase if you are using seq_name.nextval, it is always going to generate a unique number. Since you are running 3 programs referencing the same sequence, prog 1 grabs #1, prog 2 grabs #2, prog 3 grabs #3, then prog 1 grabs #4, prog 2 grabs #5, prog 3 grabs #6, etc.
If you do not want this to happen, then you need to either run the programs sequentially (1 after the other) or create a sequence for each program.
|
|
|