I'm trying to impdp a schema with just one table on it. The impdp parfile looks like this:
LOGFILE=scott_impdp.log
DUMPFILE=scott.dmp
SCHEMAS=scott
REMAP_SCHEMA=scott:scott2
REMAP_TABLESPACE=scott:scott2
EXCLUDE=grant
PARALLEL=8
CLUSTER=N
TRANSFORM=disable_archive_logging:Y
However, I'm getting these errors:
ORA-39002: invalid operation
ORA-39168: Object path GRANT was not found.
If I'm not mistaken, EXCLUDE=grant is valid syntax according to https://docs.oracle.com/database/121/SUTIL/GUID-DC7668E1-C846-48C5-A0D5-F4659EC119BB.htm#SUTIL911
From that link:
Specifying EXCLUDE=GRANT excludes object grants on all object types and system privilege grants.
Removing EXCLUDE=grant
seems to work, but why would that break the impdp in the first place?
EDIT:
My expdp parfile looks like this:
LOGFILE=scott_expdp.log
DUMPFILE=scott.dmp
SCHEMAS=scott
PARALLEL=8
CLUSTER=N
COMPRESSION=ALL
FLASHBACK_TIME=systimestamp
REUSE_DUMPFILES=Y
EXCLUDE=statistics
Best Answer
This happened because you specified
EXCLUDE=GRANT
on export as well.This is expected behavior - according to Oracle.
The workaround is to not specify the same
EXCLUDE
inexpdp
andimpdp
.See the below (with support access):
DataPump Import (IMPDP) Fails With ORA-39168 (Doc ID 430702.1)
I have just tested this on version 18c and 19c as well, in those newer versions it worked fine without any error.