Tuesday, September 23, 2008

Export/Import Usage on Data Incompatible with a Previous Release

When you export data to a previous release, data that is incompatible with the previous release either is not exported at all or is exported with the loss of some features.

In general, if you must export data to a previous release, then first remove as many incompatibilities with the previous release as possible before you export the data.

To upgrade a database using the Export/Import utilities, complete the following steps:

  1. Export data from the current database using the Export utility shipped with the current database. See the current Oracle Database Utilities documentation for information about using the Export utility on the current database.

    To ensure a consistent export, make sure the current database is not available for updates during and after the export. If the current database is available to users for updates after the export, then, prior to making the current database available, put procedures in place to copy the changes made in the current database to the new database after the import is complete.

  2. Install the new Oracle Database software. Installation is operating system specific. Installation steps for Oracle Database are covered in your operating system-specific Oracle documentation.

  3. If the new database has the same name as the current database, then shut down the current database before creating the new database.

  4. Create the new database.

  5. Start SQL*Plus in the new Oracle Database environment.

  6. Connect to the database instance as a user with SYSDBA privileges.

  7. Start an Oracle Database instance using STARTUP.

  8. Optionally, you can change the storage parameters from the source database.

    You can pre-create tablespaces, users, and tables in the new database to improve space usage by changing storage parameters. When you pre-create tables using SQL*Plus, either run the database in the original database compatibility mode or make allowances for the specific data definition conversions that occur during import. When items have been pre-created, specify one of the following options:

    • TABLE_EXISTS_ACTION=APPEND for Data Pump Import

    • IGNORE=Y for original Import

    Note:

    If the new database is created on the same computer as the source database, and you do not want to overwrite the source database data files, then you must pre-create the tablespaces and specify one of the following options when you import:
    • REUSE_DATAFILES=N for Data Pump Import

      Optionally, consider using the REMAP_DATAFILE, REMAP_TABLESPACE and REMAP_TABLE options so that references to the old names in the dump file set are remapped to new, non-colliding names.

    • DESTROY=N for original Import.

  9. Use the Import utility of the new database to import the objects exported from the current database. Include one of the following parameters to save the informational and error messages from the import session to a file:

    • The LOGFILE parameter for Data Pump Import

    • The LOG parameter for original ImportAfter the import, check the import log file for information about which imports of which objects completed successfully and, if there were failures, which failed.

    • Use further Import scenarios or SQL scripts that create the database's objects to clean up incomplete imports (or possibly to start an entirely new import).

      Note:

      If a Data Pump Export or Import job encounters a fatal error, then the job can be restarted after the condition inducing the failure is corrected. The job then continues automatically from the point of failure.
    • If changes are made to the current database after the export, then make sure those changes are propagated to the new database prior to making it available to users. See Step 1 for more information.

No comments: