Database Reference
In-Depth Information
Exporting Table, Index, Constraint, and Trigger DDL
Suppose you want to export the DDL associated with tables, indexes, constraints, and triggers in your database. To do
this, use the FULL export mode, specify CONTENT=METADATA_ONLY , and only include tables:
$ expdp mv_maint/foo directory=dp_dir dumpfile=ddl.dmp \
content=metadata_only full=y include=table
When you export an object, Data Pump also exports any dependent objects. So, when you export a table, you also
get indexes, constraints, and triggers associated with the table.
Excluding Objects from Import
In general, you can use the same techniques used to filter objects in exports to exclude objects from being imported.
Use the EXCLUDE parameter to exclude objects from being imported. For example, to exclude triggers and procedures
from being imported, use this command:
$ impdp mv_maint/foo dumpfile=inv.dmp directory=dp_dir exclude=TRIGGER,PROCEDURE
You can further refine what is excluded by adding an SQL clause. For example, say you want not to import triggers
that begin with the letter B . Here is what the parameter file looks like:
userid=mv_maint/foo
directory=dp_dir
dumpfile=inv.dmp
schemas=HEERA
exclude=trigger:"like 'B%'"
Including Objects in Import
You can use the INCLUDE parameter to reduce what is imported. Suppose you have a schema from which you want to
import tables that begin with the letter A . Here is the parameter file:
userid=mv_maint/foo
directory=dp_dir
dumpfile=inv.dmp
schemas=HEERA
include=table:"like 'A%'"
If you place the previous text in a file named h.par , then the parameter file can be invoked as follows:
$ impdp parfile=h.par
In this example the HEERA schema must already exist. Only tables that start with the letter A are imported.
 
Search WWH ::




Custom Search