Professional Documents
Culture Documents
Data Pump in Oracle 11g
Data Pump in Oracle 11g
transfer. Data Pump Export and Import utilities are much faster comparatively to original Export and Import commands. Besides of the fact that stoppage of the data pump job was voluntary or involuntary, they can be re-started without any data loss. Fine-grained object selection is supported by Data pump jobs. Data pump supports Network Import, the ability to load one instance directly from another. Network Export supported by Data Pump, used to unload a remote instance.
original import and export, besides this data pump include many new features like:
dump file encryption and compression checkpoint restart job size estimation very flexible, fine-grained object selection direct loading of one instance from another detailed job monitoring the ability to move individual table partitions using transportable
tablespaces
Manages and controls the operation Responsible for data movement One for each degree of parallelism Created in invokers schema at job start Maintained during job execution Dropped after successful completion Used to resume a paused/failed job
Worker process(es)
Master table
Data Pump
DBMS_DATAPUMP
Oracle_ Loader
Oracle_ DataPump
Metadata API:
DBMS_METADATA
Utilities..
The three client utilities which are included in Oracle Database
are:
Command-line export (expdp) Command-line import (impdp) Web-based Oracle Enterprise Manager export/import interface
original import and export, besides this data pump include many new features like:
dump file encryption and compression checkpoint restart job size estimation very flexible, fine-grained object selection direct loading of one instance from another detailed job monitoring the ability to move individual table partitions using transportable
tablespaces
TRANSPORTABLE
PARTITION_OPTIONS REUSE_DUMPFILES
Compression
Syntax:
COMPRESSION={ALL | DATA_ONLY | METADATA_ONLY | NONE}
Compression {Example}
expdp test/test schemas=TEST directory=TEST_DIR
TRANSPORTABLE parameter
The TRANSPORTABLE parameter is similar to
the TRANSPORT_TABLESPACES parameter available previously in that it only exports and imports metadata about a table, relying on you to manually transfer the relevant tablespace datafiles. The export operation lists the tablespaces that must be transferred.
Syntax:
TRANSPORTABLE = {ALWAYS | NEVER}
EXP_FULL_DATABASE privilege. Tablespaces containing the source objects must be read-only. The COMPATIBLE initialization parameter must be set to 11.0.0 or higher. The default tablespace of the user performing the export must not be the same as any of the tablespaces being transported.
import operation. This parameter is set to a valid database link to the source schema. The schema performing the import must have both EXP_FULL_DATABASE and IMP_FULL_DATABASE privileges. The TRANSPORT_DATAFILES parameter is used to identify the datafiles holding the table data.
Examples:
Export using TRANSPORTABLE parameter
expdp system tables=TEST1.TAB1 directory=TEST_DIR dumpfile=TEST.dmp
logfile=expdpTEST.log transportable=ALWAYS
PARTITION_OPTIONS parameter
The PARTITION_OPTIONS parameter determines how partitions will be
from. DEPARTITION: Each partition and sub-partition is created as a separate table, named using a combination of the table and (sub-)partition name. MERGE: Combines all partitions into a single table.
Example:
Export using PARTITION_OPTIONS parameter:
expdp test/test directory=TEST_DIR dumpfile=TEST.dmp
REUSE_DUMPFILES parameter.
The REUSE_DUMPFILES parameter can be used to prevent errors being
issued if the export attempts to write to a dump file that already exists.
SYNTAX:
REUSE_DUMPFILES={Y | N}
When set to "Y", any existing dumpfiles will be overwritten. When the default
values of "N" is used, an error is issued if the dump file already exists.
Example:
Export using REUSE_DUMPFILES parameter:
expdp test/test schemas=TEST directory=TEST_DIR
REMAP_TABLE parameter.
This parameter allows a table to be renamed during the import
operations performed using the TRANSPORTABLE method. It can also be used to alter the base table name used during PARTITION_OPTIONS imports.
SYNTAX:
REMAP_TABLE=[schema.]old_tablename[.partition]:new_tablena
me
Example:
Example using REMAP_TABLE parameter:
impdp test/test tables=TAB1 directory=TEST_DIR dumpfile=TEST.dmp
logfile=impdpTEST.log remap_table=TEST.TAB1:TAB2