8i | 9i | 10g | 11g | 12c | 13c | 18c | 19c | 21c | 23c | Misc | PL/SQL | SQL | RAC | WebLogic | Linux
Multitenant : Upgrading to Oracle Database 18c
This article provides an overview of upgrading an existing multitenant database to Oracle 18c. Upgrades can be very complicated, so you must always read the upgrade manual, and test thoroughly before considering an upgrade of a production environment.
Remember, 18c is essentially 12.2.0.2, so the possible upgrade options will be similar to those described in upgrading to Oracle Database 12c.
- Assumptions
- Prerequisites
- Install 18c Software
- Run preupgrade.jar
- Perform Pre-Upgrade Actions
- Upgrade the Database
- Perform Post-Upgrade Actions
- Final Steps
Related articles.
- Upgrading to Oracle Database 18c (Non-CDB)
- Multitenant : Upgrade a PDB using Unplug/Plugin
- Multitenant : PDB Upgrades Using Priority Lists, Inclusion Lists and Exclusion Lists in Oracle Database 12c Release 2 (12.2)
- Upgrading to Oracle Database 12c
- Multitenant : All Articles
- Upgrade the Database Time Zone File Using the DBMS_DST Package
Assumptions
This article is focused on upgrading a multitenant database. If your starting point is a non-CDB database, you should be reading the following article.
This article assumes your source database is of a version supported for direct upgrade to 18c. This is the whole list, but remember multitenant database have only existed from 12.1.0.1 onward.
11.2.0.3, 11.2.0.4, 12.1.0.1, 12.1.0.2, 12.2.0.1
In this example we are doing an upgrade from 12.2 to 18c. The process is very similar for version 12.1, but the pre-upgrade and post-upgrade fixup actions may vary a little.
It's important to have backups of everything before you start! Some of these steps are destructive, and if something goes wrong you have no alternative but to restore from backups and start again.
Remember, this article is not a replacement for reading the upgrade documentation. Each upgrade has the potential to be different, depending on what options are installed.
Prerequisites
Make sure you have all the OS prerequisites in place by running the 18c preinstall package. On Oracle Linux you can do this by installing the preinstall package. It probably makes sense to update the remaining packages also.
yum install -y oracle-database-preinstall-18c yum update -y
Install 18c Software
You can read about the installation process in more detail here, but for this example I'll keep it brief. The following commands will perform a silent installation of the 18c software.
export ORACLE_HOME=$ORACLE_BASE/product/18.0.0/dbhome_1 export SOFTWARE_DIR=/u01/software export ORA_INVENTORY=/u01/app/oraInventory mkdir -p ${ORACLE_HOME} cd $ORACLE_HOME /bin/unzip -oq ${SOFTWARE_DIR}/LINUX.X64_180000_db_home.zip ./runInstaller -ignorePrereq -waitforcompletion -silent \ -responseFile ${ORACLE_HOME}/install/response/db_install.rsp \ oracle.install.option=INSTALL_DB_SWONLY \ ORACLE_HOSTNAME=${ORACLE_HOSTNAME} \ UNIX_GROUP_NAME=oinstall \ INVENTORY_LOCATION=${ORA_INVENTORY} \ SELECTED_LANGUAGES=en,en_GB \ ORACLE_HOME=${ORACLE_HOME} \ ORACLE_BASE=${ORACLE_BASE} \ oracle.install.db.InstallEdition=EE \ oracle.install.db.OSDBA_GROUP=dba \ oracle.install.db.OSBACKUPDBA_GROUP=dba \ oracle.install.db.OSDGDBA_GROUP=dba \ oracle.install.db.OSKMDBA_GROUP=dba \ oracle.install.db.OSRACDBA_GROUP=dba \ SECURITY_UPDATES_VIA_MYORACLESUPPORT=false \ DECLINE_SECURITY_UPDATES=true
Run the root scripts when prompted.
As a root user, execute the following script(s): 1. /u01/app/oracle/product/18.0.0/dbhome_1/root.sh
At this point you should also patch the new Oracle home, but in this case we will forgo that step to keep things simple.
Run preupgrade.jar
Download the latest "preupgrade.jar" file from MOS 884522.1. If you don't have MOS access you can miss out the next step.
Put the latest "preupgrade.jar" into the 18c Oracle home.
export ORACLE_HOME=$ORACLE_BASE/product/18.0.0/dbhome_1 cd $ORACLE_HOME/rdbms/admin unzip -o /u01/software/preupgrade_181_cbuild_6_lf.zip
Make sure you are using the original Oracle home and run the "preupgrade.jar".
export ORACLE_SID=cdb1 export ORAENV_ASK=NO . oraenv export ORAENV_ASK=YES export ORACLE_HOME=$ORACLE_BASE/product/12.2.0.1/db_1 $ORACLE_BASE/product/18.0.0/dbhome_1/jdk/bin/java -jar $ORACLE_BASE/product/18.0.0/dbhome_1/rdbms/admin/preupgrade.jar TERMINAL TEXT
Here is the output from an example run against a 12.2 database. There is output for the root container, seed and any user-defined pluggable databases.
$ $ORACLE_BASE/product/18.0.0/dbhome_1/jdk/bin/java -jar $ORACLE_BASE/product/18.0.0/dbhome_1/rdbms/admin/preupgrade.jar TERMINAL TEXT Report generated by Oracle Database Pre-Upgrade Information Tool Version 18.0.0.0.0 Build: 6 on 2019-01-19T11:29:43 Upgrade-To version: 18.0.0.0.0 ======================================= Status of the database prior to upgrade ======================================= Database Name: CDB1 Container Name: CDB$ROOT Container ID: 1 Version: 12.2.0.1.0 Compatible: 12.2.0 Blocksize: 8192 Platform: Linux x86 64-bit Timezone File: 26 Database log mode: NOARCHIVELOG Readonly: FALSE Edition: EE Oracle Component Upgrade Action Current Status ---------------- -------------- -------------- Oracle Server [to be upgraded] VALID JServer JAVA Virtual Machine [to be upgraded] VALID Oracle XDK for Java [to be upgraded] VALID Real Application Clusters [to be upgraded] OPTION OFF Oracle Workspace Manager [to be upgraded] VALID OLAP Analytic Workspace [to be upgraded] VALID Oracle Label Security [to be upgraded] VALID Oracle Database Vault [to be upgraded] VALID Oracle Text [to be upgraded] VALID Oracle XML Database [to be upgraded] VALID Oracle Java Packages [to be upgraded] VALID Oracle Multimedia [to be upgraded] VALID Oracle Spatial [to be upgraded] VALID Oracle OLAP API [to be upgraded] VALID ============== BEFORE UPGRADE ============== REQUIRED ACTIONS ================ None RECOMMENDED ACTIONS =================== 1. (AUTOFIXUP) Gather stale data dictionary statistics prior to database upgrade in off-peak time using: EXECUTE DBMS_STATS.GATHER_DICTIONARY_STATS; Dictionary statistics do not exist or are stale (not up-to-date). Dictionary statistics help the Oracle optimizer find efficient SQL execution plans and are essential for proper upgrade timing. Oracle recommends gathering dictionary statistics in the last 24 hours before database upgrade. For information on managing optimizer statistics, refer to the 12.2.0.1 Oracle Database SQL Tuning Guide. 2. (AUTOFIXUP) Gather statistics on fixed objects prior the upgrade. None of the fixed object tables have had stats collected. Gathering statistics on fixed objects, if none have been gathered yet, is recommended prior to upgrading. For information on managing optimizer statistics, refer to the 12.2.0.1 Oracle Database SQL Tuning Guide. INFORMATION ONLY ================ 3. To help you keep track of your tablespace allocations, the following AUTOEXTEND tablespaces are expected to successfully EXTEND during the upgrade process. Min Size Tablespace Size For Upgrade ---------- ---------- ----------- SYSAUX 460 MB 679 MB SYSTEM 800 MB 1241 MB TEMP 33 MB 150 MB UNDOTBS1 70 MB 439 MB Minimum tablespace sizes for upgrade are estimates. 4. No action needed. Using default parallel upgrade options, this CDB with 2 PDBs will first upgrade the CDB$ROOT, and then upgrade at most 1 PDBs at a time using 2 parallel processes per PDB. The number of PDBs upgraded in parallel and the number of parallel processes per PDB can be adjusted as described in Database Upgrade Guide. ORACLE GENERATED FIXUP SCRIPT ============================= All of the issues in database CDB1 container CDB$ROOT which are identified above as BEFORE UPGRADE "(AUTOFIXUP)" can be resolved by executing the following from within the container SQL>@/u01/app/oracle/cfgtoollogs/cdb1/preupgrade/preupgrade_fixups.sql ============= AFTER UPGRADE ============= REQUIRED ACTIONS ================ None RECOMMENDED ACTIONS =================== 5. Upgrade the database time zone file using the DBMS_DST package. The database is using time zone file version 26 and the target 18.0.0.0.0 release ships with time zone file version 31. Oracle recommends upgrading to the desired (latest) version of the time zone file. For more information, refer to "Upgrading the Time Zone File and Timestamp with Time Zone Data" in the 18.0.0.0.0 Oracle Database Globalization Support Guide. 6. (AUTOFIXUP) Gather dictionary statistics after the upgrade using the command: EXECUTE DBMS_STATS.GATHER_DICTIONARY_STATS; Oracle recommends gathering dictionary statistics after upgrade. Dictionary statistics provide essential information to the Oracle optimizer to help it find efficient SQL execution plans. After a database upgrade, statistics need to be re-gathered as there can now be tables that have significantly changed during the upgrade or new tables that do not have statistics gathered yet. 7. Gather statistics on fixed objects after the upgrade and when there is a representative workload on the system using the command: EXECUTE DBMS_STATS.GATHER_FIXED_OBJECTS_STATS; This recommendation is given for all preupgrade runs. Fixed object statistics provide essential information to the Oracle optimizer to help it find efficient SQL execution plans. Those statistics are specific to the Oracle Database release that generates them, and can be stale upon database upgrade. For information on managing optimizer statistics, refer to the 12.2.0.1 Oracle Database SQL Tuning Guide. ORACLE GENERATED FIXUP SCRIPT ============================= All of the issues in database CDB1 container CDB$ROOT which are identified above as AFTER UPGRADE "(AUTOFIXUP)" can be resolved by executing the following from within the container SQL>@/u01/app/oracle/cfgtoollogs/cdb1/preupgrade/postupgrade_fixups.sql Report generated by Oracle Database Pre-Upgrade Information Tool Version 18.0.0.0.0 Build: 6 on 2019-01-19T11:30:05 Upgrade-To version: 18.0.0.0.0 ======================================= Status of the database prior to upgrade ======================================= Database Name: CDB1 Container Name: PDB$SEED Container ID: 2 Version: 12.2.0.1.0 Compatible: 12.2.0 Blocksize: 8192 Platform: Linux x86 64-bit Timezone File: 26 Database log mode: NOARCHIVELOG Readonly: TRUE Edition: EE Oracle Component Upgrade Action Current Status ---------------- -------------- -------------- Oracle Server [to be upgraded] VALID JServer JAVA Virtual Machine [to be upgraded] VALID Oracle XDK for Java [to be upgraded] VALID Real Application Clusters [to be upgraded] OPTION OFF Oracle Workspace Manager [to be upgraded] VALID OLAP Analytic Workspace [to be upgraded] VALID Oracle Label Security [to be upgraded] VALID Oracle Database Vault [to be upgraded] VALID Oracle Text [to be upgraded] VALID Oracle XML Database [to be upgraded] VALID Oracle Java Packages [to be upgraded] VALID Oracle Multimedia [to be upgraded] VALID Oracle Spatial [to be upgraded] VALID Oracle OLAP API [to be upgraded] VALID ============== BEFORE UPGRADE ============== REQUIRED ACTIONS ================ None RECOMMENDED ACTIONS =================== 1. (AUTOFIXUP) Gather stale data dictionary statistics prior to database upgrade in off-peak time using: EXECUTE DBMS_STATS.GATHER_DICTIONARY_STATS; Dictionary statistics do not exist or are stale (not up-to-date). Dictionary statistics help the Oracle optimizer find efficient SQL execution plans and are essential for proper upgrade timing. Oracle recommends gathering dictionary statistics in the last 24 hours before database upgrade. For information on managing optimizer statistics, refer to the 12.2.0.1 Oracle Database SQL Tuning Guide. 2. (AUTOFIXUP) Gather statistics on fixed objects prior the upgrade. None of the fixed object tables have had stats collected. Gathering statistics on fixed objects, if none have been gathered yet, is recommended prior to upgrading. For information on managing optimizer statistics, refer to the 12.2.0.1 Oracle Database SQL Tuning Guide. INFORMATION ONLY ================ 3. To help you keep track of your tablespace allocations, the following AUTOEXTEND tablespaces are expected to successfully EXTEND during the upgrade process. Min Size Tablespace Size For Upgrade ---------- ---------- ----------- SYSAUX 330 MB 571 MB SYSTEM 250 MB 689 MB TEMP 64 MB 150 MB UNDOTBS1 100 MB 439 MB Minimum tablespace sizes for upgrade are estimates. 4. No action needed. Using default parallel upgrade options, this CDB with 1 PDBs will first upgrade the CDB$ROOT, and then upgrade at most 1 PDBs at a time using 2 parallel processes per PDB. The number of PDBs upgraded in parallel and the number of parallel processes per PDB can be adjusted as described in Database Upgrade Guide. ORACLE GENERATED FIXUP SCRIPT ============================= All of the issues in database CDB1 container PDB$SEED which are identified above as BEFORE UPGRADE "(AUTOFIXUP)" can be resolved by executing the following from within the container SQL>@/u01/app/oracle/cfgtoollogs/cdb1/preupgrade/preupgrade_fixups.sql ============= AFTER UPGRADE ============= REQUIRED ACTIONS ================ None RECOMMENDED ACTIONS =================== 5. Upgrade the database time zone file using the DBMS_DST package. The database is using time zone file version 26 and the target 18.0.0.0.0 release ships with time zone file version 31. Oracle recommends upgrading to the desired (latest) version of the time zone file. For more information, refer to "Upgrading the Time Zone File and Timestamp with Time Zone Data" in the 18.0.0.0.0 Oracle Database Globalization Support Guide. 6. (AUTOFIXUP) Gather dictionary statistics after the upgrade using the command: EXECUTE DBMS_STATS.GATHER_DICTIONARY_STATS; Oracle recommends gathering dictionary statistics after upgrade. Dictionary statistics provide essential information to the Oracle optimizer to help it find efficient SQL execution plans. After a database upgrade, statistics need to be re-gathered as there can now be tables that have significantly changed during the upgrade or new tables that do not have statistics gathered yet. 7. Gather statistics on fixed objects after the upgrade and when there is a representative workload on the system using the command: EXECUTE DBMS_STATS.GATHER_FIXED_OBJECTS_STATS; This recommendation is given for all preupgrade runs. Fixed object statistics provide essential information to the Oracle optimizer to help it find efficient SQL execution plans. Those statistics are specific to the Oracle Database release that generates them, and can be stale upon database upgrade. For information on managing optimizer statistics, refer to the 12.2.0.1 Oracle Database SQL Tuning Guide. ORACLE GENERATED FIXUP SCRIPT ============================= All of the issues in database CDB1 container PDB$SEED which are identified above as AFTER UPGRADE "(AUTOFIXUP)" can be resolved by executing the following from within the container SQL>@/u01/app/oracle/cfgtoollogs/cdb1/preupgrade/postupgrade_fixups.sql Report generated by Oracle Database Pre-Upgrade Information Tool Version 18.0.0.0.0 Build: 6 on 2019-01-19T11:30:24 Upgrade-To version: 18.0.0.0.0 ======================================= Status of the database prior to upgrade ======================================= Database Name: CDB1 Container Name: PDB1 Container ID: 3 Version: 12.2.0.1.0 Compatible: 12.2.0 Blocksize: 8192 Platform: Linux x86 64-bit Timezone File: 26 Database log mode: NOARCHIVELOG Readonly: FALSE Edition: EE Oracle Component Upgrade Action Current Status ---------------- -------------- -------------- Oracle Server [to be upgraded] VALID JServer JAVA Virtual Machine [to be upgraded] VALID Oracle XDK for Java [to be upgraded] VALID Real Application Clusters [to be upgraded] OPTION OFF Oracle Workspace Manager [to be upgraded] VALID OLAP Analytic Workspace [to be upgraded] VALID Oracle Label Security [to be upgraded] VALID Oracle Database Vault [to be upgraded] VALID Oracle Text [to be upgraded] VALID Oracle XML Database [to be upgraded] VALID Oracle Java Packages [to be upgraded] VALID Oracle Multimedia [to be upgraded] VALID Oracle Spatial [to be upgraded] VALID Oracle OLAP API [to be upgraded] VALID ============== BEFORE UPGRADE ============== REQUIRED ACTIONS ================ None RECOMMENDED ACTIONS =================== 1. (AUTOFIXUP) Gather stale data dictionary statistics prior to database upgrade in off-peak time using: EXECUTE DBMS_STATS.GATHER_DICTIONARY_STATS; Dictionary statistics do not exist or are stale (not up-to-date). Dictionary statistics help the Oracle optimizer find efficient SQL execution plans and are essential for proper upgrade timing. Oracle recommends gathering dictionary statistics in the last 24 hours before database upgrade. For information on managing optimizer statistics, refer to the 12.2.0.1 Oracle Database SQL Tuning Guide. 2. (AUTOFIXUP) Gather statistics on fixed objects prior the upgrade. None of the fixed object tables have had stats collected. Gathering statistics on fixed objects, if none have been gathered yet, is recommended prior to upgrading. For information on managing optimizer statistics, refer to the 12.2.0.1 Oracle Database SQL Tuning Guide. INFORMATION ONLY ================ 3. To help you keep track of your tablespace allocations, the following AUTOEXTEND tablespaces are expected to successfully EXTEND during the upgrade process. Min Size Tablespace Size For Upgrade ---------- ---------- ----------- SYSAUX 690 MB 904 MB SYSTEM 350 MB 786 MB TEMP 64 MB 150 MB UNDOTBS1 360 MB 441 MB Minimum tablespace sizes for upgrade are estimates. 4. No action needed. Using default parallel upgrade options, this CDB with 1 PDBs will first upgrade the CDB$ROOT, and then upgrade at most 1 PDBs at a time using 2 parallel processes per PDB. The number of PDBs upgraded in parallel and the number of parallel processes per PDB can be adjusted as described in Database Upgrade Guide. ORACLE GENERATED FIXUP SCRIPT ============================= All of the issues in database CDB1 container PDB1 which are identified above as BEFORE UPGRADE "(AUTOFIXUP)" can be resolved by executing the following from within the container SQL>@/u01/app/oracle/cfgtoollogs/cdb1/preupgrade/preupgrade_fixups.sql ============= AFTER UPGRADE ============= REQUIRED ACTIONS ================ None RECOMMENDED ACTIONS =================== 5. Upgrade the database time zone file using the DBMS_DST package. The database is using time zone file version 26 and the target 18.0.0.0.0 release ships with time zone file version 31. Oracle recommends upgrading to the desired (latest) version of the time zone file. For more information, refer to "Upgrading the Time Zone File and Timestamp with Time Zone Data" in the 18.0.0.0.0 Oracle Database Globalization Support Guide. 6. (AUTOFIXUP) Gather dictionary statistics after the upgrade using the command: EXECUTE DBMS_STATS.GATHER_DICTIONARY_STATS; Oracle recommends gathering dictionary statistics after upgrade. Dictionary statistics provide essential information to the Oracle optimizer to help it find efficient SQL execution plans. After a database upgrade, statistics need to be re-gathered as there can now be tables that have significantly changed during the upgrade or new tables that do not have statistics gathered yet. 7. Gather statistics on fixed objects after the upgrade and when there is a representative workload on the system using the command: EXECUTE DBMS_STATS.GATHER_FIXED_OBJECTS_STATS; This recommendation is given for all preupgrade runs. Fixed object statistics provide essential information to the Oracle optimizer to help it find efficient SQL execution plans. Those statistics are specific to the Oracle Database release that generates them, and can be stale upon database upgrade. For information on managing optimizer statistics, refer to the 12.2.0.1 Oracle Database SQL Tuning Guide. ORACLE GENERATED FIXUP SCRIPT ============================= All of the issues in database CDB1 container PDB1 which are identified above as AFTER UPGRADE "(AUTOFIXUP)" can be resolved by executing the following from within the container SQL>@/u01/app/oracle/cfgtoollogs/cdb1/preupgrade/postupgrade_fixups.sql ================== PREUPGRADE SUMMARY ================== /u01/app/oracle/cfgtoollogs/cdb1/preupgrade/preupgrade.log /u01/app/oracle/cfgtoollogs/cdb1/preupgrade/preupgrade_fixups.sql /u01/app/oracle/cfgtoollogs/cdb1/preupgrade/postupgrade_fixups.sql Execute fixup scripts across the entire CDB: Before upgrade: 1. Execute preupgrade fixups with the below command $ORACLE_HOME/perl/bin/perl -I$ORACLE_HOME/perl/lib -I$ORACLE_HOME/rdbms/admin $ORACLE_HOME/rdbms/admin/catcon.pl -l /u01/app/oracle/cfgtoollogs/cdb1/preupgrade/ -b preup_cdb1 /u01/app/oracle/cfgtoollogs/cdb1/preupgrade/preupgrade_fixups.sql 2. Review logs under /u01/app/oracle/cfgtoollogs/cdb1/preupgrade/ After the upgrade: 1. Execute postupgrade fixups with the below command $ORACLE_HOME/perl/bin/perl -I$ORACLE_HOME/perl/lib -I$ORACLE_HOME/rdbms/admin $ORACLE_HOME/rdbms/admin/catcon.pl -l /u01/app/oracle/cfgtoollogs/cdb1/preupgrade/ -b postup_cdb1 /u01/app/oracle/cfgtoollogs/cdb1/preupgrade/postupgrade_fixups.sql 2. Review logs under /u01/app/oracle/cfgtoollogs/cdb1/preupgrade/ Preupgrade complete: 2019-01-19T11:30:29 $
Perform Pre-Upgrade Actions
The output from the "preupgrade.jar" lists a number of pre-upgrade recommendations. Some must be manually applied. Others are incorporated into the "preupgrade_fixups.sql" script. In the following example we will only run the "preupgrade_fixups.sql" script and recompile invalid objects. Remember, in a multitenant database we must run the pre-upgrade actions on the root, seed and all user-defined pluggable databases.
$ORACLE_HOME/perl/bin/perl \ -I$ORACLE_HOME/perl/lib \ -I$ORACLE_HOME/rdbms/admin \ $ORACLE_HOME/rdbms/admin/catcon.pl \ -l /u01/app/oracle/cfgtoollogs/${ORACLE_SID}/preupgrade/ \ -b preup_cdb1 \ /u01/app/oracle/cfgtoollogs/${ORACLE_SID}/preupgrade/preupgrade_fixups.sql
We can recompile invalid objects in the all containers except the seed database using the following command.
$ORACLE_HOME/perl/bin/perl \ -I$ORACLE_HOME/perl/lib \ -I$ORACLE_HOME/rdbms/admin \ $ORACLE_HOME/rdbms/admin/catcon.pl \ -l /u01/app/oracle/cfgtoollogs/${ORACLE_SID}/preupgrade/ \ -b preup_${ORACLE_SID}_recompile \ -C 'PDB$SEED' \ $ORACLE_HOME/rdbms/admin/utlrp.sql
Upgrade the Database
With the pre-upgrade actions complete we can start the upgrade. Shutdown the source database.
sqlplus / as sysdba <<EOF shutdown immediate; exit; EOF
Copy the config files from the old to the new Oracle home. You should check the contents of the "listener.ora" file to see if there are any references to the Oracle home path. If there are, amend them.
cp $ORACLE_HOME/network/admin/*.ora $ORACLE_BASE/product/18.0.0/dbhome_1/network/admin # Add this to $ORACLE_BASE/product/18.0.0/dbhome_1/network/admin/sqlnet.ora # Need to correct password versions and remove this. cat >> $ORACLE_BASE/product/18.0.0/dbhome_1/network/admin/sqlnet.ora <<EOF # This should be temporary while you deal with old passwords. SQLNET.ALLOWED_LOGON_VERSION_SERVER=11 EOF cp $ORACLE_HOME/dbs/orapw${ORACLE_SID} $ORACLE_BASE/product/18.0.0/dbhome_1/dbs/ cp $ORACLE_HOME/dbs/spfile${ORACLE_SID}.ora $ORACLE_BASE/product/18.0.0/dbhome_1/dbs/
Switch to the 18c listener.
lsnrctl stop export ORACLE_HOME=$ORACLE_BASE/product/18.0.0/dbhome_1 export PATH=${ORACLE_HOME}/bin:$PATH lsnrctl start
Start the database using the 18c Oracle home, ready for the upgrade. All user-defined PDBs must also be open in upgrade mode, or they will not be included in the upgrade, and will need to be upgraded manually later.
sqlplus / as sysdba <<EOF startup upgrade; alter pluggable database all open upgrade force; exit; EOF
You can run the upgrade using either of the following commands. The second is actually just a shorthand for the former.
# Regular upgrade command. cd $ORACLE_HOME/rdbms/admin $ORACLE_HOME/perl/bin/perl catctl.pl catupgrd.sql # Shorthand command. $ORACLE_HOME/bin/dbupgrade
Here is the output from an example run against a 12.2 multitenant database. The output looks quite long, as the upgrade is run against the root, seed and user-defined PDBs.
$ $ORACLE_HOME/bin/dbupgrade Argument list for [/u01/app/oracle/product/18.0.0/dbhome_1/rdbms/admin/catctl.pl] Run in c = 0 Do not run in C = 0 Input Directory d = 0 Echo OFF e = 1 Simulate E = 0 Forced cleanup F = 0 Log Id i = 0 Child Process I = 0 Log Dir l = 0 Priority List Name L = 0 Upgrade Mode active M = 0 SQL Process Count n = 0 SQL PDB Process Count N = 0 Open Mode Normal o = 0 Start Phase p = 0 End Phase P = 0 Reverse Order r = 0 AutoUpgrade Resume R = 0 Script s = 0 Serial Run S = 0 RO User Tablespaces T = 0 Display Phases y = 0 Debug catcon.pm z = 0 Debug catctl.pl Z = 0 catctl.pl VERSION: [18.0.0.0.0] STATUS: [Production] BUILD: [RDBMS_18.3.0.0.0DBRU_LINUX.X64_180627] /u01/app/oracle/product/18.0.0/dbhome_1/rdbms/admin/orahome = [/u01/app/oracle/product/18.0.0/dbhome_1] /u01/app/oracle/product/18.0.0/dbhome_1/bin/orabasehome = [/u01/app/oracle/product/18.0.0/dbhome_1] catctlGetOrabase = [/u01/app/oracle/product/18.0.0/dbhome_1] Analyzing file /u01/app/oracle/product/18.0.0/dbhome_1/rdbms/admin/catupgrd.sql Log file directory = [/tmp/cfgtoollogs/upgrade20190119114540] catcon::set_log_file_base_path: ALL catcon-related output will be written to [/tmp/cfgtoollogs/upgrade20190119114540/catupgrd_catcon_11636.lst] catcon::set_log_file_base_path: catcon: See [/tmp/cfgtoollogs/upgrade20190119114540/catupgrd*.log] files for output generated by scripts catcon::set_log_file_base_path: catcon: See [/tmp/cfgtoollogs/upgrade20190119114540/catupgrd_*.lst] files for spool files, if any Number of Cpus = 2 Database Name = cdb1 DataBase Version = 12.2.0.1.0 catcon::set_log_file_base_path: ALL catcon-related output will be written to [/u01/app/oracle/product/18.0.0/dbhome_1/cfgtoollogs/cdb1/upgrade20190119114542/catupgrd_catcon_11636.lst] catcon::set_log_file_base_path: catcon: See [/u01/app/oracle/product/18.0.0/dbhome_1/cfgtoollogs/cdb1/upgrade20190119114542/catupgrd*.log] files for output generated by scripts catcon::set_log_file_base_path: catcon: See [/u01/app/oracle/product/18.0.0/dbhome_1/cfgtoollogs/cdb1/upgrade20190119114542/catupgrd_*.lst] files for spool files, if any Log file directory = [/u01/app/oracle/product/18.0.0/dbhome_1/cfgtoollogs/cdb1/upgrade20190119114542] PDB Parallel SQL Process Count = [2] is higher or equal to CPU Count = [2] Concurrent PDB Upgrades defaulting to CPU Count [2] Parallel SQL Process Count (PDB) = 2 Parallel SQL Process Count (CDB$ROOT) = 4 Concurrent PDB Upgrades = 2 Generated PDB Inclusion:[PDB$SEED PDB1] Components in [CDB$ROOT] Installed [APS CATALOG CATJAVA CATPROC CONTEXT DV JAVAVM OLS ORDIM OWM SDO XDB XML XOQ] Not Installed [APEX EM MGW ODM RAC WK] ------------------------------------------------------ Phases [0-108] Start Time:[2019_01_19 11:45:43] Container Lists Inclusion:[CDB$ROOT] Exclusion:[NONE] ------------------------------------------------------ *********** Executing Change Scripts *********** Serial Phase #:0 [CDB$ROOT] Files:1 Time: 42s *************** Catalog Core SQL *************** Serial Phase #:1 [CDB$ROOT] Files:5 Time: 38s Restart Phase #:2 [CDB$ROOT] Files:1 Time: 0s *********** Catalog Tables and Views *********** Parallel Phase #:3 [CDB$ROOT] Files:19 Time: 17s Restart Phase #:4 [CDB$ROOT] Files:1 Time: 0s ************* Catalog Final Scripts ************ Serial Phase #:5 [CDB$ROOT] Files:7 Time: 11s ***************** Catproc Start **************** Serial Phase #:6 [CDB$ROOT] Files:1 Time: 8s ***************** Catproc Types **************** Serial Phase #:7 [CDB$ROOT] Files:2 Time: 9s Restart Phase #:8 [CDB$ROOT] Files:1 Time: 0s **************** Catproc Tables **************** Parallel Phase #:9 [CDB$ROOT] Files:66 Time: 17s Restart Phase #:10 [CDB$ROOT] Files:1 Time: 1s ************* Catproc Package Specs ************ Serial Phase #:11 [CDB$ROOT] Files:1 Time: 44s Restart Phase #:12 [CDB$ROOT] Files:1 Time: 0s ************** Catproc Procedures ************** Parallel Phase #:13 [CDB$ROOT] Files:94 Time: 7s Restart Phase #:14 [CDB$ROOT] Files:1 Time: 1s Parallel Phase #:15 [CDB$ROOT] Files:117 Time: 12s Restart Phase #:16 [CDB$ROOT] Files:1 Time: 0s Serial Phase #:17 [CDB$ROOT] Files:17 Time: 3s Restart Phase #:18 [CDB$ROOT] Files:1 Time: 0s ***************** Catproc Views **************** Parallel Phase #:19 [CDB$ROOT] Files:32 Time: 19s Restart Phase #:20 [CDB$ROOT] Files:1 Time: 0s Serial Phase #:21 [CDB$ROOT] Files:3 Time: 12s Restart Phase #:22 [CDB$ROOT] Files:1 Time: 0s Parallel Phase #:23 [CDB$ROOT] Files:24 Time: 175s Restart Phase #:24 [CDB$ROOT] Files:1 Time: 1s Parallel Phase #:25 [CDB$ROOT] Files:12 Time: 112s Restart Phase #:26 [CDB$ROOT] Files:1 Time: 0s Serial Phase #:27 [CDB$ROOT] Files:1 Time: 0s Serial Phase #:28 [CDB$ROOT] Files:3 Time: 4s Serial Phase #:29 [CDB$ROOT] Files:1 Time: 0s Restart Phase #:30 [CDB$ROOT] Files:1 Time: 0s *************** Catproc CDB Views ************** Serial Phase #:31 [CDB$ROOT] Files:1 Time: 1s Restart Phase #:32 [CDB$ROOT] Files:1 Time: 0s Serial Phase #:34 [CDB$ROOT] Files:1 Time: 0s ***************** Catproc PLBs ***************** Serial Phase #:35 [CDB$ROOT] Files:288 Time: 32s Serial Phase #:36 [CDB$ROOT] Files:1 Time: 0s Restart Phase #:37 [CDB$ROOT] Files:1 Time: 0s Serial Phase #:38 [CDB$ROOT] Files:2 Time: 4s Restart Phase #:39 [CDB$ROOT] Files:1 Time: 0s *************** Catproc DataPump *************** Serial Phase #:40 [CDB$ROOT] Files:3 Time: 61s Restart Phase #:41 [CDB$ROOT] Files:1 Time: 0s ****************** Catproc SQL ***************** Parallel Phase #:42 [CDB$ROOT] Files:13 Time: 114s Restart Phase #:43 [CDB$ROOT] Files:1 Time: 0s Parallel Phase #:44 [CDB$ROOT] Files:11 Time: 14s Restart Phase #:45 [CDB$ROOT] Files:1 Time: 1s Parallel Phase #:46 [CDB$ROOT] Files:3 Time: 2s Restart Phase #:47 [CDB$ROOT] Files:1 Time: 0s ************* Final Catproc scripts ************ Serial Phase #:48 [CDB$ROOT] Files:1 Time: 4s Restart Phase #:49 [CDB$ROOT] Files:1 Time: 0s ************** Final RDBMS scripts ************* Serial Phase #:50 [CDB$ROOT] Files:1 Time: 5s ************ Upgrade Component Start *********** Serial Phase #:51 [CDB$ROOT] Files:1 Time: 0s Restart Phase #:52 [CDB$ROOT] Files:1 Time: 1s ********** Upgrading Java and non-Java ********* Serial Phase #:53 [CDB$ROOT] Files:2 Time: 309s ***************** Upgrading XDB **************** Restart Phase #:54 [CDB$ROOT] Files:1 Time: 0s Serial Phase #:56 [CDB$ROOT] Files:3 Time: 6s Serial Phase #:57 [CDB$ROOT] Files:3 Time: 6s Parallel Phase #:58 [CDB$ROOT] Files:9 Time: 3s Parallel Phase #:59 [CDB$ROOT] Files:25 Time: 6s Serial Phase #:60 [CDB$ROOT] Files:4 Time: 7s Serial Phase #:61 [CDB$ROOT] Files:1 Time: 0s Serial Phase #:62 [CDB$ROOT] Files:31 Time: 4s Serial Phase #:63 [CDB$ROOT] Files:1 Time: 0s Parallel Phase #:64 [CDB$ROOT] Files:6 Time: 3s Serial Phase #:65 [CDB$ROOT] Files:2 Time: 25s Serial Phase #:66 [CDB$ROOT] Files:3 Time: 39s **************** Upgrading ORDIM *************** Restart Phase #:67 [CDB$ROOT] Files:1 Time: 0s Serial Phase #:69 [CDB$ROOT] Files:1 Time: 1s Parallel Phase #:70 [CDB$ROOT] Files:2 Time: 35s Serial Phase #:71 [CDB$ROOT] Files:1 Time: 71s Restart Phase #:72 [CDB$ROOT] Files:1 Time: 1s Parallel Phase #:73 [CDB$ROOT] Files:2 Time: 16s Serial Phase #:74 [CDB$ROOT] Files:2 Time: 1s ***************** Upgrading SDO **************** Restart Phase #:75 [CDB$ROOT] Files:1 Time: 0s Serial Phase #:77 [CDB$ROOT] Files:1 Time: 55s Serial Phase #:78 [CDB$ROOT] Files:1 Time: 2s Restart Phase #:79 [CDB$ROOT] Files:1 Time: 0s Serial Phase #:80 [CDB$ROOT] Files:1 Time: 95s Restart Phase #:81 [CDB$ROOT] Files:1 Time: 0s Parallel Phase #:82 [CDB$ROOT] Files:3 Time: 56s Restart Phase #:83 [CDB$ROOT] Files:1 Time: 0s Serial Phase #:84 [CDB$ROOT] Files:1 Time: 6s Restart Phase #:85 [CDB$ROOT] Files:1 Time: 0s Serial Phase #:86 [CDB$ROOT] Files:1 Time: 8s Restart Phase #:87 [CDB$ROOT] Files:1 Time: 0s Parallel Phase #:88 [CDB$ROOT] Files:4 Time: 100s Restart Phase #:89 [CDB$ROOT] Files:1 Time: 1s Serial Phase #:90 [CDB$ROOT] Files:1 Time: 1s Restart Phase #:91 [CDB$ROOT] Files:1 Time: 0s Serial Phase #:92 [CDB$ROOT] Files:2 Time: 11s Restart Phase #:93 [CDB$ROOT] Files:1 Time: 1s Serial Phase #:94 [CDB$ROOT] Files:1 Time: 1s Restart Phase #:95 [CDB$ROOT] Files:1 Time: 0s ******* Upgrading ODM, WK, EXF, RUL, XOQ ******* Serial Phase #:96 [CDB$ROOT] Files:1 Time: 21s Restart Phase #:97 [CDB$ROOT] Files:1 Time: 1s *********** Final Component scripts *********** Serial Phase #:98 [CDB$ROOT] Files:1 Time: 4s ************* Final Upgrade scripts ************ Serial Phase #:99 [CDB$ROOT] Files:1 Time: 55s ******************* Migration ****************** Serial Phase #:100 [CDB$ROOT] Files:1 Time: 0s *** End PDB Application Upgrade Pre-Shutdown *** Serial Phase #:101 [CDB$ROOT] Files:1 Time: 1s Serial Phase #:102 [CDB$ROOT] Files:1 Time: 1s Serial Phase #:103 [CDB$ROOT] Files:1 Time: 59s ***************** Post Upgrade ***************** Serial Phase #:104 [CDB$ROOT] Files:1 Time: 4s **************** Summary report **************** Serial Phase #:105 [CDB$ROOT] Files:1 Time: 1s *** End PDB Application Upgrade Post-Shutdown ** Serial Phase #:106 [CDB$ROOT] Files:1 Time: 0s Serial Phase #:107 [CDB$ROOT] Files:1 Time: 1s Serial Phase #:108 [CDB$ROOT] Files:1 Time: 0s ------------------------------------------------------ Phases [0-108] End Time:[2019_01_19 12:15:34] Container Lists Inclusion:[CDB$ROOT] Exclusion:[NONE] ------------------------------------------------------ Start processing of PDBs (PDB$SEED) [/u01/app/oracle/product/18.0.0/dbhome_1/perl/bin/perl /u01/app/oracle/product/18.0.0/dbhome_1/rdbms/admin/catctl.pl -I -i pdb_seed -n 2 -c 'PDB$SEED' -l /u01/app/oracle/product/18.0.0/dbhome_1/cfgtoollogs/cdb1/upgrade20190119114542 /u01/app/oracle/product/18.0.0/dbhome_1/rdbms/admin/catupgrd.sql] Start processing of PDBs (PDB1) [/u01/app/oracle/product/18.0.0/dbhome_1/perl/bin/perl /u01/app/oracle/product/18.0.0/dbhome_1/rdbms/admin/catctl.pl -I -i pdb1 -n 2 -c 'PDB1' -l /u01/app/oracle/product/18.0.0/dbhome_1/cfgtoollogs/cdb1/upgrade20190119114542 /u01/app/oracle/product/18.0.0/dbhome_1/rdbms/admin/catupgrd.sql] Argument list for [/u01/app/oracle/product/18.0.0/dbhome_1/rdbms/admin/catctl.pl] Run in c = PDB$SEED Do not run in C = 0 Input Directory d = 0 Echo OFF e = 1 Simulate E = 0 Forced cleanup F = 0 Log Id i = pdb_seed Child Process I = 1 Log Dir l = /u01/app/oracle/product/18.0.0/dbhome_1/cfgtoollogs/cdb1/upgrade20190119114542 Priority List Name L = 0 Upgrade Mode active M = 0 SQL Process Count n = 2 SQL PDB Process Count N = 0 Open Mode Normal o = 0 Start Phase p = 0 End Phase P = 0 Reverse Order r = 0 AutoUpgrade Resume R = 0 Script s = 0 Serial Run S = 0 RO User Tablespaces T = 0 Display Phases y = 0 Debug catcon.pm z = 0 Debug catctl.pl Z = 0 catctl.pl VERSION: [18.0.0.0.0] STATUS: [Production] BUILD: [RDBMS_18.3.0.0.0DBRU_LINUX.X64_180627] Argument list for [/u01/app/oracle/product/18.0.0/dbhome_1/rdbms/admin/catctl.pl] Run in c = PDB1 Do not run in C = 0 Input Directory d = 0 Echo OFF e = 1 Simulate E = 0 Forced cleanup F = 0 Log Id i = pdb1 Child Process I = 1 Log Dir l = /u01/app/oracle/product/18.0.0/dbhome_1/cfgtoollogs/cdb1/upgrade20190119114542 Priority List Name L = 0 Upgrade Mode active M = 0 SQL Process Count n = 2 SQL PDB Process Count N = 0 Open Mode Normal o = 0 Start Phase p = 0 End Phase P = 0 Reverse Order r = 0 AutoUpgrade Resume R = 0 Script s = 0 Serial Run S = 0 RO User Tablespaces T = 0 Display Phases y = 0 Debug catcon.pm z = 0 Debug catctl.pl Z = 0 catctl.pl VERSION: [18.0.0.0.0] STATUS: [Production] BUILD: [RDBMS_18.3.0.0.0DBRU_LINUX.X64_180627] /u01/app/oracle/product/18.0.0/dbhome_1/rdbms/admin/orahome = [/u01/app/oracle/product/18.0.0/dbhome_1] /u01/app/oracle/product/18.0.0/dbhome_1/rdbms/admin/orahome = [/u01/app/oracle/product/18.0.0/dbhome_1] /u01/app/oracle/product/18.0.0/dbhome_1/bin/orabasehome = [/u01/app/oracle/product/18.0.0/dbhome_1] catctlGetOrabase = [/u01/app/oracle/product/18.0.0/dbhome_1] Analyzing file /u01/app/oracle/product/18.0.0/dbhome_1/rdbms/admin/catupgrd.sql Log file directory = [/u01/app/oracle/product/18.0.0/dbhome_1/cfgtoollogs/cdb1/upgrade20190119114542] /u01/app/oracle/product/18.0.0/dbhome_1/bin/orabasehome = [/u01/app/oracle/product/18.0.0/dbhome_1] catctlGetOrabase = [/u01/app/oracle/product/18.0.0/dbhome_1] Analyzing file /u01/app/oracle/product/18.0.0/dbhome_1/rdbms/admin/catupgrd.sql Log file directory = [/u01/app/oracle/product/18.0.0/dbhome_1/cfgtoollogs/cdb1/upgrade20190119114542] catcon::set_log_file_base_path: ALL catcon-related output will be written to [/u01/app/oracle/product/18.0.0/dbhome_1/cfgtoollogs/cdb1/upgrade20190119114542/catupgrdpdb1_catcon_19550.lst] catcon::set_log_file_base_path: catcon: See [/u01/app/oracle/product/18.0.0/dbhome_1/cfgtoollogs/cdb1/upgrade20190119114542/catupgrdpdb1*.log] files for output generated by scripts catcon::set_log_file_base_path: ALL catcon-related output will be written to [/u01/app/oracle/product/18.0.0/dbhome_1/cfgtoollogs/cdb1/upgrade20190119114542/catupgrdpdb_seed_catcon_19548.lst] catcon::set_log_file_base_path: catcon: See [/u01/app/oracle/product/18.0.0/dbhome_1/cfgtoollogs/cdb1/upgrade20190119114542/catupgrdpdb_seed*.log] files for output generated by scripts catcon::set_log_file_base_path: catcon: See [/u01/app/oracle/product/18.0.0/dbhome_1/cfgtoollogs/cdb1/upgrade20190119114542/catupgrdpdb1_*.lst] files for spool files, if any catcon::set_log_file_base_path: catcon: See [/u01/app/oracle/product/18.0.0/dbhome_1/cfgtoollogs/cdb1/upgrade20190119114542/catupgrdpdb_seed_*.lst] files for spool files, if any Number of Cpus = 2 Number of Cpus = 2 Database Name = cdb1 Database Name = cdb1 DataBase Version = 18.0.0.0.0 DataBase Version = 18.0.0.0.0 Generated PDB Inclusion:[PDB$SEED] CDB$ROOT Open Mode = [OPEN] Generated PDB Inclusion:[PDB1] Components in [PDB$SEED] Installed [APS CATALOG CATJAVA CATPROC CONTEXT DV JAVAVM OLS ORDIM OWM SDO XDB XML XOQ] Not Installed [APEX EM MGW ODM RAC WK] CDB$ROOT Open Mode = [OPEN] Components in [PDB1] Installed [APEX APS CATALOG CATJAVA CATPROC CONTEXT DV JAVAVM OLS ORDIM OWM SDO XDB XML XOQ] Not Installed [EM MGW ODM RAC WK] ------------------------------------------------------ Phases [0-108] Start Time:[2019_01_19 12:15:40] Container Lists Inclusion:[PDB$SEED] Exclusion:[NONE] ------------------------------------------------------ *********** Executing Change Scripts *********** Serial Phase #:0 [PDB$SEED] Files:1 ------------------------------------------------------ Phases [0-108] Start Time:[2019_01_19 12:15:40] Container Lists Inclusion:[PDB1] Exclusion:[NONE] ------------------------------------------------------ *********** Executing Change Scripts *********** Serial Phase #:0 [PDB1] Files:1 Time: 33s *************** Catalog Core SQL *************** Serial Phase #:1 [PDB$SEED] Files:5 Time: 53s *************** Catalog Core SQL *************** Serial Phase #:1 [PDB1] Files:5 Time: 69s Restart Phase #:2 [PDB$SEED] Files:1 Time: 1s *********** Catalog Tables and Views *********** Parallel Phase #:3 [PDB$SEED] Files:19 Time: 72s Restart Phase #:2 [PDB1] Files:1 Time: 1s *********** Catalog Tables and Views *********** Parallel Phase #:3 [PDB1] Files:19 Time: 39s Restart Phase #:4 [PDB$SEED] Files:1 Time: 0s ************* Catalog Final Scripts ************ Serial Phase #:5 [PDB$SEED] Files:7 Time: 24s Restart Phase #:4 [PDB1] Files:1 Time: 0s ************* Catalog Final Scripts ************ Serial Phase #:5 [PDB1] Files:7 Time: 14s ***************** Catproc Start **************** Serial Phase #:6 [PDB$SEED] Files:1 Time: 14s ***************** Catproc Start **************** Serial Phase #:6 [PDB1] Files:1 Time: 11s ***************** Catproc Types **************** Serial Phase #:7 [PDB$SEED] Files:2 Time: 13s ***************** Catproc Types **************** Serial Phase #:7 [PDB1] Files:2 Time: 11s Restart Phase #:8 [PDB$SEED] Files:1 Time: 0s **************** Catproc Tables **************** Parallel Phase #:9 [PDB$SEED] Files:66 Time: 9s Restart Phase #:8 [PDB1] Files:1 Time: 0s **************** Catproc Tables **************** Parallel Phase #:9 [PDB1] Files:66 Time: 27s Restart Phase #:10 [PDB$SEED] Files:1 Time: 1s ************* Catproc Package Specs ************ Serial Phase #:11 [PDB$SEED] Files:1 Time: 36s Restart Phase #:10 [PDB1] Files:1 Time: 1s ************* Catproc Package Specs ************ Serial Phase #:11 [PDB1] Files:1 Time: 98s Restart Phase #:12 [PDB$SEED] Files:1 Time: 0s ************** Catproc Procedures ************** Parallel Phase #:13 [PDB$SEED] Files:94 Time: 91s Restart Phase #:12 [PDB1] Files:1 Time: 0s ************** Catproc Procedures ************** Parallel Phase #:13 [PDB1] Files:94 Time: 16s Restart Phase #:14 [PDB$SEED] Files:1 Time: 0s Parallel Phase #:15 [PDB$SEED] Files:117 Time: 14s Restart Phase #:14 [PDB1] Files:1 Time: 0s Parallel Phase #:15 [PDB1] Files:117 Time: 28s Restart Phase #:16 [PDB$SEED] Files:1 Time: 0s Serial Phase #:17 [PDB$SEED] Files:17 Time: 24s Restart Phase #:16 [PDB1] Files:1 Time: 0s Serial Phase #:17 [PDB1] Files:17 Time: 6s Restart Phase #:18 [PDB$SEED] Files:1 Time: 1s ***************** Catproc Views **************** Parallel Phase #:19 [PDB$SEED] Files:32 Time: 6s Restart Phase #:18 [PDB1] Files:1 Time: 0s ***************** Catproc Views **************** Parallel Phase #:19 [PDB1] Files:32 Time: 37s Restart Phase #:20 [PDB$SEED] Files:1 Time: 34s Restart Phase #:20 [PDB1] Files:1 Time: 0s Serial Phase #:21 [PDB$SEED] Files:3 Time: 0s Serial Phase #:21 [PDB1] Files:3 Time: 14s Restart Phase #:22 [PDB$SEED] Files:1 Time: 14s Restart Phase #:22 [PDB1] Files:1 Time: 0s Parallel Phase #:23 [PDB$SEED] Files:24 Time: 0s Parallel Phase #:23 [PDB1] Files:24 Time: 460s Restart Phase #:24 [PDB1] Files:1 Time: 460s Restart Phase #:24 [PDB$SEED] Files:1 Time: 1s Parallel Phase #:25 [PDB1] Files:12 Time: 1s Parallel Phase #:25 [PDB$SEED] Files:12 Time: 168s Restart Phase #:26 [PDB1] Files:1 Time: 0s Serial Phase #:27 [PDB1] Files:1 Time: 0s Serial Phase #:28 [PDB1] Files:3 Time: 172s Restart Phase #:26 [PDB$SEED] Files:1 Time: 0s Serial Phase #:27 [PDB$SEED] Files:1 Time: 0s Serial Phase #:28 [PDB$SEED] Files:3 Time: 29s Serial Phase #:29 [PDB1] Files:1 Time: 0s Restart Phase #:30 [PDB1] Files:1 Time: 0s *************** Catproc CDB Views ************** Serial Phase #:31 [PDB1] Files:1 Time: 25s Serial Phase #:29 [PDB$SEED] Files:1 Time: 0s Restart Phase #:30 [PDB$SEED] Files:1 Time: 0s *************** Catproc CDB Views ************** Serial Phase #:31 [PDB$SEED] Files:1 Time: 1s Restart Phase #:32 [PDB1] Files:1 Time: 0s Serial Phase #:34 [PDB1] Files:1 Time: 0s ***************** Catproc PLBs ***************** Serial Phase #:35 [PDB1] Files:288 Time: 1s Restart Phase #:32 [PDB$SEED] Files:1 Time: 0s Serial Phase #:34 [PDB$SEED] Files:1 Time: 0s ***************** Catproc PLBs ***************** Serial Phase #:35 [PDB$SEED] Files:288 Time: 147s Serial Phase #:36 [PDB$SEED] Files:1 Time: 0s Restart Phase #:37 [PDB$SEED] Files:1 Time: 147s Serial Phase #:36 [PDB1] Files:1 Time: 0s Restart Phase #:37 [PDB1] Files:1 Time: 1s Serial Phase #:38 [PDB$SEED] Files:2 Time: 1s Serial Phase #:38 [PDB1] Files:2 Time: 10s Restart Phase #:39 [PDB1] Files:1 Time: 10s Restart Phase #:39 [PDB$SEED] Files:1 Time: 0s *************** Catproc DataPump *************** Serial Phase #:40 [PDB1] Files:3 Time: 0s *************** Catproc DataPump *************** Serial Phase #:40 [PDB$SEED] Files:3 Time: 84s Restart Phase #:41 [PDB1] Files:1 Time: 0s ****************** Catproc SQL ***************** Parallel Phase #:42 [PDB1] Files:13 Time: 91s Restart Phase #:41 [PDB$SEED] Files:1 Time: 0s ****************** Catproc SQL ***************** Parallel Phase #:42 [PDB$SEED] Files:13 Time: 189s Restart Phase #:43 [PDB1] Files:1 Time: 0s Parallel Phase #:44 [PDB1] Files:11 Time: 8s Restart Phase #:45 [PDB1] Files:1 Time: 0s Parallel Phase #:46 [PDB1] Files:3 Time: 3s Restart Phase #:47 [PDB1] Files:1 Time: 1s ************* Final Catproc scripts ************ Serial Phase #:48 [PDB1] Files:1 Time: 6s Restart Phase #:49 [PDB1] Files:1 Time: 0s ************** Final RDBMS scripts ************* Serial Phase #:50 [PDB1] Files:1 Time: 202s Restart Phase #:43 [PDB$SEED] Files:1 Time: 0s Parallel Phase #:44 [PDB$SEED] Files:11 Time: 6s ************ Upgrade Component Start *********** Serial Phase #:51 [PDB1] Files:1 Time: 1s Restart Phase #:52 [PDB1] Files:1 Time: 1s ********** Upgrading Java and non-Java ********* Serial Phase #:53 [PDB1] Files:2 Time: 11s Restart Phase #:45 [PDB$SEED] Files:1 Time: 0s Parallel Phase #:46 [PDB$SEED] Files:3 Time: 4s Restart Phase #:47 [PDB$SEED] Files:1 Time: 0s ************* Final Catproc scripts ************ Serial Phase #:48 [PDB$SEED] Files:1 Time: 12s Restart Phase #:49 [PDB$SEED] Files:1 Time: 0s ************** Final RDBMS scripts ************* Serial Phase #:50 [PDB$SEED] Files:1 Time: 5s ************ Upgrade Component Start *********** Serial Phase #:51 [PDB$SEED] Files:1 Time: 1s Restart Phase #:52 [PDB$SEED] Files:1 Time: 0s ********** Upgrading Java and non-Java ********* Serial Phase #:53 [PDB$SEED] Files:2 Time: 290s ***************** Upgrading XDB **************** Restart Phase #:54 [PDB1] Files:1 Time: 1s Serial Phase #:56 [PDB1] Files:3 Time: 268s ***************** Upgrading XDB **************** Restart Phase #:54 [PDB$SEED] Files:1 Time: 0s Serial Phase #:56 [PDB$SEED] Files:3 Time: 6s Serial Phase #:57 [PDB1] Files:3 Time: 3s Parallel Phase #:58 [PDB1] Files:9 Time: 5s Serial Phase #:57 [PDB$SEED] Files:3 Time: 3s Parallel Phase #:59 [PDB1] Files:25 Time: 4s Parallel Phase #:58 [PDB$SEED] Files:9 Time: 3s Parallel Phase #:59 [PDB$SEED] Files:25 Time: 7s Serial Phase #:60 [PDB1] Files:4 Time: 6s Serial Phase #:60 [PDB$SEED] Files:4 Time: 14s Serial Phase #:61 [PDB1] Files:1 Time: 0s Serial Phase #:62 [PDB1] Files:31 Time: 12s Serial Phase #:61 [PDB$SEED] Files:1 Time: 0s Serial Phase #:62 [PDB$SEED] Files:31 Time: 12s Serial Phase #:63 [PDB$SEED] Files:1 Time: 0s Parallel Phase #:64 [PDB$SEED] Files:6 Time: 13s Serial Phase #:63 [PDB1] Files:1 Time: 0s Parallel Phase #:64 [PDB1] Files:6 Time: 6s Serial Phase #:65 [PDB1] Files:2 Time: 6s Serial Phase #:65 [PDB$SEED] Files:2 Time: 32s Serial Phase #:66 [PDB1] Files:3 Time: 32s Serial Phase #:66 [PDB$SEED] Files:3 Time: 35s **************** Upgrading ORDIM *************** Restart Phase #:67 [PDB$SEED] Files:1 Time: 0s Serial Phase #:69 [PDB$SEED] Files:1 Time: 36s **************** Upgrading ORDIM *************** Restart Phase #:67 [PDB1] Files:1 Time: 0s Serial Phase #:69 [PDB1] Files:1 Time: 2s Parallel Phase #:70 [PDB$SEED] Files:2 Time: 2s Parallel Phase #:70 [PDB1] Files:2 Time: 38s Serial Phase #:71 [PDB$SEED] Files:1 Time: 38s Serial Phase #:71 [PDB1] Files:1 Time: 58s Restart Phase #:72 [PDB1] Files:1 Time: 0s Parallel Phase #:73 [PDB1] Files:2 Time: 60s Restart Phase #:72 [PDB$SEED] Files:1 Time: 0s Parallel Phase #:73 [PDB$SEED] Files:2 Time: 22s Serial Phase #:74 [PDB1] Files:2 Time: 21s Serial Phase #:74 [PDB$SEED] Files:2 Time: 1s ***************** Upgrading SDO **************** Restart Phase #:75 [PDB1] Files:1 Time: 1s Serial Phase #:77 [PDB1] Files:1 Time: 2s ***************** Upgrading SDO **************** Restart Phase #:75 [PDB$SEED] Files:1 Time: 0s Serial Phase #:77 [PDB$SEED] Files:1 Time: 51s Serial Phase #:78 [PDB$SEED] Files:1 Time: 51s Serial Phase #:78 [PDB1] Files:1 Time: 4s Restart Phase #:79 [PDB$SEED] Files:1 Time: 4s Restart Phase #:79 [PDB1] Files:1 Time: 1s Serial Phase #:80 [PDB$SEED] Files:1 Time: 1s Serial Phase #:80 [PDB1] Files:1 Time: 6s Restart Phase #:81 [PDB1] Files:1 Time: 6s Restart Phase #:81 [PDB$SEED] Files:1 Time: 0s Parallel Phase #:82 [PDB1] Files:3 Time: 0s Parallel Phase #:82 [PDB$SEED] Files:3 Time: 88s Restart Phase #:83 [PDB$SEED] Files:1 Time: 1s Serial Phase #:84 [PDB$SEED] Files:1 Time: 90s Restart Phase #:83 [PDB1] Files:1 Time: 0s Serial Phase #:84 [PDB1] Files:1 Time: 8s Restart Phase #:85 [PDB$SEED] Files:1 Time: 0s Serial Phase #:86 [PDB$SEED] Files:1 Time: 7s Restart Phase #:85 [PDB1] Files:1 Time: 1s Serial Phase #:86 [PDB1] Files:1 Time: 9s Restart Phase #:87 [PDB$SEED] Files:1 Time: 0s Parallel Phase #:88 [PDB$SEED] Files:4 Time: 9s Restart Phase #:87 [PDB1] Files:1 Time: 0s Parallel Phase #:88 [PDB1] Files:4 Time: 84s Restart Phase #:89 [PDB$SEED] Files:1 Time: 83s Restart Phase #:89 [PDB1] Files:1 Time: 0s Serial Phase #:90 [PDB$SEED] Files:1 Time: 0s Serial Phase #:90 [PDB1] Files:1 Time: 1s Restart Phase #:91 [PDB$SEED] Files:1 Time: 1s Serial Phase #:92 [PDB$SEED] Files:2 Time: 2s Restart Phase #:91 [PDB1] Files:1 Time: 0s Serial Phase #:92 [PDB1] Files:2 Time: 26s Restart Phase #:93 [PDB1] Files:1 Time: 0s Serial Phase #:94 [PDB1] Files:1 Time: 27s Restart Phase #:93 [PDB$SEED] Files:1 Time: 1s Restart Phase #:95 [PDB1] Files:1 Time: 0s Serial Phase #:94 [PDB$SEED] Files:1 Time: 0s ******* Upgrading ODM, WK, EXF, RUL, XOQ ******* Serial Phase #:96 [PDB1] Files:1 Time: 1s Restart Phase #:95 [PDB$SEED] Files:1 Time: 0s ******* Upgrading ODM, WK, EXF, RUL, XOQ ******* Serial Phase #:96 [PDB$SEED] Files:1 Time: 20s Restart Phase #:97 [PDB1] Files:1 Time: 19s Restart Phase #:97 [PDB$SEED] Files:1 Time: 0s *********** Final Component scripts *********** Serial Phase #:98 [PDB1] Files:1 Time: 0s *********** Final Component scripts *********** Serial Phase #:98 [PDB$SEED] Files:1 Time: 2s ************* Final Upgrade scripts ************ Serial Phase #:99 [PDB1] Files:1 Time: 2s ************* Final Upgrade scripts ************ Serial Phase #:99 [PDB$SEED] Files:1 Time: 99s ******************* Migration ****************** Serial Phase #:100 [PDB$SEED] Files:1 Time: 1s *** End PDB Application Upgrade Pre-Shutdown *** Serial Phase #:101 [PDB$SEED] Files:1 Time: 1s Serial Phase #:102 [PDB$SEED] Files:1 Time: 3s Serial Phase #:103 [PDB$SEED] Files:1 Time: 105s ******************* Migration ****************** Serial Phase #:100 [PDB1] Files:1 Time: 1s *** End PDB Application Upgrade Pre-Shutdown *** Serial Phase #:101 [PDB1] Files:1 Time: 1s Serial Phase #:102 [PDB1] Files:1 Time: 3s Serial Phase #:103 [PDB1] Files:1 Time: 28s ***************** Post Upgrade ***************** Serial Phase #:104 [PDB$SEED] Files:1 Time: 36s ***************** Post Upgrade ***************** Serial Phase #:104 [PDB1] Files:1 Time: 5s **************** Summary report **************** Serial Phase #:105 [PDB1] Files:1 Time: 1s *** End PDB Application Upgrade Post-Shutdown ** Serial Phase #:106 [PDB1] Files:1 Time: 1s Serial Phase #:107 [PDB1] Files:1 Time: 1s Serial Phase #:108 [PDB1] Files:1 Time: 0s ------------------------------------------------------ Phases [0-108] End Time:[2019_01_19 12:57:32] Container Lists Inclusion:[PDB1] Exclusion:[NONE] ------------------------------------------------------ Grand Total Time: 2518s [PDB1] LOG FILES: (/u01/app/oracle/product/18.0.0/dbhome_1/cfgtoollogs/cdb1/upgrade20190119114542/catupgrdpdb1*.log) Upgrade Summary Report Located in: /u01/app/oracle/product/18.0.0/dbhome_1/cfgtoollogs/cdb1/upgrade20190119114542/upg_summary.log Total Upgrade Time: [0d:0h:41m:58s] Time: 355s **************** Summary report **************** Serial Phase #:105 [PDB$SEED] Files:1 Time: 1s *** End PDB Application Upgrade Post-Shutdown ** Serial Phase #:106 [PDB$SEED] Files:1 Time: 1s Serial Phase #:107 [PDB$SEED] Files:1 Time: 4s Serial Phase #:108 [PDB$SEED] Files:1 Time: 0s ------------------------------------------------------ Phases [0-108] End Time:[2019_01_19 13:03:11] Container Lists Inclusion:[PDB$SEED] Exclusion:[NONE] ------------------------------------------------------ Grand Total Time: 2857s [PDB$SEED] LOG FILES: (/u01/app/oracle/product/18.0.0/dbhome_1/cfgtoollogs/cdb1/upgrade20190119114542/catupgrdpdb_seed*.log) Upgrade Summary Report Located in: /u01/app/oracle/product/18.0.0/dbhome_1/cfgtoollogs/cdb1/upgrade20190119114542/upg_summary.log Total Upgrade Time: [0d:0h:47m:37s] Time: 1790s For CDB$ROOT Time: 2867s For PDB(s) Grand Total Time: 4657s LOG FILES: (/u01/app/oracle/product/18.0.0/dbhome_1/cfgtoollogs/cdb1/upgrade20190119114542/catupgrd*.log) Upgrade Summary Report Located in: /u01/app/oracle/product/18.0.0/dbhome_1/cfgtoollogs/cdb1/upgrade20190119114542/upg_summary.log Grand Total Upgrade Time: [0d:1h:17m:37s] $
Check out the "upg_summary.log" file, and if anything looks wrong, check out the associated "catupgrd*.log" file. At this point I do a shutdown and startup to make sure everything is running in the correct mode. Also make sure the user-defined PDBs are open before doing the post upgrade steps.
sqlplus / as sysdba <<EOF shutdown immediate; startup; column name format A30 select name, open_mode from v\$pdbs; exit; EOF
Perform Post-Upgrade Actions
The output from the "preupgrade.jar" lists a number of post-upgrade recommendations. Some must be manually applied. Others are incorporated into the "postupgrade_fixups.sql" script. In the following example we will only run the "postupgrade_fixups.sql" script. Remember, in a multitenant database we must run the post-upgrade actions on the root, seed and all user-defined pluggable databases.
$ORACLE_HOME/perl/bin/perl \ -I$ORACLE_HOME/perl/lib \ -I$ORACLE_HOME/rdbms/admin \ $ORACLE_HOME/rdbms/admin/catcon.pl \ -l /u01/app/oracle/cfgtoollogs/${ORACLE_SID}/preupgrade/ \ -b postup_cdb1 \ /u01/app/oracle/cfgtoollogs/${ORACLE_SID}/preupgrade/postupgrade_fixups.sql
Assuming you didn't hit any problems along the way, your database is upgraded and ready to go now.
Final Steps
Edit the "/etc/oratab" file, correcting the Oracle home path.
From: cdb1:/u01/app/oracle/product/12.2.0.1/db_1:Y To: cdb1:/u01/app/oracle/product/18.0.0/dbhome_1:Y
You need to consider what you are going to do with the COMPATIBLE
parameter. I prefer to reset it as soon as possible.
sqlplus / as sysdba <<EOF alter system set compatible='18.0.0' scope=spfile; shutdown immediate; startup; EXIT; EOF
If local undo is not enabled, you need to enable it. You can read more about local undo here.
sqlplus / as sysdba <<EOF shutdown immediate; startup upgrade; alter database local undo on; shutdown immediate; startup; EXIT; EOF
If you are using APEX or ORDS, you probably want to validate them (validate APEX, validate ORDS).
For more information see:
- Oracle Database Upgrade Guide 18c
- Master Note For Oracle Database Upgrades and Migrations [ID 1152016.1]
- Different Upgrade Methods For Upgrading Your Database [ID 419550.1]
- Upgrading to Oracle Database 18c (Non-CDB)
- Multitenant : Upgrade a PDB using Unplug/Plugin
- Multitenant : PDB Upgrades Using Priority Lists, Inclusion Lists and Exclusion Lists in Oracle Database 12c Release 2 (12.2)
- Upgrading to Oracle Database 12c
- Multitenant : All Articles
- Upgrade the Database Time Zone File Using the DBMS_DST Package
Hope this helps. Regards Tim...