Previous Table of Contents Next


Migration Utility

You need to install the migration utility as explained in the following steps.

Stage 1. Install the Oracle8 migration utility.

1.  Run orainst from the Oracle8 distribution CD-ROM with ORACLE_HOME and ORACLE_SID pointing to your Oracle7 database:

$ cd /cdrom/cdrom0/orainst

$ ./orainst /m

( /m is required for motif version)

2.  Go to the Install Type screen and select Default or Custom Install.
On the Installation Activity Choice screen, choose appropriately any of the options from Install, Upgrade.
You must bypass the creation of a new database.
On the Installation Options screen, select Migrate from Oracle7 to Oracle8.
You need to enter the following options on the prompts shown below, before running the mig utility:

Prompt Screen Selection / Enter Value

Installation Options:
Home Locator Enter the Oracle7 $ORACLE_HOME location.
Logging and Status Confirm and/or change the log file location (installer log, sql log, makefile log, and OS log). (You are prompted for this if you select Custom Install.)
Migration Select Install Migration Utility.
Install Source Select either Install from CD-ROM or Install from Staging Area. If you select Install from Staging Area, you will get the Source Staging Area to enter the pathname of the source staging area directory. (You are prompted for this if you select Custom Install.)
NLS Choose the language to be installed.
Software Asset Manager Choose Migration Utility: Oracle7 to Oracle8 (8.0.3.0.0).

Now choose Install and exit from orainst.

Please make sure that the Oracle8 migration utility executable mig resides in the Oracle7 $ORACLE_HOME/bin directory; migus.msb, the new version of the message file, resides in the Oracle7 $ORACLE_HOME/rdbms/mesg directory; migrate.bsq resides under the Oracle7 ORACLE_HOME/dbs directory; and all the NLS files are under the Oracle7 ORACLE_HOME/migrate/nls/admin/data directory. During the process of migration, migrate.bsq will create a number of objects that are normally created by sql.bsq, but it will create them under the migrate schema. Later, during the convert phase, the ownership of migrate’s objects will be changed to sys.


Note:  
If your Oracle7 sql.bsq was customized (which it should not be, but might be for very specific reasons), you need to make the same changes to migrate.bsq prior to running the migration utility.

You can locate migrate.bsq under $ORACLE_HOME/dbs (as mentioned previously). You have to search on sql.bsq to find the exact script.


Migration Preparation

Stage 2. Prepare the database for migration.

Go through README.doc and check for any patches that need to be installed:

1.  Check ‘PL/SQL Release’ in the sqlplus or server manager banner to ensure that the procedural option is installed:

drop view dba_histograms;

drop view v$bh if it exists;


Make sure that TWO_TASK is not set. (You can use echo $TWO_TASK at the unix prompt to confirm).
Also check that you do not have a user/role named migrate.
2.  If you do not use the default character set US7ASCII, make sure to have the ORA_NLS33 set to $ORACLE_HOME/migrate/nls/admin/data.
3.  It is better to offline normal or make read-only all tablespaces except SYSTEM and those containing rollback segments. If migration fails, only the SYSTEM and rollback datafiles need to be restored.
4.  Check the status of the datafiles:

Select name, status, enabled from v$datafile;


It should be either online or offline. Any file with a recover status cannot be opened after migration.
5.  Make sure to incorporate a rollback big enough that it does not fail during the operation. Ensure that the OPTIMAL parameter of the storage clause is not set for the SYSTEM rollback segment.
6.  To check that SYSTEM rollback is not hitting the maxextents:

select extents from v$rollstat where usn=0;

7.  Check to ensure that AUD$ belongs to the SYSTEM tablespace if the database auditing is enabled.
8.  There should not be any pending or uncommitted transactions. The migration utility does check for it and aborts the execution.
You can check using select * from x$kttvs; to list such tablespace transactions by selecting the kttvstnm column. This column corresponds to the ts# column of ts$.
You can execute

select name from ts$ where ts#=<”kttvstnm”>


This select lists the tablespaces that have save undo.
Further, you can issue

Alter tablespace tablespace_name online;


This eliminates the save undo.
Make sure to alter the tablespace offline normal again by issuing the command

Alter tablespace tablespace_name offline normal;

9.  If you are supporting replication, disable it. If replication is enabled and the logs have not been cleared, migration will fail.
10.  Oracle8 has a larger data dictionary. The SYSTEM tablespace should be about two to three times the one needed in Oracle7. Make sure to add a datafile or resize the existing file. Look into the “Common Problems and Troubleshooting” section of this chapter to learn how to verify the space in the SYSTEM tablespace.

Stage 3. Migrate the database.

This is your only chance to take the backup if you have not taken it so far. Shut down normal or immediate the Oracle7 database. So, take a backup now.


Previous Table of Contents Next
Используются технологии uCoz