Database Reference
In-Depth Information
If you attempt to exclude a user in this manner, an error is thrown. This is because the default mode of export is
SCHEMA level, and Data Pump can't exclude and include a schema at the same time. If you want to exclude a user from
an export file, specify the FULL mode, and exclude the user:
userid=mv_maint/foo
directory=dp_dir
dumpfile=sch.dmp
exclude=schema:"='HEERA'"
full=y
Excluding Statistics
By default, when you export a table object, any statistics are also exported. You can prevent statistics from being
imported via the EXCLUDE parameter. Here is an example:
$ expdp mv_maint/foo directory=dp_dir dumpfile=inv.dmp \
tables=inv exclude=statistics
When importing, if you attempt to exclude statistics from a dump file that didn't originally include the statistics,
then you receive this error:
ORA-39168: Object path STATISTICS was not found.
You also receive this error if the objects in the exported dump file never had statistics generated for them.
Including Only Specific Objects in an Export File
Use the INCLUDE parameter to include only certain database objects in the export file. The following example exports
only the procedures and functions that a user owns:
$ expdp mv_maint/foo dumpfile=proc.dmp directory=dp_dir include=procedure,function
The proc.dmp file that is created contains only the DDL required to recreate any procedures and functions the
user owns.
When using INCLUDE , you can also specify that only specific PL/SQL objects should be exported:
$ expdp mv_maint/foo directory=dp_dir dumpfile=ss.dmp \
include=function:\"=\'IS_DATE\'\"
When you're exporting only specific PL/SQL objects, because of the issue of having to escape quotation marks on
the OS command line, I recommend using a parameter file. When you use a parameter file, this is not a concern. The
following example shows the contents of a parameter file that exports specific objects:
directory=dp_dir
dumpfile=ss.dmp
include=function:"='ISDATE'",procedure:"='DEPTREE_FILL'"
If you specify an object that doesn't exist, Data Pump throws an error but continues with the export operation:
ORA-39168: Object path FUNCTION was not found.
 
Search WWH ::




Custom Search