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: migration

RE: migration

From: Stephen Lee <Stephen.Lee_at_DTAG.Com>
Date: Tue, 18 Mar 2003 06:44:03 -0800
Message-ID: <F001.0056C6AD.20030318064403@fatcity.com>

An ora 1452 error says there are duplicate keys, hence you can't create a unique key. If it is a known, death be unto me if I am wrong, 100% fact that the unique key was valid in the original data, the first question I would ask is: Was this an import that is being run with commit=y ignore=y, aborted, then restarted without truncating the data? In a case like that, you would get duplicate rows.

If that is not the case, you could try creating an EXCEPTIONS table using the ?/rdbms/admin/utlexcpt.sql script. Then try to add the unique constraint using the extra clause: "exceptions into exceptions". The exceptions table will have the rowid's of the offending rows. You can then: select a,b,c,etc. from your_table where rowid in (select row_id from exceptions);

> -----Original Message-----
>
> IMP-00017: following statement failed with ORACLE error 1452:
> "CREATE UNIQUE INDEX "TTIITM009001$IDX1" ON "TTIITM009001" ....
>

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Stephen Lee
  INET: Stephen.Lee_at_DTAG.Com

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: ListGuru_at_fatcity.com (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 Mar 18 2003 - 08:44:03 CST

Original text of this message

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