Scripts Associated with Upgrading Oracle Database

Oracle provides a set of tools and scripts that assist with specific tasks assocaited with upgrades.

Note:

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

Starting with Oracle Database 23ai, the use of manual scripts to upgrade Oracle Database is desupported. Database Upgrade Assistant (DBUA) is desupported except on Windows as of Oracle Database 23.4. Oracle recommends using AutoUpgrade to upgrade your database.

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

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

Script Description

catcon.pl

The use of this upgrade script is desupported in Oracle Database 23ai.

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.

catdwgrd.sql

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

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. You can run this script any time after upgrading.

utlprpom.sql

Starting with AutoUpgrade 23.1, when you run the AutoUpgrade utility, AutoUpgrade runs the utlprpom.sql script, and does not run utlrp.sql. When AutoUpgrade is used for upgrades to Oracle Database 12c Release 2 (12.2.0.1) and later releases, AutoUpgrade only recompiles invalid objects owned by Oracle-maintained schemas. Because database upgrades do not need to touch user objects, AutoUpgrade maintains this policy when it recompiles invalid objects.

utlrp.sql

Use utlrp.sql to recompile stored PL/SQL and Java code. This script recompiles invalid objects owned by user schemas.

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.