Expdp Backup
Expdp backup is the logical backup. It will take out the ddl commands and data from the tables.
It is highly used backup.
When you got the following error, its means you are running taking backup of that user which is not exists in current database when you try to import this expdp will generate the following error:
ORA-31655: no data or metadata objects selected for job
ORA-39154: Objects from foreign schemas have been removed from import
Solution:
You need to import the object of that schema into another schema. For this you need to use additional parameter in expdp command remap_schema-<oldschemaname>:<newschemaname>
<oldschemaname> means from which schema backup is taken.
<newschemaname> means inwhich you need to insert the data.
Use remap schema and import with sys or system user;
impdp directory=dbbackup remap_schema=scott:remap_test dumpfile=expdump.dmp logfile=impdump.log