Oracle8i Personal Edition Administrator's Guide
Release 2 (8.1.6) for Windows 98

A85313-01

Library

Product

Contents

Index

Prev Next

4
Installing, Migrating, and Upgrading Databases

This chapter describes the options available to you when you have existing databases on your computer and want to install the latest release of Oracle8i Personal Edition. In particular, it describes how to migrate an Oracle7 database or upgrade an earlier Oracle8 database release to the current release of Oracle8i Personal Edition.

Specific topics discussed are:

Intended Audience

Read this chapter if you have existing Oracle7 and/or Oracle8 databases on your computer and you want to install Oracle8i Personal Edition for Windows 98 Release 8.1.6. If you are installing Oracle8i Personal Edition on a computer that has no other Oracle database releases, you do not have to read this chapter.

Additional Information:

See Oracle8i Installation for Windows 98 if you want to install Oracle8i Personal Edition on a computer containing no other databases. 


Note:

The generic Oracle8i Migration guide is the primary source of migration and upgrading information in the Oracle documentation set. You are frequently referred to the generic guide throughout this chapter, in particular to obtain information on what you must do before and after migrating or upgrading. Information on how to run the various migration and upgrade utilities is also provided in the generic guide, but the focus is on UNIX. This chapter provides information on using these utilities on Windows 98. 



Note::

The directory path examples in this chapter follow Optimal Flexible Architecture (OFA) guidelines (for example, ORACLE_BASE\ORACLE_HOME\). If you specified non-OFA compliant directories during installation, your directory paths will differ. See section "OFA and Multiple Oracle Home Configurations" for information. 


What to Do with Previous Oracle Database Releases

If you already have Oracle7, and/or Oracle8 databases on your computer and want to install Release 8.1.6, the following options are available to you.

If you are not sure what option is best for you, read the following overview sections:

Multiple Oracle Homes Overview

An Oracle home is a directory location where you can install software. Multiple Oracle homes functionality enables you to preserve your previous Release 7.x or 8.0.x databases in locations separate from where you will install Release 8.1.6. Installing a new database release in a separate Oracle home allows you to test it before migrating or upgrading your production databases to the new release. There have been modifications to multiple Oracle home functionality since it was introduced in Release 8.0.4. In particular, note:

Migrating, Upgrading, and Downgrading Overview

This section explains the difference between migrating, upgrading, and downgrading, and lists the Oracle database versions that can be migrated or upgraded.

What Is Migrating?

Migrating is the process of transforming an installed version of an Oracle database into a later version. For example, transforming an Oracle7 database to an Oracle8i database is migrating the database system.

Additional Information:

See "Migrating an Oracle7 Database to Oracle8i"

What Is Upgrading?

Upgrading is the process of transforming an installed version of an Oracle database release into another release of the same version. For example, transforming an Oracle8 database Release 8.0.4 to Release 8.1.6 is upgrading the database system.

Additional Information:

See "Upgrading an Oracle8 Database Release 8.0.x to 8.1.6"

What Is Downgrading?

Downgrading is the process of transforming an installed version of an Oracle database from a later release back into an earlier release. For example, transforming an Oracle database from Release 8.1.6 back into Release 8.0.4 is downgrading, and transforming an Oracle database from Version8 back into Version7 is downgrading.

Additional Information:

See Chapter 10, "Downgrading to an Older Version8 Release" for information about downgrading to Release 8.0, or Chapter 11, "Downgrading to Version7" for information about downgrading to version7 of Oracle8i Migration.

 

Migrating and Upgrading Using Multiple Oracle Homes

You can easily migrate or upgrade databases across multiple Oracle homes. If you use the graphical user interface (GUI) Oracle Data Migration Assistant, the earlier database instance on your system is displayed in a list box. You select the Oracle database instance you want to migrate or upgrade and the assistant takes care of any multiple Oracle homes issues.

If you use the command line tool MIG to migrate, or a U*.SQL script to upgrade, you need to copy files from one Oracle home directory to another. You must also ensure the PATH variable is set correctly so that any Oracle database tools you run are started from the correct Oracle home directory.

Additional Information:

See "Changing the Value of PATH".

 

Checklist of Database Release Numbers

Check that your Oracle database release can be migrated or upgraded directly to Release 8.1.6. This table provides a list of the database releases you can migrate or upgrade and the tools you can use to perform these tasks:

Oracle Database Release  Use This Tool... 

Release 7.3.4.x  

  • MIG or Oracle Data Migration Assistant can migrate databases that are Oracle7, Release 7.3.4.x or later to Release 8.1.6

 

Release 8.0.4.0.0 to 8.1.x 

  • SQL scripts executed in SQL*Plus can upgrade databases Release 8.0.4.0.0 to Release 8.1.6

  • Oracle Data Migration Assistant upgrades from Release 8.0.4.0.0 or later to Release 8.1.6

 

Release 8.1.5 to 8.1.6 

  • SQL scripts executed in SQL*Plus can upgrade databases Release 8.1.5 to Release 8.1.6

 

Export/Import Overview

An alternative method of migrating or upgrading is to:

  1. Export your data from the source database using the Export Utility (EXP). This will physically copy the data to the export dump file.

  2. Create an Oracle8i database into which you will import the exported data.

  3. Import the exported data into the new Oracle8i database using the Import Utility (IMP).

The Export Utility puts all of the data in one large binary file that might require large amounts of disk space.

Additional Information:

See "Choose a Migration Method" in Chapter 2, "Preparing to Migrate" of Oracle8i Migration for information on when to use the Export/Import utilities for migrating a database. See "Exporting an Existing Database" and "Importing a Database" for information on using these tools on Windows 98. 

Version 8 and Version 7 Client/Server Configurations

Oracle7 and Oracle8i clients can communicate either with Oracle7 or Oracle8i databases. This functionality gives you maximum flexibility when designing your network and deciding when to:

Consider the following "database coexistence" issues before you decide which of the above options is most suitable for your requirements:

Oracle7 Database Applications

Most Oracle7 applications can run on an Oracle8i database. Some applications cannot run on an Oracle8i database unless you upgrade them to versions that support Oracle8i databases. Contact your application vendor to check if your third-party applications are supported with.

Additional Information:

See Chapter 8, "Upgrading Your Applications" of Oracle8i Migration. 

Different Client and Database Release Considerations

Consider the following "client to database connection" issues before you decide if upgrading or migrating is appropriate for your environment:

Oracle8i Client Release 8.1 to Oracle8i Database Release 8.1

As the following diagram depicts, an Oracle8i Client Release 8.1 requires Net8 Client Release 8.1, and Oracle8i Release 8.1 database requires Net8 Server Release 8.1.

The Oracle8 Client Release 8.1 and clients must be configured with a service name, as described in "Using the Local Naming Method" in Chapter 5, "Configuring the Network" of Net8 Administrator's Guide.

Oracle8 Client Release 8.0/Oracle7 Client to Oracle8i Database Release 8.1

As the following diagram depicts, an Oracle8 Client Release 8.0 requires a compatible release of Net8 Client, an Oracle7 Client requires SQL*Net Client, and an Oracle8 database Release 8.1 requires Net8 Server Release 8.1 to connect successfully to an Oracle8i database Release 8.1.

While it is not necessary to reconfigure Release 8.0 and Release 7.x clients with a service name, Oracle Corporation recommends doing so to take advantage of new functionality. For example, in the TNSNAMES.ORA file:

net_service_name = 
(DESCRIPTION= 
  (ADDRESS =...)
  (ADDRESS =...)
  )
  (CONNECT_DATA=
   (SERVICE_NAME=SALES)
  )

This effect may be accomplished by manually replacing SID=SID with SERVICE_NAME=SERVICE_NAME or using the Net8 Assistant's compatibility mode. See "Using the Release 8.0/2.x Compatibility Mode" in Chapter 3 "Upgrading and Migrating" of Net8 Administrator's Guide.

Consider the following questions for an environment with Oracle7 clients connecting to an Oracle8 Release 8.1 database:

Oracle8i Client Release 8.1 to Oracle8 Release 8.0/Oracle7 Databases

An Oracle8 Client Release 8.1 requires Net8 Client Release 8.1, an Oracle7 Server requires SQL*Net Server, and an Oracle8 Server Release 8.0 requires Net8 Server Release 8.0.

The Release 8.1 clients must be configured with the SID of the database. For example, the TNSNAMES.ORA would have the following effect:

net_service_name = 
(DESCRIPTION= 
  (ADDRESS =...)
  (ADDRESS =...)
  )
  (CONNECT_DATA=
   (SID=SALES)
  )

This effect may be accomplished by manually editing the TNSNAMES.ORA file or using the Net8 Assistant's compatibility mode. See "Using Release 8.0/7.x Features and Connecting To a Release 8.0/7.x Service" in Chapter 3, "Upgrading and Migrating" of Net8 Administrator's Guide.

Additionally, the LISTENER.ORA on the database server must still be configured with the description of the SID, as described in "Statically Configuring a Listener" in Chapter 5, "Configuring the Network" of Net8 Administrator's Guide.

Consider the following questions for an environment with Oracle8 clients Release 8.1 connecting to an Oracle7 database.

Multi-Versioning

Oracle8i Personal Edition Server Release 8.1.6 for Windows 98 supports multiple Oracle Homes. You can run different versions of Oracle databases on the same computer system at the same time. However, each version can only access a database that is consistent with its version. For example, if you have Version 7 Server and Version 8 of Oracle installed on the same computer system, the Version 7 Server can access Version 7 databases, but not Version 8 databases, and the Version 8 Server can access Version8 databases but not Version7 databases. The only way for a Version8 database to read Version7 database files is to perform a migration. You should be aware that after migration the Version7 Server will no longer be able to read the migrated databases.

Migrate an Oracle7 Database to an Oracle8i Database

You can migrate your Oracle7 database to an Oracle8i database and have both Oracle7 and Oracle8i clients connecting to the Oracle8i database. You can not migrate your Oracle7 database to an Oracle8i database in the same Oracle home. The following figure illustrates this network configuration:


Upgrade an Oracle8 Database to the Current Oracle8i Database Release

You can upgrade your Oracle8 database, for example, Release 8.0.4, to Release 8.1.6 and have both Oracle7 and Oracle8 clients connecting to the Release 8.1.6 Oracle8i database. You can upgrade databases either in the same Oracle home or across different Oracle homes. See "Upgrading an Oracle8 Database Release 8.0.x to 8.1.6" for instructions. The following figure illustrates this network configuration:

Migrating an Oracle7 Database to Oracle8i

This section describes how to migrate an Oracle7 database to the current Oracle8i database release. You can choose either of the following tools to perform a migration:

Oracle Corporation recommends that new users use Oracle Data Migration Assistant to migrate databases because it is the easiest method to perform a migration. If you want to perform a migration manually using command line tools, use MIG.

Before you start a migration using the assistant or MIG, read the following sections:

Ten Issues That Can Affect Oracle7 to Oracle8i Migration

The following table lists and describes the ten issues you should be aware of that can affect Oracle7 to Oracle8i migration.

Issues That Affect Migration  Description 
  1. Running out of space

 
  • Version8 binaries may require as much as three times the disk space required by Version7 binaries. This requirement may cause you to run out of disk space during migration. It is very important that you read "System Considerations and Requirements" and "Prepare the Version7 Source Database for Migration" in Oracle8i Migration to find out more about this and other requirements before you migrate.

  • During migration, the data dictionary requires 50% more space to hold both Oracle7 and Oracle8i data dictionaries. Actual usage can be verified by running MIG in CHECK_ONLY mode.

 
  1. Duration of migration is unrelated to database size

 

The time it takes to migrate is not dependent on the size of the database, but on the number of objects in the data dictionary. For example, actual migration for a 3 1/2 GB database with 25,473 objects on a Sun E6000 with 20 CPUs, with datafiles stripped on the file system on 128 KB slices can take 1 1/2 hours. Remember to allow extra time for backing up and restoring database in case of problems. 

  1. Avoiding problem areas

 
  • Check for usage of ROWIDs in both user columns as well as application code (including triggers & packaged procedures). These may require to be converted to use the DBMS_ROWID package.

  • Check the names of any Oracle7 database objects (for example, tables and columns) that use names that are key words or reserved words for Oracle8i. Usage of key words and reserved words can cause unexpected failures during migration. See Appendix C, "Oracle Reserved Words" of Oracle8i SQL Reference for a list of reserved words.

  • Certain Version7 initialization parameters are obsolete in Version8. Remove all obsolete parameters from the Release 7.x INITSID.ORA file that start a Version8 instance. Obsolete parameters may cause errors if used with a Version8 database. Also, alter any parameter whose syntax has changed in Version8. See Appendix B, "Changes to Initialization Parameters" of Oracle8i Migration for lists of new, changed, and obsolete parameters.

 
  1. Compatibility

 

Make sure that all Oracle product versions, operating system versions, and third-party software versions are certified against Oracle8i

  1. Invalid objects and lost statistics

 

Migration leaves all objects (packages, triggers, views, and so on) invalid except for tables. All other objects must be made valid again by recompilation. This can either be done manually (preferably by building a dependency tree before migration from dependency), otherwise this is done automatically as the objects are first accessed. The latter will of course slow down initial access. All estimated or calculated statistics are lost during migration. These need to be recalculated to ensure proper functionality of the Cost Based Optimizer. Some bitmapped indexes will get invalidated. Check all bitmapped indexes in the DBA_INDEXES table and recreate any that are marked as status unusable. 

  1. Editing the registry

 

If you edit the registry for any reason during the migration process, you need to reboot your computer. 

  1. Read-only tablespace confusions

 

Oracle7 read-only tablespaces are readable by Oracle8i and do not require any conversion. But to prevent Oracle8i rowid conversions to take place every time a table is accessed, the tablespaces in read-only mode should be made read-write. Perform full table scans on all tables in the tablespace. After the full table scans are complete, you can put the tablespaces in read-only mode again.  

  1. The point of no return

 

You can return the database to an Oracle7 version up until the ALTER DATABASE CONVERT command is run. If a failure occurs during ALTER DATABASE CONVERT (when it is converting the physical file headers of the datafiles), you must restore the database from backup and rerun the migration. Do not open the database between running the migration and executing the ALTER DATABASE CONVERT command.  

  1. Preventing large restores

 

To avoid restoring the entire database due to any failures during the ALTER DATABASE CONVERT, put all tablespaces, except SYSTEM and ROLLBACK into read-only or offline normal mode. This causes the ALTER DATABASE CONVERT command to only convert the datafile headers for SYSTEM and ROLLBACK. If any errors occur, you need only restore the datafiles for the SYSTEM and ROLLBACK and rerun the migration. If the migration is successful, the headers for the rest of the datafiles will be converted when they are read-write or online.  

  1. Testing

 

Most migration problems can be avoided if a test migration is performed first. Performing a test migration helps raise any problems that can occur as well as letting you see the amount of time it takes to migrate. See "Test the Migration Process" in Chapter 2, "Preparing to Migrate" in Oracle8i Migration

Installing Appropriate Versions of SQL*Net

When migrating from Oracle7 Server Release 7.3.x to Oracle8i Release 8.1.6, install the appropriate version of SQL*Net in the 7.3.x Oracle home before using Oracle Data Migration Assistant or MIG. Migration will be unsuccessful if you do not install the appropriate versions of SQL*Net.

Migrating Using Oracle Data Migration Assistant

Oracle Data Migration Assistant helps you migrate data from an Oracle7 database to an Oracle8i database. During installation of Oracle8i Personal Edition, you are prompted to migrate a database with this assistant if Oracle Universal Installer detects that an earlier database release exists on your computer. If you do not want to migrate a database, uninstall the existing Oracle database, before installing the new database.

What to do Before Using Oracle Data Migration Assistant

Complete the following steps before you use this assistant:

To migrate a database using Oracle Data Migration Assistant:

  1. Choose Start > Programs > Oracle - HOME_NAME > Migration Utilities > Oracle Data Migration Assistant.

    The following window appears:

  2. Respond to instructions in each Oracle Data Migration Assistant window, and click Next when you are ready to continue to the next window. When you get to the last window, click Next to start the migration of the database. More documentation on this product can be accessed by clicking Help.

Migrating Using MIG

This section describes how to use MIG to migrate your Oracle7 database to an Oracle8i database.


Note:

Information on how to run MIG (sometimes referred to as the Migration Utility) is provided in Oracle8i Migration, but there the focus is on UNIX. This section provides information on using MIG on Windows 98. 


To migrate an Oracle7 database using MIG:

Step 1: What To Do Before Using MIG

Step 2: Shut Down the Oracle7 Database

Step 3: Back Up the Oracle7 Database

Step 4: Install MIG from CD-ROM

Step 5: Run MIG

Step 6: Create Oracle8i Database Files

Step 7: Remove Oracle7 Software (Optional)

Step 1: What To Do Before Using MIG

Complete the following steps before you use MIG:

Review Migration Concepts

Use Appropriate SQL*Plus Versions

When you are asked to enter commands at the SQL*Plus prompt, remember to use the appropriate version of the tool for the version of Oracle7 Server you are migrating:

Use...  When Migrating From... 

SVRMGR23 

Oracle7 Release 7.3.x 

Check the Version Number of the Database to be Migrated

Check that your database release can be directly migrated to Oracle8i Personal Edition. MIG only migrates databases that are Oracle7 Release 7.3.x or later.

Check Character Set

  1. Check the character set of your Oracle7 database, and compare it with the character set in the NLS_LANG environment variable, or in the registry (if the character set does not exist as an environment variable).

  2. Start SQL*Plus at the MS-DOS command prompt. If you are migrating from:

Oracle7 Release...  Enter at the MS-DOS Command Prompt... 

7.3.x 

C:\> SVRMGR23 

  1. Connect to the Oracle7 database as INTERNAL, where PASSWORD is the password of the database you want to migrate:

Oracle7 Release...  Enter at the SQLDBA or SQLPLUS Command Prompt... 

7.3.x 

SQL> CONNECT INTERNAL/PASSWORD 

  1. Obtain the value of NLS_CHARACTERSET:

    Oracle7 Release...  Enter at the SQLDBA or SQLPLUS Command Prompt... 

    7.3.x 

    SQL> SELECT VALUE FROM NLS_DATABASE_PARAMETERS WHERE PARAMETER='NLS_CHARACTERSET'; 

The character set value is returned by the database. If the character sets are identical, then you can proceed to run MIG.

If the character sets are different, before you run MIG, you must set the NLS_LANG environment variable at the MS-DOS command prompt as follows:

AMERICAN_AMERICA.database character set

where database character set is substituted with the character set of your Oracle7 database. For example, if the character set of your Oracle7 database is JA16EUC, set the NLS_LANG environment variable as follows:

C:\> SET NLS_LANG=AMERICAN_AMERICA.JA16EUC 

Messages output from MIG will now be in English. After MIG finishes, reset the NLS_LANG environment variable to its original value.

Step 2: Shut Down the Oracle7 Database

Shut down the database. Do not use SHUTDOWN IMMEDIATE or SHUTDOWN ABORT. If the database is not shut down before you start the migration, MIG stops and issues an error message. Also, if the database is not cleanly shutdown, any backup you make may be useless as it was taken while data was being written to the data files.

  1. Start SQL*Plus:

    Oracle7 Release...  Enter at the MS-DOS Command Prompt... 

    7.3.x 

    C:\> SQLPLUS 

  2. Connect to the Oracle7 database as INTERNAL, where PASSWORD is the password of the database you want to migrate:

    Oracle7 Release...  Enter at the SQLPLUS Command Prompt... 

    7.3.x 

    SQL> CONNECT INTERNAL/PASSWORD 

    The message Connected appears if you are successfully connected to the database.

  3. Shut down the database:

Oracle7 Release...  Enter at the SQLPLUS Command Prompt... 

7.3.x 

SQL> SHUTDOWN 

Step 3: Back Up the Oracle7 Database

  • Data files

 

SYS1SID.ORA, USR1SID.ORA, RBS1SID.ORA, TMP1SID.ORA 

  • Initialization parameter file

 

INITSID.ORA 

  • Redo log files

 

LOG1SID.ORA, LOG2SID.ORA, LOG3SID.ORA, LOG4SID.ORA

(the last two redo log files are only available for Oracle Release 7.3.4) 

  • Control files

 

CTL1SID.ORA and CTL2SID.ORA 


Prev Next
Oracle
Copyright © 2000 Oracle Corporation.

All Rights Reserved.

Library

Product

Contents

Index