This feature is covered last in this chapter, but it’s quite useful, especially if you’re an old-school DBA. As of Oracle 11g Release 2, Data Pump allows you to use the old exp and imp utility parameters when invoking a Data Pump job. This is known as legacy mode, and it’s a great feature.
You don’t have to do anything special to use legacy mode Data Pump. As soon as Data Pump detects a legacy parameter, it attempts to process the parameter as if it were from the old exp/imp utilities. You can even mix and match old legacy parameters with newer parameters; for example,
$ expdp mv_maint/foo consistent=y tables=inv directory=dp_dir
In the output, Data Pump indicates that it has encountered legacy parameters and gives you the syntax for what it translated the legacy parameter to in Data Pump syntax. For the previous command, here is the output from the Data Pump session that shows what the consistent=y parameter was translated into:
Legacy Mode Parameter: "consistent=TRUE" Location: Command Line,
Replaced with:
"flashback_time=TO_TIMESTAMP('2014-01-25 19:31:54', 'YYYY-MM-DD HH24:MI:SS')"
This feature can be extremely handy, particularly if you’re really familiar with the old legacy syntax and wonder how it’s implemented in Data Pump.
I recommend that you try to use the newer Data Pump syntax whenever possible. However, you may run into situations in which you have legacy exp/imp jobs and want to continue running the scripts as they are, without modification.
Note When Data Pump runs in legacy mode, it doesn’t create an old exp-/imp-formatted file. Data Pump always creates a Data Pump file and can only read Data Pump files.
Data Pump Mapping to the exp Utility
If you’re used to the old exp/imp parameters, you may initially be confused by some of the syntax semantics. However, after you use Data Pump, you’ll find the newer syntax fairly easy to remember and use. Table 8-3 describes how the legacy export parameters map to Data Pump export.
Table 8-3. Mapping of Old Export Parameters to Data Pump
Original exp Parameter | Similar Data Pump expdp Parameter |
---|---|
BUFFER | N/A |
COMPRESS | TRANSFORM |
CONSISTENT | FLASHBACK_SCN or FLASHBACK_TIME |
CONSTRAINTS | EXCLUDE=CONSTRAINTS |
DIRECT | N/A; Data Pump automatically uses direct path whenever possible. |
FEEDBACK | STATUS in client output |
FILE | Database directory object and DUMPFILE |
GRANTS | EXCLUDE=GRANT |
INDEXES | INCLUDE=INDEXES, INCLUDE=INDEXES |
LOG | Database directory object and LOGFILE |
OBJECT_CONSISTENT | N/A |
OWNER | SCHEMAS |
RECORDLENGTH | N/A |
RESUMABLE | N/A; Data Pump automatically provides functionality. |
RESUMABLE_NAME | N/A |
RESUMABLE_TIMEOUT | N/A |
ROWS | CONTENT=ALL |
STATISTICS | N/A; Data Pump export always exports statistics for tables. |
TABLESPACES | TRANSPORT_TABLESPACES |
TRANSPORT_TABLESPACE | TRANSPORT_TABLESPACES |
TRIGGERS | EXCLUDE=TRIGGER |
TTS_FULL_CHECK | TRANSPORT_FULL_CHECK |
VOLSIZE | N/A; Data Pump doesn’t support tape devices. |
In many instances, there isn’t a one-to-one mapping. Often, Data Pump automatically provides features that used to require a parameter in the legacy utilities. For example, whereas you used to have to specify DIRECT=Y to get a direct path export, Data Pump automatically uses direct path whenever possible.
Data Pump Mapping to the imp Utility
As with Data Pump export, Data Pump import often doesn’t have a one-to-one mapping of the legacy utility parameter. Data Pump import automatically provides many features of the old imp utility. For example, COMMIT=Y isn’t required because Data Pump import automatically commits after each table is imported. Table 8-4 describes how the legacy import parameters map to Data Pump import.
Table 8-4. Mapping of Old Import Parameters to Data Pump
Original imp Parameter | Similar Data Pump impdp Parameter |
---|---|
BUFFER | N/A |
CHARSET | N/A |
COMMIT | N/A; Data Pump import automatically commits after each table is exported. |
COMPILE | N/A; Data Pump import compiles procedures after they’re created. |
CONSTRAINTS | EXCLUDE=CONSTRAINT |
DATAFILES | TRANSPORT_DATAFILES |
DESTROY | REUSE_DATAFILES=y |
FEEDBACK | STATUS in client output |
FILE | Database directory object and DUMPFILE |
FILESIZE | N/A |
FROMUSER | REMAP_SCHEMA |
GRANTS | EXCLUDE=OBJECT_GRANT |
IGNORE | TABLE_EXISTS_ACTION, with APPEND, REPLACE, SKIP, or TRUNCATE |
INDEXES | EXCLUDE=INDEXES |
INDEXFILE | SQLFILE |
LOG | Database directory object and LOGFILE |
RECORDLENGTH | N/A |
RESUMABLE | N/A; this functionality is automatically provided. |
RESUMABLE_NAME | N/A |
RESUMABLE_TIMEOUT | N/A |
ROWS=N | CONTENT, with METADATA_ONLY or ALL |
SHOW | SQLFILE |
STATISTICS | N/A |
STREAMS_CONFIGURATION | N/A |
STREAMS_INSTANTIATION | N/A |
TABLESPACES | TRANSPORT_TABLESPACES |
TOID_NOVALIDATE | N/A |
TOUSER | REMAP_SCHEMA |
TRANSPORT_TABLESPACE | TRANSPORT_TABLESPACES |
TTS_OWNERS | N/A |
VOLSIZE | N/A; Data Pump doesn’t support tape devices. |