Re: Oracle 10 + Sun App Server 7: Unique Constraint Violation?!?
Date: Sun, 19 Nov 2006 09:52:26 -0800
Message-ID: <1163958758.36257_at_bubbleator.drizzle.com>
ndamianov wrote:
> Hi All,
>
> For about a week and a half I have been trying to solve a mysterious
> issue with unique constraint violations on our database server without
> any luck.
>
> We basically have a simple table with a unique primary key (number) and
> a few string columns that aren't part of the key.
>
> With J2EE on the Sun App Server 7, we always make sure we get the
> nextval from the table's sequence before inserting it into the table. I
> have checked this numerous times.
>
> The Oracle DB doesn't have any triggers or other procedures accessing
> the table in any way.
>
>>From time to time, we get a bunch of unique constraint key violations
> in spaces of about 30 minutes after which its all good again...
>
> Has anybody heard of this issue or know how to fix it?
>
> Regards,
>
> Nikk
Go to www.psoug.org and click on Morgan's Library Scroll down to DBMS_ERRLOG.
Implement a log and when errors occur next ... trace them back to the value in the sequence.
BTW: When you write "the table's sequence" ... tables don't have sequences. A sequence is completely independent of any table or tables. Be sure something else isn't using the same sequence.
-- Daniel A. Morgan University of Washington damorgan_at_x.washington.edu (replace x with u to respond) Puget Sound Oracle Users Group www.psoug.orgReceived on Sun Nov 19 2006 - 18:52:26 CET