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 Migration utility. This chapter covers the following topics:
Figure 4-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.
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 Migration utility on the Oracle7 database. Then, you execute a series of ALTER DATABASE statements 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 by Oracle8i:
The following sections provide an outline of the migration process:
You can run the Oracle8i Migration utility multiple times (without opening the database in Oracle8i) and still be able to return to the Oracle7 database. However, running the Migration utility automatically eliminates the Oracle7 database catalog views (see "Abandoning the Migration").
Note:
The file headers of offline datafiles and read-only tablespaces are not updated during migration. The file headers of offline datafiles are converted later when they are brought online, and the file headers of read-only tablespaces are converted if and when they are made read-write sometime after migration; however, they never have to be made read-write.
If a source database rollback segment is in a tablespace that is offline when the Oracle8i database is opened, then the rollback segment is not converted immediately to Oracle8i database format. Instead, the rollback segment is converted the first time the tablespace is brought online in Oracle8i.
u0703040.sql
script. This 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.
Other conversion scripts perform the necessary operations to convert specific components to the current release. For example, the catrep.sql
script is one of the conversion scripts for Oracle replication.
This section contains important considerations for using the Migration utility.
A version 6 database must be migrated to at least Oracle7 before it can be migrated to Oracle8i using the Migration utility. 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.
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 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, 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 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.
The following sections discuss system considerations and requirements for using the Migration utility.
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. If you are installing Oracle8i onto a computer system that already has Oracle7 installed, then ensure that you have enough hard disk space and RAM for both databases. You need to add the system requirements for Oracle8i server and Oracle7 server to determine the total system requirements.
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, then try increasing the SYSTEM tablespace and the rollback segments; then, rerun the script.
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.
If you are migrating a system with Oracle Parallel Server installed, then 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. Support for coexistence of different versions of the database is operating system-specific for Oracle Parallel Server.
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. |
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 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:
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, 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.
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. 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 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 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, then 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, 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 errors when you run the Migration utility in the Oracle7 environment.
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.
SHUTDOWN IMMEDIATE
If you are using Oracle Parallel Server, then shutdown all instances.
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:
If you are migrating a system with Oracle Parallel Server installed, then see the Oracle8i Parallel Server Setup and Configuration Guide for additional installation instructions.
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.
After you make your selection, click Next.
If you chose Custom, the Available Product Components screen appears. Complete the following steps:
Make sure you install Oracle Utilities to install the Migration utility. If you chose Minimal, the Migration utility is installed automatically.
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 replication in Oracle7, then you should install it in Oracle8i.
If you select the Upgrade or Migrate an Existing Database checkbox, then 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.
Complete any remaining screens until you reach the Summary screen. Click the Help button if you need help for a certain screen.
When installation is completed successfully, click the Exit button to close the Universal Installer.
After you successfully install Oracle8i on a Windows platform, complete the following steps. If your operating system is UNIX, then go to "Review Migration Utility Command-Line Options" now.
C:\> NET START OracleServiceORCL
C:\> SET ORACLE_SID=ORCL
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.
Complete the steps in the following sections to migrate an Oracle7 source database to Oracle8i using the Migration utility.
You only need to complete the steps described in this section if you are migrating your Oracle database on a UNIX operating system. If your operating system is Windows, then go to "Perform Migration Steps in the Oracle7 Environment" now.
On UNIX operating systems, 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, if your new Oracle8i Oracle home is /oracle/product/8.1
and your old Oracle7 Oracle home is /oracle/product/7.3
, then complete the following steps:
migprep
:
migprep /oracle/product/8.1 /oracle/product/7.3
$ORACLE_HOME/migrate/nls/admin/data
Complete the following migration steps in the Oracle7 environment. These steps apply to both UNIX systems and Windows platforms.
STARTUP
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, suppose your output for the query above is the following:
PARAMETER VALUE --------------------- --------------------------- NLS_LANGUAGE AMERICAN NLS_TERRITORY AMERICA NLS_CHARACTERSET US7ASCII
In this case, set NLS_LANG to the following at a command prompt:
AMERICAN_AMERICA.
US7ASCII
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, then 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, then connect as a user who does.
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 in Step 9.
SHUTDOWN IMMEDIATE
If you are using Oracle Parallel Server, then shutdown all instances.
v7files.log
spool file that you generated in Step 7.
The steps required to run the Migration utility on UNIX are different than the steps required to run the Migration utility on a Windows platform. Complete the steps in the appropriate section:
Complete the following steps to run the Migration utility on a UNIX operating system:
Step 3 in the "Prepare the Oracle7 Environment for Migration on UNIX Operating Systems" for detailed information about the environment variables to check.
See Also:
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, then you should add the amount specified by the CHECK_ONLY option plus an additional 25 megabytes. The additional 25 megabytes approximates the amount of space required by the migration scripts that you will run later in the migration process.
To add space to the SYSTEM tablespace, 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;
If you add space to the SYSTEM tablespace, then remember to shut down the database when you are finished.
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. Oracle Corporation recommends using the SPOOL option, because it makes it easier to check your migration results when the migration is complete. |
If ORACLE_HOME points to the Oracle7 executables, then an ORA-223 error is displayed when you run the ALTER DATABASE CONVERT statement later in the migration process, stating "conversion data file is invalid or incorrect version".
Complete the following steps to run the Migration utility on a Windows platform:
C:\> mig PFILE=ORACLE7_HOME\DATABASE\INIT_PARAM_FILE
Replace the ORACLE7_HOME variable with the complete path to the Oracle7 Oracle home directory. Also, replace the INIT_PARAM_FILE variable with the full name of the initialization parameter file for the Oracle7 database.
For example, if the ORALCE7_HOME is C:\ORANT
and the INIT_PARAM_FILE is INITORCL.ORA
, then enter the following:
C:\> mig PFILE=C:\ORANT\DATABASE\INITORCL.ORA
You can enter mig
with the PFILE option only to run the Migration utility with a default set of options, or you can enter mig
followed by more selected options.
See Also:
"Review Migration Utility Command-Line Options" for information about command-line options. Oracle Corporation recommends using the SPOOL option, because it makes it easier to check your migration results when the migration is complete. |
C:\> NET STOP OracleServiceORCL
Oracle7 Release... | Enter at the MS-DOS Command Prompt... |
---|---|
7.1 |
|
7.2 |
|
7.3 |
|
For example, if your Oracle7 release is release 7.3.4 and your SID is ORCL, then enter the following MS-DOS command:
C:\> ORADIM73 -DELETE -SID ORCL
C:\> ORADIM -NEW -SID SID -INTPWD PASSWORD -MAXUSERS USERS -STARTMODE AUTO -PFILE ORACLE_HOME\DATABASE\INITSID.ORA
This syntax includes the following variables:
For example, if your SID is ORCL, your PASSWORD is TWxy579, the maximum number of USERS is 10, and the ORACLE_HOME directory is C:\ORA81
, then enter the following command:
C:\> ORADIM -NEW -SID ORCL -INTPWD TWxy579 -MAXUSERS 10 -STARTMODE AUTO -PFILE C:\ORA81\DATABASE\INITORCL.ORA
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, then 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 conv
sid
.dbf
, where sid is your Oracle7 instance ID. On Windows NT, the default location is ORACLE_HOME\rdbms
in the Oracle8i 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, then 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, then you must rerun the Migration utility, starting at Step 8. |
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:
Complete the following migration steps in the Oracle8i environment:
init
db_name
.ora
file instead.
You will issue the ALTER DATABASE CONVERT statement in Step 10. This statement automatically creates new control files. If you do not use the CONTROL_FILES parameter, then this statement 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 files.
However, if you use the CONTROL_FILES initialization parameter to specify new control file names, then the ALTER DATABASE CONVERT statement creates the new control files with the names you specify, and you do not need to remove the old control files. For a complete list of your existing control files, check the v7files.log
spool file you created in Step 9.
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: The CONTROL_FILES initialization parameter 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. |
conv
sid
.dbf
(where sid is the Oracle8i database name), should reside in ORACLE_HOME/dbs
in both the Oracle7 and the Oracle8i environment.
On Windows platforms, the convert file, convert.ora
, should reside in ORACLE_HOME\rdbms
in the Oracle8i environment. It is placed in this directory automatically by the Migration utility, and you do not need to move it.
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/orapw
sid
, but on Windows platforms, the default password file is ORACLE_HOME\database\pwd
sid
.ora
. In both cases, sid is your Oracle instance ID.
ORACLE_HOME
/dbs
on UNIX and ORACLE_HOME
\database on Windows platforms. The initialization parameter file can reside anywhere you wish, but it should not reside in the Oracle7 Oracle home after you migrate to Oracle8i.
init
db_name
.ora
file resides within the Oracle7 Oracle home, then move or copy the init
db_name
.ora
file to a location outside of the Oracle7 Oracle home.
Also, if you are using Oracle Parallel Server, then see Oracle8i Parallel Server Documentation Set: Oracle8i Parallel Server Concepts; Oracle8i Parallel Server Setup and Configuration Guide; Oracle8i Parallel Server Administration, Deployment, and Performance for more information about obsolete Oracle Parallel Server initialization parameters.
"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.
init
db_name
.ora
file in the same way that you modified the initialization parameter file in steps a to h.
Make sure you save all of the files you modified after making these adjustments.
conv
sid
.dbf
file to match the Oracle8i DB_NAME. For example, if the Oracle7 DB_NAME is DBMS7 and the Oracle8i DB_NAME is DBMS8, then rename the convert file from convDBMS7.dbs
to convDBMS8.dbs
. This action is not necessary on Windows platforms.
ORACLE_HOME
/rdbms/admin
directory. You should be in the Oracle8i Oracle home.
svrmgrl
at a command prompt to start Server Manager in Oracle8i.
SVRMGR> STARTUP NOMOUNT
You may need to use the PFILE option to specify the location of your initialization parameter file.
You may see error messages listing obsolete initialization parameters. If so, then make a note of the obsolete initialization parameters and continue with the migration normally. Then, remove the obsolete initialization parameters the next time you shut down the database (Step 18).
SVRMGR> ALTER DATABASE CONVERT;
Successful execution of this statement 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, then correct the conditions that caused the errors and rerun the Migration utility. Restart at Step . Otherwise restore the backup you performed after you ran the Migration utility.
See Also:
"Problems at the ALTER DATABASE CONVERT Statement" for information about common errors encountered at this step and the actions required to resolve them. |
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 statement, then 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 4, but make sure you completed all of the pre-migration steps described in Chapter 3.
SVRMGR> SPOOL catoutm.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
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, then 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. |
catparr.sql
:
SVRMGR> @catparr.sql
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, 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 12; 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, 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.
The COMPATIBLE initialization parameter controls the compatibility level of your database. Set the COMPATIBLE initialization parameter in your initialization parameter file based on the compatibility level you want for your migrated database.
Also, if you encountered a message listing obsolete initialization parameters when you started the database in Step 9, then remove the obsolete initialization parameters from the initialization parameter file now.
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. 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:
If you took a backup of your Oracle7 database before you ran the Migration utility, then 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, then 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 statement. If you executed this statement and want to return to Oracle7, then complete the procedure in Chapter 14, "Downgrading to Oracle7". |
To abandon the migration, you generally must restore the Oracle7 database by completing the following steps in the Oracle7 environment:
SVRMGR> DROP USER MIGRATE CASCADE;
catalog.sql
and catproc.sql
:
SVRMGR> @catalog.sql SVRMGR> @catproc.sql
catsvrmg.sql
:
SVRMGR> @catsvrmg.sql
catparr.sql
:
SVRMGR> @catparr.sql
catrep.sql
:
SVRMGR> @catrep.sql
|
![]() Copyright © 1996-2000, Oracle Corporation. All Rights Reserved. |
|