DBAsupport.com Forums - Powered by vBulletin
Results 1 to 8 of 8

Thread: Error in Importing the file

  1. #1
    Join Date
    Oct 2002
    Posts
    109

    Error in Importing the file

    Hi ALL
    I am facing a problem ,Ineed your help:
    #1. When I am importing a .dmp file I am getting the below mentioned message:

    **********************************************************
    connected to: Oracle8i Enterprise Edition Release 8.1.7.0.0 - Production
    With the Partitioning option
    JServer Release 8.1.7.0.0 - Production

    Export file created by EXPORT:V08.01.07 via conventional path
    import done in WE8ISO8859P1 character set and WE8ISO8859P1 NCHAR character set
    . importing JCAST's objects into JCAST
    . . importing table "TBLTXNPDF" 654 rows imported
    . . importing table "TBLTESTPROPERTY" 1450 rows imported
    . . importing table "TBLLABLOCATIONS" 25 rows imported
    . . importing table "TBLSAMPLETYPES" 2 rows imported
    . . importing table "TBLCLIENTMASTER" 4 rows imported
    . . importing table "TBLDIVDEPT" 1524 rows imported
    . . importing table "TBLCOMPANY" 3878 rows imported
    . . importing table "TBLMERCHANT" 2590 rows imported
    . . importing table "TBLTXNDETAIL" 654 rows imported
    IMP-00017: following statement failed with ORACLE error 2261:
    "ALTER TABLE "TBLTXNDETAIL" ADD CONSTRAINT "IDX_TTD_SAMPLENUM" UNIQUE ("SAM"
    "PLENUM") USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 STORAGE(INITIAL 131"
    "072 NEXT 131072 MINEXTENTS 1 MAXEXTENTS 4096 PCTINCREASE 0 FREELISTS 1 FREE"
    "LIST GROUPS 1 BUFFER_POOL DEFAULT) TABLESPACE "USERS" ENABLE "
    IMP-00003: ORACLE error 2261 encountered
    ORA-02261: such unique or primary key already exists in the table
    . . importing table "TBLTESTRESULTS" 5715 rows imported
    About to enable constraints...
    Import terminated successfully with warnings.
    ****************************************

    # 2. I have a unique key "IDX_TTD_SAMPLENUM" on table TBLTXNDETAIL field SAMPLENUM.

    I need help why this error is coming?


    best regards
    praveen

  2. #2
    Join Date
    Jan 2002
    Location
    Up s**t creek
    Posts
    1,525
    Basically IMP is trying to create the unique constraint when it already exists. Use IGNORE=Y to supress these types of warnings.

    Regards
    Jim
    Oracle Certified Professional
    "Build your reputation by helping other people build theirs."

    "Sarcasm may be the lowest form of wit but its still funny"

    Click HERE to vist my website!

  3. #3
    Join Date
    Sep 2001
    Location
    Düsseldorf, Germany.
    Posts
    588
    Either drop this "IDX_TTD_SAMPLENUM" constraint and then import the dump file or while importing set the parameter IGNORE=Y to avoid this error.

  4. #4
    Join Date
    Nov 2002
    Location
    New Delhi, INDIA
    Posts
    1,796
    Not to worry if such error comes :-) its just trying to create whats already there.

    Just run utlrp at the end of import, to be sure that all objects are valid
    Amar
    "There is a difference between knowing the path and walking the path."

    Amar's Blog  Get Firefox!

  5. #5
    Join Date
    Oct 2002
    Posts
    109
    Thanks Jovery
    I have tried the below solution,but still getting the problem.e.g. IGNORE=Y.
    I am sending you the script for creation of the table,Is something wrong with it? pls let me know
    **********************************
    create table tbltxndetail(
    txnid number(10),
    samplenum varchar2(25),
    clientmasterid number(10),
    divdeptid number(10),
    lablocationid number(10),
    clientnum varchar2(50),
    datein date,
    dateout date,
    numofworkingdays varchar2(50),
    rating varchar2(10),
    sampledesc varchar2(300),
    manufacturerid number(10),
    agentid number(10),
    millid number(10),
    merchantid number(10),
    stylenum varchar2(255),
    countryoforigin varchar2(100),
    specnum varchar2(100),
    retest varchar2(3),
    retestsamplenum varchar2(25),
    packagetest varchar2(3),
    sampletypeid number(10),
    reportpdf long raw,
    adddate date,
    modifieddate date,
    username varchar2(56),
    addendum varchar2(3),
    addendumdate date,
    sourceid number(10),
    deleted varchar2(1) not null,
    Constraint tbltxndetail_txnid_pk primary key(txnid),

    Constraint idx_ttd_samplenum unique(samplenum),

    Constraint tbltxndetail_clntmstid_fk FOREIGN KEY (clientmasterid)
    REFERENCES tblclientmaster(clientmasterid),
    Constraint tbltxndetail_lablctid_fk FOREIGN KEY (lablocationid)
    REFERENCES tbllablocations(lablocationid ),
    Constraint tbltxndetail_divdeptid_fk FOREIGN KEY (divdeptid)
    REFERENCES tbldivdept(divdeptid),
    Constraint tbltxndetail_agentid_fk FOREIGN KEY (agentid)
    REFERENCES tblcompany(companyid),
    Constraint tbltxndetail_millid_fk FOREIGN KEY (millid)
    REFERENCES tblcompany(companyid),
    Constraint tbltxndetail_manufid_fk FOREIGN KEY (manufacturerid)
    REFERENCES tblcompany(companyid),
    Constraint tbltxndetail_sampletypeid_fk FOREIGN KEY (sampletypeid)
    REFERENCES tblsampletypes(sampletypeid),
    Constraint tbltxndetail_merchantid_fk FOREIGN KEY (merchantid)
    REFERENCES tblmerchant(merchantid));
    *************************************


    Originally posted by jovery
    Basically IMP is trying to create the unique constraint when it already exists. Use IGNORE=Y to supress these types of warnings.

    Regards
    Constraint idx_ttd_samplenum unique(samplenum),

  6. #6
    Join Date
    Oct 2002
    Posts
    109
    Thanks Samir
    I have tried the below solution,
    when I drop this "IDX_TTD_SAMPLENUM" constraint it will work but when I do IGNORE=Y.I am getting the same error.
    Samir can you help me in understanding this :
    I am sending you the script for creation of the table,Is something wrong with it? pls let me know
    **********************************
    create table tbltxndetail(
    txnid number(10),
    samplenum varchar2(25),
    clientmasterid number(10),
    divdeptid number(10),
    lablocationid number(10),
    clientnum varchar2(50),
    datein date,
    dateout date,
    numofworkingdays varchar2(50),
    rating varchar2(10),
    sampledesc varchar2(300),
    manufacturerid number(10),
    agentid number(10),
    millid number(10),
    merchantid number(10),
    stylenum varchar2(255),
    countryoforigin varchar2(100),
    specnum varchar2(100),
    retest varchar2(3),
    retestsamplenum varchar2(25),
    packagetest varchar2(3),
    sampletypeid number(10),
    reportpdf long raw,
    adddate date,
    modifieddate date,
    username varchar2(56),
    addendum varchar2(3),
    addendumdate date,
    sourceid number(10),
    deleted varchar2(1) not null,
    Constraint tbltxndetail_txnid_pk primary key(txnid),

    Constraint idx_ttd_samplenum unique(samplenum),

    Constraint tbltxndetail_clntmstid_fk FOREIGN KEY (clientmasterid)
    REFERENCES tblclientmaster(clientmasterid),
    Constraint tbltxndetail_lablctid_fk FOREIGN KEY (lablocationid)
    REFERENCES tbllablocations(lablocationid ),
    Constraint tbltxndetail_divdeptid_fk FOREIGN KEY (divdeptid)
    REFERENCES tbldivdept(divdeptid),
    Constraint tbltxndetail_agentid_fk FOREIGN KEY (agentid)
    REFERENCES tblcompany(companyid),
    Constraint tbltxndetail_millid_fk FOREIGN KEY (millid)
    REFERENCES tblcompany(companyid),
    Constraint tbltxndetail_manufid_fk FOREIGN KEY (manufacturerid)
    REFERENCES tblcompany(companyid),
    Constraint tbltxndetail_sampletypeid_fk FOREIGN KEY (sampletypeid)
    REFERENCES tblsampletypes(sampletypeid),
    Constraint tbltxndetail_merchantid_fk FOREIGN KEY (merchantid)
    REFERENCES tblmerchant(merchantid));
    *************************************

    Originally posted by Sameer
    Either drop this "IDX_TTD_SAMPLENUM" constraint and then import the dump file or while importing set the parameter IGNORE=Y to avoid this error.

  7. #7
    Join Date
    Nov 2002
    Location
    New Delhi, INDIA
    Posts
    1,796
    Originally posted by adewri
    Not to worry if such error comes :-) its just trying to create whats already there.

    Just run utlrp at the end of import, to be sure that all objects are valid
    u just missed this
    Amar
    "There is a difference between knowing the path and walking the path."

    Amar's Blog  Get Firefox!

  8. #8
    Join Date
    Sep 2001
    Location
    Düsseldorf, Germany.
    Posts
    588
    Originally posted by prav_saras

    I am sending you the script for creation of the table,Is something wrong with it? pls let me know
    I don't see anything wrong in your table script hpoing that all references tables exists in your database.

    Now about your problem:

    You are trying to import existing table, so while importing if you don't specify IGNORE=Y parameter, it will fail by giving error "object already exists". If the table structure in dump file is same as what you are creating, then either don't create table of specify IGNORE=Y parameter, so that it will just import the rows from the dump file.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  


Click Here to Expand Forum to Full Width