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

Home -> Community -> Mailing Lists -> Oracle-L -> RE: unique constraint violation problem

RE: unique constraint violation problem

From: Rudy Zung <rzung_at_printcafe.com>
Date: Tue, 08 Jul 2003 09:15:52 -0700
Message-ID: <F001.005C3DE7.20030708090437@fatcity.com>

Unique constraints can be disabled and enabled; there is no facility to disable a unique index besides dropping the unique index, which means that when you want to "re-enable" a unique index, you will have to rebuild it again, which means that you would need to know what columns make up the index.

When a constraint is disabled, it will still show up in USER_CONSTRAINTS, letting you know that perhaps something may need to be fixed; when an index is dropped, unless you have another mechanism for tracking indexes, you won't know that you're missing an index.

-----Original Message-----
Sent: Tuesday, July 08, 2003 10:09 AM
To: Multiple recipients of list ORACLE-L

Thanks for all of you who replied the message. I apologize for not explaining the problem clearer. Actually, the error was reported at 13:35:13pm from the application. There is a column called date_created in the table that records what time the record was created. The value of date_created for the record that caused error message is the same as reported from application. That's why I said that the record was inserted into the table successfully.

I know Oracle recommends that we do not explicitly define unique indexes on tables. Why?

Anna

>From: "Jacques Kilchoer" <[EMAIL PROTECTED]>
>Reply-To: [EMAIL PROTECTED]
>To: Multiple recipients of list ORACLE-L <[EMAIL PROTECTED]>
>Subject: RE: unique constraint violation problem
>Date: Mon, 07 Jul 2003 12:59:25 -0800
>
>My explanation would be that the record was NOT inserted successfully into
>the table. Proof of that would be that there are no duplicate records in
>the table.
>
> > -----Original Message-----
> > From: Anna Li [mailto:[EMAIL PROTECTED]
> >
> > I created a unique index on a table called REGISTRATION_K,
> > but no unique
> > constraint. Last week when the application tried to insert a
> > record into
> > the table, we got following error in the log file:
> >
> > Oracle::st execute failed: ORA-00001: unique constraint
> > (REGISTRATION_K)
> > violated
> >
> > However, the record was inserted into the table successfully.
> > There are no
> > duplicate records in the table. Could anyone explain why?
> >
> > Any input will be highly appreciated. Thanks in advance.
>--
>Please see the official ORACLE-L FAQ: http://www.orafaq.net
>--
>Author: Jacques Kilchoer
> INET: [EMAIL PROTECTED]
>
>Fat City Network Services -- 858-538-5051 http://www.fatcity.com
>San Diego, California -- Mailing list and web hosting services
>---------------------------------------------------------------------
>To REMOVE yourself from this mailing list, send an E-Mail message
>to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
>the message BODY, include a line containing: UNSUB ORACLE-L
>(or the name of mailing list you want to be removed from). You may
>also send the HELP command for other information (like subscribing).
>



MSN 8 with e-mail virus protection service: 2 months FREE* http://join.msn.com/?page=features/virus
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Anna Li
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Rudy Zung
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Tue Jul 08 2003 - 11:15:52 CDT

Original text of this message

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