Oracle8 Installation Guide
Release 8.0.4

Part Number A56097-01

Library

Product

Contents

Index

Prev Next

5
Upgrading and Migrating

This chapter describes the procedure for upgrading an Oracle Server installation on Solaris 2.x. Use this chapter in conjunction with Oracle8 Migration, which describes new functionality, backwards compatibility, and application migration issues.

Selecting an Upgrade Method

Moving from an existing Oracle Server release to a newer release is referred to as an "upgrade." Every upgrade involves at least a software upgrade. An upgrade may require upgrading database objects and migrating the database, depending on the Oracle Server release from which you are upgrading. Figure 5-1 shows the additional procedures required for your system.

Definitions

Software Upgrade

A software upgrade installs the current release of the Oracle8 software on a system that has a prior release of the Oracle Server installed. Upgrading software might or might not require upgrading product database objects. A software upgrade does not alter data stored in the database, nor does it alter the data dictionary.

Note:

Except for patch installations, Oracle Corporation strongly recommends that software upgrades should be performed in a separate ORACLE_HOME directory from the existing installation.

 

Database Object Upgrade

Some Oracle products use database roles, views, tables, or indexes for internal purposes. These database objects typically need to be upgraded when performing a major upgrade (for instance, if a view has been modified to provide more information). Information for determining if you must upgrade database objects is provided.

Database Migration

A database migration alters the data dictionary and other control structures to make an existing database conform to the definitions of a different Server release. Migration is performed in addition to a software upgrade, when moving between different Server versions, such as from Oracle7 to Oracle8. Migration is never used between two Oracle8 releases.

Migration can be accomplished with the Migration utility, which converts the structures in an existing database, or by performing an export/import, which copies the data from one database into the structures of another database.

Figure 5-1 Determining the Appropriate Upgrade Method

Restrictions and Other Considerations

Upgrading from Oracle Server Version 6

There is no facility for migrating directly from a version 6 Oracle Server to the Oracle8 Server. If you want to move from version 6 to Oracle8, you must first migrate to Oracle7 release 7.1.4 or higher.

Migrating and Block Size

To use the Migration utility, the Oracle7 and Oracle8 Servers must use the same database block size. If there is an entry for the DB_BLOCK_SIZE parameter in the Oracle7 initsid.ora file, do not change the setting. If you want to change the DB_BLOCK_SIZE for the Oracle8 Server you must use the export/import method.

Migrating Between Operating Systems

If you migrate between operating systems, as well as between versions of the Oracle Server, you must use the export/import method. The Migration utility does not support different operating systems in the source and destination environments.

Time Available

Export/import is slower than the migration utility, because it copies data out of the old database and into the new one. Migration is faster, especially for very large databases, because it makes changes only in the data dictionary of the existing database. Migration might be the only option for databases that require high availability.

System Resources

Export/import requires greater system resources than migration: exported data must be written to disk, and memory must be allocated for the export buffer.

Pre-Upgrade Tasks

Perform the following tasks before upgrading to the Oracle8 Server:

Verify Environment Setup for Oracle8
Back Up the Existing Oracle Database
Comply with Pre-Installation Requirements for Oracle Products
Complete Pre-Upgrade Tasks
Prepare the Migration Utility

Verify Environment Setup for Oracle8

Confirm that the environment in which you are installing the Oracle8 Server meets the requirements for installation.

  1. Check the system requirements listed in Chapter 1, "Requirements and Features", and the summary table in Chapter 2, "Setting the Environment" to make sure the environment meets all requirements for Oracle8.
    Note:

    On systems where more than one Oracle Server is installed under the same oracle account, it is essential that the environment be set to the Server you want to upgrade. This is especially true of the ORACLE_HOME, ORACLE_SID, and PATH environment variables.

     
  2. Make a list of all products in the existing installation. Such a list is valuable during later stages of upgrading. One way to generate a list of installed products is to print the file $ORACLE_HOME/orainst/unix.rgs. The Installer uses this file as a registry of installed products and version numbers.
    Note:

    Products not installed with the Installer do not show up in the unix.rgs file.

     

Back Up the Existing Oracle Database

Perform a full backup of the existing Oracle database before you perform any upgrade. A full backup ensures that you can recover from errors encountered during the upgrade process.

This backup should be taken with the database shut down cleanly. If you must use SHUTDOWN IMMEDIATE or SHUTDOWN ABORT to force users off the system, be sure to restart the database in restricted mode, then shut it down with normal priority. Once you have taken the backup, do not restart the Server until you have completed the migration.

See Also:

Backing up a Database", in the Oracle Administrator's Guide, or the Backup and Recovery Handbook.

 

Comply with Pre-Installation Requirements for Oracle Products

Table 1-3 lists the products included in the 8.0.4 distribution, and indicates restrictions and requirements for installation.

Complete Pre-Upgrade Tasks

Perform all pre-upgrade tasks before beginning to upgrade the Oracle8 Server installation.

Oracle8 Server

The Oracle Server must be shut down prior to being upgraded. If the Server is not shut down when you start the upgrade, the Installer will shut it down automatically.

Note that the Installer determines the database it will upgrade based on the user's environment. It is the responsibility of the user to ensure that the environment variables ORACLE_HOME and ORACLE_SID are set to the database you want to upgrade

See Oracle8 Migration for information on issues and restrictions when upgrading to release 8.0.4.

Oracle Parallel Server

When upgrading an Oracle Parallel Server, follow the instructions in this chapter to upgrade the initial node first. After upgrading the initial node, start a new Installer session and use the Install Oracle8 on Cluster option to upgrade the product software on additional nodes.

Oracle Net8

Shut down existing SQL*Net or Oracle Net8 listeners before starting installation.

Prepare the Migration Utility

Perform this task only when migrating the database using the Migration utility. If you are unsure whether to use the Migration utility, see "Selecting an Upgrade Method" on page 5-2. To migrate the database using the export/import method, see "Export/Import" on page 5-15.

Install the Migration Utility

Install the Migration utility from the Oracle8 distribution into the existing ORACLE_HOME directory, using the Installer provided with the new release.

  1. Start the Installer provided in the new release and select the Migrate from ORACLE7 to ORACLE8 option at the Installation Options screen.
  2. Enter the pathname of the Oracle7 ORACLE_HOME directory name at the prompt.
  3. Select the Install Migration Utility option from the Migration screen.
  4. Select the Migration Utility: ORACLE7 to ORACLE8 from the Software Asset Manager screen and select the Install button. The Installer installs the following items:
    • the Migration utility executable, mig, in the $ORACLE_HOME/bin directory
    • the migrate.bsq script in the $ORACLE_HOME/dbs directory
    • required NLS files in the $ORACLE_HOME/migrate/nls/admin/data directory
  5. The Installer notifies you when it has finished installing the Migration utility.
    Note:

    Ignore the message to run the root.sh script.

     
  6. If you do not already have a list of installed Oracle7 products, use the Installed Products window of the Software Asset Manager to make one. The list is useful later in the migration.
  7. Exit the Installer.

Verify Space in SYSTEM Tablespace

An Oracle8 database requires approximately 150% as much space in the SYSTEM tablespace as the equivalent Oracle7 database. Verify that the SYSTEM tablespace in your Oracle7 database is large enough, before migrating the database.

If your initsid.ora is in the default directory $ORACLE_HOME/dbs, you can verify space availability by running the Migration utility from the command line as follows:

$ mig SPOOL='"filename"' CHECK_ONLY=TRUE

Otherwise, you must specify the parameter PFILE in the Migration command:

$ mig PFILE='"initsid.ora_file"' SPOOL='"filename"' CHECK_ONLY=TRUE

Export the Full Database

Perform this task only if you are planning to export/import the database.

Export the full database using the Export utility provided with the source database. See Chapter 1, "Export", in Oracle7 Server Utilities for detailed information on the Export utility and the available command line options.

Note:

If you are exporting to a database on a different operating system, be sure to use the RECORDLENGTH parameter in the exp command. On Solaris 2.x, the default record length is 32,768 bytes.

 

Upgrading

Perform the following tasks to upgrade the Oracle Server.

Set Environment Variables for New Server
Install Oracle8 Server in New ORACLE_HOME Directory
Update Parameter Files
Migrate Database (If Necessary)
Upgrade Product Database Objects
Relocate Database Files to an OFA-Compliant Structure

Set Environment Variables for New Server

Set the following environment variables in the .profile or .login file of the oracle account.

LD_LIBRARY_PATH

Add the $ORACLE_HOME/lib directories for the new Oracle8 Server.

ORACLE_HOME

Set to the pathname of the new ORACLE_HOME directory (the Installer will create the directory if it doesn't already exist). For OFA-compliance, the new directory should be at the same level of the directory structure as the existing ORACLE_HOME directory. For example, if the existing ORACLE_HOME is /u01/app/oracle/product/7.3.3, the setting for the new Server would be /u01/app/oracle/product/8.0.4.

ORACLE_SID

Set to the sid, or instance name, of the existing Oracle Server, unless you plan to change the name of the instance and database for Oracle8. If you change the instance name for Oracle8, set ORACLE_SID to the new sid.

PATH

Add the full pathname of the new $ORACLE_HOME/bin before the existing $ORACLE_HOME/bin.

Update the current environment from the .profile or .login file after you have edited the file.

Install Oracle8 Server in New ORACLE_HOME Directory

Install the Oracle8 software in the new ORACLE_HOME directory using the Installer provided with the new release. Do not create database objects during this Installer session.

  1. Start the Installer provided with the new release:
$ ./orainst /m
See Also:

Chapter 3, "Installation Tasks" for detailed instructions on running the Installer.

 
  1. Select the Install, Upgrade, or De-Install Software option at the Installation Activity Choice screen.
  2. Select either the Install New Product - Do Not Create DB Objects, or Add/Upgrade Software option.
  3. Enter the ORACLE_HOME directory for the new Oracle8 Server when prompted.
  4. Select the products you want to install at the Software Asset Manager screen. Select the Install button to begin the installation.
  5. Answer the remaining Installer prompts.
  6. Exit the Installer when the software upgrade is complete.

Update Parameter Files

Modify the Oracle Server parameter files to reflect the new location of the Oracle software, relative to existing database files.

  1. Copy the initsid.ora file from the existing location to the appropriate location in the Oracle8 directory structure. If you are following the OFA recommendations in this manual, the new location should be in the $ORACLE_BASE/admin/sid/pfile directory. If you are changing the name of the database, rename the initsid.ora file accordingly.
  2. In the initsid.ora file, change any question marks (?) or at signs (@) in pathnames to the full pathname of the ORACLE_HOME directory. For example, change the line:
USER_DUMP_DEST = ?/admin/udump

to

USER_DUMP_DEST = /u01/oracle/admin/udump

Question marks are interpreted as "the current value of ORACLE_HOME," so leaving them in the initsid.ora file will prevent the Oracle8 Server from locating the files in the updated environment.

  • Check the file for a CONTROL_FILES parameter entry in the following format:
  • CONTROL_FILES = (location_of_control_files)

    Create or modify the CONTROL_FILES parameter by setting it to the absolute pathnames where the Oracle8 control files will reside. Note that you are not moving or changing the existing control files in any way; you are only specifying where the control files should be placed for the Oracle8 Server.

    Note:

    If you are migrating the database, the locations you specify for the control files must be empty. The actual control files are recreated during the database migration.

     

  • If the initsid.ora file contains an ifile (include file) entry, the entry specifies another file you must check, typically the configdbname.ora file. Locate the include file and copy it to the same directory as the initsid.ora file. Update the include file entry to point to the new version of the file, making sure the entry is an absolute pathname, not a relative one.

    Edit the include file as you did the initsid.ora file:

    • Change any question marks (?) in pathnames to the full name of the ORACLE_HOME directory.
    • Modify any CONTROL_FILES entry by setting it to the absolute pathnames of where new control files will reside.
    • If you are changing the name of the database, update the DB_NAME parameter and rename the file accordingly.
  • Check Appendix D, "Oracle8 INIT.ORA Changes" in Oracle8 Migration for other changes you must make in the initsid.ora file for Oracle8.
  • Migrate Database (If Necessary)

    If you need to migrate the database, use either the Migration utility or the export/import method; do not do both. If you do not need to migrate the database, proceed to "Upgrade Product Database Objects" on page 5-15.

    Migration Utility

    Run the Migration Utility

    Run the Migration utility that you installed in the Oracle7 ORACLE_HOME directory. You can run the utility from the command line, or by using the Installer provided with the new Oracle8 release. The following procedure describes running the Migration utility through the Installer.

    1. Set the ORACLE_HOME, ORACLE_SID, and PATH environment variables to refer to the Oracle7 installation. (Remember that you set these for the new Oracle8 installation before you performed the software upgrade.)
    2. Set the ORA_NLS33 environment variable to the $ORACLE_HOME/migrate/nls/admin/data directory.
    3. Be sure that you know the locations of the control files and initsid.ora file.
    4. Start the Installer provided with the new distribution. At the Installation Activity screen, choose the Install, Upgrade, or De-Install Software option.
    5. At the Installation Options screen, select the Migrate from ORACLE7 to ORACLE8 option.
    6. Select the Run Migration Utility option at the Migration screen.
    7. Enter the ORACLE_SID for the database to be migrated at the prompt.
    8. Select the Migration Utility: ORACLE7 to ORACLE8 at the Software Asset Manager screen and select the Install button.

      The Installer prompts you for the information necessary to invoke the Migration utility. Table 5-1 lists the prompts and provides additional information about them.

      Table 5-1 Migration Utility Prompts
      Prompt   Information  

      Enter sid

       

      Enter the instance name, or sid, of the database you are migrating.

       

      Do you want to be prompted for all command options?

       

      Unless you are certain you can use all the default values, answer Yes to this prompt.

       

      Spool output?

       

      Spooling the output of the Migration utility gives you a record of the actions taken in the migration. If you decline this option, output is sent only to standard output.

       

      Space-check only?

       

      This Migration utility has the ability to check for adequate space in the SYSTEM tablespace. Accepting this prompt means that the utility will only check the space; it will not perform the migration.

       

      DB_NAME = sid?

       

      Specify if database name is the same as the sid (on single-instance systems they are generally the same).

       

      Changing database name?

       

      Indicate if you are changing the name of the database during the migration.

       

      PFILE

       

      Enter the path and filename of the init.ora parameter file to be used with the sid database.

       

      NLS_NCHAR

       

      If the value of the NLS_NCHAR is different from the value that the database was created with, enter the correct value for NLS_NCHAR

       

      MULTIPLIER

       

      If the value for MULTIPLIER is different from the value that the database was created with, enter the correct value for MULTIPLIER.

       

      Change character set?

       

      If you want to change the storage character set during the migration, enter the new character set (valid character sets are listed in Appendix C, "National Language Support").

       

      Skip space checking?

       

      If you are certain that the SYSTEM tablespace has enough space for the Oracle8 data structures, you can specify that the Migration utility not perform space calculations.

       

      Information

       

      The Installer displays the full command it will use to invoke the Migration utility. If any part of the command is unsatisfactory, you can select the Back button and re-enter answers to the prompts in this table.

       

      Last chance...

       

      Confirm or abort the migration. Despite the warning from the Installer, it is still possible to abort the migration after this point. Issuing the ALTER DATABASE statement (page 5-15) is the point beyond which you cannot halt the migration.

       

      Information

       

      The Installer reports whether the Migration utility has completed successfully.

       

      Information

       

      If there are additional databases under the ORACLE_HOME directory, you can migrate them by returning to the Software Asset Manager screen, then selecting the Migration utility and Install button again.

       

      Rename or remove control files.

       

      The Installer instructs you to rename or remove all control files used with the Oracle7 database.

       

      Run the root.sh script.

       

      You can ignore the prompt to run the root.sh script after migrating the database.

       

    Complete the Migration

    Perform the following steps to complete migrating the Oracle7 database to Oracle8

    See Also:

    Oracle8 Migration describes the Migration utility and its command options in detail. You should read Chapter 5 of Oracle8 Migration, "After Migrating the Database."

     
    .

    1. Move the conversion file convsid.dbf from the Oracle7 $ORACLE_HOME/dbs directory to the Oracle8 $ORACLE_HOME/dbs directory. If the Oracle8 sid is different from the Oracle7 sid, rename the conversion file appropriately. Do not alter the conversion file in any other way.
    2. Verify that the CONTROL_FILES entry in the parameter file(s) points to locations without control files.
    3. Convert the database:
      SVRMGR> STARTUP NOMOUNT
      SVRMGR> ALTER DATABASE CONVERT
      SVRMGR> ALTER DATABASE OPEN RESETLOGS
    SVRMGR> @$ORACLE_HOME/rdbms/admin/cat8000.sql
    warning:

    Converting the database is irreversible. You cannot migrate from Oracle8 to Oracle7.

     

    Export/Import

    Create the New Database

    Because the Installer-created database is limited and intended primarily for testing purposes, Oracle Corporation recommends creating the database manually through Server Manager. See the Oracle8 Administrator's Guide for detailed information on creating a database.

    Import the Exported Files

    Use the Import utility provided with the target database to import the files you previously exported. See Chapter 2, "Import", in Oracle8 Utilities for detailed instructions on importing data into an Oracle8 Server.

    Note:

    If you are importing from a database on a different operating system, be sure to use the RECORDLENGTH parameter in the imp command. The record length must match the record length used during export. On Solaris 2.x, the default record length is 32,768 bytes.

     

    Upgrade Product Database Objects

    Some Oracle products use the database to store and manipulate information: Oracle ConText Option, for instance, stores its dictionary in a database table. The tables, indexes, and other objects created by Oracle products for internal use are called product database objects, and they usually need to be upgraded when product software is upgraded.

    When Not to Upgrade Product Database Objects

    As a rule, product database objects do not need to be upgraded during a minor upgrade: between release 2.1.1 and 2.1.2, for instance. Major upgrades-from 2.1 to 2.2 or 3.0, for instance-generally require any database objects to be upgraded. Products that do not follow this general rule include special instructions in their upgrade notes, which are listed in Table 1-3, "Restrictions, Requirements, and Installation Tasks for Server, Options, and Cartridges," on page 5 of Chapter 1.

    How to Upgrade Product Database Objects

    To upgrade product database objects, select the Create/Upgrade Database Objects option at the Installation Activity Choice screen.

    1. Start the Installer provided with the new Oracle8 release.
    2. Select the Create/Upgrade Database Objects option at the Installation Activity Choice screen.
    3. Select the Upgrade Database Objects option at the Database Options screen.
    4. At the prompt, enter the location of the new ORACLE_HOME directory.
    5. At the prompt, enter the ORACLE_SID for the database to be upgraded.
    6. Select the products for which you want to upgrade database objects at the Software Asset Manager screen and select the Install button.
    7. Select the version of the database you are upgrading at the DB Upgrade screen.
    8. At the Database Action screen:
      • If the product was not part of the old release and you are installing it for the first time, select the Create Product DB Objects option.
      • If the product was part of the old release, select the Upgrade Existing Product DB Objects option.
        Warning:

        Do not select the Create Product DB Objects option if the product was part of the old release. Consult the list of installed products you made during upgrade preparation as necessary.

         

    Exit the Installer when the database object upgrade is complete. If there is more than one database under the ORACLE_HOME directory, perform this task for each database, supplying the appropriate ORACLE_SID each time you restart the Installer.

    Relocate Database Files to an OFA-Compliant Structure

    This task is not required, but it is recommended for simplifying future maintenance and upgrades. The goal of the procedure is to separate database files from software and administrative files in the directory structure. Then, when you upgrade in the future, you can install software in a new location and use the initsid.ora file to direct the instance to the existing database files. Once satisfied with the upgraded production environment, you can easily remove the old Oracle software, reclaiming disk space.

    Warning:

    If you retain the old Oracle software, never start the upgraded database with it. This can corrupt the database files. Start the upgraded database only with the executables in the new ORACLE_HOME directory.

     

    To relocate database files:

    1. Change directories to the new ORACLE_HOME directory.
    2. Start Server Manager and execute the following SQL commands to generate a list of database and log files, and write the filenames to a file (file.list in the example below).
    SVRMGR> CONNECT INTERNAL
    SVRMGR> SPOOL file.list
    SVRMGR> SELECT * FROM v$dbfile;
    SVRMGR> SELECT * FROM v$logfile;
    1. Shut down the database with the SHUTDOWN NORMAL command.
    2. Back up the upgraded database. (The backup made during upgrade preparation is acceptable, as long as the database has not been opened since that backup was taken.)
    3. Copy the control files, typically in the $ORACLE_HOME/dbs directory, to the new locations. If you follow the OFA recommendations in this manual, the new locations should be the db_mount_point[1-3]/oradata/db_name directories. The syntax for copying a file to its new location looks like the following:

      Do not use variable syntax like $ORACLE_HOME or $ORACLE_BASE in the path when specifying the new locations.

    4. Change the CONTROL_FILES entry in the parameter file (initsid.ora or configdbname.ora) to reflect the new location of the control files.
    5. Copy the data files and log files to their new locations. Specify the new file locations using complete, absolute pathnames.

      If you are following the OFA recommendations in this manual, the new location should be the db_mount_point[1-3]/oradata/db_name directory. See the file.list file for the list of files you must copy.

      You should also record the full pathnames of the new files for future reference.

    6. Verify that the database is mounted and closed by executing the STARTUP MOUNT command from Server Manager.
    7. Update the database with the new file locations by executing the ALTER DATABASE command. Check file.list for a list of the files to rename; use the list of filenames you recorded in Step 7 for the new filenames.

      The syntax for the ALTER DATABASE RENAME FILE command should look like the following:

    SVRMGR> ALTER DATABASE 2> RENAME FILE '/u01/oracle/dbs/log1.dbf' 3> TO '/u02/oradata/prod/log01.dbf';

    Repeat the command for all files you must relocate. Always provide complete, absolute pathnames in the RENAME FILE clause.

  • Open the database by executing the ALTER DATABASE OPEN command.
  • Verify that all the database files and log files have the new names you specified.

    Create a newfile.list file in the same way you created file.list in Step 2, then compare the files. All the database files and log files listed in file.list should appear in their new locations in the newfile.list file.

    See Also:

    Managing Datafiles", in the Oracle8 Administrator's Guide.

     

  • When you are certain the database files are successfully relocated and the initsid.ora, log, and control files are in their new locations, remove the old database files.
  • Post-Upgrade Tasks

    Check Post-Installation Tasks
    Notify Users

    Check Post-Installation Tasks

    1. Run the root.sh script to complete the upgrade.
      See Also:

      Chapter 4, "Configuring the Oracle8 System".

       
    2. Perform any post-installation tasks not completed during the software upgrade portion of the upgrade (such as completing installation of online documentation). Post-installation tasks are listed in Chapter 4, "Configuring the Oracle8 System" of this manual.

    Notify Users

    Notify users to log out of the operating system and log back in. This activates the new ORACLE_HOME location for the upgraded database. It also runs the oraenv program, reads the new oratab file entry, and points users to the upgraded database.




    Prev

    Next
    Oracle
    Copyright © 1997 Oracle Corporation.

    All Rights Reserved.

    Library

    Product

    Contents

    Index