I have been given a DMP data pump export file to import into my local Oracle instance. I've tried running this command line:
impdp full=Y directory=DATA_PUMP_DIR dumpfile=MyDumpFile.dmp logfile=import.log
I get the errors:
ORA-31655: no data or metadata objects selected for job
ORA-39154: Objects from foreign schemas have been removed from import
And no data is imported.
From what I've Googled, one possible cause of this is that I need to specify remap_schama
. But I have no idea what the name is of the schema in the dmp file. Any easy way to find out?
EDIT: I didn't find a solution to this question, but I did find a workaround… I tracked down the guy who made the DMP, and beat got the schema name out of him. Specified remap_schema
according to his definition, and Hey Presto!
Best Answer
Use the
sqlfile=
parameter ofimpdp
to generate a file containing all of the DDL/DML in the dump.For example:
Looking for
CREATE USER
DDL statements in the file should show you what schemas are needed in order to perform an import.For example, from my test dump:
The only drawback is that if the .dmp file is large the resulting SQL dump will be huge.