Import existing table in schema
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 7 of 7

Thread: Import existing table in schema

  1. #1
    Join Date
    Aug 2007
    Posts
    54

    Import existing table in schema

    Hi, do i need to drop the table first, then import it in schema. Does oracle overwrites the table if not dropped.

  2. #2
    Join Date
    Dec 2001
    Location
    Tel-Aviv,Israel
    Posts
    233
    Hi,

    You don't need to drop the table before the import.
    Use the option "IGNORE=Y" in the import command.

    Nir

  3. #3
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,333
    but it will try to put all the data in, so you have to sort our your data issues

  4. #4
    Join Date
    Mar 2007
    Location
    Ft. Lauderdale, FL
    Posts
    3,554
    You can either drop your table or truncate it. In the second case use ignore=y option as appointed by Nir.
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.

  5. #5
    Join Date
    Aug 2007
    Posts
    54

    Import existing table in schema


    If I import the table, the message is import terminated successfully with warnings. And when i query the table I don't get the table data(old data) present in the imported file. when I have tried with ignore=y option, it gives error as unique constraint voilated, import terminated successfully with warnings. And when i query the table, it is not updated with imported data.

    Your kind help is highly appreciated.

  6. #6
    Join Date
    Aug 2007
    Posts
    54

    Import existing table in schema

    Quote Originally Posted by nir_s
    Hi,

    You don't need to drop the table before the import.
    Use the option "IGNORE=Y" in the import command.

    Nir
    Dear Nir, if i don't drop the table, the table is not updating with the imported data. The table is referenced by foreign keys. I tried with ignore=y options, this also not working.

  7. #7
    Join Date
    Mar 2007
    Location
    Ft. Lauderdale, FL
    Posts
    3,554
    You do not update a table doing an import. Import will try to insert every single row it finds in the dump file into the affected table.

    Now you added a valuable piece of information... you have Referential Integrity constraints involving that table.

    Are you sure you want to import "only" that table?... are you sure you are gonna get a RI consistent environment after that?

    If you do, you have to deal with RI constraints; disable them... import... enable them.

    Once you have your constraints disabled... what part of You can either drop your table or truncate it. In the second case use ignore=y option as appointed by Nir is not clear to you?
    Pablo (Paul) Berzukov

    Author of Understanding Database Administration available at amazon and other bookstores.

    Disclaimer: Advice is provided to the best of my knowledge but no implicit or explicit warranties are provided. Since the advisor explicitly encourages testing any and all suggestions on a test non-production environment advisor should not held liable or responsible for any actions taken based on the given advice.

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