Oracle8 Installation Guide Release 8.0.4 Part Number A56097-01 |
|
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.
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.
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. |
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.
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.
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.
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 init
sid.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.
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.
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.
Export/import requires greater system resources than migration: exported data must be written to disk, and memory must be allocated for the export buffer.
Perform the following tasks before upgrading to the Oracle8 Server:
Confirm that the environment in which you are installing the Oracle8 Server meets the requirements for installation.
$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 |
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. |
Table 1-3 lists the products included in the 8.0.4 distribution, and indicates restrictions and requirements for installation.
Perform all pre-upgrade tasks before beginning to upgrade the Oracle8 Server installation.
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.
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.
Shut down existing SQL*Net or Oracle Net8 listeners before starting installation.
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 from the Oracle8 distribution into the existing ORACLE_HOME directory, using the Installer provided with the new release.
Note:
Ignore the message to run the |
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 init
sid.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
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 |
Perform the following tasks to upgrade the Oracle Server.
Set the following environment variables in the .profile
or .login
file of the oracle account.
Add the $ORACLE_HOME/lib
directories for the new Oracle8 Server.
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
.
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.
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 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.
$ ./orainst /mSee Also:
Chapter 3, "Installation Tasks" for detailed instructions on running the Installer. |
Modify the Oracle Server parameter files to reflect the new location of the Oracle software, relative to existing database files.
init
sid.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 init
sid.ora
file accordingly.
init
sid.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:
Question marks are interpreted as "the current value of ORACLE_HOME," so leaving them in the init
sid.ora
file will prevent the Oracle8 Server from locating the files in the updated environment.
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. |
init
sid.ora
file contains an ifile
(include file) entry, the entry specifies another file you must check, typically the config
dbname.ora
file. Locate the include file and copy it to the same directory as the init
sid.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 init
sid.ora
file:
init
sid.ora
file for Oracle8.
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.
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.
$ORACLE_HOME/migrate/nls/admin/data
directory.
init
sid.ora
file.
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.
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 |
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 |
You can ignore the prompt to run the |
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." |
conv
sid.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.
SVRMGR> STARTUP NOMOUNT
SVRMGR> ALTER DATABASE CONVERT
SVRMGR> ALTER DATABASE OPEN RESETLOGS
warning:
Converting the database is irreversible. You cannot migrate from Oracle8 to Oracle7. |
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.
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.
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.
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.
To upgrade product database objects, select the Create/Upgrade Database Objects option at the Installation Activity Choice screen.
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.
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 init
sid.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.
To relocate database files:
file.list
in the example below).
$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.
init
sid.ora
or config
dbname.ora
) to reflect the new location of the control files.
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.
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:
Repeat the command for all files you must relocate. Always provide complete, absolute pathnames in the RENAME FILE clause.
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. |
init
sid.ora
, log, and control files are in their new locations, remove the old database files.
root.sh
script to complete the upgrade.
See Also: |
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.