Skip to Main Content

Breadcrumb

Question and Answer

Chris Saxon

Thanks for the question, Ralf.

Asked: February 15, 2018 - 7:44 am UTC

Last updated: February 15, 2018 - 11:07 am UTC

Version: Oracle Database 12c Release 12.1.0.1.0 - 64bit Production

Viewed 1000+ times

You Asked

Hi,

I want to transfer data between test systems, version is Oracle Database 12c Release 12.1.0.1.0 - 64bit Production.

I wrote scripts for a full export and import (expdp/impdp)

When importing I get many errors because objects do not exist or already exist. A database is present before the import but should be totally replaced with ther import.

What do I need to delete on the target system to hace a clean import (full expdp-impdp?

Regards
Ralf

and Chris said...

To deal with existing objects, you've got a couple of options:

- Drop the users yourself before running the import
- Set the TABLE_EXISTS_ACTION parameter to REPLACE. Note you may need to disable foreign keys before hand for this to work.

https://docs.oracle.com/en/database/oracle/oracle-database/12.2/sutil/datapump-import-utility.html#GUID-C9664F8C-19C5-4177-AC20-5682AEABA07F

For objects do not exist errors ensure these are in the file you're trying to import!

Is this answer out of date? If it is, please let us know via a Comment

More to Explore

Data Pump

All of the database utilities including Data Pump are explained in the Utilities guide.