This procedure provides steps for upgrading non-CDB architecture Oracle Databases.
Starting with Oracle Database 12c Release 1 (12.1), non-CDB architecture is deprecated. It can be desupported in a future release.
Before using this procedure, complete the following steps:
Install the Oracle Database software
Prepare the new Oracle home
Run the Pre-Upgrade Information Tool
If you have not done so, run the Pre-Upgrade Information Tool. Review the Pre-Upgrade Information Tool output and correct all issues noted in the output before proceeding.
For example, on Linux or Unix systems:
$ORACLE_HOME/jdk/bin/java -jar /opt/oracle/product/19.0.0/rdbms/admin/preupgrade.jar FILE TEXT
Ensure that you have a proper backup strategy in place.
If you have not done so, prepare the new Oracle home.
(Conditional) For Oracle RAC environments only, enter the following commands to set the initialization parameter value for CLUSTER_DATABASE to FALSE:
ALTER SYSTEM SET CLUSTER_DATABASE=FALSE SCOPE=SPFILE;
Shut down the database. For example:
SQL> SHUTDOWN IMMEDIATE
If your operating system is Windows, then complete the following steps:
OracleServiceSIDOracle service of the database you are upgrading, where
SIDis the instance name. For example, if your
ORCL, then enter the following at a command prompt:
C:\> NET STOP OracleServiceORCL
Delete the Oracle service at a command prompt using
ORADIM. Refer to your platform guide for a complete list of the
ORADIMsyntax and commands.
For example, if your
ORCL, then enter the following command.
C:\> ORADIM -DELETE -SID ORCL
Create the service for the new release Oracle Database at a command prompt using the
ORADIMcommand of the new Oracle Database release.
Use the following syntax, where
SIDis your database SID,
PASSWORDis your system password,
USERSis the value you want to set for maximum number of users, and
ORACLE_HOMEis your Oracle home:
C:\> ORADIM -NEW -SID SID -SYSPWD PASSWORD -MAXUSERS USERS -STARTMODE AUTO -PFILE ORACLE_HOME\DATABASE\INITSID.ORA
Most Oracle Database services log on to the system using the privileges of the Oracle software installation owner. The service runs with the privileges of this user. The
ORADIMcommand prompts you to provide the password to this user account. You can specify other options using
In the following example, if your
TWxy5791, the maximum number of users (
MAXUSERS) is 10, and the Oracle home path is
C:\ORACLE\PRODUCT\19.0.0\DB, then enter the following command:
C:\> ORADIM -NEW -SID ORCL -SYSPWD TWxy5791 -MAXUSERS 10 -STARTMODE AUTO -PFILE C:\ORACLE\PRODUCT\19.0.0\DB\DATABASE\INITORCL.ORA
ORADIMwrites a log file to the
Note:If you use an Oracle Home User account to own the Oracle home, then the ORADIM command prompts you for that user name and password.
If your operating system is Linux or UNIX, then perform the following checks:
ORACLE_SIDis set correctly
oratabfile points to the new Oracle home
The following environment variables point to the new Oracle Database directories:
Any scripts that clients use to set the
$ORACLE_HOMEenvironment variable must point to the new Oracle home.
If you are upgrading an Oracle Real Application Clusters database, then perform these checks on all Oracle Grid Infrastructure nodes where the Oracle Real Application Clusters database has instances configured.
Log in to the system as the Oracle installation owner for the new Oracle Database release.
Start SQL*Plus in the new Oracle home from the admin directory in the new Oracle home directory.
$ cd $ORACLE_HOME/rdbms/admin $ pwd /u01/app/oracle/product/19.0.0/dbhome_1/rdbms/admin $ sqlplus
Copy the SPFILE.ORA or INIT.ORA file from the old Oracle home to the new Oracle home.
Connect to the database that you want to upgrade using an account with SYSDBA privileges:
SQL> connect / as sysdba
Start the non-CDB Oracle Database in upgrade mode:
SQL> startup upgrade
If errors appear listing desupported initialization parameters, then make a note of the desupported initialization parameters and continue with the upgrade. Remove the desupported initialization parameters the next time you shut down the database.
Starting up the database in
UPGRADEmode enables you to open a database based on an earlier Oracle Database release. It also restricts log-ins to
AS SYSDBAsessions, disables system triggers, and performs additional operations that prepare the environment for the upgrade.
Run the Parallel Upgrade Utility (
catctl.pl) script, using the upgrade options that you require for your upgrade.
You can run the Parallel Upgrade Utility as a command-line shell command by using the
dbupgradeshell command, which is located in
Oracle_home/bin. If you set the PATH environment variable to include
Oracle_home/bin, then you can run the command directly from your command line. For example:
$ dbupgrade -d /u01/app/oracle/12.2.0/dbhome_1
When you run the Parallel Upgrade Utility command, use the
-doption to specify the filepath for the target Oracle home. Use the
-loption to specify the directory that you want to use for spool log files.
The database is shut down after a successful upgrade. Restart the instance so that you reinitialize the system parameters for normal operation. For example:
This restart, following the database shutdown, 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 upgraded Oracle Database software.
If you encountered a message listing desupported initialization parameters when you started the database, then remove the desupported initialization parameters from the parameter file before restarting it. If necessary, convert the
PFILE, so that you can edit the file to delete parameters.
utlrp.sql, and to recompile any remaining invalid objects.
$ORACLE_HOME/perl/bin/perl catcon.pl -n 1 -e -b utlrp -d '''.''' utlrp.sql
Because you run the command using
-b utlrp, the log file
utlrp0.logis generated as the script is run. The log file provides results of the recompile.
postupgrade_fixups.sql. For example:
If you did not specify to place the script in a different location, then it is in the default path
Oracle_baseis your Oracle base home path, and
SIDis your unique database name.
utlusts.sql. The script verifies that all issues are fixed.
The log file
utlu122s0.logis generated as the script is run, which provides the upgrade results. You can also review the upgrade report in
To see information about the state of the database, run
utlusts.sqlas many times as you want, at any time after the upgrade is completed. If the
utlusts.sqlscript returns errors, or shows components that do not have the status
VALID, or if the version listed for the component is not the most recent release, then refer to the troubleshooting section in this guide.
Ensure that the time zone data files are current by using the
DBMS_DST PL/SQLpackage to upgrade the time zone file. You can also adjust the time zone data files after the upgrade.
Exit from SQL*Plus
(Conditional) If you are upgrading an Oracle Real Application Clusters database, then use the following command syntax to upgrade the database configuration in Oracle Clusterware:
srvctl upgrade database -db db-unique-name -oraclehome oraclehome
In this syntax example,
db-unique-nameis the database name (not the instance name), and
oraclehomeis the Oracle home location in which the database is being upgraded. The
SRVCTLutility supports long GNU-style options, in addition to short command-line interface (CLI) options used in earlier releases.
(Conditional) For Oracle RAC environments only, after you have upgraded all nodes, enter the following commands to set the initialization parameter value for CLUSTER_DATABASE to TRUE, and start the database, where
db_unique_nameis the name of the Oracle RAC database:
ALTER SYSTEM SET CLUSTER_DATABASE=TRUE SCOPE=SPFILE; srvctl start database -db db_unique_name
Your database is now upgraded. You are ready to complete post-upgrade procedures.
If you retain the old Oracle software, then never start the upgraded database with the old software. Only start Oracle Database using the start command in the new Oracle Database home.
Before you remove the old Oracle environment, relocate any data files in that environment to the new Oracle Database environment.
Oracle Database Administrator’s Guide for information about relocating data files