Avoid already existing objects when importing into Oracle

impdporacleoracle-11g-r2

I need help with impdp. I have taken a backup with:

expdp system/pw@orcl full=y directory=abc dumpfile=full.dmp

Now I need to import the dump into another instance, which has recently been created. I was going to import the full database dump, but it raises an error when an object already exists.

However, these objects belong to Oracle's default schemas, which I can not remove. How do I avoid these import errors?

Best Answer

Exclude the schemas with the exclude parameter. E.g:

EXCLUDE=SCHEMA:\"IN\(\'SYS\',\'SYSTEM\',\'OUTLN\',\'ORDDATA\',\'OLAPSYS\',\'MDDATA\',\'SPATIAL_WFS_ADMIN_USR\',\'ANONYMOUS\',\'SPATIAL_CSW_ADMIN_USR\',\'ANONYMOUS\',\'FLOWS_FILES\',\'APEX_PUBLIC_USER\',\'APEX_030200\',\'OWBSYS\',\'OWBSYS_AUDIT\',\'SCOTT\',\'SYSMAN\',\'MGMT_VIEW\'\)\"

The list of schemas depends on the database version and options installed.

In a parameterfile, you can use the above without \ (escaping special characters).