Oracle8i Migration
Release 8.1.5

A67774-01

Library

Product

Contents

Index

Prev Next

3
Migrating Using the Migration Utility

This chapter guides you through the process of migrating an Oracle7 database to Oracle8i using the Migration utility. This chapter covers the following topics:

Documentation Roadmap for Using the Migration Utility

Figure 3-1 is a roadmap that specifies the documentation you should use to migrate your database to release 8.1 based on your current release of Oracle.

Figure 3-1 Documentation Roadmap for Using the Migration Utility


Overview of Migration Using the Migration Utility

Migration converts the data dictionary and structures of an Oracle7 database into Oracle8i format. To migrate the database, you first install the Oracle8i software and run the migprep script to copy migration files to the Oracle7 environment. Next, you run the Migration utility on the Oracle7 database. Then, you execute a series of ALTER DATABASE commands on the new Oracle8i database and run the u0703040.sql conversion script.

The completion of these procedures results in the conversion of the following Oracle7 structures into structures that can be used in Oracle8i:

Outline of the Migration Process

The following sections provide an outline of the migration process:

In the Oracle7 Environment

In the Oracle8i Environment

Using the Migration Utility

This section contains important considerations for using the Migration utility.

Start with an Oracle7 Database Supported by the Migration Utility

A version 6 database must be migrated to at least Oracle7 before it can be migrated to Oracle8i. Also, the Migration utility cannot migrate some Oracle7 releases. See your operating-system specific Oracle documentation for information about the earliest release that is supported by the Migration utility on your operating system.

For example, on some operating systems, the Migration utility can migrate only release 7.1.4 and higher databases, and cannot migrate a release lower than release 7.1.4 (such as release 7.0 or release 7.1.3). If your database release number is lower than the release supported by the Migration utility on your operating system, upgrade or migrate the database to the required release.

See Also:

Oracle7 Server Migration, Release 7.3 for instructions about migrating or upgrading the database to the required release. Then, use this Oracle8i Migration manual to migrate to Oracle8i.  

Downgrading

Downgrading is the process of transforming an existing Oracle database into a previous version or release. The Migration utility cannot transform an Oracle8i database back into Oracle7. In some situations, you can use another facility to downgrade, such as using Export/Import, restoring from backups, and possibly using other functions.

See Also:

Chapter 12 and Chapter 13 for information about downgrading.  

System Considerations and Requirements

The following sections discuss system considerations and requirements for using the Migration utility.

Space Requirements

Oracle8i binaries may require as much as three times the disk space required by Oracle7 binaries. This requirement may cause you to run out of disk space during migration. However, the Migration utility requires relatively little temporary space. It needs only enough extra room in the SYSTEM tablespace to hold the new Oracle8i data dictionary simultaneously with the existing Oracle7 data dictionary.

The space required to hold an Oracle data dictionary depends on how many objects are in the database. Typically, a new Oracle8i data dictionary requires double the space that its Oracle7 source data dictionary required. If necessary, add space to the SYSTEM tablespace.

In addition, running the conversion scripts (such as the u0703040.sql script) to complete the migration may require more space in the SYSTEM tablespace and in the rollback segments. Insufficient space results in "unable to extend" warning when you run a conversion script. The exact amount of space required to run the conversion scripts varies depending on the number of objects in the database. If you encounter "unable to extend" warnings when you run a conversion script, try increasing the SYSTEM tablespace and the rollback segments; then, rerun the script.

Block Size Considerations

The value of DB_BLOCK_SIZE (a parameter in the initsid.ora file) in the Oracle7 database and in the migrated Oracle8i database must be the same. Oracle8i requires a minimum block size of 2048 bytes (2KB). Above this amount, integer multiples of your operating system's physical block size are acceptable. However, multiples of 2KB, especially powers of 2--that is, 2KB, 4KB, 8KB, 16KB--provide for the most robust operation.

Make sure the Oracle8i block size setting meets the following criteria:

Considerations for Replication Environments

You can migrate an Oracle7 replication environment to Oracle8i. Oracle7 sites can co-exist and run successfully with version 8 sites within the replication environment. However, take special care to accommodate the various replication features implemented on each system. Support for coexistence of different versions of the database is operating-system specific for Oracle Parallel Server.

See Also:

Oracle8i Replication, Appendix B, "Migration and Compatibility", for detailed instructions about migrating systems using replication features.  

Migrating a System with Oracle Parallel Server Installed

If you are migrating a system with Oracle Parallel Server installed, most of the actions described in this chapter should be performed on only one node of the system. So, perform the actions described in this chapter on only one node unless instructed otherwise in a particular step.

Migrating to a Different Operating System

The Oracle8i Migration utility cannot migrate a database to a computer system that has a different operating system. For example, it cannot migrate a database from Oracle7 on Solaris to Oracle8i on Windows NT. However, you normally can use Export/Import to migrate a database to a different operating system.


Note:

Starting with release 8.1, a change in word-size is supported during the migration process. A change in word size involves switching between 32-bit and 64-bit architecture within the same operating system. See "Changing Word-Size" for more information.  


Character Set Considerations

It is not possible to change the character set during migration using the Migration utility; that is, the Oracle7 source database and the migrated Oracle8i database must have the same character set. All character data in the Oracle8i database is assumed to be in the character set specified in the CREATE DATABASE command that created the database.

However, you can change the character set by performing a full Export/Import. Or, you can use the ALTER DATABASE [NATIONAL] CHARACTER SET statement to change the character set, but only if the new character set is a true superset of the existing character set.

See Also:

The Oracle8i National Language Support Guide for information about National Language Support (NLS), instructions for specifying a character set, and for a full list of character sets that can be used with the ALTER DATABASE [NATIONAL] CHARACTER SET statement.  

Prepare the Oracle7 Source Database for Migration

Complete the following steps before you migrate your Oracle7 database to Oracle8i:

  1. If your database release number is lower than the release supported by the Migration utility on your operating system, upgrade or migrate the database to a supported release.

    See Also:

    "Start with an Oracle7 Database Supported by the Migration Utility" for more information.  

  2. Make a complete backup of you Oracle7 database.

    See Also:

    The Oracle7 Server Administrator's Guide for information about backing up your Oracle7 database.  

  3. If the Procedural Option is not installed, use your Oracle7 installation media to install it. See your operating-system specific Oracle documentation for instructions.

    If you are not sure whether the Procedural Option is installed, you can check by starting Server Manager. The following is an example of the messages you will see when Server Manager starts:

    Oracle Server Manager Release 2.3.3.0.0 - Production
    
    Copyright (c) Oracle Corporation 1994, 1995. All rights reserved.
    
    Oracle7 Server Release 7.3.4.0.0 - Production
    With the distributed, replication, parallel query, Parallel Server
    and Spatial Data options
    PL/SQL Release 2.3.4.0.0 - Production
    
    

    The messages you see may be slightly different, based on the options you have installed and their release numbers. If you see "PL/SQL" in the messages, as in the last line in the preceding example, then the Procedural Option is installed. Otherwise, it is not installed.

  4. Make sure all datafiles and tablespaces are either online or offline normal.

    To determine whether any datafiles require recovery, issue the following SQL statement:

    SELECT * FROM v$recover_file;
    
    

    You should see a "0 rows selected" message, which indicates that all datafiles are either online or offline normal. If any datafiles are listed, you must restore the datafiles before you migrate the database. You can use the V$DATAFILE dynamic performance view to find the datafile name based on the datafile number. The Oracle8i Migration utility will not proceed, and will display an error, if any datafiles require media recovery.

    Tablespaces that are not taken offline cleanly must be dropped or brought online before migration. Otherwise, these tablespaces will not be available under Oracle8i after the migration. Typically, tablespaces that are taken offline by using an ALTER TABLESPACE OFFLINE IMMEDIATE or ALTER TABLESPACE OFFLINE TEMPORARY command require media recovery.

    After migration, tablespaces that are offline when you open the Oracle8i database remain in Oracle7 database file format. The offline tablespaces can be brought online at any time after migration, and the file headers are converted to Oracle8i format at that time. In addition, if you want to avoid large restores in the event of a failure, you can make all tablespaces except SYSTEM and ROLLBACK offline normal; then, you can restore only the datafiles for SYSTEM and ROLLBACK if you need to run another migration.

  5. Make sure no user or role has the name OUTLN, because this schema is created automatically when you install Oracle8i. If you have a user or role named OUTLN, you must drop the user or role and recreate it with a different name.

    To check for a user with the name OUTLN, issue the following SQL statement:

    SELECT username FROM dba_users WHERE username = 'OUTLN';
    
    

    If you do not have a user named OUTLN, zero rows are selected.

    To check for a role with the name OUTLN, issue the following SQL statement:

    SELECT role FROM dba_roles WHERE role = 'OUTLN';
    
    

    If you do not have a role named OUTLN, zero rows are selected.

  6. Make sure no user or role has the name MIGRATE, because the Oracle8i Migration utility creates this schema and uses it to replace any pre-existing user or role with this name, and finally drops it from the system.

    To check for a user with the name MIGRATE, issue the following SQL statement:

    SELECT username FROM dba_users WHERE username = 'MIGRATE';
    
    

    If you do not have a user named MIGRATE, zero rows are selected.

    To check for a role with the name MIGRATE, issue the following SQL statement:

    SELECT role FROM dba_roles WHERE role = 'MIGRATE';
    
    

    If you do not have a role named MIGRATE, zero rows are selected.

  7. Make sure the SYSTEM rollback segment does not have an OPTIMAL setting. An OPTIMAL setting may cause errors during migration.

    To check the OPTIMAL setting for the SYSTEM rollback segment, issue the following SQL statement:

    SELECT a.usn, a.name, b.optsize
        FROM v$rollname a, v$rollstat b
        WHERE a.usn = b.usn AND name = 'SYSTEM';
    
    

    Your output should be similar to the following:

    USN        NAME                           OPTSIZE   
    ---------- ------------------------------ ----------
             0 SYSTEM                                   
    1 row selected.
    
    

    If there is a value in the OPTSIZE column, issue the following SQL statement to set optimal to NULL:

    ALTER ROLLBACK SEGMENT SYSTEM STORAGE (OPTIMAL NULL);
    
    

    You can reset OPTIMAL when migration is complete.

    See Also:

    The troubleshooting information in "OPTIMAL Setting for the SYSTEM Rollback Segment".  

  8. Increase the maximum number of extents for your SYSTEM rollback segment by altering the MAXEXTENTS parameter in the STORAGE clause of the ALTER ROLLBACK SEGMENT statement (optional).

    The following is an example of the ALTER ROLLBACK SEGMENT statement:

    ALTER ROLLBACK SEGMENT system
       STORAGE (MAXEXTENTS 121);
    
    

    You may need more space in the SYSTEM rollback segment to complete the migration successfully. If there is not enough space in your SYSTEM rollback segment, you may encounter errors when you run the Migration utility in the Oracle7 environment.

    See Also:

    If you are migrating an Oracle Parallel Server on Windows NT, see the Oracle Parallel Server Getting Started for Windows NT for important Operating System Dependent (OSD) layer instructions.  

Install the Release 8.1 Oracle Software

Complete the following steps to install the release 8.1 software:

  1. Follow the instructions in your operating-system specific Oracle documentation to prepare for installation and start the Oracle Universal Installer.

    If you are migrating a system with Oracle Parallel Server installed, see the Oracle8i Parallel Server Setup and Configuration Guide for additional installation instructions.

  2. At the Welcome screen of the Oracle Universal Installer, click Next.

    If you need help at any screen or want to consult more documentation about the Oracle Universal Installer, click the Help button to open the online help.

  3. At the File Locations screen, make sure the Destination is the complete path to your release 8.1 Oracle home. Then, click Next.


    Note:

    You must install the new 8.1 release in an Oracle home separate from the Oracle7 release.  


  4. At the Available Products screen, select the edition of Oracle8i that you want to install, either Oracle8i Enterprise Edition or Oracle8i. Then, click Next.


    Note:

    The Oracle Parallel Server option is available only with Oracle8i Enterprise Edition.  


  5. At the Installation Types screen, choose either Custom or Minimal. Do no choose Typical unless you want to install a starter database along with your Oracle software. You can avoid installing a starter database if you select Custom or Minimal. Normally, you should not install a starter database if you are migrating an existing database.


    Note:

    Minimal is not supported for Oracle Parallel Server.  


    After you make your selection, click Next.

    If you chose Custom, respond to the screens that enable you to specify your custom installation settings until you reach the "Upgrading or Migrating an Existing Database" screen.

    Make sure you install all of the options you installed with the Oracle7 database, assuming you do not want to discontinue use of a particular option. For example, if you installed Advanced Replication in Oracle7, you should install it in Oracle8i.

  6. If you are installing Oracle Parallel Server, at the Cluster Node Selection screen, select the nodes onto which you want the software installed. Then, click Next.

  7. At the "Upgrading or Migrating an Existing Database" screen, leave the "Upgrade or Migrate an Existing Database" checkbox unselected. Then, click Next.

    If you select the "Upgrade or Migrate an Existing Database" checkbox, the Oracle Data Migration Assistant is started automatically after installation. Because you are following the instructions for migrating the database with the Migration utility, you should not start the Oracle Data Migration Assistant.


    Note:

    The Oracle Data Migration Assistant does not support Oracle Parallel Server migrations.  


  8. At the Create Database screen, select the No radio button, indicating that you do not want to create a database because you are migrating an existing database. Then, click Next.

  9. At the Summary screen, make sure all of the settings and choices are correct for your installation. Then, click Install. The Oracle Universal Installer performs the installation, which may take some time.

    When installation is completed successfully, click the Exit button to close the Universal Installer.

    See Also:

    If you are migrating an Oracle Parallel Server on Windows NT, see the Oracle Parallel Server Getting Started for Windows NT for important Operating System Dependent (OSD) layer instructions.  

Review Migration Utility Command-Line Options

The next task in the migration process is running the Oracle8i Migration utility. Before you begin that task, review the following command-line options for the Migration utility because you may want to use some of them in your migration. In addition, your operating-system specific Oracle documentation may contain more information about Migration utility command-line options.

CHECK_ONLY  

When TRUE, the Migration utility performs space use calculations without performing a migration. When FALSE, the Migration utility performs both space usage calculations and the migration. This command-line option is mutually exclusive with NO_SPACE_CHECK.  

DBNAME  

Specifies the name of the database to migrate (DB_NAME in initsid.ora).  

MULTIPLIER  

Specifies the initial size of the Oracle8i i_file#_block# index relative to the Oracle7 i_file#_block# index. For example, MULTIPLIER=30 triples the initial size when the index is created. If no MULTIPLIER command-line option is specified, the Migration utility uses the i_file#_block# value of 15, creating an index for Oracle8i that is 1.5 times larger than the Oracle7 i_file#_block# index.  

NEW_DBNAME  

Specifies a new name for the migrated database. The default name "DEFAULT" should not be used; choose a more meaningful name.  

NLS_NCHAR  

Specifies the National Language Standard (NLS) NCHAR character set in PROPS$ for the Oracle8i database, for example W52DEC or US7ASCII. If no NLS_NCHAR option is specified, the Migration utility uses the Oracle7 database character set.  

NO_SPACE_CHECK  

When TRUE, the Migration utility does not perform a space usage check before the migration. When FALSE, the Migration utility performs a space usage check before migration. This command-line option is mutually exclusive with CHECK_ONLY.  

PFILE  

Specifies the name of the initialization parameter file. If no PFILE command-line option is specified, the Migration utility uses the default initsid.ora file.

Note: On UNIX, the pathname must be enclosed by double-quotes escaped by a backslash, for example:

mig PFILE=\"/tmp/mig/pfile\"
 

SPOOL  

Specifies the filename for the spool output.

Note: On UNIX, the pathname must be enclosed by double-quotes escaped by a backslash, for example:

mig  SPOOL=\"/tmp/mig/spool\"
 

Migrate the Oracle7 Source Database

Complete the steps in the following sections to migrate an Oracle7 source database to Oracle8i using the Migration utility.

Prepare the Oracle7 Environment for Migration

The migprep utility prepares the Oracle7 environment for migration by copying required migration files from the Oracle8i Oracle home to the Oracle7 Oracle home. With your environment variables pointing to the new release 8.1 Oracle home, run migprep in the following way:

migprep new_oracle_home old_oracle_home
     

Where new_oracle_home is the complete path for the new Oracle8i Oracle home directory and old_oracle_home is the complete path for the old Oracle7 Oracle home directory.

For example, on UNIX, if your new Oracle8i Oracle home is /oracle/product/8.1 and your old Oracle7 Oracle home is /oracle/product/7.3, enter the following to run migprep:

migprep /oracle/product/8.1 /oracle/product/7.3

On Windows NT, if your new Oracle8i Oracle home is \oracle\product\8.1 on the E drive and your old Oracle7 Oracle home is \oracle\product\7.3 on the D drive, enter the following to run migprep:

migprep e:\oracle\product\8.1 d:\oracle\product\7.3

Migration Steps in the Oracle7 Environment

Complete the following migration steps in the Oracle7 environment:

  1. Make sure the following environment variables point to the Oracle7 directories:

  2. Refer to your operating-system specific documentation to verify the system settings that control the placement of new Oracle8i database objects you will be creating.

    The following examples illustrate operating-system specific variable settings:

  3. Set the ORA_NLS33 environment variable to the following directory in your Oracle7 environment:

    $ORACLE_HOME/migrate/nls/admin/data
    
    
  4. Make sure the NLS_LANG environment variable is set to the character set you are using for your database.

    To check your character set, issue the following SQL statement:

    SELECT * FROM v$nls_parameters 
       WHERE parameter = 'NLS_LANGUAGE'   
          OR parameter = 'NLS_TERRITORY'
          OR parameter = 'NLS_CHARACTERSET';
    
    

    You use all three values returned by this query to set NLS_LANG. For example, if your NLS_LANGUAGE is AMERICAN, your NLS_TERRITORY is AMERICA, and your NLS_CHARACTERSET is WE8ISO8859P1, set NLS_LANG to the following:

    AMERICAN_AMERICA.WE8ISO8859P1
    
    

    See Also:

    Oracle8i National Language Support Guide for information about setting NLS_LANG.  

  5. Make sure you have DBA privileges, which are required to run the Oracle8i Migration utility.

    To check if you have DBA privileges, query the DBA_ROLE_PRIVS static data dictionary view. For example, if you are connected as user SYSTEM, enter the following SQL statement:

    SELECT * FROM dba_role_privs WHERE grantee = 'SYSTEM';
    
    

    You have DBA privileges if 'DBA' is listed in the GRANTED_ROLE column for the user. If you do not have DBA privileges, connect as a user who does.

  6. Make sure no other DBA with RESTRICTED SESSION privilege connects to the database while the Migration utility is running. Also, "Normal" users should not connect to the database during migration.

  7. Shutdown the Oracle7 database cleanly using the SHUTDOWN NORMAL or SHUTDOWN IMMEDIATE command; do not use SHUTDOWN ABORT. The Oracle7 source database must be shut down cleanly; therefore, no redo information or uncommitted transactions can remain.

    SVRMGR> SHUTDOWN IMMEDIATE
    
    

    If you are using Oracle Parallel Server, shutdown all instances.


    Note:

    If you do not shut down the Oracle7 database before migration starts, the Migration utility will stop and display an error message.  


  8. Make sure you have enough space in the SYSTEM tablespace (optional).

    A common migration problem is running out of space in the SYSTEM tablespace during migration. The Migration utility will not complete the migration unless sufficient space is allocated in the SYSTEM tablespace. To determine disk space requirements for a successful migration, run the Oracle8i Migration utility with the CHECK_ONLY command-line option set to TRUE by entering the following at a system prompt:

    mig CHECK_ONLY=TRUE
    
    

    The CHECK_ONLY command-line option causes the Migration utility to assess the amount of disk space required for migration, check the amount of space available, and issue an informational message about the disk space requirements. When the CHECK_ONLY command-line option is set to TRUE, the Migration utility does not build the Oracle8i data dictionary or perform any other migration processing.

    If the CHECK_ONLY command-line option shows that you need to add more space to the SYSTEM tablespace, issue a command similar to the following, substituting the appropriate directory path and name for the new datafile and the amount of space you need to add:

    ALTER TABLESPACE system
       ADD DATAFILE '/home/user1/mountpoint/oradata/db1/system02.dbf'
       SIZE 50M;
    
    

    If you add space to the SYSTEM tablespace, remember to shut down the database when you are finished.

  9. Run the Oracle8i Migration utility by entering the Migration utility command at the system prompt:

    mig
    
    

    The command is mig unless stated otherwise in your operating-system specific Oracle documentation. Enter mig alone to run the Migration utility with a default set of options, or enter mig followed by one or more selected options.

    See Also:

    "Review Migration Utility Command-Line Options" for information about command-line options.  

  10. Check the results after running the Migration utility. The Migration utility generates informational messages and echoes its progress as it runs the migrate.bsq script. If the Migration utility exits with an ORA- error, check Appendix A, "Troubleshooting Migration Problems" for information about the error and the actions to perform to resolve the problem.

    The Migration utility creates a convert file that contains the information of the Oracle7 control file. Later in the migration process, the convert file is used by ALTER DATABASE CONVERT to create a new control file in Oracle8i.

    The name and location of the convert file are operating-system specific. For example, on a UNIX operating system, the default location is $ORACLE_HOME/dbs in the Oracle7 environment, and the default filename in this directory is convsid.dbf, where sid is your Oracle7 instance ID. On Windows NT, the default location is $ORACLE_HOME\database in the Oracle7 environment, and the default filename in this directory is convert.ora.



    CAUTION:

    Do not open the Oracle7 database, which was shut down by the Oracle8i Migration utility. To ensure datafile version integrity, the SCNs in the dictionary, the convert file, and file header must all be consistent when the database is converted to Oracle8i. If the Oracle7 database is opened after running the Migration utility, the SCN check will fail when the database is converted to Oracle8i, and an ORA-1211 error will be displayed, stating "Oracle7 datafile is not from migration to Oracle8". Therefore, if the Oracle7 database is opened, you must rerun the Migration utility, starting at Step 7.  


Preserve the Oracle7 Source Database

After you successfully run the Migration utility, perform a cold backup of the Oracle7 database. This backup serves the following purposes:

In addition, perform a backup of the entire Oracle7 software distribution, including the Oracle7 home directory. Make sure the backup includes the following:

Migration Steps in the Oracle8i Environment

Complete the following migration steps in the Oracle8i environment:

See Also:

If you are migrating an Oracle Parallel Server on Windows NT, see the Oracle Parallel Server Getting Started for Windows NT for important Operating System Dependent (OSD) layer instructions.  

  1. Make sure that the following environment variables point to the Oracle8i executables:

    • ORACLE_HOME

    • PATH

    • LD_LIBRARY_PATH

    • ORA_NLS

    • ORACLE_BASE

    • ORACLE_PATH (if set)

    If ORACLE_HOME points to the Oracle7 executables, an ORA-223 error is displayed when you run the ALTER DATABASE CONVERT command later in the migration process, stating "conversion data file is invalid or incorrect version".


    Note:

    Some of these environment variables may not apply to your operating system.  



    Note:

    For Oracle Parallel Server, perform this step on all nodes.  


    See Also:

    Your operating-system specific Oracle8i installation documents for information about setting other important environment variables on your operating system.  

  2. Either remove or rename the database's control files, or use the CONTROL_FILES initialization parameter to specify new control file names. The CONTROL_FILES initialization parameter typically is set in the initsid.ora file, but, if you are using Oracle Parallel Server, it may be set in the initdb_name.ora file instead.

    The ALTER DATABASE CONVERT command automatically creates new control files. If you do not use the CONTROL_FILES parameter, this command uses the control file names of your pre-migration database (derived from the CONVERT file) and returns an error if the control files already exist. Therefore, in this case, you must remove or rename the control file(s).

    However, if you use the CONTROL_FILES parameter to specify new control file names, the ALTER DATABASE CONVERT command creates the new control file(s) with the names you specify, and you do not need to remove the old control files.

    Control files are considerably larger in Oracle8i than in Oracle7. For example, Oracle7 control files in the hundreds of kilobytes may expand into tens of megabytes in Oracle8i. The larger size in Oracle8i results from the storage of more information in the control file, such as backup and tablespace records. This size increase could be important if a control file is on a raw device or if its available disk space is restricted.


    Note:

    CONTROL_FILES specifies one or more names of control files, separated by commas. Oracle Corporation recommends using multiple files on different devices or mirroring the file at the operating system level. See the Oracle8i Administrator's Guide for more information.  



    Note:

    For Oracle Parallel Server, perform this step on all nodes.  


  3. Copy files that are important for migration to a location outside of the Oracle7 Oracle home:

    1. Move or copy the convert file from the Oracle7 Oracle home directory to the Oracle8i Oracle home directory. On most UNIX operating systems, the convert file, convsid.dbf (where sid is the Oracle8i database name), should reside in $ORACLE_HOME/dbs in both the Oracle7 and the Oracle8i environment. On Windows NT, the convert file, convert.ora, should reside in $ORACLE_HOME\database in both the Oracle7 and the Oracle8i environment.

    2. If you have a password file that resides within the Oracle7 Oracle home, move or copy the password file to a location outside of the Oracle7 Oracle home directory.

      The name and location of the password file is operating-system specific; for example, on UNIX operating systems, the default password file is $ORACLE_HOME/dbs/orapwsid, but on Windows NT, the default password file is $ORACLE_HOME\database\pwdsid.ora. In both cases, sid is your Oracle instance ID.

    3. If your initsid.ora file resides within the Oracle7 Oracle home, move or copy it to a location outside of the Oracle7 Oracle home. In past releases, the default location for the initsid.ora file was $ORACLE_HOME/dbs on UNIX and $ORACLE_HOME\database on Windows NT, but in release 8.1, the default location is $ORACLE_BASE/admin/sid/pfile, where sid is the Oracle instance ID. The initsid.ora file can reside anywhere you wish, but it should not reside in the Oracle7 Oracle home after you migrate to Oracle8i.

    4. If the initsid.ora file contains an IFILE (include file) entry that resides within the Oracle7 Oracle home, copy the file specified in the IFILE entry to a location outside of the Oracle7 Oracle home.

    5. If you are using Oracle Parallel Server and your initdb_name.ora file resides within the Oracle7 Oracle home, move or copy the initdb_name.ora file to a location outside of the Oracle7 Oracle home.

  4. Adjust the initsid.ora file in the Oracle8i environment for use with Oracle8i. Specifically, complete the following steps:

    1. Set the COMPATIBLE initialization parameter in your initsid.ora file to a valid version 8 setting, such as 8.0.5 or 8.1.0. Make sure the COMPATIBLE parameter is not set to any Oracle7 release, because if it is, you will not be able to start the Oracle8i database and the migration will fail. See "Setting the COMPATIBLE Parameter" for information.

    2. Remove obsolete parameters and adjust changed parameters. Certain Oracle7 initialization parameters are obsolete in version 8. Remove all obsolete initialization parameters from any initsid.ora file that will start an Oracle8i instance; obsolete parameters may cause errors in Oracle8i. Also, alter any parameter whose syntax has changed in version 8; refer to Appendix B, "Changes to Initialization Parameters" for lists of new, renamed, and obsolete parameters. Also, if you are using Oracle Parallel Server, see Oracle8i Parallel Server Concepts and Administration for more information about obsolete Oracle Parallel Server initialization parameters.

    3. If you are updating snapshots automatically by using the JOB_QUEUE_PROCESSES initialization parameter, comment out the this parameter in the initsid.ora file. After migrating your database, you can remove the comments to use this parameter normally.

    4. Adjust the LARGE_POOL_SIZE setting, if required. In release 8.1 of Oracle, the LARGE_POOL_SIZE setting may be calculated automatically by Oracle. If the automatic setting is too large, it may increase the time required to perform your migration. See "Parallel Execution Allocated from Large Pool" for more information.

    5. If you are using Oracle Parallel Server, set the PARALLEL_SERVER initialization parameter to FALSE. You can change it back to TRUE after migration is complete.

    6. If you are using a Distributed Lock Manager (DLM) on a UNIX operating system, make sure you set the LM_LOCKS, LM_RESS, and LM_PROCS initialization parameters equal to the lock, resource, and process parameters for the DLM used in Oracle7.

    7. Make sure your DB_DOMAIN initialization parameter is set properly.

    8. Edit the initsid.ora file in the new location by changing any question marks (?) in pathnames to the full path for the old Oracle7 Oracle home. If the full pathname for Oracle home is stated, you do not need to edit the initsid.ora file. The initsid.ora file should contain only full pathnames, not relative pathnames.

    9. If the initsid.ora file contains an IFILE entry, change the IFILE entry in the initsid.ora file to point to the new location you copied it to in Step 3. Then, edit the file specified in the IFILE entry in the same way that you edited the initsid.ora file in sub-steps a to h.

    10. If you are using Oracle Parallel Server, modify the initdb_name.ora file in the same way that you modified the initsid.ora file in steps a to h.

    Make sure you save all of the files you modified after making these adjustments.


    Note:

    For Oracle Parallel Server, perform this step on all nodes.  


  5. If the Oracle8i DB_NAME is different from the Oracle7 DB_NAME, complete the following steps. Otherwise, skip to Step 6.

    1. On UNIX operating systems, rename the convsid.dbf file to match the Oracle8i DB_NAME. For example, if the Oracle7 DB_NAME is DBMS7 and the Oracle8i DB_NAME is DBMS8, rename the convert file from convDBMS7.dbs to convDBMS8.dbs. This action is not necessary on Windows NT.

    2. Set the DB_NAME parameter in the initsid.ora file to the Oracle8i database name.

  6. Make sure all online data files are accessible and in the correct directories. If you are using a raw disk, log files also must be accessible.

  7. Change to the $ORACLE_HOME/rdbms/admin directory. You should be in the Oracle8i Oracle home.

  8. Start Server Manager.

  9. Connect to the database instance:

    SVRMGR> CONNECT INTERNAL
    
    
  10. Start an Oracle8i database instance without mounting the new Oracle8i database:

    SVRMGR> STARTUP NOMOUNT 
    
    


    CAUTION:

    Starting the database instance in any other mode might corrupt the database.  


    You may need to use the PFILE option to specify the location of your initsid.ora file.

    You may see error messages listing obsolete parameters. If so, shut down the database, edit the initsid.ora file to remove the parameters listed, and then run STARTUP NOMOUNT again.

  11. Create a new Oracle8i database control file and convert the file headers of all online tablespaces to Oracle8i format by issuing the following command:

    SVRMGR> ALTER DATABASE CONVERT;
    
    

    Successful execution of this command is the "point of no return" to Oracle7 for this database. However, if necessary, you can restore the Oracle7 database from backups.

    If errors occur during this step, correct the conditions that caused the errors and rerun the Migration utility. Restart at Step 1. Otherwise restore the backup you performed after you ran the Migration utility.

    See Also:

    "Problems at the ALTER DATABASE CONVERT Command" for information about common errors encountered at this step and the actions required to resolve them.  

  12. Open the Oracle8i database with the following command:

    SVRMGR> ALTER DATABASE OPEN RESETLOGS; 
    
    

    When the Oracle8i database is opened, all rollback segments that are online are converted to the new Oracle8i format.

    If you encounter errors when you issue this command, start the Migration process over from the beginning, ensuring the database is not opened in the Oracle7 environment after the Migration utility completes. Start from the beginning of this chapter, Chapter 3, but make sure you completed all of the pre-migration steps described in Chapter 2.

  13. Set the system to spool results to a log file for later verification of success:

    SVRMGR> SPOOL catoutm.log
    
    

    If you want to see the output on your screen of the scripts you will run, you also can issue a SET ECHO ON statement:

    SVRMGR> SET ECHO ON
    
    
  14. Run the Oracle8i database conversion script u0703040.sql:

    SVRMGR> @u0703040.sql
    
    

    The u0703040.sql script is the database conversion script for all 7.1, 7.2, and 7.3 releases supported by the Migration utility on your operating system. The u0703040.sql script creates and alters certain system tables and drops the MIGRATE user. It also runs the catalog.sql and catproc.sql scripts, which create the system catalog views and all the necessary packages for using PL/SQL.

    If you encounter any problems when you run this script, or any of the scripts in the remaining steps, correct the cause(s) of the problems and rerun the script. You can rerun any of the scripts described in this chapter as many times as necessary.

    See Also:

    "Running Scripts" for information about the types of errors to look for when you run a script.  


    Note:

    If the u0703040.sql script runs for an inordinately long time, it may be caused by a setting for LARGE_POOL_SIZE that is too large for your installation. Use the V$PARAMETER view to check the setting for LARGE_POOL_SIZE, and if it is too large, set it to a smaller value in your initsid.ora file. See "Parallel Execution Allocated from Large Pool" for more information.  


  15. If the Oracle system has Advanced Replication installed, complete the following steps:

    1. Run catrep.sql:

      SVRMGR> @catrep.sql
      
      
    2. Run r0703040.sql:

      SVRMGR> @r0703040.sql
      
      

      This r0703040.sql script performs a post-catrep.sql Advanced Replication related upgrade.

  16. If the Oracle system has Oracle Parallel Server installed, run the following catalog script supplied with your new release:

    SVRMGR> @catparr.sql
    
    
  17. Run utlrp.sql (optional):

    SVRMGR> @utlrp.sql
    
    

    The utlrp.sql script recompiles all existing PL/SQL modules that were previously in an INVALID state, such as packages, procedures, types, etc. These actions are optional; however, they ensure that the cost of recompilation is incurred during installation rather than in the future.

    Oracle Corporation highly recommends performing this optional step.

  18. Turn off the spooling of script results to the log file:

    SVRMGR> SPOOL OFF 
    
    

    Then, check the spool file and verify that the packages and procedures compiled successfully. You named the spool file in Step 13; the suggested name was catoutm.log.

    You should look for errors that alert you to insufficient space, and for errors that alert you that a script failed to run. If you see these types of errors, your migration may not be completely successful. However, you typically can ignore errors about the failure to alter or drop an object that does not exist.

    If you specified SET ECHO ON, you may want to SET ECHO OFF now:

    SVRMGR> SET ECHO OFF
    
    
  19. Run SHUTDOWN on the Oracle8i database:

    SVRMGR> SHUTDOWN IMMEDIATE
    
    


    CAUTION:

    Use SHUTDOWN NORMAL or SHUTDOWN IMMEDIATE. Do not use SHUTDOWN ABORT.  


    Executing this clean shutdown flushes all caches, clears buffers, and performs other DBMS housekeeping activities. These measures are an important final step to ensure the integrity and consistency of the newly migrated Oracle8i database.

    The COMPATIBLE initialization parameter controls the compatibility level of your database. Set the COMPATIBLE initialization parameter in your initsid.ora file based on the compatibility level you want for your migrated database.

    See Also:

    "Setting the COMPATIBLE Parameter" for information.  

  20. Complete the procedures described in Chapter 6, "After Migrating the Database".


    CAUTION:

    If you retain the old Oracle7 software, never start the migrated database with the old Oracle7 software. Only start the database with the executables in the new Oracle8i installation.  


Troubleshooting Errors During Migration

Errors may be caused by the following actions or omissions:

Abandoning the Migration

If you took a backup of your Oracle7 database before you ran the Migration utility, the easiest way to abandon a migration is to restore that backup. However, if you do not have a backup, or if you took the backup after running the Migration utility, you must complete the procedure described in this section to abandon the migration.

You can run the Oracle8i Migration utility multiple times and still return to the Oracle7 database. However, running the Migration utility automatically eliminates the Oracle7 database catalog views. Therefore, to return to the Oracle7 database after running the Migration utility, you must run the Oracle7 catalog.sql script to restore the Oracle7 database catalog views.


Note:

You cannot use the procedure below to abandon the migration if you already executed the ALTER DATABASE CONVERT command. If you executed this command and want to return to Oracle7, complete the procedure in Chapter 13, "Downgrading to Oracle7".  


To abandon the migration, you generally must restore the Oracle7 database by completing the following steps in the Oracle7 environment:

  1. Start the Oracle7 database using Server Manager.

  2. Drop the user MIGRATE:

    SVRMGR> DROP USER MIGRATE CASCADE;
    
    
  3. Rerun catalog.sql and catproc.sql:

    SVRMGR> @catalog.sql
    SVRMGR> @catproc.sql
    
    
  4. If Server Manager is installed, run catsvrmg.sql:

    SVRMGR> @catsvrmg.sql
    
    
  5. If Parallel Server is installed, run catparr.sql:

    SVRMGR> @catparr.sql
    
    
  6. If Advanced Replication is installed, run catrep.sql:

    SVRMGR> @catrep.sql
    
    


    Note:

    The Oracle8i Migration utility upgrades release 7.1 and release 7.2 databases to release 7.3. If the original Oracle7 production database was release 7.1 or 7.2 and the migration is run but abandoned before the conversion to Oracle8i, the Oracle7 database will be left with a dictionary that is release 7.3. However, is such a case, you do not need to downgrade from release 7.3 to release 7.1.or 7.2; your release 7.1. or 7.2 software should work with the data dictionary without the need for further action.  





Prev

Next
Oracle
Copyright © 1999 Oracle Corporation.

All Rights Reserved.

Library

Product

Contents

Index