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!
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.
IMP\EXP aren't designed for this purpose.
Use a proper backup and restore policy (RMAN) to do what you want.
Assistance is Futile...
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!
eh? did you even read the post
Click Here to Expand Forum to Full Width