Oracle7 Server Utilities
Importing Incremental, Cumulative and Complete Export Files
Since an incremental export extracts only tables that have changed since the last incremental, cumulative, or complete export, an import from an incremental export file imports the table's definition and all its data, not just the changed rows. Such exports are typically done more often than cumulative or complete exports.
Since imports from incremental export files are dependent on the method used to export the data, you should also read the section called "Incremental, Cumulative and Complete Exports".
It is important to note that, since importing an incremental export file imports new versions of existing objects, existing objects are dropped before new ones are imported. This behavior differs from a normal import. During a normal import, objects are not dropped and an error is generated if the object already exists.
Note: Imports from incremental export files can only be applied to an entire database. There is no user-mode or table-mode for such an import. Any user with the BECOME_USER system privilege can do an import from an incremental export file. This privilege is contained in the IMP_FULL_DATABASE role.
Command Syntax
where:
SYSTEM | Imports the most recent version of system objects (except those owned by SYS) using the most recent incremental export file. A SYSTEM import does not import user data or objects. |
RESTORE | Imports all user database objects and data that have changed since the last export using export files in chronological order. |
Restoring a Set of Objects
The order in which incremental, cumulative and complete exports are done is important. A set of objects cannot be restored until a complete export/import has been run on a database. Once that has been done, the process of restoring objects would follow the steps listed below.
Note: To restore a set of objects, you must first import the most recent incremental export file to import the system objects (i.e. specify INCTYPE=SYSTEM for the export). Then you must import the export files in chronological order, based on their export time (i.e. specify INCTYPE=RESTORE for the import).
1. Import the most recent incremental export file (specify INCTYPE=SYSTEM for the export) or cumulative export file, if no incremental exports have been taken.
2. Import the most recent complete export file.
3. Import all cumulative export files after the last complete export.
4. Import all incremental export files after the last cumulative export.
For example, if you have
- one complete export called X1
- two cumulative exports called C1 and C2
- three incremental exports called I1, I2, and I3
then you should import in the following order:
IMP system/manager INCTYPE=SYSTEM FULL=Y FILE=I3
IMP system/manager INCTYPE=RESTORE FULL=Y FILE=X1
IMP system/manager INCTYPE=RESTORE FULL=Y FILE=C1
IMP system/manager INCTYPE=RESTORE FULL=Y FILE=C2
IMP system/manager INCTYPE=RESTORE FULL=Y FILE=I1
IMP system/manager INCTYPE=RESTORE FULL=Y FILE=I2
IMP system/manager INCTYPE=RESTORE FULL=Y FILE=I3
Notes:
- You import the last incremental export file twice; once at the beginning to import the most recent version of the system objects, and once at the end to apply the most recent changes made to the user data and objects.
- When restoring tables with this method, you should drop the tables from the database (if they exist) before starting the import sequence. This step prevents you from importing duplicate rows.