How to use IMPORT to REPLACE data and objects
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 6 of 6

Thread: How to use IMPORT to REPLACE data and objects

Hybrid View

  1. #1
    Join Date
    May 2007
    Posts
    2

    How to use IMPORT to REPLACE data and objects

    Is it possible to carry out an import where the target tables (and other objects) are over-written?

    Here's what I need to do --

    I have two databases (9iR2) running on my machine. I have taken an export from db1 and I want to import it to db2. However if I try to do this the data in db2 is not REPLACED, instead the imported data is ADDED to db2 and therefore the data is duplicated. What I want to do is to replace the data in db2 (essentially recreate all the objects and return the db to its original state). Is it possible to do this (using IMP or any other oracle tool)?

    [db1 and db2 are structurally identical, i.e. tablespaces, datafiles, users, etc. The difference is in the actual data (and obviously the database and instance names). I mainly use db1 for query only and db2 for testing (so that the data in db2 has changed considerably). This is why I want to replace the changed (“corrupted”) data in db2 using the db1 dump. ]

    Any help or advice will be much appreciated!

    Thank you!

  2. #2
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,333
    no

  3. #3
    Join Date
    May 2007
    Posts
    2

    any other alternatives to IMP?

    Thanks for your reply. Can you tell me if there are other ways of doing what I've explained? I think I can use RMAN to take a backup of db1 and restore this to db2 but I think this would be very tedious.

    Thanks.

  4. #4
    Join Date
    Jul 2002
    Location
    Northampton, England
    Posts
    612
    IMP\EXP aren't designed for this purpose.

    Use a proper backup and restore policy (RMAN) to do what you want.
    Assistance is Futile...

  5. #5
    Join Date
    Nov 2001
    Posts
    335
    Truncate tables prior to the import and data will be replaced.
    One, who thinks that the other one who thinks that know and does not know, does not know either!

  6. #6
    Join Date
    Sep 2002
    Location
    England
    Posts
    7,333
    eh? did you even read the post

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