Scripts for Upgrading Oracle Database

Oracle provides a set of tools and scripts for upgrades that you run before, during, and after upgrading.

Note:

Some of the scripts Oracle provides cannot be run in UPGRADE mode.

The following table lists the various scripts and tools with a description for each.

Table B-1 Upgrade, Post-Upgrade, and Downgrade Scripts

Script Description

catcon.pl

Must be run in UPGRADE mode. This script is used when upgrading a CDB.

catctl.pl

Parallel Upgrade Utility (catctl.pl, and the shell script dbupgrade). Run these scripts in UPGRADE mode. With Parallel Upgrade Utility, you can run upgrade scripts and processes in parallel. This capability takes full advantage of your server CPU capacity, and can shorten upgrade time. DBUA uses this tool.

dbdowngrade

Shell script utility that calls the catdwgrd.sql script, and ensures that calls to the catcon.pl script use the recommended values for the downgrade. This feature helps to reduce potential errors due to excessive threads being spawned during the upgrade. It is particularly helpful with multitenant architecture (CDB) downgrades. Using this script is Oracle's recommended downgrade procedure.

dbupgrade, dbupgrade.cmd

Shell scripts that call the catctl.pl script. The scripts enable you to enter the dbupgrade command at the shell command prompt. You can either run these scripts with default values, or you can run them with the same input parameters that you use to run catctl.pl from the Perl prompt. Use dbupgrade for Linux and Unix systems, and dbupgrade.cmd for Windows systems.

catdwgrd.sql

This is the downgrade script, which is used in the procedure to downgrade to the earlier release from which you upgraded.

catuppst.sql

You must run this script, either through DBUA or manually, if you perform a manual upgrade.

DBUA automatically runs catuppst.sql. You only must run this script separately for manual upgrades.

Do not run this in UPGRADE mode. Run catuppst.sql, located in the ORACLE_HOME/rdbms/admin directory, to perform remaining upgrade actions that do not require the database to be in UPGRADE mode. If an Oracle bundle patch or patch set update (PSU or BP) is installed in the Oracle home, then this script automatically applies that patch set update to the database.

Caution: If you perform a manual upgrade, and you do not run catuppst.sql,, then your database suffers performance degradation over time.

catuptabdata.sql

The catuptabdata.sql script is run automatically by catuppst.sql to run ALTER TABLE UPGRADE on any Oracle-Maintained tables that are affected by changes to Oracle-Maintained types during the upgrade.

You can run the catuptabdata.sql script manually to upgrade any Oracle-Maintained tables that require upgrading because of changes to any Oracle-Maintained types. You must run the command with a user account that is granted the SYSDBA system privileges, and that is connected AS SYSDBA.

emremove.sql

The emremove.sql script drops the Oracle Enterprise Manager-related schemas and objects. Use this script to manually remove DB Control. Running emremove.sql before starting the upgrade process minimizes downtime. This is an optional pre-upgrade step because the Parallel Upgrade Utility and DBUA automatically run this script.

Caution: If you want to preserve the DB Control configuration and data to have the option of downgrading and restoring DB Control, then you must first follow the procedure for using emdwgrd .

postupgrade_fixups.sql

The postupgrade_fixups.sql script is supplied with Oracle Database. Run postupgrade_fixups.sql after upgrading. DBUA runs this script automatically; however, you can run it any time after upgrading.

utlrp.sql

Use utlrp.sql to recompile stored PL/SQL and Java code. DBUA runs this script automatically. When you upgrade manually, you must run this script.

utlusts.sql

The utlusts.sql Post-Upgrade Status Tool is supplied with Oracle Database and displays the version and elapsed upgrade time for each component in DBA_REGISTRY. The Post-Upgrade Status Tool can be run any time after upgrading the database.

utluptabdata.sql

Run the utluptabdata.sql script after upgrades to perform an ALTER TABLE UPGRADE command on any user tables that depend on Oracle-Maintained types that changed during the upgrade.

You must run the utluptabdata.sql script either with a user account that is assigned the ALTER TABLE system privilege for all of the tables that you want to upgrade, or by a user account with SYSDBA system privileges that is connected AS SYSDBA).

User tables are not automatically upgraded to new versions of types during the database upgrade, so that you can run the upgrade with user tablespaces set to READ ONLY.