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

Thread: IMPORT PROBLEM

  1. #1
    Join Date
    Sep 2001
    Posts
    9
    hi,

    i'm trying to restore a table from a dump file. whenever i do, i get the error...

    IMP-00015: following statement failed because the object already exists

    according to the documentation in oracle, the way to bypass this error is to set IGNORE=Y. my question is, if ever i do that, how will i know if it will only restore that particular table that i want and it didn't corrupt any of my other tables/indexes?


    thanks

  2. #2
    Join Date
    Apr 2001
    Posts
    108

    Table level import

    It's simple. Do a table level import rather than a full import and Oracle will only import the table you select. Of course you need to know your data and any parent/child relationships that might exist.
    Eric Hanson

    There are 10 types of people in the world:

    Those who understand binary and those who don't!

  3. #3
    Join Date
    Sep 2001
    Posts
    9
    thanks for the reply...

    i don't really know if this is what you mean by a table level import. but this is what i do...

    Enter table or partition names. Null list means all tables for user: TEST_TABLE
    Enter table or partition name or . if done:.

    i think i'm doing it right. but right after i press enter and it starts to do the import, i get a bunch of errors on creating some other indexes or system files.

    since i dropped the table, it should somehow try to recreate it first before importing the data, right? but TEST_TABLE isn't even in the errors that i get.




  4. #4
    Join Date
    Jan 2001
    Posts
    3,134
    I always prefer a parfile for imp/exp.

    Ex..

    FILE= path to dump file (D:\ora\blah.dmp)
    LOG= path to logfile for import )D:\ora\table.log)
    FROMUSER= Owner of exported table
    TOUSER= Owner of target table
    TABLES=(table_name) Do not prefix with owner name!
    BUFFER=100000 (This depends on table and RBS size)
    COMMIT=Y
    IGNORE=Y

    Then do import as...
    D:\hanky imp parfiel=I_PUKE.PAR

    MH
    I remember when this place was cool.

  5. #5
    Join Date
    Apr 2002
    Posts
    291
    Hanky is correct. It's always safer and better to use a par file for imp/exp. Just add a feature Tables=(table_name) in your import script with all other attributes, like FROMUSER,TOUSER,FILE,LOG etc.. You will definitely get it.

    thanks
    PNRDBA

  6. #6
    Join Date
    Sep 2001
    Posts
    9
    how exactly do you do a parfile? is it like a standard way of backing up tables?

  7. #7
    Join Date
    Feb 2000
    Location
    Washington DC
    Posts
    1,843
    par file is nothing but a parameter file (text file)where you list all your import/export parameters and you give that filename at the export/import command prompt instead of listing all the parameters. see below

    $exp userid/passwd parfile=xyz.par

    where xyz.par is text file which holds parmeters and values.

    xyz.par
    ---------
    FILE= path to dump file (D:\ora\blah.dmp)
    LOG= path to logfile for import )D:\ora\table.log)
    FROMUSER= Owner of exported table
    TOUSER= Owner of target table
    TABLES=(table_name) Do not prefix with owner name!
    BUFFER=100000 (This depends on table and RBS size)
    COMMIT=Y
    IGNORE=Y

    Reddy,Sam

  8. #8
    Join Date
    Jan 2001
    Posts
    3,134
    The other benefits to a parfile are..

    You will have a record of what you exported/imported and where you stored the dump files.

    By specifying a LOG= you will be able to review any errors (hopefully none) that the export/import generated. Plus you can look back in 5 months and see exactly what is in you "long_forgotten_mystery.DMP" file, trust me on this one.

    You can name them .par or .txt, it really does not matter, for simplicity sake use .par.

    MH
    I remember when this place was cool.

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