Oracle9i Database Migration Release 1 (9.0.1) Part Number A90191-02 |
|
The information in this chapter only applies to release 9.0.1 installations of Oracle. The term downgrading describes transforming an Oracle database into a previous release of the same version, such as transforming a database from release 8.1.7 to release 8.1.5. The term downgrading also describes transforming an Oracle database into a previous version, such as transforming a database from Oracle9i to Oracle7. This chapter describes downgrading to release 8.1 of Oracle. If you want to downgrade to Oracle7 or release 8.0, then see Chapter 15, "Downgrading to an Older Release of Oracle".
This chapter covers the following topics:
Perform a full offline backup of your release 9.0.1 database before you downgrade.
The process of removing incompatibilities depends on the release to which you are downgrading. First, check the compatibility level of your database to see if your database might have incompatibilities with the release to which you are downgrading.
If the compatibility level of your database is higher than the release to which you are downgrading, then your database may have incompatibilities with the previous release that must be removed before you downgrade. Your compatibility level matches the setting of the COMPATIBLE
initialization parameter. Check your COMPATIBLE
initialization parameter setting by issuing the following SQL statement:
SQL> SELECT name, value, description FROM v$parameter WHERE name='compatible';
You do not need to remove incompatibilities if the COMPATIBLE
parameter is set to the release to which you are downgrading or lower. For example, if you are downgrading to release 8.1.6 and the COMPATIBLE
parameter is set to 8.1.6 or lower, then you do not need to remove incompatibilities. In this case, no incompatibilities exist in your database with the release to which you are downgrading, and you can skip the rest of this section and procede to "Downgrade the Database".
However, if the COMPATIBLE
parameter is set higher than the release to which you are downgrading, then some incompatibilities may exist. For example, if you are downgrading to release 8.1.7 and COMPATIBLE
is set to 9.0.0 or higher, then incompatibilities may exist.
Follow the instructions in Chapter 14, "Removing Incompatibilities Before Downgrading to Release 8.1" to remove incompatibilities with the release to which you are downgrading.
After you have removed all of the incompatibilities with the release to which you are downgrading, reset the compatibility level of the database to the prior release by completing the following steps:
Appendix B, "Changes to Initialization Parameters" for lists of parameters added in each release
See Also:
ORACLE_HOME
/rdbms/admin
directory.
SYSDBA
privileges.
RESTRICT
mode:
SQL> STARTUP RESTRICT
You may need to use the PFILE
option to specify the location of your initialization parameter file.
COMPATIBLE
from 9.0.0 to 8.1.x, then run utlpitl.sql
:
SQL> @utlpitl.sql
The utlpitl.sql
script removes PDML ITL incompatibilities.
ALTER DATABASE RESET COMPATIBILITY
:
SQL> ALTER DATABASE RESET COMPATIBILITY;
SQL> SHUTDOWN IMMEDIATE
COMPATIBLE
initialization parameter in the initialization parameter file to match the release to which you are downgrading.
For example, if you are downgrading to release 8.1.5, then set the COMPATIBLE
parameter to the following:
COMPATIBLE = 8.1.5
COMPATIBLE
parameter.
If your database fails to open, then some incompatibilities still exist. If so, then reset the COMPATIBLE
parameter to a higher setting. Remove the incompatibilities and attempt to reset database compatibility again. All incompatibilities with the database to which you are downgrading must be removed before you proceed with the downgrade process.
Make sure your database is compatible with the release to which you are downgrading before you perform the downgrade steps in this section. See "Remove Incompatibilities" if you have not yet removed incompatibilities.
Complete the following steps to downgrade your release 9.0.1 database to a previous release:
ORACLE_HOME
/rdbms/admin
directory of the release from which you are downgrading to a directory outside of the Oracle home, such as the temporary directory on your system:
If you have Java installed, copy one or more of the following files from the ORACLE_HOME
/javavm/install
directory of the release from which you are downgrading to a directory outside of the Oracle home, such as the temporary directory on your system:
jvmd815.sql
(if you are downgrading to release 8.1.5)
jvmd816.sql
(if you are downgrading to release 8.1.6)
jvmd817.sql
, jisd817.sql
, jspd817.sql
(if you are downgrading to release 8.1.7)
Also, if you have XDK for Java installed, copy one of the following files from the ORACLE_HOME
/xdk/admin
directory of the release from which you are downgrading to a directory outside of the Oracle home, such as the temporary directory on your system:
Make a note of the new location of these files. You may need them later in the downgrade process.
ORACLE_HOME
/rdbms/admin
directory.
SYSDBA
privileges.
RESTRICT
mode:
SQL> STARTUP RESTRICT
You may need to use the PFILE
option to specify the location of your initialization parameter file.
SQL> SPOOL catoutd.log
If you want to see the complete detailed output of the script you will run, then you can also issue a SET ECHO ON
statement:
SQL> SET ECHO ON
d
old_release
.sql
, where old_release refers to the release to which you are downgrading. See Table 13-1 to choose the correct script. Each script provides a direct downgrade to the release specified in the "Downgrading To" column.
To run a script, enter the following:
SQL> @dold_release.sql
Downgrading To | Run Script |
---|---|
8.1.7 |
|
8.1.6 |
|
8.1.5 |
|
Note: If the release to which you are downgrading is not included in Table 13-1, then see the README files in the new installation for the correct downgrade script to run. |
The following are notes about running the script:
d0801050.sql
.
If you encounter any problems when you run the script, or any of the scripts in the remaining steps, then correct the causes 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. |
SQL> SPOOL OFF
Then, check the spool file and verify that the packages and procedures compiled successfully. You named the spool file in Step 7; the suggested name was catoutd.log
. Correct any problems you find in this file and rerun the appropriate downgrade script if necessary.
If you specified SET ECHO ON
, then you may want to SET ECHO OFF
now:
SQL> SET ECHO OFF
SQL> SHUTDOWN IMMEDIATE
If you are using Oracle9i Real Application Clusters, then shutdown all instances.
For example, if your SID is ORCL, then enter the following at an MS-DOS prompt:
C:\> NET STOP OracleServiceORCL
C:\> ORADIM -DELETE -SID ORCL
For example, if you are downgrading to release 8.1.5, then use the release 8.1.5 installation media to install the release 8.1.5 distribution of Oracle.
You must install the release 8.1 software in a new Oracle home that is separate from the 9.0.1 release.
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 you are downgrading to release 8.1.6, if your SID is ORCL, your PASSWORD is TWxy579, the maximum number of USERS is 10, and the ORACLE_HOME directory is C:\ORANT
, then enter the following command:
C:\> ORADIM -NEW -SID ORCL -INTPWD TWxy579 -MAXUSERS 10 -STARTMODE AUTO -PFILE C:\ORANT\DATABASE\INITORCL.ORA
SPFILE
(server parameter file) entry, then complete the following steps:
CREATE PFILE[=pfile-name] [FROM spfile-name];
The initialization parameter file will be created as a text file. In an Oracle9i Real Application Clusters environment, it will contain all parameter settings of all instances.
SPFILE
parameter to specify a server parameter file, then change the SPFILE
parameter to an IFILE
parameter in the initialization parameter file used to start up the instance. Make sure the IFILE
parameter points to the initialization parameter file that you exported from the server parameter file.
You can use the IFILE
parameter in each instance-specific parameter file to point to the initialization parameter file that you exported from the server parameter file.
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 Oracle home of the release from which you are downgrading.
IFILE
(include file) entry and the file specified in the IFILE
entry resides within the Oracle home of the release from which you are downgrading, then copy the file specified by the IFILE
entry to a location outside of the Oracle home. The file specified in the IFILE
entry has additional initialization parameters. After you copy this file, edit the initialization parameter file to point to its new location.
ORACLE_HOME
/dbs/orapw
sid
. On Windows operating systems, the default password file is ORACLE_HOME
\database\pwd
sid
.ora
. On both UNIX and Windows operating systems, sid is your Oracle instance ID.
ORACLE_HOME
/rdbms/admin
directory of the release to which you are downgrading:
If you have Java installed, copy one or more of the following files to the ORACLE_HOME
/javavm/install
directory of the release to which you are downgrading:
jvmd815.sql
(if you are downgrading to release 8.1.5)
jvmd816.sql
(if you are downgrading to release 8.1.6)
jvmd817.sql
, jisd817.sql
, jspd817.sql
(if you are downgrading to release 8.1.7)
Also, if you have XDK for Java installed, copy one of the following files to the ORACLE_HOME
/xdk/admin
directory of the release to which you are downgrading:
You copied these files to a directory outside of the Oracle home of the release from which you are downgrading in Step 2.
_SYSTEM_TRIG_ENABLED = false
This initialization parameter should be removed from your initialization parameter file after the downgrade is complete.
ORACLE_HOME
/rdbms/admin
directory of the release to which you are downgrading.
SYSDBA
privileges.
RESTRICT
mode:
STARTUP RESTRICT
You may need to use the PFILE
option to specify the location of your initialization parameter file.
SPOOL catoutd2.log
If you want to see the complete detailed output of the script you will run, then you can also issue a SET ECHO ON
statement:
SET ECHO ON
utlip.sql
:
@utlip.sql
The utlip.sql
script invalidates all existing PL/SQL modules by altering certain dictionary tables so that subsequent recompilations will happen in the format required by the database. It also reloads packages STANDARD
and DBMS_STANDARD
, which are necessary for any PL/SQL compilations.
catalog.sql
:
@catalog.sql
catproc.sql
:
@catproc.sql
catrep.sql
:
@catrep.sql
@catparr.sql
If you are downgrading to release 8.1.5, then run the following script:
@ORACLE_HOME/javavm/install/jvmd815.sql
If you are downgrading to release 8.1.6, then run the following script:
@ORACLE_HOME/javavm/install/jvmd816.sql
If you are downgrading to release 8.1.7, then run the following scripts:
@ORACLE_HOME/javavm/install/jvmd817.sql @ORACLE_HOME/xdk/admin/xmld817.sql @ORACLE_HOME/javavm/install/jisd817.sql @ORACLE_HOME/javavm/install/jspd817.sql
utlrp.sql
. This step is optional and can be done regardless of whether there was a change in word-size.
@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 running utlrp.sql
.
If you receive compile-time errors while running utlrp.sql
, you may need to run one or more catalog scripts supplied with the release to which you downgraded. For example, to re-create Heterogeneous Services data dictionary views, tables, and packages, run caths.sql
:
@caths.sql
SPOOL OFF
Then, check the spool file and verify that the packages and procedures compiled successfully. You named the spool file in Step 24; the suggested name was catoutd2.log
. Correct any problems you find in this file and rerun the appropriate script if necessary.
If you specified SET ECHO ON
, then you may want to SET ECHO OFF
now:
SET ECHO OFF
SHUTDOWN IMMEDIATE
_SYSTEM_TRIG_ENABLED = false
You added this initialization parameter to your initialization parameter file in Step 19.
Your database is now downgraded. Complete the procedures described in the following sections to finish downgrading specific components.
If you are using Oracle Replication, then complete the actions described below based on whether the downgraded database is a master site or a materialized view site.
If the downgraded database is a master site for one or more object groups, then complete the following steps to regenerate replication support:
If the downgraded database is a materialized view site, then generate replication support for each updatable materialized view.
|
Copyright © 1996-2001, Oracle Corporation. All Rights Reserved. |
|