Professional Documents
Culture Documents
Complete Checklist for Manual Upgrades to Non-CDB Oracle Database 12c Release 2 (12.2) (Doc
ID 2173141.1)
In this Document
Purpose
Scope
Details
Step 1: Upgrade Path for 12.2 Oracle database
Minimum version of the database that can be directly upgraded to Oracle 12c Release 1 (12.2)
Intermediate upgrades needs to be carried for following releases
Step 2: Requirements and recommendations for source database
Step3: Requirements and recommendations for target ORACLE_HOME
Step 4: Check the health of the source database
Step 5: Pre-upgrade checks
Clean up database
Check materialized views
Performance
Checking Time zone settings
Back up the database
Ensure no files are in Back up mode before starting the upgrade
Purge Recycle bin
Save Oracle EM DB Control Configuration and Data
Steps to save data
Manually remove DB control with emremove.sql
Drop JSON-Enabled Context search Indexes
Check the accounts use Case-Insensitive password version
Remove Unified Auditing Schema and Roles
Put Schema based tablespaces offline during upgrade
Preserve Downgrade capability
Audit table preupgrade requirements
Cluster DB Requirements
Other Checks
Step 6: Preupgrade step
Dependencies on Network Utility Packages
Check Time zone version
Step7: Upgrade Database to 12.2
Step 8: Post-upgrade
Setting Environment variables on Linux and Unix
Update oratab entries
Post-upgrade fixup script
Upgrading Tables Dependent on Oracle-Maintained Types
Enabling the New Extended Data Type Capability
Recovery Catalog Upgrade
Upgrade the Time Zone File Version After Upgrading Oracle Database
https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-state=11y2m2zlos_445&id=2173141.1 1/11
11/24/2017 Document 2173141.1
APPLIES TO:
Oracle Database - Enterprise Edition - Version 10.2.0.5.0 to 12.2.0.1 [Release 10.2 to 12.2]
Oracle Database - Standard Edition - Version 10.2.0.5.0 to 12.2.0.1 [Release 10.2 to 12.2]
Information in this document applies to any platform.
PURPOSE
This document is created for use as a guideline and checklist when manually upgrading from Oracle 10gR2 (10.2) , Oracle
11gR1 (11.1) or Oracle 11gR2 (11.2) or Oracle 12c Release 1 (12.1) to Oracle 12c Release 2 (12.2)
SCOPE
DETAILS
Minimum version of the database that can be directly upgraded to Oracle 12c Release 1 (12.2)
For example
If you are upgrading from release 11.2.0.2 or 11.1.0.7, then you must first upgrade to Oracle Database 11g release 2
(11.2.0.4).
https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-state=11y2m2zlos_445&id=2173141.1 2/11
11/24/2017 Document 2173141.1
If you are upgrading from release 10.2.0.2, 10.2.0.3, 10.2.0.4,10.2.0.5 or 10.1.0.5, then you must first upgrade to
release 11.2.0.4 or 12.1.0.2.
If you are upgrading from release 9.2.0.8, then you must first upgrade to a sequence of intermediate Oracle Database
releases:
Upgrade from release 9.2.0.8 to release 11.2.0.3 or 11.2.0.4. Then upgrade from release 11.2.0.4 to 12.2
Verify the whether your operating system is certified for 12.2. Click here to launch certification portal
Install 12.2.0.1, verify there are no installation related issues.
Download and install latest PSU if any
Copy spfile or pfile from source ORACLE_HOME (under $ORACLE_HOME/dbs) to target home
Remove any _parameter, obsolete and deprecated parameters in pfile
Note min value of COMPATIBLE parameter to upgrade 12.2 is “11.2.0”, make sure you have COMPATIBLE parameter is
set to 11.2.0 or greater
Review patch recommendations as given in the article "Patches to apply before upgrading Oracle GI and DB to 12.2.0.1
(Doc ID 2180188.1)"
Execute dbupgdiag.sql (refer note 556610.1 to download this script) and verify whether there are any INVALID
components or objects owned by SYS/SYSTEM. If any, fix them before proceeding to upgrade the database. You can
execute utlrp.sql multiple times to VALIDate them, if still objects are INVALID, create a service request with Oracle
support.
Execute utlrp.sql multiple times and verify there are no INVALID objects.
Clean up database
Check the status of all materialized views (MV), and refresh any materialized views that are not fresh.
Check the size of your materialized view logs. If any materialized view logs have non-zero rows, then refresh the
base table materialized views.
Check the size of direct loader logs and PMOP logs (partition maintenance operation logs). If any direct loader logs
or PMOP logs have non-zero rows, then refresh the MVs indicated by the logs
Before upgrading Oracle Database, you must wait until all materialized views have completed refreshing.
https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-state=11y2m2zlos_445&id=2173141.1 3/11
11/24/2017 Document 2173141.1
SQL> SELECT o.name FROM sys.obj$ o, sys.user$ u, sys.sum$ s WHERE o.type# = 42 AND
bitand(s.mflags, 8) =8;
Performance
To decrease the amount of downtime, gather statistics. Oracle recommends that you use the
DBMS_STATS.GATHER_DICTIONARY_STATS procedure to gather these statistics. For example, enter the
following SQL statement:
RUN
{
ALLOCATE CHANNEL chan_name TYPE DISK;
BACKUP DATABASE FORMAT 'some_backup_directory%U' TAG before_upgrade;
BACKUP CURRENT CONTROLFILE FORMAT 'controlfile location and name';
}
https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-state=11y2m2zlos_445&id=2173141.1 4/11
11/24/2017 Document 2173141.1
Note: The database recycle bin must be empty during the upgrade process to avoid possible ORA-00600 errors, and to
minimize the upgrade time.
If you plan to downgrade database after upgrading to 12.2, then before starting the upgrade save the DB Control
configuration and data using emdwgrd utility, so that you can restore the files after downgrading.
1. Install the software for the new Oracle Database 12c release.
2. Set ORACLE_HOME to your old Oracle home.
3. Set ORACLE_SID to the SID of the database being upgraded.
4. Set PATH, LD_LIBRARY_PATH, and SHLIB_PATH to point to the upgraded Oracle Database Oracle home.
5. Change directory to the new Oracle Database release Oracle home.
6. Run emdwgrd
Single-instance databases:
7. Enter the SYS password for the database that you want to upgrade.
Stop/shutdown DB control
Login as sysdba
SQL>SET ECHO ON
SQL>SET SERVEROUTPUT ON
SQL>@emremove.sql >> Script located in new 12c ORACLE_HOME/rdbms/admin
If you created a JSON search index using Oracle Database 12c Release 1 (12.1.0.2) then Oracle recommends that you
drop that index and create a new search index for use with later releases.
Log in to SQL*Plus as an administrative user, and enter the following SQL query
https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-state=11y2m2zlos_445&id=2173141.1 5/11
11/24/2017 Document 2173141.1
If there are any 10g versions, suggest you to refer Oracle documentation to fix 10g versions, failing to do so, user
accounts with LOCKED after upgrade is completed.
Note: If you have created AUDIT_ADMIN and AUDIT_VIEWER users or roles with Oracle Database 12c release
1 (12.1) or if the database was created in 12.1, then you do not need to drop these roles and AUDSYS user.
Log into SQL*Plus as SYS with SYSDBA privilege. Drop AUDSYS schema if exists. Start DB in migrate mode and drop
AUDSYS user
Note down the table space names which needs to be offline during upgrade. Use -T option followed by table space name
dbupgrade –T
Starting with Oracle Database 12c release 2, you can run the Parallel Upgrade Utility with the -T option to have schema-based
tablespaces (user tablespaces) taken offline during the upgrade. Taking these tablespaces offline can reduce the necessity of
backing up before upgrades. The Parallel Upgrade Utility (catctl.pl) analyzes tablespaces, and automatically selects the right
set of tablespaces to set to read only. The utility does not set to READ ONLY any tablespaces that contain Oracle-Maintained
objects
If you have any plans to downgrade the database to its previous version, then you must have patch 20898997 installed
in source ORACLE_HOME, else downgrade will not be possible.
On source ORACLE_HOME
If patch is not installed, download patch 20898997 from MOS and install
If upgrading from pre 12.1 release and using Oracle database Vault, Oracle Label Security, then you must first run
olspreupgrade.sql. Copy $ORACLE_HOME/rdbms/admin/olspreupgrade.sql from target home (12.2). Connect as
DVOWNER to the source db
Execute olspreupgrade.sql
SQL>ORACLE_HOME/rdbms/admin/olspreupgrade.sql
Cluster DB Requirements
Upgrade GI first before upgrading the database. If RAC, then database set CLUSTER_DATABASE to false in the init parameter
file.
Other Checks
$Earlier_release_Oracle_home/jdk/bin/java -jar
$New_release_Oracle_home/rdbms/admin/preupgrade.jar FILE TEXT DIR output_dir
It is recommended to execute pre-upgrade fixup script, if any, which are AUTO FIXABLE
To ensure that the new access controls are part of your upgrade testing, prepare a post-upgrade script to make the scripts
available in your database environment. After the upgrade, grant specific required privileges. Access is based on the usage in
the original database.
Check if target database's time zone version is lower than the source database time zone version. If yes, before starting
upgrade time zone should be upgrade without fail. RDBMS DST patches are available in Note 412160.1
https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-state=11y2m2zlos_445&id=2173141.1 7/11
11/24/2017 Document 2173141.1
CONNECT / AS SYSDBA
SQL> startup upgrade;
SQL> exit
On Linux/Unix
cd $ORACLE_HOME/bin
./dbupgrade
On Windows
cd %ORACLE_HOME%\bin
dbupgrade
Execute Post-Upgrade Status Tool, utlu122s.sql and review the upgrade spool log file. You run the Post-Upgrade Status Tool
in the environment of the new release.
Verify the upgrade log whether catuppst.sql has been executed or not. If not, execute it manually from new ORACLE_HOME,
located at $ORACLE_HOME/rdbms/admin directory
SQL> @catuppst.sql
Run utlrp.sql to recompile any remaining stored PL/SQL and Java code in another session.
SQL> @utlrp.sql
Check the state of the Oracle Data Dictionary for diagnosing upgrades and migrations. The dbupgdiag.sql script collects
upgrade and migration diagnostic information about the current state of the data dictionary. You can run the script in
SQL*Plus on the upgraded database as the SYS user. Refer Note 556610.1 Script to Collect DB Upgrade/Migrate Diagnostic
Information (dbupgdiag.sql)
If the dbupgdiag.sql script reports any invalid objects, run $ORACLE_HOME/rdbms/admin/utlrp.sql (multiple times) to validate
the invalid objects in the database, until there is no change in the number of invalid objects. After validating the invalid
objects, re-run dbupgdiag.sql in the upgraded database once again and make sure that everything is fine.
If you are using Oracle Clusterware, then you must upgrade the Oracle Clusterware keys for the database. Run srvctl for
Oracle Database 12c to upgrade the database. For example:
Step 8: Post-upgrade
Confirm that the following environment variables point to the directories of the new Oracle home:
ORACLE_HOME
PATH
https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-state=11y2m2zlos_445&id=2173141.1 8/11
11/24/2017 Document 2173141.1
Modify the corresponding entry in the /etc/oratab file to point to the new ORACLE_HOME location.
Starting with Oracle Database 12c release 2 (12.2), you must manually upgrade user tables that depend on Oracle-Maintained
types.
To identify tables that need to be upgraded after the database upgrade, connect AS SYSDBA and run the following query:
Execute utluptabdata.sql script either with a user account with the privileges to ALTER all of the tables dependent on Oracle-
Maintained types, or with a user granted the SYSDBA system privileges that is logged in AS SYSDBA.
SET SERVEROUTPUT ON
@utluptabdata.sql
Enabling a system to take advantage of the new extended data types requires specific upgrade actions.
Oracle Database 12c introduces MAX_STRING_SIZE to control the maximum size of VARCHAR2, NVARCHAR2, and RAW data
types in SQL. Setting MAX_STRING_SIZE = EXTENDED enables the 32767 byte limit introduced in Oracle Database 12c.
You must set the COMPATIBLE initialization parameter to 12.0.0.0 or higher to be able to set MAX_STRING_SIZE =
EXTENDED.
If you use a version of the recovery catalog schema that is older than that required by the RMAN client, then you must
upgrade it. You can upgrade the Recovery catalog by executing the UPGRADE CATALOG command
Please refer to Oracle documentation under "Upgrading the Recovery Catalog" for complete information and steps
Upgrade the Time Zone File Version After Upgrading Oracle Database
If the Pre-Upgrade Information Tool instructed you to upgrade the time zone files after completing the database upgrade,
then use the DBMS_DST PL/SQL package to update the RDBMS DST (timezone) version.
Follow the procedure in Oracle documentation under "Steps to Upgrade Time Zone File and Timestamp with Time Zone Data"
and Note 1509653.1 "Updating the RDBMS DST version in 12c Release 1 (12.1.0.1 and up) using DBMS_DST"
https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-state=11y2m2zlos_445&id=2173141.1 9/11
11/24/2017 Document 2173141.1
If you created statistics tables using the DBMS_STATS.CREATE_STAT_TABLE procedure, then upgrade these tables by running
DBMS_STATS.UPGRADE_STAT_TABLE. In the following example, SYS is the owner of the statistics table and 'dictstattab' is
the name of the statistics table.
If you are upgrading from Oracle9i Release 2 (9.2) or Oracle Database 10g Release 1 (10.1), and you are using externally
authenticated SSL users, then you must run the SSL external users conversion (extusrupgrade) script to upgrade those users.
Install Oracle Text Supplied Knowledge Bases After Upgrading Oracle Database
The Oracle Text-supplied knowledge bases are part of the companion products for Oracle Database 12c and are not
immediately available after an upgrade to Oracle Database 12c. Any Oracle Text features dependent on the supplied
knowledge bases which were available before the upgrade do not function after the upgrade. To re-enable such features, you
must install the Oracle Text supplied knowledge bases from the installation media.
If the Oracle Database release that you upgrade includes Oracle Application Express release 3.2 or later, then you do not need
to carry out additional configuration after upgrading to Oracle Database 12c. However, if Oracle Application Express is in the
registry, so that Oracle Application Express is included in the upgrade, then set the open_cursors parameter to a minimum of
200.
if you have applications that use UTL_TCP, UTL_SMTP, UTL_MAIL, UTL_HTTP, or UTL_INADDR packages, then after
upgrading Oracle Database you must configure network access control lists (ACLs) in the database before these packages can
work as they did in earlier releases. Without the ACLs, your applications may fail with the error "ORA-24247: network access
denied by access control list (ACL)."
Connections to Oracle Database from clients earlier than release 10g fail with the error ORA-28040: No matching
authentication protocol. Refer to Oracle documentation for fixing the ORA-28040: No matching authentication protocol.
Known issues
For known issues refer to Oracle Database Upgrade Known issues - 12.2 (Doc ID 2243613.1)
REFERENCES
https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-state=11y2m2zlos_445&id=2173141.1 10/11
11/24/2017 Document 2173141.1
https://support.oracle.com/epmos/faces/DocumentDisplay?_adf.ctrl-state=11y2m2zlos_445&id=2173141.1 11/11