Oracle 19c - Complete Checklist For Manual Upgrades To Non-CDB Oracle Database 19c - 2539778.1
Oracle 19c - Complete Checklist For Manual Upgrades To Non-CDB Oracle Database 19c - 2539778.1
Oracle 19c - Complete Checklist for Manual Upgrades to Non-CDB Oracle Database 19c (Doc ID
2539778.1)
In this Document
Purpose
Scope
Details
About New Autoupgrade utility
Step 1: Upgrade Path for 19c Oracle database
Minimum version of the database that can be directly upgraded to Oracle 19c
Intermediate upgrades needs to be carried for following releases
Changes in 19c release
Step 2: Requirements and recommendations for source database
Step3: Requirements and recommendations for target ORACLE_HOME
Step 4: Pre-upgrade checks
Clean up database
Check materialized views
Schema-Only Accounts and Upgrading EXPIRED Password Accounts
Copying Transparent Encryption Oracle Wallets
Understanding Password Case Sensitivity
Checking for Accounts Using Case-Insensitive Password Version
Running Upgrades with Read-Only Tablespaces
Preparing the New Oracle Home for Upgrading
Prerequisites for Preparing Oracle Home on Windows
Databases That Use Oracle Label Security and Oracle Database Vault
Manually remove DB control with emremove.sql
Ensure no files are in Back up mode before starting the upgrade
Purge Recycle bin
Performance
Checking Time zone settings
About Upgrading Oracle OLAP Data Security Policies
Block Change Tracking
PUBLIC Synonym AREA
Step 5: Preupgrade step
Preupgrade fixup script
Dependencies on Network Utility Packages
Check Time zone version
Backing Up Oracle Database for Upgrading
Back Up Files to Preserve Downgrade and Recovery Options
Step 6: Upgrade Database to 19c
Start the upgrade
Check upgrade status
Recompile INVALID Objects
Step 7: Post-upgrade
Setting Environment variables on Linux and Unix
Update oratab entries
Post-upgrade fixup script
Create or Migrate Your Password File with ORAPWD
Recovery Catalog Upgrade
Upgrade the Time Zone File Version After Upgrading Oracle Database
Upgrading Statistics Tables
References
APPLIES TO:
PURPOSE
This document is created for use as a guideline and checklist when manually upgrading from Oracle 11gR2 (11.2) or Oracle
12c Release 1 (12.1) or Oracle 12c Release 2 (12.2) to Oracle 19c Release
SCOPE
DETAILS
Oracle strongly recommends to use AutoUpgrade Tool for performing Database Upgrades over other methods.
Further information on how to use this Tool is documented in Note 2485457.1 and Oracle documentation
Minimum version of the database that can be directly upgraded to Oracle 19c
Upgrade Matrix
Source Target
11.2.0.4 19c
12.1.0.2 19c
12.2.0.1 19c
18.1 19c
For any multi-step upgrade, if you must carry out two upgrades to upgrade to the current release, then you must run the
preupgrade script twice: First, for the intermediate upgrade release, and second, for the target upgrade target release. For
example, if the database from which you are upgrading is running Oracle Database 10g, then follow these steps:
Upgrade release 10.2.0.5 to release 12.1.0.2 using the instructions in Oracle Database Upgrade Guide 12c Release 1
(12.1), including running the pre-upgrade script for 12.1.0.2.
Upgrade Oracle Database 12c release 1 (12.1.0.2) directly to Oracle Database 19c. Use the instructions in this article,
Oracle Database Upgrade Guide, including running the preupgrade script for 19c.
Upgrade to an intermediate Oracle Database release that can be directly upgraded to the current release. Upgrade Oracle
Database releases that are not supported for direct upgrade in this release to an intermediate Oracle Database release that is
supported for direct upgrade.
This restriction does not apply if you use Oracle Data Pump export/import to migrate data to the new release.
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).
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. or 12.1
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.4. Then upgrade from release 11.2 to 19c
Oracle continues to support the DBMS_JOB package. However, you must grant the CREATE JOB privilege to the database
schemas that submit DBMS_JOB jobs.
Oracle Scheduler replaces the DBMS_JOB package. Although DBMS_JOB is still supported for backward compatibility, Oracle
strongly recommends that you switch from DBMS_JOB to Oracle Scheduler.
During the 19c upgrade for each job in DBMS_JOB a corresponding entry will be created with DBMS_SCHEDULER
The old DBMS_JOB interface still works. But using it will always create a corresponding entry in the scheduler
Pre-upgrade check in preupgrade.jar checks for inconsistencies or any issues
Oracle Multimedia is desupported in Oracle Database 19c, and the implementation is removed.
As an alternative for image processing and conversion, Oracle recommends that you store multimedia content in SecureFiles
LOBs, and use third party products, such as Piction. The ORDIM component remains in the registry and still has a VALID
status. Oracle Multimedia objects and packages remain in the database. However, these objects and packages no longer
function, and raise exceptions if there is an attempt made to use them. Oracle Locator is not affected by the desupport of
Oracle Multimedia.
Starting in Oracle Database 19c (19.1), Oracle Streams is desupported. Oracle GoldenGate is the replication solution for Oracle
Database.
Note that Oracle Database Advanced Queuing is not deprecated, and is fully supported in Oracle Database 19c. Oracle Streams
did not support features added in Oracle Database 12c (12.1) and later releases, including the multitenant architecture, LONG
VARCHAR, and other new features. Oracle Streams replication functionality is superseded by GoldenGate.
Preupgrade check "STREAMS_SETUP" will warn if Oracle Streams is presented. To remove Oracle streams in 18c refer to
Oracle documentation, similarly refer to section "Removing an Oracle Streams Configuration" in the Oracle Streams Concepts
and Administration Guide specific for the Oracle release from which you are removing.
Verify the whether your operating system is certified for 19c. Click here to launch certification portal
Install 19c, verify there are no installation related issues.
Download and install latest RU if any
Copy spfile or pfile from source ORACLE_HOME (under $ORACLE_HOME/dbs) to target home
Remove any _ (underscore) parameter, obsolete and deprecated parameters in pfile
Note min value of COMPATIBLE parameter to upgrade 19c 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 19c (Doc
ID 2539751.1)"
Apply patch 29213893 on target ORACLE_HOME to avoid ORA-01422 error - refer: Database Upgrade to 12.2, 18c, 19c
fails with ORA-01422, ORA-06512 for SYS.DBMS_STATS (Doc ID 2525596.1)
It is suggested review the Preparing to upgrade Oracle Database completely before starting the db upgrade
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.
SQL> SELECT o.name FROM sys.obj$ o, sys.user$ u, sys.sum$ s WHERE o.type# = 42 AND
bitand(s.mflags, 8) =8;
Note: These will be taken care by preupgrade.jar. Review the preupgrade logs
Before starting your upgrade, determine if you want to use password authenticate to default Oracle Database accounts where
their passwords are in EXPIRED status, and their account is in LOCKED status
During upgrades to Oracle Database 19c, default Oracle accounts that have not had their passwords reset before upgrade (and
are set to EXPIRED status), and that are also set to LOCKED status, are set to NO AUTHENTICATION after the upgrade is
complete.
Because of this new feature, default accounts that are changed to schema-only accounts become unavailable for password
authentication. The benefit of this feature is that administrators no longer have to periodically rotate the passwords for these
Oracle Database-provided schemas. This feature also reduces the security risk of attackers using default passwords to hack
into these accounts.
If you want to prevent these Oracle accounts from being set to schema-only accounts during the upgrade, then you must
either set a valid strong password for the account before you start the upgrade, or set a valid strong password for these
accounts after upgrade, or unlock the accounts before you log in to the upgraded Oracle Database.
After the upgrade, an administrator can also enable password authentication for schema-only accounts. However, for better
security, Oracle recommends that you keep these accounts as schema only accounts.
If Oracle wallet used with Transparent Data Encryption (TDE), then copy the sqlnet.ora and wallet file to the new Oracle
home. You must copy the sqlnet.ora and the wallet file manually before starting the upgrade.
For example:
For greater security, Oracle recommends that you leave case-sensitive password-based authentication enabled. This setting is
the default. However, you can temporarily disable case-sensitive authentication during the upgrade to new Oracle Database
releases. After the upgrade, you can then decide if you want to enable the case-sensitive password-based authentication
feature as part of your implementation plan to manage your password versions.
Before upgrading, Oracle recommends that you determine if this change to the default password-based authentication protocol
configuration affects you. Perform the following checks:
Identify if you have accounts that use only 10G case-insensitive password authentication versions.
Identify if you have Oracle Database 11g release 2 (11.2.0.3) database or earlier clients that have not applied critical
patch update CPUOct2012, or a later patch update, and have any account that does not have the case-insensitive 10G
password version.
Ensure that you do not have the deprecated parameter SEC_CASE_SENSITIVE_LOGON set to FALSE. Setting this
parameter to FALSE prevents the use of the case-sensitive password versions (the 11G and 12C password versions) for
authentication.
Identify if the Oracle Database that getting upgraded has accounts or configuration parameters that are using a case-
insensitive password version.
By default, in Oracle Database 12c release 2 (12.2) and later releases, the 10G password version is not generated or allowed.
If you do not set SQLNET.ALLOWED_LOGON_VERSION_SERVER to a permissive authentication protocol that permits case-
insensitive versions, and you do not want user accounts authenticated with case-insensitive password versions to be locked
out of the database, then you must identify affected accounts, and ensure that they are using case-sensitive password
versions.
Use the Parallel Upgrade Utility with the -T option to take schema-based tablespaces offline during upgrade. Oracle Database
can read file headers created in earlier releases, so you are not required to do anything to them during the upgrade. The file
headers of READ ONLY tablespaces are updated when they are changed to READ WRITE. If the upgrade suffers a
catastrophic error, so that the upgrade is unable to bring the tablespaces back online, then review the upgrade log files. The
log files contain the actual SQL statements required to make the tablespaces available. To bring the tablespaces back online,
you must run the SQL statements in the log files for the database, or run the log files for each PDB.
If a catastrophic upgrade failure occurs, then you can navigate to the log directory (Oracle_base/cfgtoologs/dbua), and run
commands in the log files manually to bring up tablespaces. You can view tablespace commands in the following log files:
At the beginning of each log file, you find SQL statements such as the following, which sets tables to READ ONLY:
Copy configuration files from the Oracle home of the database being upgraded to the new release Oracle Database
Oracle home.
If you have a password file that resides within the old environment Oracle home, then move or copy the password file
to the new Oracle home. It is recommended to recreate the password file freshly to leverage the new features (if any)
provided by orapwd utility.
Remove desupported initialization parameters and adjust deprecated initialization parameters. In new releases, some
parameters are desupported, and other parameters are deprecated. Remove all desupported parameters from any
parameter file that starts the new Oracle Database instance. Desupported parameters can cause errors in new Oracle
Database releases. Also, alter any parameter whose syntax has changed in the new release.
If you are upgrading a cluster database, then you need to change CLUSTER_DATABASE=FALSE before starting upgrade
System must meet these requirements before starting Oracle Database upgrade on Microsoft Windows platforms.
For security reasons, different Microsoft Windows user accounts configured as Oracle home users for different Oracle homes
are not allowed to share the same Oracle Base.
Database upgrade is supported when the same Windows user account is used as the Oracle home user in both the
source and destination Oracle homes.
Database upgrade is supported when the Oracle home from which the database is being upgraded uses the Windows
Built-in Account. Releases earlier than Oracle Database 12c (release 11.2 and earlier) only supported the built-in
account option for the Oracle home user on Windows.
The Oracle home user may not have access to files outside its own Oracle Base and Oracle home. If that is the case,
then if you choose a different Oracle Base during upgrade, it is possible that Oracle Database services cannot access
files in the older Oracle Base. Using DBUA for database upgrade ensures that the Oracle home user has access to files
outside of its own Oracle Base and its own Oracle home.
Before upgrading manually, or before using the custom files from the older Oracle Base (for example, wallets,
configuration files and other custom files ), you must grant access to the Oracle home user for these outside files, or
copy these files to the new Oracle Base.
Databases That Use Oracle Label Security and Oracle Database Vault
For Oracle Database releases earlier than 12.1 using Oracle Label Security and Oracle Database Vault, you must run the OLS
preprocess script before you upgrade.
If you are upgrading from a database earlier than Oracle Database release 12.1 that uses Oracle Label Security (OLS) and
Oracle Database Vault, then you must first run the OLS preprocess script, olspreupgrade.sql, to process the aud$ table
contents. The OLS upgrade moves the aud$ table from the SYSTEM schema to the SYS schema. The olspreupgrade.sql script
is a preprocessing script required for this move.
Running the olspreupgrade.sql script before upgrading is mandatory for upgrading databases earlier than Oracle Database
release 12.1 that use Oracle Label Security and Oracle Database Vault. Once you have upgraded to Oracle Database release
12.1, you do not have to perform the OLS preprocessing procedure going forward to patch or upgrade the database.
The olspreupgrade.sql script creates a temporary table PREUPG_AUD$ in the SYS schema and moves the SYSTEM.aud$
records to SYS.PREUPG_AUD$. As a safety measure, Oracle recommends that you archive your audit trail before running the
olspreupgrade.sql script. If Oracle Label Security is installed on your database, and you are upgrading from an earlier release,
then you must run the OLS preprocess script before upgrading.
If Oracle Label Security is installed in the earlier release that you are upgrading, then grant the DV_PATCH_ADMIN role to SYS.
To run the OLS preprocess script on a release 11.2 database before upgrading:
1. Copy the following scripts script from the newly installed Oracle home (19c) to the Oracle home of the database that
needs to be upgraded (11.2):
ORACLE_HOME/rdbms/admin/olspreupgrade.sql
ORACLE_HOME/rdbms/admin/emremove.sql
ORACLE_HOME/olap/admin/catnoamd.sql
2. Start SQL*Plus and connect as DVOWNER to the database that you want to upgrade.
ORACLE_HOME/rdbms/admin/olspreupgrade.sql
ORACLE_HOME/rdbms/admin/emremove.sql
ORACLE_HOME/olap/admin/catnoamd.sql
You may continue to run your applications on the database while the preprocess scripts are running.
6. After the olspreupgrade.sql completes its run successfully, start SQL*Plus and connect to the database as DVOWNER.
If Oracle Database Vault is enabled, then to perform checks for Oracle Data Vault, the upgrade process requires running three
SQL scripts - olspreupgrade.sql, emremove.sql, catnoamd.sql
Start SQL*Plus and connect as DVOWNER to 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
Note: The database recycle bin must be empty during the upgrade process to avoid possible ORA-00600 errors, and to
minimize the upgrade time.
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:
Time zone should less than or equal to target database time zone version. If source is having higher time zone, then apply
time zone patch on target ORACLE_HOME to match the source.
Data security roles defined in a release 11g Oracle Database instance are not automatically converted to ORAS. Before
upgrading Oracle Database Release 11g to a current Oracle Database release, delete any data security roles that are defined in
the 11g database. After the upgrade, you can use the new release Oracle Database Analytic Workspace Manager to define the
data security roles again.
If DB us upgraded from an 11g database without deleting the 11g data security roles, then any data security policies that
include a data security role are invalid in the later Oracle Database releases.
When "Block Change Tracking" is enabled, before start of the upgrade it needs to be disabled. Before disabling Block Change
Tracking, take into account the time to do a level 0 backup after upgrade. If you decide to disable Block Change Tracking, here
is the command
After upgrade, re-enable Block Change Tracking and perform a level 0 backup before resuming incremental backups for the
database. Refer to Oracle Backup and Recovery User's Guide for more details on how to perform and manage Oracle Database
Backups. If Manual Memory Management is enabled, refer to <Doc ID 2651237.1> for memory requirements. and after
upgrade it can enabled.
Before the upgrade, if Oracle Multimedia and/or Oracle Spatial is installed, check the definition of the PUBLIC synonym AREA.
It should be defined to be a synonym for OGC_AREA, otherwise, it causes invalid db components upon upgrading.
SQL> select owner, synonym_name, table_owner, table_name from dba_synonyms where synonym_name = 'AREA';
$Earlier_release_Oracle_home/jdk/bin/java -jar
$New_release_Oracle_home/rdbms/admin/preupgrade.jar FILE TEXT DIR output_dir
Note: You can download latest preupgrade script from the document - How to Download and Run Oracle's Database
Pre-Upgrade Utility (Doc ID 884522.1)
It is recommended to execute pre-upgrade fixup script, if any, which are AUTO FIXABLE
WARNING: --> Database contains schemas with objects dependent on network packag
.... Refer to the Database Upgrade Guide for instructions to configure Network
.... USER WKSYS has dependent objects.
.... USER SYSMAN has dependent objects.
.... USER FLOWS_010600 has dependent objects.
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
Suggested to backup Oracle database after you run the Pre-Upgrade Information Tool. Take backup or create a guaranteed
restore point or both. Test your backup. Ensure there is a proper fallback plan in case of any issues.
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';
}
With upgrades to Oracle Database 19c and later releases, you must back up the Data Guard broker configuration file to
preserve the capability to downgrade to an earlier release.
In releases before Oracle Database 19c, Oracle Database settings that are mapped to Oracle Data Guard broker properties are
maintained in the Oracle Data Guard broker configuration file, and can be modified using the DGMGRL command-line interface.
However, starting with Oracle Database 19c, these database settings are no longer stored in the broker configuration file. As a
result of this change, although you can continue to modify these properties using DGMGRL, the values that you modify are no
longer stored in the Oracle Data Guard broker configuration file. Instead, the DGMGRL commands directly modify the Oracle
Database initialization parameters or database settings to which these Oracle Data Guard Broker properties are mapped.
Because of this change to the way that property settings are managed, if you use Oracle Data Guard broker, then Oracle
recommends that you export your earlier release Oracle Data Guard broker configuration file to a secure backup location
before you start the upgrade. If you do not back up the Oracle Data Guard broker configuration file before the upgrade, then
after the upgrade, you cannot downgrade to an earlier release and retain the property options you previously selected for
Oracle Data Guard
Use the EXPORT CONFIGURATION command to export the metadata contained in the broker configuration file to a text file.
The directory in which the broker configuration file is stored must be accessible to the Oracle server process.
The following command exports the broker configuration and stores it in a file named myconfig.txt in the trace directory.
a. Stop the OracleServiceSID Oracle service of the database you are upgrading,where SID is the instance name. For
example, if your SID is ORCL, then enter the following at a command prompt:
b. Delete the Oracle service at a command prompt using ORADIM. Refer to your platform guide for a complete list of the
ORADIM syntax and commands.
For example, if your SID is ORCL, then enter the following command.
C:\> ORADIM -NEW -SID SID -SYSPWD PASSWORD -MAXUSERS USERS -STARTMODE AUTO -PFILE
ORACLE_HOME\DATABASE\INITSID.ORA
For Unix/Linux
Copy the SPFILE.ORA or INIT.ORA file from the old Oracle home to the target Oracle home.
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, utlusts.sql and review the upgrade spool log file. You run the Post-Upgrade Status Tool in
the environment of the new release.
If you are using Oracle Clusterware, set CLUSTER_DATABASE=TRUE and you must upgrade the Oracle Clusterware keys for
the database. Run srvctl for Oracle Database 19c to upgrade the database. For example:
Execute dbupgdiag.sql and review the logs. To download this script refer to Note 556610.1
Execute utlrp.sql multiple times till the number of INVALID objects becomes constant
Step 7: Post-upgrade
Confirm that the following environment variables point to the directories of the new Oracle home:
ORACLE_HOME
PATH
Modify the corresponding entry in the /etc/oratab file to point to the new ORACLE_HOME location.
SQL> @postupgrade_fixups.sql
If the REMOTE_LOGIN_PASSWORDFILE initialization parameter is set to EXCLUSIVE, then create or migrate the password file
with ORAPWD. Oracle Database 12c and later releases provide a new option to ORAPWD for migrating the password file from
your existing database.
With Oracle Database 12c release 2 (12.2) and later releases, if REMOTE_LOGIN_PASSWORDFILE is set to SHARED, then you
receive a pre-upgrade check validation warning. You can choose one of the following options to correct this issue:
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.
The following scripts get delivered with Oracle Database 18c onward
$ORACLE_HOME/rdbms/admin/utltz_countstats.sql
Script to gives how much TIMESTAMP WITH TIME ZONE data there is in a database using stats info. No restart required.
$ORACLE_HOME/rdbms/admin/utltz_countstar.sql
Script to approximate how much TIMESTAMP WITH TIME ZONE data there is in a database using a COUNT(*) for each
table that has a TSTZ column. This script is useful when using DBMS_DST package or the scripts of utlz_upg_check.sql and
utlz_upg_apply.sql scripts.
$ORACLE_HOME/rdbms/admin/utltz_upg_check.sql
Time zone upgrade check script
?/rdbms/admin/utltz_upg_apply.sql
Time zone apply script. Warning: This script will restart the database and adjust time zone data.
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.