Oracle8i Migration Release 3 (8.1.7) Part Number A86632-01 |
|
This chapter guides you through the process of migrating an Oracle7 database to Oracle8i using the Oracle Data Migration Assistant. This chapter covers the following topics:
Figure 5-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.
This section contains important considerations for using the Oracle Data Migration Assistant.
The following restrictions apply to the Oracle Data Migration Assistant:
A version 6 database must be migrated to at least Oracle7 before it can be migrated to Oracle8i. Also, the Oracle Data Migration Assistant cannot migrate some Oracle7 releases. See your operating system-specific Oracle documentation for information about the earliest release that is supported by the Oracle Data Migration Assistant on your operating system.
In general, the Migration utility supports migrations of the last 7.1 release and higher databases on your operating system. The exact maintenance release number of the last 7.1 release varies from operating system to operating system.
For example, on some operating systems, the Oracle Data Migration Assistant can migrate only release 7.1.4 and later 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 Oracle Data Migration Assistant on your operating system, then upgrade or migrate the database to the required release.
Downgrading is the process of transforming an existing Oracle database into a previous version or release. The Oracle Data Migration Assistant cannot transform an Oracle8i database back to Oracle7. In some situations, you can use another facility to downgrade, such as using Export/Import, restoring from backups, and possibly using other functions.
The following sections discuss system considerations and requirements for using the Oracle Data Migration Assistant.
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 Oracle Data Migration Assistant 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. The Oracle Data Migration Assistant will not complete the migration unless sufficient space is allocated in the SYSTEM tablespace.
If you need to add more space to the SYSTEM tablespace, then issue a statement 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;
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 file system where its available disk space is restricted.
The value of DB_BLOCK_SIZE (an initialization parameter in the initialization parameter 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:
There are many issues relating to SQL*Net that you must consider when you migrate your database to Oracle8i, not the least of which is deciding whether you will migrate to Net8.
See Also:
Appendix F, "SQL*Net and Net8 Considerations for Migrations and Upgrades" for information about these issues and for instructions on migrating from SQL*Net to Net8. |
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.
See Also:
Appendix G, "Migration and Compatibility for Replication Environments" for detailed instructions about migrating systems using replication features. |
See Oracle8i interMedia Text Migration for information about migrating from ConText to interMedia.
When migrating from Oracle7 in a distributed database configuration, make sure that no pending transactions are in the DBA_2PC_PENDING data dictionary view before migrating the database. Otherwise, when you open the database after migration using the ALTER DATABASE RESET LOGS statement and a transaction is pending, you will encounter an error.
If there are any pending transactions, then resolve them before you migrate using the SQL commands COMMIT FORCE or ROLLBACK FORCE.
The Oracle Data Migration Assistant 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. |
It is not possible to change the character set during migration using the Oracle Data Migration Assistant; 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 statement 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. |
Complete the following steps before you migrate your Oracle7 database to Oracle8i:
"Start with an Oracle7 Database Supported by the Oracle Data Migration Assistant" for more information.
See Also:
SPOOL v7files.log;
SELECT member FROM v$logfile;
SPOOL OFF;
SELECT name FROM v$datafile;
SELECT value FROM v$parameter WHERE name = 'control_files';
The v7files.log
spool file lists all of the files that you must back up.
If you are not sure whether the Procedural Option is installed, then you can check by starting Server Manager or SQL*DBA. 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, 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.
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, then 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. You will encounter an error during migration 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 statement 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, then 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.
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, then 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, then zero rows are selected.
To check for a user named MIGRATE, issue the following SQL statement:
SELECT USERNAME FROM dba_users WHERE USERNAME = 'MIGRATE';
If you do not have a user named MIGRATE, then zero rows are selected.
To check for a role named MIGRATE, issue the following SQL statement:
SELECT ROLE FROM dba_roles WHERE ROLE = 'MIGRATE';
If you do not have a role named MIGRATE, then zero rows are selected.
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, then 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.
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, then you may encounter an error when you run the Oracle Data Migration Assistant.
In addition, if you are migrating a release 7.1.6 or lower database, then you may need to increase the size of your extents by dropping and recreating your rollback segments.
To check the free space in your SYSTEM tablespace, issue the following SQL statement:
SELECT sum(bytes) FROM dba_free_space WHERE tablespace_name='SYSTEM';
This statement displays the number of free bytes in the system tablespace.
See Also:
"Space Requirements" and "Assess System Requirements vs. Resources Available" for more information. |
Specifically, complete the following steps:
"The DB_DOMAIN Parameter" for more information about setting this initialization parameter.
See Also:
Initialization Parameter | Change Setting To |
---|---|
BACKGROUND_DUMP_DEST |
|
USER_DUMP_DEST |
|
In the settings, substitute the complete ORACLE_BASE path for ORACLE_BASE and substitute the database name for DB_NAME.
Make sure you save the initialization parameter file and the file specified in the IFILE entry, if one exists, after making these adjustments.
In addition to the steps described in the previous section, "Prepare the Oracle7 Source Database for Migration", complete the following steps if you are migrating your database on a Windows platform:
If the required release of SQL*Net is not installed, complete the following steps to install it:
If you are installing SQL*Net release 2.3.2.1.12, navigate to the following directory on the CD-ROM:
\patches\sqlnet\232112\nt_x86\install
If you are installing SQL*Net release 2.3.3.0.3, navigate to the following directory on the CD-ROM:
\patches\sqlnet\23303\nt_x86\install
nt.prd
file.
Complete the following steps to install the release 8.1 software and migrate the database:
If you need help at any screen or want to consult more documentation about the Oracle Universal Installer, then click the Help button to open the online help.
The Available Products screen appears.
If you chose Custom, Available Product Components screen appears. Complete the following steps:
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 Oracle Advanced Replication in Oracle7, then you should install it in Oracle8i.
When installation is complete, one or more assistants may be started. When the Oracle Data Migration Assistant is started, you are ready to proceed with the migration.
If you need help at any screen or want to consult more documentation about the Oracle Data Migration Assistant, then click the Help button to open the online help.
If you chose Custom, then respond to the screens that enable you to specify your custom migration settings until you reach the Backup Your Database screen. If you need help with any of the custom screens, click the Help button.
After you have made your choice, click Next.
When you click Next, the Status screen appears and the Oracle Data Migration Assistant begins to perform the migration. A status bar shows its progress. When the migration is complete, the Listener.ora Migration Confirmation screen appears.
listener.ora
file automatically, or click the No button if you do not want the assistant to modify the listener.ora
file.
Certain modifications are required to the listener.ora
file for your database to work properly with Oracle Enterprise Manager. If you plan to use Oracle Enterprise Manager, then you should click the Yes button to automatically modify the listener.ora
file. However, if you do not plan to use Oracle Enterprise Manager, then click the No button.
If you click the Yes button, then the Oracle Data Migration Assistant modifies the listener.ora
file in the following way:
listener.ora
in one of the following ways:
A simple case: Suppose the old listener.ora
has the following SID_DESC entry:
... (SID_DESC = (SID_NAME = ORCL) ) ...
If the database name is SAL, then the domain name is COM, and the Oracle home is /oracle/product/8.1
, the assistant adds the following entry:
... (SID_DESC = (GLOBAL_DBNAME = sal.com) (ORACLE_HOME = /oracle/product/8.1) (SID_NAME = SAL) ) ...
A more complicated case: Suppose the old listener.ora
has the following SID_DESC entry:
...
(SID_DESC =
(GLOBAL_DBNAME = an_entry
)
(SID_NAME = ORCL)
)
...
If an_entry does not match the GLOBAL_DBNAME of the migrated database, and if the database name is SAL, the domain name is COM, and the Oracle home is /oracle/product/8.1
, then the assistant adds the following entry:
... (SID_DESC = (GLOBAL_DBNAME = sal.com) (ORACLE_HOME = /oracle/product/8.1) (SID_NAME = SAL) ) ...
This entry is the same as the entry in the simple case, but the assistant also adds the entry an_entry to the SERVICE_NAMES parameter. Therefore, the assistant changes the SERVICE_NAMES parameter to the following:
SERVICE_NAMES = sal.com, an_entry
listener.ora
file.
listener.ora
file in both the Oracle7 and the Oracle8i environments.
When the Oracle Data Migration Assistant is complete, go to "Finish the Migration" for information about additional migration steps.
If you installed Oracle8i without specifying that you are migrating an existing database, then you can run the Oracle Data Migration Assistant independently after the Oracle8i installation is complete.
Complete the following steps to run the Oracle Data Migration Assistant independently:
On UNIX, enter the following command at a system prompt:
odma
On Windows platforms, choose:
Start > Programs > Oracle - HOME_NAME > Migration Utilities > Oracle Data Migration Assistant
When you start the Oracle Data Migration Assistant, its Welcome screen appears (see Figure 5-2).
Step 9 to Step 15 in "Install the Release 8.1 Oracle Software and Migrate the Database" for more information about the windows that appear in the Oracle Data Migration Assistant.
See Also:
Complete the following steps after you have successfully run the Oracle Data Migration Assistant:
ORACLE_HOME
/rdbms/admin
directory in the Oracle8i Oracle home.
svrmgrl
at a command prompt to start Server Manager in Oracle8i.
SVRMGR> STARTUP RESTRICT
You may need to use the PFILE option to specify the location of your initialization parameter file.
SVRMGR> SPOOL catoutma.log
If you want to see the output on your screen of the scripts you will run, then you also can issue a SET ECHO ON statement:
SVRMGR> SET ECHO ON
catrep.sql
:
SVRMGR> @catrep.sql
r0703040.sql
:
SVRMGR> @r0703040.sql
This r0703040.sql
script performs a post-catrep.sql
Oracle replication related upgrade.
If you encounter any problems when you run these scripts, or any of the scripts in the remaining steps, then correct the causes of the problems and rerun the scripts. You can rerun any of the scripts described in this chapter as many times as necessary.
utlrp.sql
if you did not run it using the Oracle Data Migration Assistant (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, and so on. 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.
SVRMGR> SPOOL OFF
Then, check the spool file and verify that the packages and procedures compiled successfully. You named the spool file in Step 5; the suggested name was catoutma.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, then 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, then you may want to SET ECHO OFF now:
SVRMGR> SET ECHO OFF
SVRMGR> SHUTDOWN IMMEDIATE
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.
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, learn about the new parameters listed in Appendix B, "Changes to Initialization Parameters" and decide which ones you want to use for your migrated database.
In addition, the Oracle Data Migration Assistant sets the COMPATIBLE initialization parameter to 8.0.5. See Chapter 9, "Compatibility and Interoperability" for information about resetting the COMPATIBLE initialization parameter.
If you retain the old Oracle7 software, then never start the migrated database with the old Oracle7 software. Only start the database with the executables in the new Oracle8i installation directory. Also, before you remove the old Oracle7 environment, make sure you relocate any datafiles in that environment to the Oracle8i environment. See the Oracle8i Administrator's Guide for information about relocating datafiles.
Caution:
Errors may be caused by the following actions or omissions:
Appendix A, "Troubleshooting Migration Problems" and Oracle8i Error Messages for information about errors during migration and about corrective action for each error.
See Also:
The easiest way to abandon a migration is to restore the backup of your Oracle7 database that you took before you ran the Oracle Data Migration Assistant.
|
![]() Copyright © 1996-2000, Oracle Corporation. All Rights Reserved. |
|