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: Export/Import issue.

RE: Export/Import issue.

From: Mercadante, Thomas F <thomas.mercadante_at_labor.state.ny.us>
Date: Wed, 24 Dec 2003 11:09:25 -0800
Message-ID: <F001.005DB06C.20031224110925@fatcity.com>


Avnish,

Are you absolutely sure that the target table is either gone before the import, or empty? You should not be getting a unique constraint violation if the table does not exists before import.

The step that Oracle import follows for importing is: Create the table
import the data
create constraints
create triggers
apply grants.

If you are getting a unique constraint violation during import, then the constraints exist before the table is being imported which leads me to believe everthing is not as clean as you think. Either that, or the uniqe constraint in the source database has been disabled, and you have bad data.

Make sure you drop the target table before you start the import. And look at the source data table's constraints to make sure they are all enabled.

Good Luck!

Tom Mercadante
Oracle Certified Professional

-----Original Message-----
[mailto:Avnish.Rastogi_at_providence.org]
Sent: Wednesday, December 24, 2003 1:44 PM To: Multiple recipients of list ORACLE-L

I am trying to export a table from one database to another. Table in target database is dropped before importing and is being created as part of import process. During import process data Oracle is complaining Unique constraint violated and throwing out following messages. Its complaining on index abhset1 which is on columns [asset, book, yr_end_date]. I tried to compare data in source and target. Somehow yr_end_date for year 2003 is changing to 2002 while importing data. Table doesnt have any triggers. Indexes in both source and target are same. Table definition is exactly same and created during import. Tried to export 2-3 times but same result. Anybody ran into this issue before. How should I approach to troubleshoot. Thanks

Error Message
Column 1 101536
Column 2 SL
Column 3 5
Column 4 31-DEC-2002:00:00:00
Column 5 53.29
Column 6 0
Column 7 4.84
Column 8 96
Column 9 01-JAN-1700:00:00:00

IMP-00019: row rejected due to ORACLE error 1
IMP-00003: ORACLE error 1 encountered
ORA-00001: unique constraint (LDDEV.ABHSET1) violated
Column 1 101537
Column 2 SL
Column 3 5
Column 4 31-DEC-2002:00:00:00
Column 5 38.75
Column 6 0
Column 7 4.84
Column 8 96
Column 9 01-JAN-1700:00:00:00
IMP-00019: row rejected due to ORACLE error 1
IMP-00003: ORACLE error 1 encountered
ORA-00001: unique constraint (LDDEV.ABHSET1) violated


Data in Source
     ASSET BOOK          COMPANY YR_END_DA   DEPR_YTD   DEPR_LTD
BEG_DEPR_LTD       LIFE METH_SW_D

---------- ---------- ---------- --------- ---------- ---------- ------------ ---------- ---------
    101536 SL                  5 31-DEC-02       4.84          0
0         96 01-JAN-00
    101536 SL                  5 31-DEC-03      53.29          0
4.84         96 01-JAN-00

     ASSET BOOK          COMPANY YR_END_DA   DEPR_YTD   DEPR_LTD
BEG_DEPR_LTD       LIFE METH_SW_D

---------- ---------- ---------- --------- ---------- ---------- ------------ ---------- ---------
    101537 SL                  5 31-DEC-02       4.84          0
0         96 01-JAN-00
    101537 SL                  5 31-DEC-03      38.75          0
4.84         96 01-JAN-00

Data in Target.

     ASSET BOOK          COMPANY YR_END_DA   DEPR_YTD   DEPR_LTD
BEG_DEPR_LTD       LIFE METH_SW_D

---------- ---------- ---------- --------- ---------- ---------- ------------ ---------- ---------
    101536 SL                  5 31-DEC-02       4.84          0
0         96 01-JAN-00

     ASSET BOOK          COMPANY YR_END_DA   DEPR_YTD   DEPR_LTD
BEG_DEPR_LTD       LIFE METH_SW_D

---------- ---------- ---------- --------- ---------- ---------- ------------ ---------- ---------
    101537 SL                  5 31-DEC-02       4.84          0
0         96 01-JAN-00

--

Please see the official ORACLE-L FAQ: http://www.orafaq.net
--

Author: <Avnish.Rastogi_at_providence.org
  INET: Avnish.Rastogi_at_providence.org
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).
--

Please see the official ORACLE-L FAQ: http://www.orafaq.net
--

Author: Mercadante, Thomas F
  INET: thomas.mercadante_at_labor.state.ny.us
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 Wed Dec 24 2003 - 13:09:25 CST

Original text of this message

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