Previous Table of Contents Next


Backup of the Existing System

Make a complete backup of the Oracle7 home, that is, the $ORACLE_HOME/ directory. The safest way to back up is to include the parameter files, control files, datafiles, and online logs. It is also a good idea to include the sql code that was used to create the objects in the Oracle7 database—any sql code that you might want to use to restore the database. If you are backing up after the mig utility is executed successfully, back up the convert file.

Now continue with Stage 3.

You can run mig from the command line or the Installer. The utility name may vary depending on the operating system. You should run the mig via the command line in case the database character set is other than US7ASCII. If mig aborts for any reason, shut down the database cleanly and execute the mig again. mig starts the database, so you must shut it down if you need to restart.

The command line is


mig dbname=oracle7db new_dbname=Oracle8dbname V803

spool=\”/tmp/migrate/mig.spool\”

Some of the command line options are

CHECK_ONLY When TRUE, space use calculations are performedwithout any actual migration (this is mutually exclusive with NO_SPACE_CHECK).
  When FALSE, space usage is checked and migration is performed.
DBNAME Specifies the name of the database to migrate.
NEW_DBNAME Specifies a new name for the migrated database.
NLS_NCHAR Specifies the character set in the Oracle8 database.
PFILE Specifies the name of the parameter file with complete pathname.
SPOOL Specifies filename to which to spool output with complete pathname.


Above options from Oracle8 Server Migration Guide, pp. 3-7. Copyright© 1997, Oracle Corporation. All rights reserved.


Note:  
Pathnames must be enclosed by double quotes masked by a backslash on UNIX. Here is an example:

mig PFILE=\”/tmp/mig/initSAMS.ora\”


If you want to use orainst, it is pretty self explanatory, and each prompt is easy to follow.

Essentially, either of the two steps drops all the obsolete views and tables; creates new Oracle8 tables, views, and clusters, updates base tables, and creates a migrate user. They also create a convSID.dbf file in the $ORACLE_HOME/dbs directory, containing a list of tablespaces, datafiles, and redologs. The convSID.dbf file also contains the close scn generated when the database is shut down by the migration utility.

The migration is complete and you need to convert the database after this step. Even at this stage, with some effort you can go back to Oracle7 without a restore. All you have to do is to drop the migrate user and run catalog and catproc scripts and re-create the DUAL table.

Stage 4. Prepare for conversion.

1.  Because you finally decide to go ahead to Oracle8, keep pointing the ORACLE_SID to Oracle7 and change the following variables to Oracle8:

PATH

ORACLE_HOME

ORACLE_PATH

LD_LIBRARY_PATH


Change ORA_NLS33 to point to the Oracle8 ORACLE_HOME/ocommon/nls/ admin/data.
2.  Install the Oracle8 executables. They are about two to three times larger than the Oracle7 executables. Execute the Installer.
3.  You need to take care of the following changes in the initialization file (initSID.ora) for Oracle8:

compatible = 8.0.0.0

control_files = new control file names

Change:

snapshot_refresh_interval to job_queue_interval

snapshot_refresh_process to job_queue_processes


These parameters are no longer valid for Oracle8. Including the old parameters, you may not get any error but will not yield the required effect.
Change db_name as you run mig with new_dbname to change the database name under Oracle8. Some parameters are obsolete in Oracle8. They are init_sql_files, lm_domains, lm_non_fault_tolerant, checkpoint_process, parallel_default_max_scans, parallel_default_scan_size, sequence_cache_hash_buckets, serializable, session_cached_cursors, db_writers, use_async_io, async_read, async_write, and ccf_io_size.
It would be a good idea to call Oracle Support to confirm any other precautions to be taken at this stage and confirm any other latest changes or bugs that you need to take care of through events or patches. You may need to set an event or so that can be done under the supervision of Support.
4.  At this stage, copy files to the Oracle8 ORACLE_HOME. It would be better to install Oracle8 executables into a separate ORACLE_HOME rather than the existing Oracle7 ORACLE_HOME. Further, copy the convSID.dbs file to the Oracle8 $ORACLE_HOME/dbs directory. Never modify this file. Make sure it contains Oracle8SID as a part of its name. If you need to, rename it.
Ensure that you have the Oracle8 $ORACLE_HOME/dbs directory empty to accommodate the new files that will be generated. Move the password file, if any, to the $ORACLE_HOME/dbs directory.

Stage 5. Convert and open the database.

Perform the following steps to finally convert the Oracle7 database to Oracle8:


svrmgrl> Connect internal;



svrmgrl>Startup nomount



svrmgrl>Alter database convert;


Above steps consolidated from Oracle8 Server Migration Guide, Copyright© 1997, Oracle Corporation. All rights reserved.


Caution:  
Starting the database in any other mode might cause corruption.


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