A Oracle Database Upgrade Utilities

Oracle Upgrade utility scripts help to carry out Oracle Database upgrades.

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 A-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). You must run these scripts in UPGRADE mode. In Oracle Database 12c and later releases, the Parallel Upgrade Utility replaces the SQL Upgrade Utility catupgrd.sql. 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. These shell scripts are available with Oracle Database 12c release 2 (12.2) and later releases. 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.

catnoamd.sql

Do not run in UPGRADE mode. Run this script only after upgrading. The catnoamd.sql script drops the OLAP catalog component, also referred to as AMD.

catnoexf.sql

The upgrade process runs this script for you; however, you can run the catnoexf.sql script before the upgrade. Do not run this script in UPGRADE mode. The catnoexf.sql script removes the Expression Filter (EXF) and Database Rules Manager (RUL) components, which are desupported in this release.

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.

emdwgrd

Do not run this script in UPGRADE mode. The emdwgrd utility saves Oracle Enterprise Manager Database Control (DB Control) configuration files and data for your release 11g database.

If it is possible that you want to downgrade Oracle Database 18c to Oracle Database 11g (11.2), and you want to restore Oracle DB Control, then you must run emdwgrd before you upgrade.

See Also: Oracle Support document ID 1484775.1.

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 .

olspreupgrade.sql

Do not run this script in UPGRADE mode. The olspreupgrade.sql script is a preprocessing script required for upgrading a database earlier than Oracle Database release 12.1 that uses Oracle Label Security (OLS) and Oracle Database Vault.

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.

preupgrd.sql

(Obsolete in 12.2 and later releases) The preupgrd.sql Pre-Upgrade Information Tool is supplied with Oracle Database 12c release 1 (12.1). Run preupgrd.sql any time before upgrading to analyze your database. The Pre-Upgrade Information Tool provides a preview of the items that DBUA checks and generates scripts, called Fixup scripts, that you can run to resolve issues that are flagged in the source database. In release 12.1, preupgrd.sql script replaces the utlu121i.sql script.) In release 12.2, preupgrade.jar replaces preupgrd.sql.

preupgrade.jar

The preupgrade.jar Pre-Upgrade Information Tool is supplied with Oracle Database 12c release 2 (12.2). The preupgrade.jar has the same capabilities as preupgrd.sql, which preupgrade.jar replaces.

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.