Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Urgent-ORA0001 Unique COnstraint
Well, the error message should give you the name of the constraint or index causing the problem:
ORA-00001: unique constraint (OWNER.NAME) violated
OWNER = index or constraint owner
NAME = index or constraint name
If you don't get the full error message, look for unique indexes / constraints on the table:
select a.owner, a.constraint_name, a.constraint_type, b.column_name
from dba_constraints a, dba_cons_columns b
where
a.owner = '&table_owner'
and a.table_name = '&table_name' and a.constraint_type in ('P', 'U') and b.owner = a.owner and b.constraint_name = a.constraint_nameorder by a.owner, a.constraint_name, b.position ; select a.owner, a.index_name, a.index_type, b.column_name from dba_indexes a, dba_ind_columns b
and a.table_name = '&table_name' and a.uniqueness = 'UNIQUE' and b.index_owner = a.owner and b.index_name = a.index_name
If that still doesn't solve the problem, then you need to start looking at triggers on the table to see if they are causing the error.
De : oracle-l-bounce_at_freelists.org [mailto:oracle-l-bounce_at_freelists.org] De la part de Sanjay Mishra
Envoyé : mardi, 6. mars 2007 11:50
À : oracle-l_at_freelists.org
Objet : Urgent-ORA0001 Unique COnstraint
Hi
I had to load some big data into the table and it has a composite Primary Key. I had disabled the Primary Key and when trying to insert the data, it is still failing with the Constraint violation
Thanks
Don't get soaked. Take a quick peek at the forecast <http://tools.search.yahoo.com/shortcuts/?fr=oni_on_mail&#news> with theYahoo! Search weather shortcut. <http://tools.search.yahoo.com/shortcuts/?fr=oni_on_mail&#news>
-- http://www.freelists.org/webpage/oracle-lReceived on Tue Mar 06 2007 - 16:53:33 CST
![]() |
![]() |