Suppose I want to export
- Views named V1, V2
- Functions named f1, f2
- Procedures named p1, p2
Tables named T1, T2
username : system
- password : manager sid /
- schema : DB3
So I fire command on CMD as follow,
(1) expdp system/manager@DB3 directory=backupdir dumpfile=backup.dmp logfile=backup.log include=view:"IN ('V1','V2')", function:"IN ('f1','f2')", procedure:"IN ('p1','p2')", table:"IN ('T1','T2')"
(2) expdp system/manager@DB3 directory=backupdir dumpfile=backup.dmp logfile=backup.log include=view:"IN ('V1','V2')" include=function:"IN ('f1','f2')" include=procedure:"IN ('p1','p2')" include=table:"IN ('T1','T2')"
These both commands are not working:
Error : ORA-39071: Value for INCLUDE is badly formed.
Following command works but it exports specified Tables only. It doesn't export views, procedures and functions.
(3) expdp system/manager@DB3 directory=backupdir dumpfile=backup.dmp logfile=backup.log include=view,procedure,function,table:"IN ('T1','T2')"
What to do?
The command line doesn't like the quote marks. There are two ways to handle this.
The first is to escape the quotes:
If that seems tedious (and it is) the second option would be to define a parameter file. You can include all your options in that, without escaping the quotes, and just run
expdp
with the PARFILE parameter.That's really a new question, but the solution is straightforward enough: you need to run
impdp
with the REMAP_SCHEMA parameter which takessource_schema:target_schema
. So in your case that would be