Oracle® Database Upgrade Guide 11g Release 2 (11.2) Part Number E10819-02 |
|
|
View PDF |
This chapter guides you through the process of upgrading a database to the new Oracle Database 11g release. The upgrade processes discussed in this chapter do not describe how to perform rolling upgrades. See "About Rolling Upgrades" for more information about rolling upgrades.
This chapter covers the following topics:
WARNING:
If you retain the old Oracle software, then never start the upgraded database with the old Oracle software. Only start the database with the executables in the new Oracle Database installation.
Also, before you remove the old Oracle environment, make sure you relocate any data files in that environment to the new Oracle Database environment. If you upgrade with Database Upgrade Assistant (DBUA), then you can do this automatically by selecting the Move Database Files option during the upgrade. See "Upgrade a Database Using Database Upgrade Assistant" for more information. If you perform a manual upgrade, then see Oracle Database Administrator's Guide for information about relocating data files.
See Also:
Some aspects of upgrading are operating system-specific. See your operating system-specific Oracle documentation for additional instructions about upgrading on your operating system.The following sections discuss system considerations and requirements:
Upgrading Oracle Clusterware and Automatic Storage Management (ASM) Databases
Upgrading Databases That Use Oracle Streams Downstream Capture
In past releases, Oracle ASM was installed as part of the Oracle Database installation. With Oracle Database 11g Release 2 (11.2), Oracle ASM is part of an Oracle grid infrastructure installation. If you want to upgrade an existing Oracle ASM installation, then you must upgrade Oracle ASM by running an Oracle grid infrastructure upgrade.
Prior to Oracle Database 11g, either all Oracle software installations were owned by the Oracle user, typically oracle
, or Oracle Database software was owned by oracle
, and Oracle Clusterware software was owned by a separate user, typically crsuser
. Starting with Oracle Database 11g, the same user that owned the Oracle Clusterware 10g software must perform the Oracle Clusterware 11g upgrade.
Starting with Oracle Database 11g release 2 (11.2), the Oracle Clusterware software must be upgraded to a new directory, called the Oracle grid infrastructure home. Also, ASM and Oracle Clusterware (and Oracle Restart for single-instance databases) must run in the same Oracle grid infrastructure home.
For a single-instance configuration, ASM and Oracle Restart run from the Oracle grid infrastructure home, and the cluster synchronization services daemon (CSS) runs from this same home. Thus, ASM and CSS will be upgraded to Oracle Database 11g Release 2 (11.2) at the same time.
If your configuration does not include ASM, then you should shut down the CSS daemon and delete the CSS service from the system by running the localconfig
batch file with the delete
option. For example:
ORACLE_HOME/bin/localconfig delete
If you do not know whether or not your configuration includes Oracle ASM, then issue the following SQL statement on the database instance:
select count(*) from v$asm_client where status = 'CONNECTED';
If this returns one or more rows, then the database is actively using an ASM disk group.
If you are upgrading an Oracle RAC database with DBUA, then all necessary configuration is done for you automatically. If you are manually upgrading an Oracle RAC database, then most of the actions described in this chapter should be performed on only one node of the system. Actions that must be performed on more than one node are indicated in that particular step.
Note:
A new prerequisite check has been added to ensure that Oracle Clusterware release 10.2.0.n is at release 10.2.0.3 (or higher), before you attempt to upgrade it to Oracle Clusterware 11g. If this check fails, then you are instructed to apply Oracle Clusterware patch set release 10.2.0.3.0 or later to your existing release 10.2.0.2 before it can be upgraded. All other upgrade paths and fresh install cycles are unaffected by this prerequisite check.Starting with Oracle Database 11g Release 1 (11.1), you should use the SYSASM
privilege to separate database management and storage management responsibilities. Also, you have the option to create separate operating system credentials for ASM and each database. This separation allows for an even greater division of database management and storage management responsibilities. For instance, if there are n databases using ASM on a given node, then you can configure n + 1 sets of operating system credentials groups whose members have SYS
privileges: one OSDBA
group for each database with SYSDBA
privileges, and one OSASM
group for the ASM instance with SYSASM
privileges.
Before upgrading an ASM instance to the new Oracle Database 11g release, you must add a user and password combination to the password file that is local to a node's ASM instance using the SQL*Plus CREATE USER
statement:
CREATE USER user_name IDENTIFIED BY password;
Note:
This step is necessary only when upgrading the ASM instance. It is not necessary when upgrading a database to the new Oracle Database 11g release without upgrading ASM.If the default Oracle Database 11g security settings are in place, then passwords must be at least 8 characters, and passwords such as welcome
and oracle
are not allowed. See Oracle Database Security Guide for more information.
See Also:
Oracle Database Storage Administrator's Guide for more information about authentication for accessing ASM instances
Oracle Database SQL Language Reference for complete syntax about CREATE USER
Oracle Database Security Guide for password management guidelines and other security recommendations
Oracle Database 11g Release 1 (11.1) and later releases can read file headers created in previous releases, so you are not required to do anything to them during the upgrade. The only exception to this is if you want to transport tablespaces created prior to Oracle Database 11g Release 1 (11.1) to another platform. In this case, the file headers must be made read/write at some point before the transport. However, there are no special actions required on them during the upgrade.
The file headers of offline data files are updated later when they are brought online, and the file headers of read-only tablespaces are updated if and when they are made read/write sometime after the upgrade. You are never required to make read-only tablespaces read/write in any other circumstance.
See Also:
Oracle Database Administrator's Guide for more information about read-only tablespaces and transporting tablespaces between databasesTo upgrade the Oracle Database software when standby databases are present in an Oracle Data Guard configuration, see Oracle Data Guard Concepts and Administration. To upgrade or downgrade Oracle Database and Oracle Enterprise Manager software in an Oracle Data Guard broker configuration, see Oracle Data Guard Broker.
During a rolling upgrade, you can run different releases of Oracle Database software on the primary and standby databases while you upgrade them, one at a time, incurring minimal downtime on the primary database by using either of the following methods:
SQL Apply and logical standby databases
Starting with Oracle Database 10g Release 1 (10.1.0.3), you can use Oracle Data Guard SQL Apply on a logical standby database to perform a rolling upgrade to the new Oracle Database 11g release. For example, you can upgrade the Oracle Database software from patchset release 10.1.0.n to the next database 10.1.0.(n+1) patchset release, or upgrade Oracle Database 10g Release 1 (10.1) to Oracle Database 11g Release 2 (11.2).
Use of physical standby database for rolling upgrades
A physical standby database can now take advantage of the rolling upgrade feature provided by a logical standby. Through the use of the new KEEP IDENTITY
clause option to the SQL ALTER DATABASE RECOVER TO LOGICAL STANDBY
statement, a physical standby database can be temporarily converted into a logical standby database for the rolling upgrade, and then reverted back to the original configuration of a primary database and a physical standby database when the upgrade is done.
See Also:
Oracle Database High Availability Best Practices
The following Oracle Maximum Availability Architecture (MAA) white papers at http://www.otn.oracle.com/goto/maa
:
"Rolling Database Upgrades using Data Guard SQL Apply"
"Rolling Database Upgrades for Physical Standby Databases Using Transient Logical Standby 11g"
If required, upgrade the operating system before upgrading Oracle Database.
See Also:
The Oracle Database Installation Guide for your platform to obtain a list of supported operating systems
Your operating system-specific documentation for information about how to perform an operating system upgrade
When using DBUA or when performing a manual upgrade, you cannot migrate data in a database on one operating system to a database on another operating system. For example, you cannot migrate data in an Oracle9i database on Solaris to an Oracle Database 11g database on Windows 2000 using DBUA.
If you must migrate Oracle Database software to a different operating system, then the best practice is to follow these steps:
Upgrade to the new Oracle Database 11g release on your current operating system platform following the instructions in this guide.
Test the upgraded database on your current operating system platform.
Use Oracle Data Guard and physical standby databases to migrate between operating systems.
See Also:
Note 413484.1 on My Oracle Support (http://metalink.oracle.com/
) for more information on Data Guard support for heterogeneous primary and standby systems in the same Data Guard configurationIf cross-platform physical standby database is not available for the platform combination to be migrated, then you can use the Oracle Database 11g cross-platform transportable tablespace feature or the Oracle Data Pump Export and Import utilities to migrate the upgraded database to the different operating system.
Note:
Transportable tablespaces do not support migratingSYSTEM
or SYSAUX
tablespaces. All non-segment user data, such as roles, triggers, views, and procedures, must be moved to the new operating system with scripts or export/import.If the two operating systems are in the same endianess group, then you can use the Oracle Database 11g cross-platform transportable database feature to migrate the entire database.
You can also use Oracle Streams to migrate data between operating systems. Oracle Streams has data type limitations and restrictions, such as for advanced queues and object types, and it requires additional administrative overhead.
See Also:
Oracle Database Backup and Recovery User's Guide for more information on transportable tablespaces
Oracle Database High Availability Overview for more information on migrations using Data Guard or transportable databases
Oracle Streams Concepts and Administration for more information on migrations using Oracle Streams
In an Oracle Streams replication environment, downstream captures means that a capture process runs on a database other than the source database. When you upgrade the databases in such an environment, upgrade the database with the downstream capture process before you upgrade the source database. Upgrading the databases in this order ensures that the downstream capture database can continue to function after the source database is upgraded.
See Also:
Oracle Streams Concepts and Administration for more information about downstream capture.If you have enabled Oracle Database Vault, then you must disable it before upgrading the database, and enable it again when the upgrade is finished.
See Also:
Oracle Database Vault Administrator's Guide for instructions about disabling Oracle Database VaultInstallation of the Oracle Database 11g Release 2 (11.2) software involves upgrading Clusterware if necessary, and installing Oracle Database 11g Release 2 (11.2).
Note:
Oracle Clusterware was called Cluster Ready Services in earlier releases.If you are upgrading an Oracle RAC database, then you must perform the following steps in the order shown:
Mount the Oracle grid infrastructure installation media.
Complete operating system prerequisite checks on each of the nodes that you intend to upgrade, to ensure that they meet the system prerequisites for Oracle grid infrastructure (Oracle Clusterware and Oracle ASM".
If necessary, perform patch upgrades of the previous release Oracle Clusterware or Oracle Cluster Ready Services software to the most recent patch version.
Ensure that you are logged in as the user that you want to own the Oracle grid infrastructure installation, and run the Oracle grid infrastructure installation. Provide information as prompted by the installer.
When prompted, open a separate terminal session, log in as root, and run root.sh
.
After upgrading Oracle Clusterware (assuming it was necessary), follow the instructions in your Oracle operating system-specific documentation to prepare for installation of Oracle Database software and start the Oracle Universal Installer.
When installation is complete, one or more assistants might be started. If you chose to run DBUA during installation, then you are ready to proceed with the upgrade when DBUA is started. However, Oracle recommends that you run the Pre-Upgrade Information Tool before you upgrade using DBUA, so that you can preview the types of items DBUA checks. (See "Run the Pre-Upgrade Information Tool".) You can then run DBUA independently after the installation is complete.
Note also that you must run the Oracle Net Configuration Assistant before running DBUA.
When installation of Oracle Database software has completed successfully, click Exit to close the Oracle Universal Installer.
Note:
If you use Oracle Label Security, Database Vault, or both, then you must perform a custom Oracle Database 11g Release 2 (11.2) installation, because these features are not included in the standard Oracle Database installation. See Oracle Label Security Administrator's Guide or your platform-specific Oracle Database Vault Administrator's Guide for more information.After you have installed Oracle Database 11g Release 2 (11.2), check to see if there is a patchset release or critical patch update to be installed:
Patchsets
Patchsets are software-release mechanisms for delivering tested and integrated product fixes on a regular basis. Patchsets provide bug fixes only; they do not include new features or functions, and do not require certification on the target system.
Critical patch updates
Critical patch updates contain security patch updates and security fixes. As of 2005, Oracle began providing critical patch updates for all product offerings on a quarterly schedule. The comprehensive patches address significant security vulnerabilities and include fixes that are prerequisites for the security fixes.
The latest patchset release and critical patch update for Oracle Database 11g Release 2 (11.2) should be installed prior to upgrading your databases. Refer to the specific patch release and critical patch update documentation for installation information.
After you have installed Oracle Database 11g Release 2 (11.2) and any required patches, you should analyze your database before upgrading it to the new release. This is done by running the Pre-Upgrade Information Tool. This is a required step if you are upgrading manually, otherwise the catupgrd.sql
script will terminate with errors. Running the Pre-Upgrade Information Tool is also recommended if you are upgrading with DBUA, so that you can preview the items that DBUA checks.
The Pre-Upgrade Information Tool is a SQL script that ships with Oracle Database 11g Release 2 (11.2), and must be copied to and run from the environment of the database being upgraded. Complete the following steps to run the Pre-Upgrade Information Tool:
Log in to the system as the owner of the Oracle Database 11g Release 2 (11.2) Oracle home directory.
Copy the Pre-Upgrade Information Tool (utlu112i.sql
) from the Oracle Database 11g Release 2 (11.2) ORACLE_HOME
/rdbms/admin
directory to a directory outside of the Oracle home, such as the temporary directory on your system.
Make a note of the new location of this file.
Log in to the system as the owner of the Oracle home directory of the database to be upgraded.
Change to the directory that you copied utlu112i.sql
to in Step 2.
Start SQL*Plus.
Connect to the database instance as a user with SYSDBA
privileges.
Set the system to spool results to a log file for later analysis:
SQL> SPOOL upgrade_info.log
Run the Pre-Upgrade Information Tool:
SQL> @utlu112i.sql
Turn off the spooling of script results to the log file:
SQL> SPOOL OFF
Check the output of the Pre-Upgrade Information Tool in upgrade_info
.log
.
The following is an example of the output generated by the Pre-Upgrade Information Tool:
Oracle Database 11.2 Pre-Upgrade Information Tool 10-14-2008 23:25:25 . ********************************************************************** Database: ********************************************************************** --> name: ORCL --> version: 10.2.0.2.0 --> compatible: 10.2.0.2 --> blocksize: 8192 --> platform: Linux IA (32-bit) --> timezone file: V2 . ********************************************************************** Tablespaces: [make adjustments in the current environment] ********************************************************************** WARNING: --> SYSTEM tablespace is not large enough for the upgrade. .... currently allocated size: 560 MB .... minimum required size: 910 MB .... increase current size by: 350 MB .... tablespace is NOT AUTOEXTEND ENABLED. --> UNDOTBS1 tablespace is adequate for the upgrade. .... minimum required size: 457 MB .... AUTOEXTEND additional space required: 352 MB --> SYSAUX tablespace is adequate for the upgrade. .... minimum required size: 617 MB .... AUTOEXTEND additional space required: 287 MB --> TEMP tablespace is adequate for the upgrade. .... minimum required size: 61 MB .... AUTOEXTEND additional space required: 41 MB --> EXAMPLE tablespace is adequate for the upgrade. .... minimum required size: 69 MB . ********************************************************************** Update Parameters: [Update Oracle Database 11.2 init.ora or spfile] ********************************************************************** WARNING: --> "sga_target" needs to be increased to at least 388 MB . ********************************************************************** Renamed Parameters: [Update Oracle Database 11.2 init.ora or spfile] ********************************************************************** WARNING: --> "plsql_compiler_flags" old value was "INTERPRETED"; new name is "plsql_code_type" new value is "INTERPRETED" . ********************************************************************** Obsolete/Deprecated Parameters: [Update Oracle Database 11.2 init.ora or spfile] ********************************************************************** --> "max_enabled_roles" --> "remote_os_authent" --> "background_dump_dest" replaced by "diagnostic_dest" --> "user_dump_dest" replaced by "diagnostic_dest" . ********************************************************************** Components: [The following database components will be upgraded or installed] ********************************************************************** --> Oracle Catalog Views [upgrade] VALID --> Oracle Packages and Types [upgrade] VALID --> JServer JAVA Virtual Machine [upgrade] VALID --> Oracle XDK for Java [upgrade] VALID --> Oracle Workspace Manager [upgrade] VALID --> Messaging Gateway [upgrade] VALID --> OLAP Analytic Workspace [upgrade] VALID --> OLAP Catalog [upgrade] VALID --> Oracle Label Security [upgrade] VALID --> EM Repository [upgrade] VALID --> Oracle Text [upgrade] VALID --> Oracle XML Database [upgrade] VALID --> Oracle Java Packages [upgrade] VALID --> Oracle interMedia [upgrade] VALID --> Spatial [upgrade] VALID --> Data Mining [upgrade] VALID --> Expression Filter [upgrade] VALID --> Rule Manager [upgrade] VALID --> Oracle Application Express [upgrade] --> Oracle OLAP API [upgrade] VALID . ********************************************************************** Miscellaneous Warnings ********************************************************************** WARNING: --> Database is using a timezone file older than version 11. .... After the release migration, it is recommended that DBMS_DST package .... be used to upgrade the 10.2.0.2.0 database timezone version .... to the latest version which comes with the new release. WARNING: --> Database contains stale optimizer statistics. .... Refer to the 11g Upgrade Guide for instructions to update .... statistics prior to upgrading the database. .... Component Schemas with stale statistics: .... SYS .... WMSYS .... CTXSYS WARNING: --> Database contains INVALID objects prior to upgrade. .... The list of invalid SYS/SYSTEM objects was written to .... registry$sys_inv_objs. .... The list of non-SYS/SYSTEM objects was written to .... registry$nonsys_inv_objs. .... Use utluiobj.sql after the upgrade to identify any new invalid .... objects due to the upgrade. .... USER PUBLIC has 7 INVALID objects. .... USER FLOWS_010600 has 1 INVALID objects. .... USER SYS has 1 INVALID objects. WARNING: --> Database contains schemas with objects dependent on network packages. .... Refer to the 11g Upgrade Guide for instructions to configure Network ACLs. .... USER WKSYS has dependent objects. .... USER SYSMAN has dependent objects. .... USER FLOWS_010600 has dependent objects. WARNING: --> EM Database Control Repository exists in the database. .... Direct downgrade of EM Database Control is not supported. Refer to the .... 11g Upgrade Guide for instructions to save the EM data prior to upgrade. . WARNING: --> There are materialized view refreshes in progress. .... Ensure all materialized view refreshes are complete prior to upgrade. WARNING: --> There are files which need media recovery. .... Ensure no files need media recovery prior to upgrade. WARNING: --> There are files in backup mode. .... Ensure no files are in backup mode prior to upgrade. WARNING:--> There are outstanding unresolved distributed transactions. .... Resolve outstanding distributed transactions prior to upgrade. WARNING:--> A standby database exists. .... Sync standby database prior to upgrade. WARNING: --> log_archive_format must be updated. .... As of 10.1, log_archive_format requires a %r format qualifier .... be present in its format string. Your current setting is: .... log_archive_format='%t_%s.dbf'. .... Archive Logging is currently OFF, but failure to add the %r to the .... format string will still prevent the upgraded database from starting up. WARNING:--> recycle bin in use. .... Your recycle bin is turned on and it contains .... 3 object(s). It is REQUIRED .... that the recycle bin is empty prior to upgrading .... your database. .... The command: PURGE DBA_RECYCLEBIN .... must be executed immediately prior to executing your upgrade. .
Note:
Oracle interMedia became Oracle Multimedia in Oracle Database 11g Release 1 (11.1).The following sections describe the output of the Pre-Upgrade Information Tool.
Database
This section displays global database information about the current database, such as the database name, release number, and compatibility level. A warning is displayed if you must adjust the COMPATIBLE
initialization parameter before the database is upgraded.
Logfiles
This section displays a list of redo log files in the current database whose size is less than 4 MB. For each log file, the file name, group number, and recommended size is displayed.
In a manual upgrade using SQL scripts and utilities, new files of at least 4 MB (preferably 10 MB) must be created in the current database, and any redo log files less than 4 MB must be dropped before the database is upgraded. These tasks are performed automatically by the Database Upgrade Assistant.
Tablespaces
This section displays a list of tablespaces in the current database. For each tablespace, the tablespace name and minimum required size is displayed. In addition, a message is displayed if the tablespace is adequate for the upgrade.
In a manual upgrade using SQL scripts and utilities, space must be added to tablespaces that do not have enough free space in the current database. These tablespace adjustments must be made before the database is upgraded. Some of these tasks are performed automatically by the Database Upgrade Assistant.
Update Parameters
This section displays a list of initialization parameters in the parameter file of the current database that must be adjusted before the database is upgraded. The adjustments must be made to the parameter file after it is copied to the new Oracle Database 11g release.
See Also:
Appendix A, "Behavior Changes" for more information about changes to initialization parameters in the new Oracle Database 11g releaseDeprecated Parameters
This section displays a list of initialization parameters in the parameter file of the current database that are deprecated in the new Oracle Database 11g release.
See Also:
Appendix A, "Behavior Changes" for a list of initialization parameters that are deprecated in the new Oracle Database 11g releaseObsolete Parameters
This section displays a list of initialization parameters in the parameter file of the current database that are obsolete in the new Oracle Database 11g release. Obsolete initialization parameters must be removed from the parameter file before the database is upgraded.
See Also:
Appendix A, "Behavior Changes" for a list of initialization parameters that are obsolete in the new Oracle Database 11g releaseComponents
This section displays a list of database components in the new Oracle Database 11g release that are upgraded or installed when the current database is upgraded.
Miscellaneous Warnings
This section provides warnings about specific situations that might require attention before or after the upgrade.
SYSAUX Tablespace
This section displays the minimum required size for the SYSAUX
tablespace, which is required in the new Oracle Database 11g release. The SYSAUX
tablespace must be created after the new release is started and before the upgrade scripts are invoked.
If the Pre-Upgrade Information Tool displays a warning about any of the following issues, then further analysis of the database is recommended prior to upgrading it to the new Oracle Database 11g release:
After upgrading to the new Oracle Database 11g release from Oracle9i Release 2 (9.2) or Oracle Database 10g Release 1 (10.1), the CONNECT
role has only the CREATE SESSION
privilege; the other privileges granted to the CONNECT
role in earlier releases are revoked during the upgrade. To identify which users and roles in your database are granted the CONNECT
role, use the following query:
SELECT grantee FROM dba_role_privs WHERE granted_role = 'CONNECT' and grantee NOT IN ( 'SYS', 'OUTLN', 'SYSTEM', 'CTXSYS', 'DBSNMP', 'LOGSTDBY_ADMINISTRATOR', 'ORDSYS', 'ORDPLUGINS', 'OEM_MONITOR', 'WKSYS', 'WKPROXY', 'WK_TEST', 'WKUSER', 'MDSYS', 'LBACSYS', 'DMSYS', 'WMSYS', 'EXFSYS', 'SYSMAN', 'MDDATA', 'SI_INFORMTN_SCHEMA', 'XDB', 'ODM');
If users or roles require privileges other than CREATE
SESSION
, then grant the specific required privileges prior to upgrading. The upgrade scripts adjust the privileges for the Oracle-supplied users.
The new Oracle Database 11g release includes fine-grained access control to the UTL_TCP
, UTL_SMTP
, UTL_MAIL
, UTL_HTTP
, or UTL_INADDR
packages using Oracle XML DB. If you have applications that use one of these packages, then you must install Oracle XML DB if it is not already installed.
Use the following instructions to assess the dependencies and provide access by adding the appropriate access control lists (ACLs):
Run the pre-upgrade information tool as described in "Run the Pre-Upgrade Information Tool".
Check the output from the pre-upgrade information tool (upgrade_info
.log
) for messages such as the following:
WARNING: --> Database contains schemas with objects dependent on network packages. .... Refer to the 11g Upgrade Guide for instructions to configure Network ACLs. .... USER WKSYS has dependent objects. .... USER SYSMAN has dependent objects. .... USER FLOWS_010600 has dependent objects. .
Query the DBA_DEPENDENCIES
view to obtain more information about the dependencies. For example:
SELECT * FROM DBA_DEPENDENCIES WHERE referenced_name IN ('UTL_TCP','UTL_SMTP','UTL_MAIL','UTL_HTTP','UTL_INADDR') AND owner NOT IN ('SYS','PUBLIC','ORDPLUGINS');
Prepare post-upgrade scripts now so the scripts will be available for use in the test environment. This ensures the new access controls are part of your upgrade testing.
To configure network access control lists (ACLs) in the database so that these packages can work as they did in prior releases, see the example script provided in "Configure Fine-Grained Access to External Network Services". This script shows how to use the DBMS_NETWORK_ACL_ADMIN
package to create, assign, and add privileges to the access control list.
After the upgrade, you will need to grant the specific required privileges. Access will be based on the usage in the original database.
During the upgrade to the new Oracle Database 11g release from Oracle9i Release 2 (9.2) or Oracle Database 10g Release 1 (10.1), any passwords in database links are encrypted. To downgrade to the original release, all of the database links with encrypted passwords must be dropped prior to the downgrade. Consequently, the database links do not exist in the downgraded database. If you anticipate a requirement to be able to downgrade to your original release, then save the information about affected database links from the SYS.LINK$
table, so that you can re-create the database links after the downgrade.
The time zone files that are supplied with Oracle Database 11g Release 2 (11.2) have been updated to version 11 to reflect changes in transition rules for some time-zone regions. The changes might affect existing data of the TIMESTAMP WITH TIME ZONE
data type.
The time zone behavior for Oracle Database 11g Release 2 (11.2) has changed significantly from prior releases. If the time zone file is not version 11 on the database being upgraded, then the Pre-Upgrade Information Tool displays a warning and describes how to proceed. Table 3-1 describes the warnings and summarizes how to rectify a mismatch in time zone file versions.
Table 3-1 Fixing the Time Zone File Version
IF the version on the database being upgraded is ... | THEN fix the time zone files ... |
---|---|
Earlier than version 11 and the Pre-Upgrade Information Tool displays "Database is using a timezone file older than version n." |
After completing the database upgrade. Use the |
Later than version 11 and the Pre-Upgrade Information Tool displays "Database is using a timezone file greater than version n." |
Before beginning the database upgrade. You must patch the Oracle home with the appropriate patch for the time zone file version in use. Apply the patch for each database you will be upgrading. Otherwise, the upgrade script will terminate without upgrading the database. |
The TIMESTAMP WITH TIME ZONE
data stored in the database can become corrupted during the upgrade if there is a time zone file version mismatch.
See Also:
Oracle Database Globalization Support Guide for a detailed description of time zone upgrade, and the following My Oracle Support notes:Note 359145.1 "Impact of 2007 USA daylight saving changes on the Oracle database"
Note 414590.1 "Time Zone IDs for 7 Time Zones Changed in Time Zone Files >=V3"
When upgrading to the new Oracle Database 11g release, optimizer statistics are collected for dictionary tables that lack statistics. This statistics collection can be time consuming for databases with a large number of dictionary tables, but statistics gathering only occurs for those tables that lack statistics or are significantly changed during the upgrade.
To decrease the amount of downtime incurred when collecting statistics, you can collect statistics prior to performing the actual database upgrade. As of Oracle Database 10g Release 1 (10.1), Oracle recommends that you use the DBMS_STATS.GATHER_DICTIONARY_STATS
procedure to gather these statistics. For example, you can enter the following:
EXEC DBMS_STATS.GATHER_DICTIONARY_STATS;
If you are using Oracle9i Release 2 (9.2), then you should use the DBMS_STATS.GATHER_SCHEMA_STATS
procedure to gather statistics. To do this, you can run the scripts provided in Appendix B.
Table 3-2 lists the system components and schemas that are checked for statistics collection during the upgrade.
Table 3-2 Statistics Collection for System Components and Schemas
Component Name | Schema |
---|---|
JServer JAVA Virtual Machine |
|
OLAP Analytic Workspace |
|
Oracle Database Catalog Views |
|
Oracle Database JAVA Packages |
|
Oracle Database Packages and Types |
|
Oracle Database Vault |
|
Oracle Enterprise Manager |
|
Oracle Expression Filter |
|
Oracle Multimedia |
|
Oracle Label Security |
|
Oracle OLAP API |
|
Oracle Spatial |
|
Oracle Text |
|
Oracle Ultra Search |
|
Oracle Workspace Manager |
|
Oracle XDK |
|
Oracle XML Database |
|
Any invalid SYS
/SYSTEM
objects found prior to upgrading the database will be stored in the table named registry$sys_inv_objs
. Any invalid non-SYS
/SYSTEM
objects found prior to upgrading the database will be stored in registry$nonsys_inv_objs
. After the upgrade, run ORACLE_HOME
/rdbms/admin/utluiobj.sql
to identify any new invalid objects due to the upgrade.
In order to downgrade Oracle Enterprise Manager Database Control after upgrading to the new Oracle Database 11g release, you must save your Database Control files and data before upgrading your database. This section explains how to use the emdwgrd
utility before upgrading your database to keep a copy of your Database Control files and data.
The emdwgrd utility resides in the ORACLE_HOME/bin directory in the new Oracle Database 11g release. The emdwgrd utility consists of emdwgrd
and emdwgrd.pl
for Linux and UNIX, and emdwgrd.bat
and emdwgrd.pl
for Windows. Before running the utility, you must install the new Oracle Database 11g release and invoke the script from the new Oracle Database 11g release. The emdwgrd
utility, however, requires that you set ORACLE_HOME
to the old Oracle home.
The following procedure is for Linux and UNIX. To run it on Windows, simply substitute emdwgrd.bat
for emdwgrd
.
Follow these steps to save your Database Control files and data:
Install the new Oracle Database 11g release.
This step is not required for an inplace patchset upgrade.
Set ORACLE_HOME
to your old Oracle home.
This step is not required for an inplace patchset upgrade.
Set ORACLE_SID
to the SID of the database being upgraded.
Set PATH
, LD_LIBRARY_PATH
, and SHLIB_PATH
to point to the Oracle home from which the database is being upgraded.
Go to the Oracle home of the new Oracle Database 11g release.
Execute one of the following:
For a single-instance database, run the following command, where old_SID
is the SID of the database being upgraded and save_directory
is the path to the storage place you have chosen for your Database Control files and data:
emdwgrd -save -sid old_SID -path save_directory
If the database is an Oracle RAC database, remote copy is required across the cluster nodes. Define an environment variable to indicate which remote copy is configured. For example:
setenv EM_REMCP /usr/bin/scp
Then, execute the following save
command:
emdwgrd -save -cluster -sid old_SID -path save_directory
If the release 10g Oracle home is on a shared device, add -shared
to the previous command line.
Enter the SYS
password for the database to be upgraded.
On a single-instance database, the emdwgrd
utility produces output similar to the following:
Sat Apr 28 08:49:45 2007 - Verify EM DB Control files ... pass Sat Apr 28 08:49:45 2007 - Validating DB Connection to DB102 ... pass Sat Apr 28 08:49:51 2007 - creating directory ... created Sat Apr 28 08:49:51 2007 - Stopping DB Control ... stopped Sat Apr 28 08:50:01 2007 - Saving DB Control files ... saved Sat Apr 28 08:50:14 2007 - recompiling invalid objects ... recompiled Sat Apr 28 08:50:18 2007 - Exporting sysman schema for DB102 ... exported Sat Apr 28 08:51:36 2007 - Starting DB Control ... started Sat Apr 28 08:53:21 2007 - DB Control was saved successfully.
On an Oracle RAC database, the emdwgrd
utility produces output similar to the following:
$ /scratch/oracle/product/11.1.0/db_1/bin/emdwgrd -srcOracleHome $ORACLE_HOME -sid DB102 -path /scratch/rpattabh/ravi/tmp/dbcdir5 –save -cluster Enter sys password for database DB102? ***** Database Unique Name : DB102 Sat Apr 28 08:49:45 2007 - Verify EM DB Control files ... pass Sat Apr 28 08:49:45 2007 - Validating DB Connection to DB102 ... pass Sat Apr 28 08:49:51 2007 - creating directory ... created Sat Apr 28 08:49:51 2007 - Stopping DB Control on all Nodes Please Execute '/tmp/racdwgrd_dbctl.sh' on Node1, Node2. Press yes to continue when the operations are successful. Continue (yes/no) ? y ... stopped Sat Apr 28 08:50:01 2007 - Saving DB Control files Executing save directories from node Node1 Executing save directories from node Node2 ... saved Sat Apr 28 08:50:14 2007 - Recompiling invalid objects ... recompiled Sat Apr 28 08:50:18 2007 - Exporting sysman schema for DB102 ... exported Sat Apr 28 08:53:21 2007 - DB Control was saved successfully. Sat Apr 28 08:51:36 2007 - Starting DB Control on all nodes Please Execute '/tmp/racdwgrd_dbctl.sh' on Node1, Node2. Press yes to continue when the operations are successful. Continue (yes/no) ? y ... started Sat Apr 28 08:57:26 2007 - Dump directory was dropped successfully.
Note:
The DBUA backup and restore process also allows you to revert to your previous Oracle Enterprise Manager Database Control environment after upgrading your database. But you will lose all user data accumulated between the upgrade and restore operations. Saving your Database Control files and data enables you to downgrade both your database and Database Control. You will lose all Database Control data accumulated between the upgrade and downgrade, but you will retain all user data.For a list of materialized view refreshes that need to be completed, issue the following statement:
SELECT DISTINCT(TRUNC(last_refresh)) FROM dba_snapshot_refresh_times;
For a list of files that require media recovery, issue the following statement:
SELECT * FROM v$recover_file;
For a list of files in backup mode, issue the following statement:
SELECT * FROM v$backup WHERE status != 'NOT ACTIVE';
Resolve outstanding distributed transactions prior to the upgrade.
SELECT * FROM dba_2pc_pending;
If this query returns any rows, then issue the following statements:
SQL> SELECT local_tran_id FROM dba_2pc_pending; SQL> EXECUTE dbms_transaction.purge_lost_db_entry(''); SQL> COMMIT;
To check if a standby database exists, issue the following query:
SELECT SUBSTR(value,INSTR(value,'=',INSTR(UPPER(value),'SERVICE'))+1) FROM v$parameter WHERE name LIKE 'log_archive_dest%' AND UPPER(value) LIKE 'SERVICE%';
If this query returns a row, then sync the standby database with the Primary database.
Make sure all the logs are transported to the standby server after a final log switch in the primary.
Start the recovery of the standby database with the NODELAY
option.
Use the PURGE
statement to remove items and their associated objects from the recycle bin and release their storage space:
PURGE DBA_RECYCLEBIN
It is REQUIRED that the recycle bin be empty during the upgrade to avoid possible ORA-00600
errors as well as to minimize the upgrade time.
If you are upgrading from Oracle9i and a listener was not configured in the Oracle9i repository, then you must run Oracle Net Configuration Assistant to configure the listening protocol address and service information for the new Oracle Database 11g database, including a listener.ora
file, before running DBUA. A new version of the listener is required for an Oracle Database 11g database. Previous versions of the listener are not supported for use with an Oracle Database 11g database. However, it is possible to use the new version of the listener with previous versions of Oracle Database.
If you are upgrading an Oracle Real Application Clusters (Oracle RAC) database, then you have two options:
Upgrade the Oracle RAC database with DBUA, which automatically migrates the listener from your old Oracle home to the Oracle home of the new Oracle Database 11g release.
If you are upgrading from Oracle9i or upgrading manually without using DBUA, then run Oracle Net Configuration Assistant before upgrading the Oracle RAC database.
This is a two-step option. You must first run Oracle Net Configuration Assistant from the old Oracle home to remove the old listener. Then you must run Oracle Net Configuration Assistant again from the Oracle home of the new Oracle Database 11g release to create a new listener.
You must remove the old listener before creating a new one. If you attempt to create a new listener from the new Oracle home first, and use the same name and port as the old listener, then Oracle Net Configuration Assistant returns an error.
Note:
This is your only option if you want to upgrade your Oracle RAC database manually.See Also:
Oracle Database Net Services Administrator's Guide for complete information about using Oracle Net Configuration AssistantThe following sections guide you through the process of upgrading a database using Database Upgrade Assistant (DBUA). Please note the following:
DBUA can be used to upgrade from prior Oracle Database 11g patch releases as well as from prior major Oracle Database releases on both Oracle Real Application Clusters databases and Oracle Database single-instance databases. The procedure to upgrade patch releases is no different from the normal upgrade procedure.
You must run the Oracle Net Configuration Assistant before running DBUA. See "Run the Oracle Net Configuration Assistant".
If you are upgrading an existing Oracle Enterprise Manager Database Control or if you are configuring a new Oracle Enterprise Manager Database Control for the new Oracle Database 11g release, then the listener must be running prior to upgrading Oracle Enterprise Manager. If DBUA detects that an Oracle Enterprise Manager upgrade or configuration is requested, and DBUA does not see a listener running, then it will prompt you and start the default listener in either of these cases.
It is not possible to upgrade a database using DBUA when the source and target Oracle homes are owned by different users. Attempting to do so returns an error similar to the following:
PRKH-1014 Current user user is not the same as owner owner of oracle home
If you upgrade a cluster database using DBUA, then you must make sure the CLUSTER_DATABASE
initialization parameter is set to true
.
If the database instance is not running, then DBUA tries to start the instance with the default initialization parameter file. If that fails, then you are prompted to provide the name of the correct initialization parameter file or to start the instance. If the instance is already up and running, then DBUA connects to it.
If you terminate the upgrade, but do not restore the database, then you should not restart DBUA until you start up the existing database in UPGRADE
mode using the new Oracle Database 11g server. You cannot go back to the original server unless you restore your database.
If you restore your database manually (not using DBUA), then remove the Welcome_
SID
.txt
file, located in the ORACLE_HOME/cfgtoollogs/dbua/logs/ directory, before starting DBUA. The presence of this file indicates to DBUA that this is a re-run operation.
DBUA provides a graphical user interface (GUI) to guide you through the upgrade of a database, or you can invoke it in silent mode, which does not present a user interface:
If you installed Oracle Database 11g Release 2 (11.2) and specified that you are upgrading an existing database, then DBUA is started automatically. However, if you did not specify that you are upgrading an existing database, then you can start DBUA independently after installation is complete.
DBUA performs the following checks before the upgrade:
Invalid user accounts or roles.
Invalid data types or invalid objects.
Desupported character sets.
Adequate resources, including rollback segments, tablespaces, and free disk space.
Missing SQL scripts needed for the upgrade.
Listener running (if Oracle Enterprise Manager Database Control upgrade or configuration is requested).
Oracle Database software linked with Database Vault option. If Database Vault is enabled, then DBUA returns an error asking you to disable Database Vault prior to upgrade. See "Upgrading Databases That Use Oracle Database Vault".
DBUA does not begin the upgrade until all of the pre-upgrade steps are completed.
During the upgrade, DBUA automatically modifies or creates new required tablespaces and invokes the appropriate upgrade scripts, as follows:
If the datafiles are auto extensible and have enough disk space to grow, then DBUA continues with the upgrade.
If the datafiles are not autoextensible, then DBUA prompts the user and makes the files auto extensible.
If the tablespaces are auto extensible and the MAXSIZE initialization parameter needs adjustment, then DBUA prompts for the same and adjusts the MAXSIZE parameter.
If there is not enough disk space to grow, then DBUA prompts you to create space (by adding more datafiles). DBUA does not add new datafiles because DBUA cannot determine where to create the files.
Optionally, DBUA backs up all necessary files.
While the upgrade is running, DBUA shows the upgrade progress for each component. DBUA writes detailed trace and log files and produces a complete HTML report for later reference. To enhance security, DBUA automatically locks new user accounts in the upgraded database. DBUA then proceeds to create new configuration files (parameter and listener files) in the new Oracle home.
Complete the following steps to upgrade a database using the DBUA graphical user interface:
Do one of the following to start DBUA:
On Linux or UNIX platforms, enter the following command at a system prompt in the Oracle Database 11g Release 2 (11.2) environment:
dbua
Note:
Thedbua
executable is usually located in the ORACLE_HOME/bin directory.On Windows operating systems, select Start > Programs > Oracle - HOME_NAME > Configuration and Migration Tools > Database Upgrade Assistant.
The DBUA Welcome screen displays.
If you need help at any screen or want to consult more documentation about DBUA, then click Help to open the online help.
Click Next.
The Select Database page appears, listing the databases available for upgrade.
Select the database you want to upgrade to Oracle Database 11g Release 2 (11.2).
You can select only one database at a time. If you do not see the database that you want, then make sure an entry with the database name exists in the oratab
file in the etc directory.
If you are running DBUA from a user account that does not have SYSDBA
privileges, then you must enter the user name and password credentials to enable SYSDBA
privileges for the selected database.
Click Next.
DBUA analyzes the database, performing pre-upgrade checks and displaying warnings as necessary. Examples of DBUA database checks include:
Redo log files whose size is less than 4 MB. If such files are found, then DBUA gives the option to drop/create new redo log files.
Obsolete or deprecated initialization parameters.
When DBUA finishes its checks, the Upgrade Options screen displays.
The Upgrade Options screens allows you to set the following options:
Recompile invalid objects at the end of upgrade
Select Recompile invalid objects at the end of upgrade if you want DBUA to recompile all invalid PL/SQL modules after the upgrade is complete.
When you upgrade a database to Oracle Database 11g Release 2 (11.2), many of the PL/SQL modules in your database become invalid. As a result, all existing PL/SQL modules in an INVALID
state must be recompiled, such as packages, procedures, types, and so on.
By default, Oracle Database recompiles invalid PL/SQL modules as they are used. The time it takes to recompile the module can result in poor performance when you begin to use your newly upgraded database.
To eliminate these performance issues, select Recompile invalid objects at the end of upgrade. When you select this option, DBUA recompiles all the invalid PL/SQL modules immediately after the upgrade is performed. This ensures that you do not experience any performance issues later, as you begin using your newly upgraded database.
Note:
Selecting Recompile invalid objects at the end of upgrade is equivalent to running theutlrp.sql
script, located in the ORACLE_HOME
/rdbms/admin
directory, which is used to recompile stored PL/SQL and Java code.The task of recompiling all the invalid PL/SQL modules in your database can take a significant amount of time and increase the time it takes to complete your database upgrade. If you have multiple CPUs, then you can reduce the time it takes to perform this task by taking advantage of parallel processing on your available CPUs. If you have multiple CPUs available, then DBUA automatically adds an additional section to the Recompile Invalid Objects screen and automatically determines the number of CPUs you have available.
Degree of Parallelism
DBUA also provides a recommended degree of parallelism, which determines how many parallel processes are used to recompile your invalid PL/SQL modules. Specifically, DBUA sets the degree of parallelism to one less than the number of CPUs you have available. For example, if you have three CPUs available for processing, then DBUA selects 2 from the Degree of Parallelism menu. You can adjust this default value by selecting a new value from the Degree of Parallelism menu.
Backup Database
Select Backup database if you want DBUA to back up your database for you.
Oracle strongly recommends that you back up your database before starting the upgrade. If errors occur during the upgrade, you might be required to restore the database from the backup.
If you use DBUA to back up your database, then it makes a copy of all your database files in the directory you specify in the Backup Directory field. DBUA performs this cold backup automatically after it shuts down the database and before it begins performing the upgrade procedure. The cold backup does not compress your database files, and the backup directory must be a valid file system path. You cannot specify a raw device for the cold backup files.
In addition, DBUA creates a batch file in the specified directory. You can use this batch file to restore the database files:
On Windows operating systems, the file is called db_name_restore.bat
.
On Linux or UNIX platforms, the file is called db_name_restore.sh
.
If you choose not to use DBUA for your backup, then Oracle assumes you have already backed up your database using your own backup procedures.
Note:
DBUA does not back up ASM databases. You must manually back them up on your own.Click Next.
If you are upgrading a single-instance database or Oracle Express Edition (XE), then the Move Database Files screen appears. If you are upgrading an Oracle Real Application Clusters database, then the Move Database Files screen does not display.
Select one of the following options:
Do Not Move Database Files as Part of Upgrade
Move Database Files during Upgrade
If you choose to move database files, then you must also select one of the following:
File System
Your database files are moved to the host file system.
Automatic Storage Management (ASM)
Your database files are moved to ASM storage, which must already exist on your system. If you do not have an ASM instance, you can create one using DBCA and then restart DBUA.
See Also:
Your platform-specific Oracle Grid Infrastructure Installation Guide for information about installing and configuring ASM
"Managing ASM Instances With ASM Configuration Assistant" in the Oracle Database Storage Administrator's Guide
Click Next.
The Recovery and Diagnostic Locations screen displays, where you can designate a Fast Recovery Area for your database.
Fast Recovery Area is an Oracle managed disk location used for storing backup and recovery related files. Oracle strongly recommends configuring a Fast Recovery Area, because it significantly enhances speed, reliability, and manageability of the database recovery process. The location of the Fast Recovery Area is also used by Enterprise Manager if you enable local management and daily backups on the Management Options screen.
If you selected the Move Database Files during Upgrade option in step 5, or if an Oracle Express Edition database is being upgraded to Oracle Enterprise Edition, then you must configure a Fast Recovery Area. If a Fast Recovery Area is already configured, then the current settings are retained but the screen will display to allow you to override these values.
Do one of the following:
Accept the default Fast Recovery Area location
Enter the full path to a different location in the Flash Recovery Area field
Click Browse and select a different Fast Recovery Area location
Do one of the following:
Accept the default size for the Fast Recovery Area
Enter a different value in the Flash Recovery Area Size field
Click the up or down arrows to adjust the Fast Recovery Area size
See Also:
Oracle Database 2 Day DBA for more information about configuring the Fast Recovery AreaClick Next.
If no other database is already being monitored with Enterprise Manager, then the Management Options screen displays.
At the Management Options screen, you have the option of setting up your database so it can be managed with Enterprise Manager. Enterprise Manager provides Web-based management tools for managing individual database instances, as well as central management tools for managing your entire Oracle environment, including multiple databases, hosts, application servers, and other components of your network.
Before you can register the database with Oracle Enterprise Manager Grid Control, an Oracle Enterprise Manager Agent must be configured on the host computer.
To set up your database to be managed with Enterprise Manager, select Configure the Database with Enterprise Manager and then select one of the following options:
Register with Grid Control for centralized management
If you select this option, then you must also select an Oracle Management Service from the Management Service drop-down list. When you run DBUA, it checks to see if the Oracle Management Agent has been installed on the host computer. If no Oracle Management Agent is found, then the Grid Control option is not available.
When you finish installing the Oracle Database software, the database is automatically available as a managed target within Oracle Enterprise Manager Grid Control.
Configure Database Control for local management
If you are not centrally managing your Oracle environment, then you can still use Enterprise Manager to manage your database. When you install Oracle Database, you automatically install Oracle Enterprise Manager Database Control, which provides Web-based features for monitoring and administering the single-instance or cluster database you are installing.
Do the following steps if you want the SYSMAN
user (the default Super Administrator and owner of the Management Repository schema) to receive E-mail notification when a metric for a specified condition reaches a critical or warning threshold:
Select Enable Alert Notifications
Enter the name of the e-mail server you want to use for notifications in the Outgoing Mail (SMTP) Server field
Enter the e-mail address of the SYSMAN
user in the Recipient Email Address field
For example, Enterprise Manager can send an e-mail when a target goes down or when there are database space usage problems. E-mail notifications are enabled immediately upon installation.
Do the following steps to use the Oracle suggested backup strategy to back up your entire database with a minimum amount of configuration:
Select Enable Daily Disk Backup to Recovery Area
Enter a start time in the Backup Start Time field
Enter host credentials in the OS Username and Password fields
If you select the Enable Daily Disk Backup to Recovery Area option, then Enterprise Manager is configured to back up your database immediately after you finish upgrading Oracle Database. Enterprise Manager backs up the database to the Flash Recovery Area. Later, you can use Enterprise Manager to customize your backup strategy further.
On Windows the user whose credentials you enter for the backup must be granted the Logon
as
a
batch
job
privilege in the Local Security Policies of Windows. If the chosen user does not have this privilege, then the backup job fails.
Click Next.
The Database Credentials screen displays.
Select one of the following options:
Use Different Passwords
If you choose to use different passwords, then you must enter a password in the Password and Confirm Password columns for each account in the table.
Use the Same Password for All Accounts
If you choose to use the same password, then you must enter that password in the Password and Confirm Password fields.
Note:
If the default Oracle Database 11g Release 2 (11.2) security settings are in place, then new passwords must be at least 8 characters, and passwords such aswelcome
and oracle
are not allowed. See Oracle Database Security Guide for more information.Click Next.
The Summary screen appears.
The Summary screen shows the following information about the upgrade before it starts:
Name, version, and Oracle home of the old and new databases
Database backup location, available space, and space required
Warnings ignored
Database components to be upgraded
Initialization parameters changes
Database files location
Listener registration
See Also:
"Setting the COMPATIBLE Initialization Parameter" for information about setting theCOMPATIBLE
initialization parameter after the upgradeCheck all of the specifications. Then do one of the following:
Click Back if anything is incorrect until you reach the screen where you can correct it.
Click Finish if everything is correct.
The Progress screen displays and DBUA begins the upgrade.
After the upgrade has completed, the following message is displayed on the Progress screen:
Upgrade is complete. Click "OK" to see the results of the upgrade.
The Upgrade Results screen displays a description of the original and upgraded databases and changes made to the initialization parameters. The screen also shows the directory where various log files are stored after the upgrade. You can examine these log files to obtain more details about the upgrade process.
Note:
An HTML version of the Upgrade Results is also saved in the log files directory.Click Configure Database Passwords to display the Password Management dialog box.
The Password Management dialog box enables you to change the default password for a user after you upgrade the database. For security reasons, all users are locked except for the following users:
SYS
SYSTEM
If you have enabled Local Management with Enterprise Manager, then the SYSMAN
and DBSNMP
accounts are also unlocked. These accounts provide Enterprise Manager with access to the database so it can gather monitoring data and so you can perform administration tasks with Enterprise Manager.
If you have enabled Central Management with Enterprise Manager, then the DBSNMP
account is unlocked, as well as the SYS
and SYSTEM
user accounts.
Note:
To prevent unauthorized use of the database, Oracle recommends that you change all user passwords immediately after you upgrade your database.If the default Oracle Database 11g Release 2 (11.2) security settings are in place, then passwords must be at least 8 characters, and passwords such as welcome
and oracle
are not allowed. See Oracle Database Security Guide for more information.
Click Restore Database if you are not satisfied with the upgrade results.
Depending on the method you used to back up your database, the Restore operation performs one of two tasks:
If you used DBUA to back up your database, then clicking Restore restores the original database and the original database settings from the backup.
If you used your own backup procedure to back up the database, then clicking Restore restores only the original database settings. To restore the database itself, you must restore the backup you created with your own backup utilities.
If you are satisfied with the upgrade results, then click Exit to quit DBUA and use your newly upgraded database. DBUA removes the entry of the upgraded database from the old listener.ora
file and reloads the listener of the old database.
When invoked with the -silent
command line option, DBUA operates in silent mode. In silent mode, DBUA does not present a user interface. It also writes any messages (including information, errors, and warnings) to a log file in ORACLE_HOME/cfgtoollogs/dbua/SID/upgraden, where n is the number of upgrades that DBUA has performed as of this upgrade.
For example, the following command upgrades a database named ORCL
in silent mode:
dbua -silent -sid ORCL &
DBUA Command Line Options
DBUA supports several command line options. You can specify all valid options from the command line using the following syntax:
dbua [ -silent ] [ -sid SID ] [-oracleHome home_name] [-oracleBase base_name] [-diagnosticDest diagnostic_destination] [-sysDBAUserName SYSDBA_user] [-sysDBAPassword SYSDBA_pwd] [-upgradeASM] [-autoextendFiles] [-newGlobalDbName db_name] [-newSid new_SID] [-generateMapFile] [-useASM] [-commonFileLocation common_files] [-omfLocation omf_area] [-databaseMapFile map_file_name] [-newRecoveryArea recover_area] [-newRecoveryAreaSize recover_size] [-apexAdminPassword apex_pwd] [-disableUpgradeScriptLogging ] [-backupLocation directory] [-sysauxTablespace -datafileName name -datafileSize size -datafileSizeNext size -datafileSizeMax size] [-postUpgradeScripts script [, script ] ... ] [-initParam parameter=value [, parameter=value ] ... ] [-disableArchiveLogMode] [-recompile_invalid_objects true | false] [-degree_of_parallelism cpu_number] [-emConfiguration {CENTRAL|LOCAL|ALL|NOBACKUP|NOEMAIL|NONE} -dbsnmpPassword password -sysmanPassword password -asmPassword password -hostUserName hostname -hostUserPassword password -backupSchedule hh:mm [-smtpServer server_name -emailAddress address] [-centralAgent location] [-localRacSid SID]] [-recoveryAreaDestination directory] [-h|-help]
Table 3-3 describes the various options and their parameters that are supported by DBUA.
Table 3-3 DBUA Command Line options
Option | Description |
---|---|
|
Specifies that DBUA should operate in silent mode. |
|
Specifies the system identifier (SID) of the database to upgrade |
|
Specifies the Oracle Database home directory of the database to upgrade |
|
Specifies the Oracle Database base directory of the database to upgrade |
|
Specifies the default location to store Oracle trace and diagnostic files. It replaces the initialization parameter settings for background dump destination and user dump destination from earlier releases. |
|
Specifies a user with SYSDBA privileges. |
|
Specifies the password for |
|
This option autoextends database files during the upgrade. Data files revert to their original autoextend settings after the upgrade. |
|
Specifies a new global database name. This option applies only if you are moving data files or upgrading an Oracle XE database. |
|
Specifies a new system identifier (SID) of the database to upgrade. This option applies only if you are moving data files or upgrading an Oracle XE database. |
|
If you specify this option, then DBUA only generates a database map file in the log location and then exits. This option applies only if you are moving data files or upgrading an Oracle XE database. |
|
If the database to upgrade has an ASM instance, then this option tells DBUA to use it for the upgrade. This option applies only if you are moving data files or upgrading an Oracle XE database. |
|
Specifies a common location to store database files. This option applies only if you are moving data files or upgrading an Oracle XE database. |
|
Specifies a database area for Oracle-Managed Files. This option applies only if you are moving data files or upgrading an Oracle XE database. |
|
Specifies the full name of the map file to map database files. This option applies only if you are moving data files or upgrading an Oracle XE database. |
|
Specifies the recovery area for a database that is moved during upgrade. This option applies only if you are moving data files or upgrading an Oracle XE database. |
|
Specifies the recovery area size (MB) for a database that is moved during upgrade. This option applies only if you are moving data files or upgrading an Oracle XE database. |
|
Specifies the password for the Application Express Administrator. |
|
This option disables the detailed log generation for running SQL scripts during the upgrade process. This is enabled by default. To enable log generation, do not specify this option. |
|
Specifies a directory to back up your database before the upgrade starts |
|
This option creates a new SYSAUX tablespace |
|
Specifies the complete path of the data file for creating the new |
|
Specifies the size of the data file for creating the new |
|
Specifies the next extent for the data file |
|
Specifies the maximum size of the data file |
|
Specifies a comma-delimited list of SQL scripts. Specify complete path names. The scripts are executed at the end of the upgrade. |
|
Specifies a comma-delimited list of initialization parameter values of the form name=value |
|
This option turns off archiving and flashback logging for the duration of the upgrade. |
|
When you specify |
|
Specifies the number of CPUs to be used for parallel recompilation. |
-emConfiguration {CENTRAL|LOCAL|ALL|NOBACKUP| NOEMAIL|NONE} |
Specifies Oracle Enterprise Manager management options:
|
|
Specifies the |
|
Specifies the |
|
Specifies the |
|
Specifies the host user name for the Oracle Enterprise Manager backup job. This option applies only if you are configuring Oracle Enterprise Manager. |
|
Specifies the host user password for the Oracle Enterprise Manager backup job. This option applies only if you are configuring Oracle Enterprise Manager. |
|
Specifies the daily backup schedule in the form hh:mm (hours and minutes). This option applies only if you are configuring Oracle Enterprise Manager. |
|
Specifies the outgoing mail (SMTP) server for E-mail notifications. This option applies only if you are configuring Oracle Enterprise Manager. |
|
Specifies the E-mail address for E-mail notifications. This option applies only if you are configuring Oracle Enterprise Manager. |
|
Specifies the Oracle Enterprise Manager central agent location. This option applies only if you are configuring Oracle Enterprise Manager. |
|
Specifies the destination directory for all recovery files. This option applies only if you are moving data files, upgrading an Oracle XE database, or configuring Oracle Enterprise Manager. |
|
Specifies the local SID of the cluster database if the cluster database is not registered in the Oracle Cluster Registry |
|
Displays help for DBUA |
Note:
If the default Oracle Database 11g Release 2 (11.2) security settings are in place, then passwords must be at least 8 characters, and passwords such aswelcome
and oracle
are not allowed. See Oracle Database Security Guide for more information.The following sections guide you through the process of performing a manual upgrade. They assume that you have already run the Pre-Upgrade Information Tool as described in "Run the Pre-Upgrade Information Tool".
After running the Pre-Upgrade Information Tool and cleanly shutting down the instance, you should perform a full backup of the database. Complete the following steps:
Sign on to RMAN:
rman "target / nocatalog"
Issue the following RMAN commands:
RUN { ALLOCATE CHANNEL chan_name TYPE DISK; BACKUP DATABASE FORMAT 'some_backup_directory%U' TAG before_upgrade; BACKUP CURRENT CONTROLFILE TO 'save_controlfile_location'; }
Caution:
If you encounter problems with the upgrade and wish to abandon the upgrade completely, then you must restore the database from this backup. Therefore, make sure you back up your database now as a precaution.See Also:
Oracle Database Backup and Recovery User's Guide for more information about backing up a databaseAfter analyzing the database to be upgraded, complete the following steps to prepare the new Oracle home:
Copy configuration files from the Oracle home of the database being upgraded to the Oracle Database 11g Release 2 (11.2) Oracle home:
If your parameter file resides within the old environment's Oracle home, then copy it to the new Oracle home. By default, Oracle looks for the parameter file in the ORACLE_HOME/dbs
directory on Linux or UNIX platforms and in the ORACLE_HOME\database
directory on Windows operating systems. The parameter file can reside anywhere you wish, but it should not reside in the old environment's Oracle home after you upgrade to Oracle Database 11g Release 2 (11.2).
Note:
It might be necessary to create a text initialization parameter file (PFILE
) from the server parameter file (SPFILE
) so that you can edit the initialization parameters.If your parameter file resides within an Automatic Storage Management (ASM) instance, then backup the parameter file using the following command:
CREATE pfile FROM spfile;
If you must downgrade the database and your SPFILE
lived in ASM, then the parameter file must be restored prior to the downgrade.
If your parameter file is a text-based initialization parameter file with either an IFILE
(include file) or a SPFILE
(server parameter file) entry, and the file specified in the IFILE
or SPFILE
entry resides within the old environment's Oracle home, then copy the file specified by the IFILE
or SPFILE
entry to the new Oracle home. The file specified in the IFILE
or SPFILE
entry contains additional initialization parameters.
If you have a password file that resides within the old environment's Oracle home, then move or copy the password file to the Oracle Database 11g Release 2 (11.2) Oracle home.
The name and location of the password file are operating system-specific. On Linux or UNIX platforms, the default password file is orapw
sid
, located in the ORACLE_HOME/dbs directory. On Windows operating systems, the default password file is pwd
sid
.ora
, located in the ORACLE_HOME\database directory. In both cases, sid
is your Oracle instance ID.
If you are upgrading a cluster database and your init
db_name
.ora
file resides within the old environment's Oracle home, then move or copy the init
db_name
.ora
file to the new Oracle home.
Note:
If you are upgrading a cluster database, then perform this step on all nodes in which this cluster database has instances configured.Adjust your parameter file in Oracle Database 11g Release 2 (11.2) by completing the following steps:
Remove obsolete initialization parameters and adjust deprecated initialization parameters. Certain parameters are obsolete in Oracle Database 11g Release 2 (11.2), while other parameters have become deprecated. Remove all obsolete parameters from any parameter file that starts an Oracle Database 11g Release 2 (11.2) instance. Obsolete parameters might cause errors in Oracle Database 11g Release 2 (11.2). Also, alter any parameter whose syntax has changed in the new release.
The Pre-Upgrade Information Tool displays any deprecated parameters and obsolete parameters it finds in the Deprecated Parameters and Obsolete Parameters sections, respectively.
See Also:
Appendix A, "Behavior Changes" for a list of initialization parameters that have been deprecated or have become obsolete, and for information on initialization parameters that have changed in ways that raise compatibility issues between different releases of Oracle Database softwareMake sure the COMPATIBLE
initialization parameter is properly set for Oracle Database 11g Release 2 (11.2). The Pre-Upgrade Information Tool displays a warning in the Database section if COMPATIBLE
is not properly set.
Adjust the values of the initialization parameters to at least the minimum values indicated by the Pre-Upgrade Information Tool.
Make sure all path names in the parameter file are fully specified. You should not have relative path names in the parameter file.
If the parameter file contains an IFILE
entry, then change the IFILE
entry in the parameter file to point to the new location of the include file that you specified in Step 1. c. Then, edit the file specified in the IFILE
entry in the same way that you edited the parameter file in Step a through Step d.
If you are upgrading a cluster database, then modify the init
db_name
.ora
file in the same way that you modified the parameter file.
Make sure you save all of the files you modified after making these adjustments.
Note:
If you are upgrading a cluster database, then perform this step on all nodes in which this cluster database has instances configured.If you are upgrading a cluster database, then set the CLUSTER_DATABASE
initialization parameter to false
. After the upgrade, you must set this initialization parameter back to true
.
After preparing the new Oracle home, you are ready to proceed with the manual upgrade. Complete the following steps to upgrade the database:
Shut down the instance:
SQL> SHUTDOWN IMMEDIATE
If your operating system is Windows, then complete the following steps:
Stop the OracleService
SID
Oracle service of the database you are upgrading, where SID
is the instance name. For example, if your SID
is ORCL
, then enter the following at a command prompt:
C:\> NET STOP OracleServiceORCL
Delete the Oracle service at a command prompt using ORADIM.
If your SID
is ORCL
, then enter the following command:
C:\> ORADIM -DELETE -SID ORCL
Create the Oracle Database 11g Release 2 (11.2) service at a command prompt using the ORADIM
command of the new Oracle Database release:
C:\> ORADIM -NEW -SID SID -SYSPWD PASSWORD -MAXUSERS USERS -STARTMODE AUTO -PFILE ORACLE_HOME\DATABASE\INITSID.ORA
This syntax includes the following variables:
Variable | Description |
---|---|
SID |
The same SID name as the SID of the database you are upgrading. |
PASSWORD |
The password for the new Oracle Database 11g Release 2 (11.2) database instance. This is the password for the user connected with SYSDBA privileges. The -SYSPWD option is not required. If you do not specify it, then operating system authentication is used, and no password is required.
If the default Oracle Database 11g Release 2 (11.2) security settings are in place, then passwords must be at least 8 characters, and passwords such as |
USERS |
The maximum number of users who can be granted SYSDBA and SYSOPER privileges. |
ORACLE_HOME |
The Oracle Database 11g Release 2 (11.2) Oracle home directory. Ensure that you specify the full path name with the -PFILE option, including the drive letter of the Oracle home directory. |
For example, if your SID
is ORCL
, your password
(SYSPWD
) is TWxy5791
, the maximum number of users (MAXUSERS
) is 10, and the ORACLE_HOME directory is C:\ORACLE\PRODUCT\11.2.0\DB, then enter the following command:
C:\> ORADIM -NEW -SID ORCL -SYSPWD TWxy5791 -MAXUSERS 10 -STARTMODE AUTO -PFILE C:\ORACLE\PRODUCT\11.2.0\DB\DATABASE\INITORCL.ORA
ORADIM writes a log file to the ORACLE_HOME\database directory.
If your operating system is Linux or UNIX, then make the following checks:
Your ORACLE_SID
is set correctly
The oratab
file points to your Oracle Database 11g Release 2 (11.2) Oracle home
The following environment variables point to the Oracle Database 11g Release 2 (11.2) directories:
ORACLE_HOME
PATH
Any scripts that clients use to set the ORACLE_HOME
value must point to the new Oracle home.
Note:
If you are upgrading a cluster database, then perform these checks on all nodes in which this cluster database has instances configured.See Also:
Your operating system-specific Oracle Database installation documents for information about setting other important environment variables on your operating system.Log in to the system as the owner of the Oracle Database 11g Release 2 (11.2) Oracle home directory.
At a system prompt, change to the ORACLE_HOME/rdbms/admin directory.
Start SQL*Plus.
Connect to the database instance as a user with SYSDBA
privileges.
Start the instance by issuing the following command:
SQL> STARTUP UPGRADE
Note:
TheUPGRADE
keyword enables you to open a database based on an earlier Oracle Database release. It also restricts logons to AS SYSDBA
sessions, disables system triggers, and performs additional operations that prepare the environment for the upgrade.You might be required to use the PFILE
option to specify the location of your initialization parameter file.
Once the database is started in upgrade mode, only queries on fixed views will execute without error until after the catupgrd.sql
script is run. Prior to running catupgrd.sql
, queries on any other view or the use of PL/SQL will return an error.
The following are common errors that might occur when attempting to start the new Oracle Database 11g Release 2 (11.2) database. Some of these errors are written to the alert log and not to your session. If you receive any of these errors, then issue the SHUTDOWN ABORT
command to shut down the database and correct the problem.
ORA-00401: the value for parameter compatible is not supported by this release
The COMPATIBLE
initialization parameter is set to a value less than 10.0.0
.
ORA-39701: database must be mounted EXCLUSIVE for UPGRADE or DOWNGRADE
The CLUSTER_DATABASE
initialization parameter is set to true
instead of false
.
ORA-39700: database must be opened with UPGRADE option
The STARTUP
command was issued without the UPGRADE
keyword.
ORA-00336: log file size xxxx blocks is less than minimum 8192 blocks
A redo log file size is less than 4 MB:
If errors appear listing obsolete initialization parameters, then make a note of the obsolete initialization parameters and continue with the upgrade. Remove the obsolete initialization parameters the next time you shut down the database.
Do this step only if you are upgrading from Oracle9i Release 2 (9.2).
Create a SYSAUX
tablespace. In the new Oracle Database 11g release, the SYSAUX
tablespace is used to consolidate data from a number of tablespaces that were separate in previous releases.
The SYSAUX
tablespace must be created with the following mandatory attributes:
ONLINE
PERMANENT
READ WRITE
EXTENT MANAGEMENT LOCAL
SEGMENT SPACE MANAGEMENT AUTO
The Pre-Upgrade Information Tool provides an estimate of the minimum required size for the SYSAUX
tablespace in the SYSAUX Tablespace section. Table 3-4 can be used to determine an optimal size for the SYSAUX
tablespace.
Table 3-4 Guidelines for Sizing the SYSAUX Tablespace
Factor | Small | Medium | Large |
---|---|---|---|
Number of CPUs |
2 |
8 |
32 |
Number of concurrently active sessions |
5 |
20 |
100 |
Number of user objects (tables and indexes) |
500 |
5,000 |
50,000 |
Estimated SYSAUX size at steady state with default configuration |
500 MB |
2 GB |
5 GB |
The following SQL statement would create a 500 MB SYSAUX
tablespace for the database:
SQL> CREATE TABLESPACE sysaux DATAFILE 'sysaux01.dbf' SIZE 500M REUSE EXTENT MANAGEMENT LOCAL SEGMENT SPACE MANAGEMENT AUTO ONLINE;
Set the system to spool results to a log file for later verification of success:
SQL> SPOOL upgrade.log
SQL> @catupgrd.sql
Note:
If you did not run the Pre-Upgrade Information Tool, thecatupgrd.sql
script will terminate with one of the following errors:
ORA-00942: table or view does not exist ORA-00904: "TZ_VERSION": invalid identifier ORA-01722: invalid number
If you receive any of these errors, issue the SHUTDOWN ABORT
statement, revert to the original Oracle home directory, and run the Pre-Upgrade Information Tool (utlu112i.sql
) as described in "Run the Pre-Upgrade Information Tool".
The catupgrd.sql
script determines which upgrade scripts must be run, runs them, and then shuts down the database. You must run the script in the Oracle Database 11g Release 2 (11.2) environment.
The upgrade script creates and alters certain data dictionary tables. It also upgrades or installs the following database components in the new Oracle Database 11g Release 2 (11.2) database:
Oracle Database Catalog Views
Oracle Database Packages and Types
JServer JAVA Virtual Machine
Oracle Database Java Packages
Oracle XDK
Oracle Real Application Clusters
Oracle Workspace Manager
Oracle Multimedia
Oracle XML Database
OLAP Analytic Workspace
Oracle OLAP API
OLAP Catalog
Oracle Text
Spatial
Oracle Data Mining
Oracle Label Security
Messaging Gateway
Oracle Expression Filter
Oracle Rules Manager
Oracle Enterprise Manager Repository
Oracle Database Vault
Oracle Application Express
Restart the instance to reinitialize the system parameters for normal operation.
SQL> STARTUP
This restart, following the database shutdown performed as part of the catupgrd.sql
script, flushes all caches, clears buffers, and performs other housekeeping activities. These measures are an important final step to ensure the integrity and consistency of the newly upgraded Oracle Database software.
Also, if you encountered a message listing obsolete initialization parameters when you started the database in Step 8, then remove the obsolete initialization parameters from the parameter file before restarting. If necessary, convert the SPFILE
to a PFILE
so you can edit the file to delete parameters.
The Post-Upgrade Status Tool provides a summary of the upgrade at the end of the spool log. It displays the status of the database components in the upgraded database and the time required to complete each component upgrade. Any errors that occur during the upgrade are listed with each component and must be addressed.
Run utlu112s.sql
to display the results of the upgrade:
SQL> @utlu112s.sql
The Post-Upgrade Status Tool displays output similar to the following:
Oracle Database 11.2 Post-Upgrade Status Tool 03-18-2007 22:48:55 . Component Status Version HH:MM:SS . Oracle Server . VALID 11.2.0.0.1 00:17:31 JServer JAVA Virtual Machine . VALID 11.1.0.6.0 00:02:32 Oracle Workspace Manager . VALID 11.1.0.6.0 00:01:02 Messaging Gateway . VALID 11.1.0.6.0 00:00:46 OLAP Analytic Workspace . VALID 11.1.0.6.0 00:03:20 OLAP Catalog . VALID 11.1.0.6.0 00:05:56 Oracle OLAP API . VALID 11.1.0.6.0 00:00:48 Oracle Label Security . VALID 11.1.0.6.0 00:00:37 Oracle Enterprise Manager . VALID 11.1.0.6.0 00:12:02 Oracle XDK . VALID 11.1.0.6.0 00:00:42 Oracle Text . VALID 11.1.0.6.0 00:01:02 Oracle XML Database . VALID 11.1.0.6.0 00:04:24 Oracle Database Java Packages . VALID 11.1.0.6.0 00:00:27 Oracle Multimedia . VALID 11.1.0.6.0 00:05:44 Spatial ERROR at line 1: ORA-00604: error occurred at recursive SQL level 1 ORA-04031: unable to allocate 4096 bytes of shared memory ("java pool","sun/tools/java/ConstantsSYS","joxlod exec hp",":SGAClass") ORA-06512: at "SYS.DBMS_JAVA", line 704 ORA-06512: at line 1 . VALID 11.1.0.6.0 00:08:24 Oracle Expression Filter . VALID 11.1.0.6.0 00:00:38 Oracle Rules Manager . VALID 11.1.0.6.0 00:00:21 Oracle Application Express . VALID 2.2.1.01.01 00:23:25 Gathering Statistics . 00:05:12 Total Upgrade Time: 01:29:03
If the Post-Upgrade Status Tool returns errors or shows components that are not VALID
or not the most recent release, then see "Troubleshoot the Upgrade".
Run catuppst.sql
, located in the ORACLE_HOME
/rdbms/admin
directory, to perform upgrade actions that do not require the database to be in UPGRADE
mode:
SQL> @rdbms/admin/catuppst.sql
This script can be run concurrently with utlrp.sql
(see step 15), if you run it in a new SQL*Plus session.
Run utlrp.sql
to recompile any remaining stored PL/SQL and Java code.
SQL> @utlrp.sql
Verify that all expected packages and classes are valid:
SQL> SELECT count(*) FROM dba_invalid_objects; SQL> SELECT distinct object_name FROM dba_invalid_objects;
Note:
If the pre-upgrade information tool detectedINVALID
objects and populated the registry$sys_inv_objs
and registry$nonsys_inv_objs
tables, then execute ORACLE_HOME
/rdbms/admin/utluiobj.sql
to display only those objects which are newly invalid as a result of the upgrade process. The utluiobj.sql
script will only display objects that are now INVALID
but which were VALID
prior to the upgrade.Exit SQL*Plus.
Your database is now upgraded to the new Oracle Database 11g release. Complete the procedures described in Chapter 4, "After Upgrading to the New Release".
WARNING:
If you retain the old Oracle software, then never start the upgraded database with the old software. Only start the database with the executables in the new Oracle Database installation. Also, before you remove the old Oracle environment, make sure you relocate any data files in that environment to the new Oracle Database environment. See the Oracle Database Administrator's Guide for information about relocating data files.
This section explains what to do if something goes wrong with your upgrade. It contains the following topics:
If you run out of resources during the upgrade, then increase the resource allocation. After increasing the resource allocation, you should perform a SHUTDOWN ABORT
and restart the instance (in UPGRADE
mode) before rerunning the catupgrd.sql
script or restarting DBUA.
There are three resources that generally require increases for a new Oracle Database release:
SYSTEM
and SYSAUX
tablespaces
Typically you receive one of the following messages during the upgrade if your SYSTEM
tablespace size is insufficient:
ORA-01650: unable to extend rollback segment string by string in tablespace string ORA-01651: unable to extend save undo segment by string for tablespace string ORA-01652: unable to extend temp segment by string in tablespace string ORA-01653: unable to extend table string.string by string in tablespace string ORA-01654: unable to extend index string.string by string in tablespace string ORA-01655: unable to extend cluster string.string by string in tablespace string
To avoid these errors, set AUTOEXTEND ON MAXSIZE UNLIMITED
for the SYSTEM
and SYSAUX
tablespaces.
Shared memory
You might require larger shared memory pool sizes in some cases. The error message indicates which shared memory initialization parameter must be increased.
ORA-04031: unable to allocate string bytes of shared memory ("string","string","string","string")
See Also:
Oracle Database Reference for information about shared memory initialization parameters.Rollback segments/undo tablespace
If you are using rollback segments, then you must have a single large (100 MB) PUBLIC
rollback segment online while the upgrade scripts are being run. Smaller public rollback segments should be taken offline during the upgrade. Typically you get the following error if your rollback segment size is insufficient:
ORA-01562: failed to extend rollback segment number string
If you are using an undo tablespace, then be sure it is at least 400 MB.
Fast Recovery Area
If you are using a Fast Recovery Area and it fills up during the upgrade, you will see the following error in the alert log, followed by some suggestions for recovering from the problem:
ORA-19815: WARNING: db_recovery_file_dest_size of string bytes is 98.99% used, and has string remaining bytes available.
Identify the root cause of the problem and take appropriate actions to proceed with the upgrade. To avoid issues during the upgrade, increase the amount of space available in your Fast Recovery Area prior to starting the upgrade.
The ORA-01408
error on the index is a known problem with Oracle Application databases, because the same index exists with a different name in these databases.
SQL> create index system.repcat$_audit_column_f2_idx on 2 system.repcat$_audit_column(base_sname,base_oname,base_conflict_type_id, 3 base_reference_name) 4 / system.repcat$_audit_column(base_sname,base_oname,base_conflict_type_id, *ERROR at line 2: ORA-01408: such column list already indexed
The workaround is to drop the REPCAT$_AUDIT_COLUMN_IDX1
index and rerun the upgrade as described in "Rerunning the Upgrade".
Running the DBMS_DST
package after upgrading to Oracle Database 11g Release 2 (11.2) can result in the ORA-01882: timezone region not found
error.
This error is returned if the user sets the time zone file version incorrectly, which results in the region IDs of several time zone regions being stored incorrectly in the database. For example:
ERROR at line 1: @ ORA-01882: timezone region not found @ ORA-06512: at "SYS.DBMS_DST", line 113 @ ORA-06512: at "SYS.DBMS_DST", line 1101 @ ORA-06512: at line 1
To fix this problem, update the time zone version as described in "TIMESTAMP WITH TIME ZONE Data Type" and rerun the upgrade as described in "Rerunning the Upgrade".
The Post-Upgrade Status Tool should report VALID
status for all components at the end of the upgrade. The following list shows and briefly describes other status values that you might see:
NO SCRIPT
The component upgrade script was not found in ORACLE_HOME. Check the install logs, install the component software, and then rerun catupgrd.sql
.
OPTION OFF
The server option required for the component was not installed or was not linked with the server. Check the V$OPTION
view as well as the install logs. Install the component or relink the server with the required option, and then rerun catupgrd.sql
.
REMOVED
The component was not upgraded because it was removed from the database.
INVALID
Some objects for the component were invalid at the completion of the upgrade. If there were no errors during the component upgrade, then running utlrp.sql
might change the status to VALID
without rerunning the entire upgrade. Check the DBA_REGISTRY
view after running utlrp.sql
.
UPGRADING
The component upgrade did not complete. Resolve the problem and rerun catupgrd.sql
.
Follow these steps to rerun the upgrade:
Shut down the database:
SQL> SHUTDOWN IMMEDIATE
Restart the database in UPGRADE
mode:
SQL> STARTUP UPGRADE
Set the system to spool results to a log file for later verification of success:
SQL> SPOOL upgrade.log
Rerun catupgrd.sql
:
SQL> @catupgrd.sql
Note:
You can rerun thecatupgrd.sql
script as many times as necessary. The first time you run the script, there should be no error messages returned. If you rerun the script, then the ORA-00001
message is displayed. You can safely ignore this message.Rerun utlu112s.sql
:
SQL> @utlu112s.sql
If you completed the steps in "Back Up the Database" to back up your database, then the easiest way to cancel the upgrade is to restore that backup. Complete the following steps:
Log in to the system as the owner of the Oracle home directory of the previous release.
Sign on to RMAN:
rman "target / nocatalog"
Issue the following RMAN commands:
STARTUP NOMOUNT
RUN
{
RESTORE CONTROLFILE FROM 'save_controlfile_location';
ALTER DATABASE MOUNT;
RESTORE DATABASE FROM TAG before_upgrade
ALTER DATABASE OPEN RESETLOGS;
}
The recommended practice is to upgrade an Oracle ASM instance with Oracle grid infrastructure Oracle Universal Installer (OUI). OUI automatically defaults to upgrade mode when it detects an Oracle ASM instance at a previous release level. See "Upgrading an Oracle ASM Instance With Oracle Universal Installer" in Oracle Database Storage Administrator's Guide.
Oracle ASM Configuration Assistant enables you to upgrade an existing ASM instance to the current software level and upgrade an older ASM instance to the latest Oracle grid infrastructure home. See "Upgrading an Oracle ASM Instance with Oracle ASM Configuration Assistant" in Oracle Database Storage Administrator's Guide.
Upgrading a single-instance ASM requires that Oracle Cluster Synchronization Services (CSS) first be configured to run from the new Oracle Database 11g Release 2 (11.2) home. See "Reconfigure Oracle Cluster Synchronization Services" for more information.
You can also perform a rolling upgrade to clustered ASM instances in environments running Oracle Database 11g or later. See your Oracle Grid Infrastructure Installation Guide for step-by-step instructions about performing a rolling upgrade of ASM.
The following sections guide you through the process of performing a manual upgrade. The discussions assume that you have already installed the Oracle Database 11g Release 2 (11.2) software and run the Pre-Upgrade Information Tool as described in "Run the Pre-Upgrade Information Tool".
Upgrading a single-instance ASM requires that Oracle Cluster Synchronization Services (CSS) first be configured to run from the new Oracle Database 11g Release 2 (11.2) home. To do this you need to run the following command before upgrading ASM:
localconfig reset [destination_Oracle_home]
where destination_Oracle_home
is required if you run the command from the Oracle home where the CSS service is currently configured.
Complete the following steps to prepare the new Oracle home:
Copy configuration files from the Oracle home of the ASM instance being upgraded to the Oracle Database 11g Release 2 (11.2) Oracle home:
If your parameter file resides within the old environment's Oracle home, then copy it to the new Oracle home. By default, Oracle looks for the parameter file in the ORACLE_HOME/dbs directory on Linux or UNIX platforms and in the ORACLE_HOME\database directory on Windows operating systems. The parameter file can reside anywhere you wish, but it should not reside in the old environment's Oracle home after you upgrade to Oracle Database 11g Release 2 (11.2).
Note:
It might be necessary to create a text initialization parameter file (PFILE
) from the server parameter file (SPFILE
) so that you can edit the initialization parameters.If your parameter file is a text-based initialization parameter file with either an IFILE
(include file) or a SPFILE
(server parameter file) entry, and the file specified in the IFILE
or SPFILE
entry resides within the old environment's Oracle home, then copy the file specified by the IFILE
or SPFILE
entry to the new Oracle home. The file specified in the IFILE
or SPFILE
entry contains additional initialization parameters.
If you have a password file that resides within the old environment's Oracle home, then move or copy the password file to the Oracle Database 11g Release 2 (11.2) Oracle home.
The name and location of the password file are operating system-specific. On Linux or UNIX platforms, the default password file is orapw
sid
, located in the ORACLE_HOME/dbs directory. On Windows operating systems, the default password file is pwd
sid
.ora
, located in the ORACLE_HOME\database directory. In both cases, sid
is your Oracle instance ID.
Note:
If you are upgrading a clustered ASM, then perform this step on all nodes that have ASM instances configured.Adjust your parameter file in Oracle Database 11g Release 2 (11.2) by completing the following steps:
Remove obsolete initialization parameters and adjust deprecated initialization parameters. Certain parameters are obsolete in Oracle Database 11g Release 2 (11.2), while other parameters have become deprecated. Remove all obsolete parameters from any parameter file that starts an Oracle Database 11g Release 2 (11.2) instance. Obsolete parameters might cause errors in Oracle Database 11g Release 2 (11.2). Also, alter any parameter whose syntax has changed in the new release.
The Pre-Upgrade Information Tool displays any deprecated parameters and obsolete parameters it finds in the Deprecated Parameters and Obsolete Parameters sections, respectively.
See Also:
Appendix A, "Behavior Changes" for a list of initialization parameters that have been deprecated or have become obsolete, and for information on initialization parameters that have changed in ways that raise compatibility issues between different releases of Oracle Database softwareAdjust the values of the initialization parameters to at least the minimum values indicated by the Pre-Upgrade Information Tool.
Make sure all path names in the parameter file are fully specified. You should not have relative path names in the parameter file.
If the parameter file contains an IFILE
entry, then change the IFILE
entry in the parameter file to point to the new location of the include file that you specified in Step 1. c. Then, edit the file specified in the IFILE
entry in the same way that you edited the parameter file in Step a through Step d.
Make sure you save all of the files you modified after making these adjustments.
Note:
If you are upgrading a clustered ASM, then perform this step on all nodes that have ASM instances configured.After preparing the new Oracle home, you are ready to proceed with the manual upgrade. Complete the following steps to upgrade ASM:
Shut down the instance:
SQL> SHUTDOWN IMMEDIATE
If your operating system is Windows, then complete the following steps:
Stop the OracleASMService
SID
Oracle service of the ASM instance you are upgrading, where SID
is the instance name. For example, if your SID
is +ASM
, then enter the following at a command prompt:
C:\> NET STOP OracleASMService+ASM
Delete the Oracle service at a command prompt using ORADIM.
If your SID
is +ASM
, then enter the following command:
C:\> ORADIM -DELETE -ASMSID +ASM
Create the Oracle Database 11g Release 2 (11.2) service at a command prompt using the ORADIM
command of the new Oracle Database release:
C:\> ORADIM -NEW -ASMSID SID -SYSPWD PASSWORD -MAXUSERS USERS -STARTMODE AUTO -PFILE ORACLE_HOME\DATABASE\INITSID.ORA
This syntax includes the following variables:
Variable | Description |
---|---|
SID |
The same SID name as the SID of the ASM instance you are upgrading. |
PASSWORD |
The password for the new Oracle Database 11g Release 2 (11.2) ASM instance. This is the password for the user connected with SYSDBA privileges. The -SYSPWD option is not required. If you do not specify it, then operating system authentication is used, and no password is required.
If the default Oracle Database 11g Release 2 (11.2) security settings are in place, then passwords must be at least 8 characters, and passwords such as |
USERS |
The maximum number of users who can be granted SYSDBA and SYSOPER privileges. |
ORACLE_HOME |
The Oracle home for the new Oracle Database 11g Release 2 (11.2) ASM instance. Ensure that you specify the full path name with the -PFILE option, including the drive letter of the Oracle home directory. |
For example, if your SID
is +ASM
, your password
(INTPWD
) is TWxy5791
, the maximum number of users (MAXUSERS
) is 10, and the ORACLE_HOME directory is C:\ORACLE\PRODUCT\11.1.0\DB, then enter the following command:
C:\> ORADIM -NEW -ASMSID +ASM -SYSPWD TWxy5791 -MAXUSERS 10 -STARTMODE AUTO -PFILE C:\ORACLE\PRODUCT\11.1.0\DB\DATABASE\INIT+ASM.ORA
If your operating system is Linux or UNIX, then make the following checks:
Your ORACLE_SID
is set correctly
The oratab
file points to the Oracle home for the new Oracle Database 11g Release 2 (11.2) ASM instance
The following environment variables point to the Oracle Database 11g Release 2 (11.2) directories:
ORACLE_HOME
PATH
Note:
If you are upgrading a clustered ASM, then perform these checks on all nodes that have ASM instances configured.See Also:
Your operating system-specific Oracle Database installation documents for information about setting other important environment variables on your operating system.Log in to the system as the owner of the Oracle home for the new Oracle Database 11g Release 2 (11.2) ASM instance.
Start SQL*Plus.
Connect to the ASM instance as a user with SYSASM
privileges using operating system (OS) authentication.
Start up the instance by issuing the following command:
SQL> STARTUP
If you encounter a message listing obsolete initialization parameters when you start ASM, then remove the obsolete initialization parameters from the parameter file before restarting. If necessary, convert the SPFILE
to a PFILE
so you can edit the file to delete parameters.
Grant the SYSMAN
privilege to SYS
:
GRANT sysasm TO sys;
This command allows the SYS
user to be authenticated using the password file.
Exit SQL*Plus.
Your ASM is now upgraded to the Oracle Database 11g Release 2 (11.2). Complete the ASM-specific procedures described in Chapter 4, "After Upgrading to the New Release".
This section explains what to do if something goes wrong with your ASM upgrade.
If you run out of resources during the ASM upgrade, then increase the resource allocation. After increasing the resource allocation, you should perform a SHUTDOWN ABORT
and restart the instance before performing a manual ASM upgrade.
A new Oracle Database release might require larger shared memory pool sizes in some cases. The error message indicates which shared memory initialization parameter must be increased.
ORA-04031: unable to allocate string bytes of shared memory ("string","string","string","string")
See Also:
Oracle Database Reference for information about shared memory initialization parameters.