0% found this document useful (0 votes)
942 views2 pages

ORA-00001: Unique Constraint Violated: XXX NNNNN XXX NNNNN

This document describes the ORA-00001 error in Oracle databases. ORA-00001 indicates that a unique constraint has been violated, meaning an attempt was made to insert a duplicate value into a column with a unique index. To resolve it, the duplicate row must be removed or the unique index changed to allow duplicates. The error provides the name of the violated constraint but not the table, so additional queries may be needed to identify the specific table and index.

Uploaded by

Ilidio Abreu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
942 views2 pages

ORA-00001: Unique Constraint Violated: XXX NNNNN XXX NNNNN

This document describes the ORA-00001 error in Oracle databases. ORA-00001 indicates that a unique constraint has been violated, meaning an attempt was made to insert a duplicate value into a column with a unique index. To resolve it, the duplicate row must be removed or the unique index changed to allow duplicates. The error provides the name of the violated constraint but not the table, so additional queries may be needed to identify the specific table and index.

Uploaded by

Ilidio Abreu
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOC, PDF, TXT or read online on Scribd
You are on page 1/ 2

http://xoopscube.com.br/modules/php/function.ora-error.

html
Descrio
string ora_error ( resource cursor_or_connection )
Retorna uma mensagem de erro no formato XXX-NNNNN onde XXX onde ocorreu o erro e
NNNNN identifica a mensagem de erro.
Nota: Suporte para conexo ids foi adicionado na verso 3.0.4.
Em verses !"#$ do %rac&e' voc( pode procurar deta&)es so*re uma mensagem de erro
como essa+ $ oerr ora 00001 00001, 00000, "unique constraint (%s.%s) violated"
// *Cause: An update or insert statement attempted to insert a duplicate
e! // "or #rusted $%AC&' con(i)ured in *+,- ,AC mode, !ou ma! see // t.is
messa)e i( a duplicate entr! e/ists at a di((erent level. // *Action: 'it.er
remove t.e unique restriction or do not insert t.e e!
http://ora-00001.ora-code.com/
ORA-00904: string: invalid identifier
Cause: The column name entered is either missing or invalid.
Action: Enter a valid column name. A valid column name must begin with a letter, be less than or equal to 30 characters, and
consist of only alphanumeric characters and the special characters , !, and ". #f it contains other characters, then it must
be enclosed in double quotation mar$s. #t may not be a reserved word.
http://www.cryer.co.uk/brian/oracle/ORA00001.htm
ORA-00001: unique constraint violated
Symptom:
,)en inserting or updating data' t)e fo&&o-ing error is returned+
$%A000001: unique constraint violated (1sc.ema2.1constraint2)
ause:
.)is error means t)at an attempt )as *een made to insert a record
-it) a dup&icate (uni/ue) 0e1. .)is error -i&& a&so *e generated if an
existing record is updated to generate a dup&icate (uni/ue) 0e1.
.1pica&&1 t)is is a dup&icate primar1 0e1' *ut it need not *e t)e
primar1 0e1.
Remedy:
%n&1 one of t)e fo&&o-ing -i&& *e appropriate+
o Remove t)e uni/ue restriction.
o 2)ange t)e restriction to a&&o- dup&icate 0e1s. 3n index cou&d
*e c)anged to *e a non-uni/ue index' *ut remem*er t)at t)e
primar1 0e1 must a&-a1s *e uni/ue.
o 4o not insert t)e dup&icate 0e1.
!sua&&1 t)is error indicates an app&ication error or error on t)e part of
t)e user.
.)e error gives t)e name of t)e constraint t)at )as *een vio&ated' *ut
not t)e name of t)e ta*&e. .o identif1 t)e ta*&e and find out a&& t)e
re&evant information a*out t)e index it is norma&&1 easiest to use
%rac&e Sc)ema 5anager - t)e name of t)e constraint given in t)e
error -i&& matc) -it) t)e name of t)e corresponding index.
3&ternate&1' to identif1 t)e name of t)e ta*&e use+
select ta3le4name (rom all4inde/es 5.ere inde/4name671inde/0name278
t)is vie- (6all4inde/es6) a&so contains some ot)er information a*out
t)e index' suc) as its uni/ueness.
and to identif1 t)e fi&es t)at toget)er constitute t)e index+
select * (rom all4ind4columns 5.ere inde/4name671inde/0name278

You might also like