Release 3 (8.1.7)
Part Number A86632-01
Migrating Using Export/Import
This chapter provides information about using Export/Import to migrate a database from Oracle7 to Oracle8i.
This chapter covers the following topics:
Basics of Export/Import
To migrate a database using Export/Import, complete the following three basic steps:
- Export the data from the database you are migrating (the source database). The export physically copies the data to the export dump file.
- Create the Oracle8i database into which you will import the exported data (the target database).
- Import the exported data into the new Oracle8i target database.
Export Utility Requirements
To migrate or upgrade a database, use the Export utility shipped with the release of the source database. After the export, the Import utility can copy the data from the export dump file into the target database. The target database must be created and operational before the Import utility can migrate the exported data into the target database.
For example, if you are migrating to release 8.1 from release 7.3, then use the Export utility for release 7.3.
If the source Oracle database is earlier than version 6, then first migrate the source database to at least version 6 before proceeding with the export.
To migrate, upgrade, or downgrade a database, use the Import utility shipped with the release of the target database. For example, if you are migrating to release 8.1 from release 7.3, then use the Import utility for release 8.1.
Refer to the following sources if you have additional options installed:
Migrate the Source Database Using Export/Import
To migrate a version 6 or version 7 database using the Export/Import utilities, complete the following steps:
- Export the source database using the Export utility shipped with the source database. See the source database's server utilities documents for information about using the Export utility on the source database. Both Oracle7 and version 6 database exports can be imported into Oracle8i.
To ensure a consistent export, make sure the source database is not available for updates during and after the export. If the source database will be available to users for updates after the export, then, prior to making the source database available, put procedures in place to copy the changes made in the source database to the Oracle8i target database after the import is complete.
- Install the Oracle8i software. Installation is operating system-specific. Installation steps for Oracle8i are covered in your operating system-specific Oracle8i documentation.
- If the new Oracle8i database will have the same name as the existing source database, then shut down the existing database before creating the new Oracle8i database.
- Create the Oracle8i target database.
- Start SQL*Plus in the Oracle8i environment.
- Connect to the database instance:
SQL> CONNECT INTERNAL
- Start an Oracle8i database instance using STARTUP.
- Pre-create tablespaces, users, and tables in the target database to improve space usage by changing storage parameters. When you pre-create tables using SQL*Plus or Server Manager, either run the database in the original database compatibility mode or make allowances for the specific data definition conversions that occur during import.
If the new Oracle8i database will be created on the same computer as the source database, and you do not want to overwrite the source database datafiles, then you must pre-create the tablespaces and specify IGNORE=Y and DESTROY=N when you import.
- Use the Oracle8i Import utility to import the objects exported from the source database. Include the LOG parameter to save the informational and error messages from the import session to a file.
- After the migration, check the import log file for information about which imports of which objects completed successfully and, if there were failures, which failed.
Oracle8i Utilities and the Oracle8i server
README.doc file for error handling information.
- Use further Import scenarios (see Oracle8i Utilities) or SQL scripts that create the source objects to clean up incomplete imports (or possibly to start an entirely new import).
- If changes are made to the source database after the export, then make sure those changes are propagated to the Oracle8i database prior to making it available to users. See Step 1 for more information.
- Complete the procedures described in Chapter 8, "After Migrating or Upgrading the Database".