In this Document
APPLIES TO:Oracle Database - Enterprise Edition - Version 19.1.0.0.0 and laterInformation in this document applies to any platform. PURPOSEThis 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 SCOPEDatabase Administrators, Support DETAILSStep 1: Upgrade Path for 19c Oracle databaseMinimum version of the database that can be directly upgraded to Oracle 19c
Intermediate upgrades needs to be carried for following releases
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 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:
Changes in 19c releaseSupport for DBMS_JOB 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.
Desupport of Oracle Multimedia Oracle Multimedia is desupported in Oracle Database 19c, and the implementation is removed. Desupport of Oracle Streams Starting in Oracle Database 19c (19.1), Oracle Streams is desupported. Oracle GoldenGate is the replication solution for Oracle Database. 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. Step 2: Requirements and recommendations for source database
Step3: Requirements and recommendations for target ORACLE_HOME
Step 4: Pre-upgrade checksClean up databaseEmpty the recycle bin Note: These will be taken care by preupgrade.jar. Check materialized viewsCheck the status of all materialized views (MV), and refresh any materialized views that are not fresh. Run the following SQL query: 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 Schema-Only Accounts and Upgrading EXPIRED Password AccountsBefore 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 Copying Transparent Encryption Oracle WalletsIf 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.
Open the Oracle wallet in mount. SQL> STARTUP MOUNT;
SQL> ALTER SYSTEM SET ENCRYPTION WALLET OPEN
Understanding Password Case SensitivityStarting with Oracle Database 12c release 2 (12.2), the default password-based authentication protocol configuration excludes the use of the case-insensitive 10G password version. By default, the SQLNET.ORA parameter SQLNET.ALLOWED_LOGON_VERSION_SERVER is set to 12, which is an Exclusive Mode. 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:
For more information refer 19c Oracle database documentation
Checking for Accounts Using Case-Insensitive Password VersionIdentify if the Oracle Database that getting upgraded has accounts or configuration parameters that are using a case-insensitive password version. For more information refer 19c Oracle database documentation Running Upgrades with Read-Only TablespacesUse 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. SQL> ALTER TABLESPACE <Tablespace Name> READ ONLY;
Tablespace altered. Near the end of each log file, you find SQL statements to reset tables to READ WRITE: SQL> ALTER TABLESPACE <Tablespace Name> READ WRITE;
Tablespace altered.
Preparing the New Oracle Home for Upgrading
Prerequisites for Preparing Oracle Home on WindowsSystem 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.
Databases That Use Oracle Label Security and Oracle Database VaultAudit Table Preupgrade and Archive Requirements 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. ORACLE_HOME/rdbms/admin/olspreupgrade.sql
ORACLE_HOME/rdbms/admin/emremove.sql ORACLE_HOME/olap/admin/catnoamd.sql
SQL> GRANT DV_PATCH_ADMIN to SYS;
CONNECT SYS AS SYSDBA
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. SQL> REVOKE DV_PATCH_ADMIN from SYS;
Granting the DV_PATCH_ADMIN Role to SYS for Oracle Database Vault SQL> GRANT DV_PATCH_ADMIN to SYS;
Manually remove DB control with emremove.sqlStop/shutdown DB control emctl stop dbconsole
SQL>SET ECHO ON
SQL>SET SERVEROUTPUT ON SQL>@emremove.sql >> Script located in new 12c ORACLE_HOME/rdbms/admin Manually remove ORACLE_HOME/HOSTNAME_SID/ and ORACLE_HOME/oc4j/j2ee/OC4J_DBConsole_HOSTNAME_SID directory from the system Ensure no files are in Back up mode before starting the upgradeRun the following statement: SQL> SELECT * FROM v$backup WHERE status != 'NOT ACTIVE';
Purge Recycle binTo empty the database recycle bin, run the following command: SQL> PURGE DBA_RECYCLEBIN
Note: The database recycle bin must be empty during the upgrade process to avoid possible ORA-00600 errors, and to minimize the upgrade time. PerformancePreserve performance statistics 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: SQL> EXEC DBMS_STATS.GATHER_DICTIONARY_STATS;
Checking Time zone settingsTime 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.
About Upgrading Oracle OLAP Data Security PoliciesData 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. Block Change TrackingWhen "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 ALTER DATABASE DISABLE BLOCK CHANGE TRACKING; in the lower version Oracle home before upgrading. 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. PUBLIC Synonym AREABefore 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'; OWNER SYNONYM_NAME TABLE_OWNER TABLE_NAME
Step 5: Preupgrade stepExecute Preupgrade script from source home $Earlier_release_Oracle_home/jdk/bin/java -jar $New_release_Oracle_home/rdbms/admin/preupgrade.jar FILE TEXT DIR output_dir
FILE - Use this option to direct output to a file 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) The Pre-Upgrade Tool (preupgrade.jar) creates the following files: It is recommended to execute pre-upgrade fixup script, if any, which are AUTO FIXABLE Preupgrade fixup scriptBefore upgrade is started, execute preupgrade fixups ( Dependencies on Network Utility PackagesAfter executing preupgrade script, verify the preupgrade log
WARNING: --> Database contains schemas with objects dependent on network packages.
.... Refer to the Database Upgrade Guide for instructions to configure Network ACLs.
.... USER WKSYS has dependent objects.
.... USER SYSMAN has dependent objects.
.... USER FLOWS_010600 has dependent objects.
Execute the following query to view DBA_DEPENDIENCIES SQL> SELECT * FROM DBA_DEPENDENCIES WHERE referenced_name IN ('UTL_TCP','UTL_SMTP','UTL_MAIL','UTL_HTTP','UTL_INADDR','DBMS_LDAP') AND owner NOT IN ('SYS','PUBLIC','ORDPLUGINS');
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 Time zone versionCheck 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 Backing Up Oracle Database for UpgradingSuggested 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. rman "target / nocatalog" Back Up Files to Preserve Downgrade and Recovery OptionsOracle Data Guard Broker Configuration File and Downgrades Exporting a Broker Configuration DGMGRL> CONNECT sysdg@North_Sales.example.com; The following command exports the broker configuration and stores it in a file named myconfig.txt in the trace directory. DGMGRL> EXPORT CONFIGURATION TO 'myconfig.txt'; Note: This is specific to 19c database version and later. Step 6: Upgrade Database to 19cStart the upgradeShut down the database. SQL> SHUTDOWN IMMEDIATE
Steps specific to Windows : If your operating system is Windows, then complete the following steps: 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: C:\> NET STOP OracleServiceORCL
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. C:\> ORADIM -DELETE -SID ORCL
c. Create the service for the new release Oracle Database at a command prompt using the ORADIM command of the new Oracle Database release. C:\> ORADIM -NEW -SID SID -SYSPWD PASSWORD -MAXUSERS USERS -STARTMODE AUTO -PFILE ORACLE_HOME\DATABASE\INITSID.ORA
For Unix/Linux Set the environment variables to point to target ORACLE_HOME export ORACLE_HOME=<path to Oracle 19c> Copy the SPFILE.ORA or INIT.ORA file from the old Oracle home to the target Oracle home. Start DB in upgrade mode from target ORACLE_HOME CONNECT / AS SYSDBA
SQL> startup upgrade; SQL> exit On Linux/Unix cd $ORACLE_HOME/bin On Windows cd %ORACLE_HOME%\bin 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. $ sqlplus "/as sysdba" Note: In 19c Earlier version utluNNNs.sql is replaced by utlusts.sql Note: While executing utlusts.sql, if "ORA-06502: PL/SQL: numeric or value error: character string buffer too small" is received, execute
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: ORACLE_HOME/bin/srvctl upgrade database -db name -o ORACLE_HOME
Check upgrade statusExecute dbupgdiag.sql and review the logs. To download this script refer to Note 556610.1 Recompile INVALID ObjectsExecute utlrp.sql multiple times till the number of INVALID objects becomes constant $ sqlplus "/ AS SYSDBA"
SQL> @Oracle_home/rdbms/admin/utlrp.sql Step 7: Post-upgrade
Setting Environment variables on Linux and UnixConfirm that the following environment variables point to the directories of the new Oracle home: ORACLE_HOME
Update oratab entriesModify the corresponding entry in the /etc/oratab file to point to the new ORACLE_HOME location. Post-upgrade fixup scriptExecute post-upgrade fixup scripts generated by the pre-upgrade script. SQL> @postupgrade_fixups.sql
Create or Migrate Your Password File with ORAPWDIf 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. Recovery Catalog UpgradeIf 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 DatabaseIf 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. For latest DST patch refer to Note 412160.1. The following scripts get delivered with Oracle Database 18c onward Upgrading Statistics TablesIf 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. EXECUTE DBMS_STATS.UPGRADE_STAT_TABLE('SYS', 'dictstattab');
Perform this procedure for each statistics table. |