
32
|
Oracle DBA Pocket Guide
Export (EXP) and Import (IMP)
The Export utility, known as EXP, takes a logical backup of
the database. EXP writes, in a proprietary format, all the SQL
commands necessary both to recreate the database objects
and to insert all the data. The companion Import utility,
IMP, reads this file and executes all the statements.
NOTE
S
tarting with Oracle Database 10g Release 1, Oracle pro-
vides a pair of new utilities: Data Pump Export and Data
Pump Import. From this release on, Oracle refers to EXP and
IMP as Original Export and Original Import, respectively.
Import can be used to restore data created by the Export util-
ity at a lower or equal version. For example, IMP Version 10.1
can restore data created by EXP Version 9.2, but cannot
recover data created by EXP Version 10.2.
You can export at the database level, schema level, or table
level, and you can import all of the export file or a portion of
it. EXP and IMP are especially useful when you need to
recover data that has been corrupted or lost as a result of
human or application error. Export/Import (or, starting with
Oracle Database 10g, Data Pump Export/Import) is the only
backup method that allows you to recreate a single table. Be
aware, however, that in a relational database, it may not be
possible (or make sense) to recover only one table. Multiple
tables may need to be recovered in order to maintain referen-
tial integrity. ...