Oracle Data Pump technology enables very high-speed movement of data and metadata from one database to another. Oracle Data Pump is available only on Oracle Database 10g release 1 (10.1) and later.
Original Export and Import Versus Data Pump Export and Import
- Data Pump Export and Import operate on a group of files called a dump file set rather than on a single sequential dump file.
- Data Pump Export and Import access files on the server rather than on the client. This results in improved performance. It also means that directory objects are required when you specify file locations.
- The Data Pump Export and Import modes operate symmetrically, whereas original export and import did not always exhibit this behavior. For example, suppose you perform an export with
FULL=Y
, followed by an import usingSCHEMAS=HR
. This will produce the same results as if you performed an export withSCHEMAS=HR
, followed by an import withFULL=Y
. - Data Pump Export and Import use parallel execution rather than a single stream of execution, for improved performance. This means that the order of data within dump file sets and the information in the log files is more variable.
- Data Pump Export and Import represent metadata in the dump file set as XML documents rather than as DDL commands. This provides improved flexibility for transforming the metadata at import time.
- Data Pump Export and Import are self-tuning utilities. Tuning parameters that were used in original Export and Import, such as
BUFFER
andRECORDLENGTH
, are neither required nor supported by Data Pump Export and Import. - At import time there is no option to perform interim commits during the restoration of a partition. This was provided by the
COMMIT
parameter in original Import. - There is no option to merge extents when you re-create tables. In original Import, this was provided by the
COMPRESS
parameter. Instead, extents are reallocated according to storage parameters for the target table. - Sequential media, such as tapes and pipes, are not supported.
- The Data Pump method for moving data between different database versions is different than the method used by original Export/Import. With original Export, you had to run an older version of Export (
exp
) to produce a dump file that was compatible with an older database version. With Data Pump, you can use the current Export (expdp
) version and simply use theVERSION
parameter to specify the target database version. - When you are importing data into an existing table using either
APPEND
orTRUNCATE
, if any row violates an active constraint, the load is discontinued and no data is loaded. This is different from original Import, which logs any rows that are in violation and continues with the load. - Data Pump Export and Import consume more undo tablespace than original Export and Import. This is due to additional metadata queries during export and some relatively long-running master table queries during import.
- If a table has compression enabled, Data Pump Import attempts to compress the data being loaded. Whereas, the original Import utility loaded data in such a way that if a even table had compression enabled, the data was not compressed upon import.
- Data Pump supports character set conversion for both direct path and external tables. Most of the restrictions that exist for character set conversions in the original Import utility do not apply to Data Pump. The one case in which character set conversions are not supported under the Data Pump is when using transportable tablespaces.
Data Pump Export
- Full Export Mode
A full export is specified using the
FULL
parameter. In a full database export, the entire database is unloaded. This mode requires that you have theEXP_FULL_DATABASE
role.> expdp hr/hr DIRECTORY=dpump_dir2 DUMPFILE=expfull.dmp FULL=y NOLOGFILE=y
- Schema Mode
A schema export is specified using the
SCHEMAS
parameter. This is the default export mode. If you have theEXP_FULL_DATABASE
role, then you can specify a list of schemas and optionally include the schema definitions themselves, as well as system privilege grants to those schemas. If you do not have theEXP_FULL_DATABASE
role, you can export only your own schema.> expdp hr/hr DIRECTORY=dpump_dir1 DUMPFILE=expdat.dmp SCHEMAS=hr,sh,oe
- Table Mode
A table export is specified using the
TABLES
parameter. In table mode, only a specified set of tables, partitions, and their dependent objects are unloaded. You must have theEXP_FULL_DATABASE
role to specify tables that are not in your own schema. All specified tables must reside in a single schema. Note that type definitions for columns are not exported in table mode. It is expected that the type definitions already exist in the target instance at import time. Also, as in schema exports, cross-schema references are not exported.> expdp hr/hr DIRECTORY=dpump_dir1 DUMPFILE=tables.dmp TABLES=employees,jobs,departments
Data Pump Import
-
Full Import Mode
A full import is specified using the
FULL
parameter. In full import mode, the entire content of the source (dump file set or another database) is loaded into the target database. This is the default for file-based imports. You must have theIMP_FULL_DATABASE
role if the source is another database.> impdp hr/hr DUMPFILE=dpump_dir1:expfull.dmp FULL=y LOGFILE=dpump_dir2:full_imp.log
-
Schema Mode
A schema import is specified using the
SCHEMAS
parameter. In a schema import, only objects owned by the specified schemas are loaded. The source can be a full, table, tablespace, or schema-mode export dump file set or another database.> impdp hr/hr SCHEMAS=hr DIRECTORY=dpump_dir1 LOGFILE=schemas.log DUMPFILE=expdat.dmp
-
Table Mode
A table-mode import is specified using the
TABLES
parameter. In table mode, only the specified set of tables, partitions, and their dependent objects are loaded. The source can be a full, schema, tablespace, or table-mode export dump file set or another database. You must have theIMP_FULL_DATABASE
role to specify tables that are not in your own schema.> impdp hr/hr DIRECTORY=dpump_dir1 DUMPFILE=expfull.dmp TABLES=employees,jobs
Note:
This article is excerpted from Oracle 10.2g document.