
The Migration Utility
This chapter guides you through the migration procedure using the Migration Utility with a step-by-step approach. In particular, this chapter describes the use of Step 5 "Migrate the Source Database".
Topics covered in this chapter include the following:
Overview of the Migration Utility
The Migration Utility is intended only for the migration of earlier to later versions of the Oracle database, for example, from Version 6 to any of the Version 7 releases; it is not intended for release-to-release upgrades such as Release 7.1 to Release 7.2.
Note: The Migration Utility cannot be used for reverse migration such as downgrading from Release 7.1 to Version 6.
Structures can be converted in the following ways:
- Some structures are converted by the Migration Utility.
- Some structures are converted by the ALTER DATABASE command.
- Some structures are converted automatically by the target database itself.
- Some file structures do not need to be converted at all.
The Migration Utility also outputs a binary file that is used to build
a new target database control file. The target database control file is created when execution of the ALTER DATABASE CONVERT command is completed.
The Migration Utility uses the character set specified by the LANGUAGE parameter in the initialization file (the INIT.ORA file) of the source database as the character set for all target databases. Since this cannot be changed after migration is complete, you must ensure that LANGUAGE specifies the correct character set before running the Migration Utility.
To run the Migration Utility, you need DBA privileges. You do not interact with the Migration Utility. Once the utility is invoked, it performs the following migration activities automatically:
- runs the conversion script MIGRATE.BSQ that creates the target database data dictionary base tables
- creates a new bootstrap segment for use by the target database
- creates CONVERT.ORA, which creates the new control file for the target database (the name of this file may vary on some operating systems)
The Migration Utility can be run multiple times and does not prevent you from returning to the source database. However, if the Migration Utility has been run, you must recreate the source database catalog views (that were dropped automatically by the Migration Utility) before returning to the source database.
Warning: You cannot return to the source database after the ALTER DATABASE CONVERT command has been run. If you wish to return the source database after the ALTER DATABASE CONVERT command has been run, you must restore the source database.
Blocksize Considerations
Before executing the STARTUP NOMOUNT command under the target database, check the value of the DB_BLOCK_SIZE parameter in the INIT.ORA file. Change the value of DB_BLOCK_SIZE, if necessary, to match the blocksize of the source database.
Warning: The migrated database will not perform correctly if the value of DB_BLOCK_SIZE of the migrated database does not match the blocksize of the source database exactly.
Migrating to a Different Computer Architecture
The Migration Utility cannot migrate a database to a computer system that uses a different architecture. For example, the Migration Utility will not successfully migrate a database from a 16-bit platform to a 32-bit platform. The only migration procedure that will work correctly in such a situation is the Export/Import method.
Errors During Migration
During the migration procedure, you may encounter errors. Errors can be due to performing migration steps out of order, not performing certain migration steps, not fulfilling the prerequisites for migration, or encountering certain conversion irregularities.
For more information about specific errors encountered during the migration process and the action to take for each error, see Appendix E.
Step 5: Migrate the Source Database (using the Migration Utility)
Before proceeding, you should review the migration steps outlined in Chapter 1 "Migration Overview". The following steps expand on
Step 5 (see page 1 - 5) of the migration procedure and explain how to migrate your source database using the Migration Utility.
1. Install and run the Migration Utility.
Additional Information: This task is operating system specific. Refer to your operating system-specific Oracle documentation.
The following parameters can be passed to the Migration Utility:
CNVFILE specifies CONVERT.ORA filename (if not using the expected default). | |
MIGFILE specifies MIGRATE.BSQ filename (if not using the expected default). | |
Warning: The Migration Utility creates a binary file that creates the control file. The name of this file is operating system dependent. Do not alter this file in any way.
2. Install the target database.
Additional Information: Installation of the target database is operating system specific. Refer to your operating system-specific Oracle documentation. Read the README.DOC file included with your target database installation for any late additions or modifications to the product.
3. Issue the following command to connect to the target database instance:
SVRMGR> CONNECT INTERNAL
Note: You must be connected as INTERNAL to perform the rest of the migration.
4. Start an instance for the target database, but do not mount the target database. Issue the following command:
SVRMGR> STARTUP NOMOUNT
5. Issue the following command:
SVRMGR> ALTER DATABASE CONVERT;
6. Open the target database by issuing the following command:
SVRMGR> ALTER DATABASE OPEN RESETLOGS;
All datafiles and rollback segments that are online when the target database is opened are converted to the new format of the target database. Refer to Step 1 "Prepare to Migrate" and the comments on shutting down the source (original production) in Chapter 1 "Migration Overview" for a description of database file and rollback segment conversion.
DROP USER migrate CASCADE;
Objects in this user's schema are no longer needed once the conversion is complete. You can also delete the binary file that creates the target database data dictionary base tables.
SVRMGR> @catalog
Run the target database CATPROC.SQL script which will run all of the scripts required for, or used within, PL/SQL.
SVRMGR> @catproc
If you wish to create additional data dictionary structures, see Oracle7 Server Reference for a complete list and description of available scripts.