Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: duplicate sequence numbers

Re: duplicate sequence numbers

From: Mike Krolewski <mkrolewski_at_rii.com>
Date: Fri, 09 Feb 2001 03:14:34 GMT
Message-ID: <95vnak$vni$1@nnrp1.deja.com>

In article <95vlc1$tu4$1_at_nnrp1.deja.com>,   dileepr_at_my-deja.com wrote:
> I have been using a d2k developed package for over a year without
> problem but recently I am unable to save transactions where a sequence
> generated "nextval from dual" number has to be inserted into a table.
> Message I get is the number is not unique. I am surprised because
> oracle is supposed to generate unique sequential numbers from any
> sequence. Or am i wrong?
>
> Can somebody please give me the solution?
>
> The funny part is that some inserts go through but most(about 80%)
 fail
> and give a duplicate number message.
>
> Sent via Deja.com
> http://www.deja.com/
>

The sequence number is unique to any user of that number.

However, you can reset the sequence number to new starting value. Or the insert of the sequence does not have to be done -- another piece of code could be setting the number.

First check that the sequence is in fact greater than the largest value in that column. If not reset it to some number above that number ( + 5 ).

If the sequence is not the problem, you need to review the code associated with inserting this record. I recall some code where the code grabbed a sequence number using the cache. The code internally incremented the sequence, then only when it thought it was out requested the next set. The sequence cache was changed and the code of course broke.

--
Michael Krolewski
Rosetta Inpharmatics
mkrolewski_at_rii.com
              Usual disclaimers


Sent via Deja.com
http://www.deja.com/
Received on Thu Feb 08 2001 - 21:14:34 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US