11g to 19c upgrade
11g to 19c upgrade
to 19c.
Prerequisities
Make sure you have all the OS prerequisites in place by running the 19c preinstall
package. On Oracle Linux you can do this by installing the preinstall package. It
probably makes sense to update the remaining packages also.
export ORACLE_HOME=$ORACLE_BASE/product/19.0.0/dbhome_1
export SOFTWARE_DIR=/u01/software
export ORA_INVENTORY=/u01/app/oraInventory
mkdir -p ${ORACLE_HOME}
cd $ORACLE_HOME
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
export ORACLE_HOME=$ORACLE_BASE/product/19.0.0/dbhome_1
cd $ORACLE_HOME/rdbms/admin
unzip -o /u01/software/preupgrade_19_cbuild_??_lf.zip
Make sure you are using the original Oracle home and run the "preupgrade.jar".
export ORACLE_SID=db11g
export ORAENV_ASK=NO
. oraenv
export ORAENV_ASK=YES
export ORACLE_HOME=$ORACLE_BASE/product/11.2.0.4/db_1
$ORACLE_BASE/product/19.0.0/dbhome_1/jdk/bin/java -jar
$ORACLE_BASE/product/19.0.0/dbhome_1/rdbms/admin/preupgrade.jar TERMINAL TEXT
$ $ORACLE_BASE/product/19.0.0/dbhome_1/jdk/bin/java -jar
$ORACLE_BASE/product/19.0.0/dbhome_1/rdbms/admin/preupgrade.jar TERMINAL TEXT
Report generated by Oracle Database Pre-Upgrade Information Tool Version
19.0.0.0.0 Build: 1 on 2019-02-27T18:57:23
=======================================
Status of the database prior to upgrade
=======================================
Database Name: DB11G
Container Name: Not Applicable in Pre-12.1 database
Container ID: Not Applicable in Pre-12.1 database
Version: 11.2.0.4.0
DB Patch Level: No Patch Bundle applied
Compatible: 11.2.0.4.0
Blocksize: 8192
Platform: Linux x86 64-bit
Timezone File: 14
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
Oracle Workspace Manager [to be upgraded] VALID
OLAP Analytic Workspace [to be upgraded] VALID
Oracle Enterprise Manager Repository [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
Expression Filter [to be upgraded] VALID
Rule Manager [to be upgraded] VALID
Oracle OLAP API [to be upgraded] VALID
==============
BEFORE UPGRADE
==============
REQUIRED ACTIONS
================
None
RECOMMENDED ACTIONS
===================
1. Update NUMERIC INITIALIZATION PARAMETERS to meet estimated minimums.
This action may be done now or when starting the database in upgrade mode
using the 19 ORACLE HOME.
Without the set echo and serveroutput commands, you will not be able to
follow the progress of the script.
Starting with Oracle Database 12c, the local Enterprise Manager Database
Control does not exist anymore. The repository will be removed from your
database during the upgrade. This step can be manually performed before
the upgrade to reduce downtime.
Starting with Oracle Database 12c, the OLAP Catalog (OLAP AMD) is
desupported and will be automatically marked as OPTION OFF during the
database upgrade if present. Oracle recommends removing OLAP Catalog
(OLAP AMD) before database upgrade. This step can be manually performed
before the upgrade to reduce downtime.
EXECUTE DBMS_STATS.GATHER_DICTIONARY_STATS;
There is one or more database triggers whose owner does not have the
right privilege on the database.
INFORMATION ONLY
================
8. 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 490 MB 738 MB
SYSTEM 740 MB 1175 MB
TEMP 29 MB 150 MB
UNDOTBS1 70 MB 446 MB
Starting with Oracle Database release 12.1, the Expression Filter (EXF)
and Database Rules Manager (RUL) features are desupported, and are
removed during the upgrade process. This step can be manually performed
before the upgrade to reduce downtime.
10. Check the Oracle Backup and Recovery User's Guide for information on how
to manage an RMAN recovery catalog schema.
If you are using a version of the recovery catalog schema that is older
than that required by the RMAN client version, then you must upgrade the
catalog schema.
It is good practice to have the catalog schema the same or higher version
than the RMAN client version you are using.
SQL>@/u01/app/oracle/cfgtoollogs/db11g/preupgrade/preupgrade_fixups.sql
=============
AFTER UPGRADE
=============
REQUIRED ACTIONS
================
None
RECOMMENDED ACTIONS
===================
11. Upgrade the database time zone file using the DBMS_DST package.
The database is using time zone file version 14 and the target 19 release
ships with time zone file version 32.
12. To identify directory objects with symbolic links in the path name, run
$ORACLE_HOME/rdbms/admin/utldirsymlink.sql AS SYSDBA after upgrade.
Recreate any directory objects listed, using path names that contain no
symbolic links.
Some directory object path names may currently contain symbolic links.
13. (AUTOFIXUP) Gather dictionary statistics after the upgrade using the
command:
EXECUTE DBMS_STATS.GATHER_DICTIONARY_STATS;
14. 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;
INFORMATION ONLY
================
15. Check the Oracle documentation for the identified components for their
specific upgrade procedure.
The database upgrade script will not upgrade the following Oracle
components: OLAP Catalog,OWB
The Oracle database upgrade script upgrades most, but not all Oracle
Database components that may be installed. Some components that are not
upgraded may have their own upgrade scripts, or they may be deprecated or
obsolete.
SQL>@/u01/app/oracle/cfgtoollogs/db11g/preupgrade/postupgrade_fixups.sql
==================
PREUPGRADE SUMMARY
==================
/u01/app/oracle/cfgtoollogs/db11g/preupgrade/preupgrade.log
/u01/app/oracle/cfgtoollogs/db11g/preupgrade/preupgrade_fixups.sql
/u01/app/oracle/cfgtoollogs/db11g/preupgrade/postupgrade_fixups.sql
Before upgrade:
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/19.0.0/dbhome_1/network/admin
cp $ORACLE_HOME/dbs/orapwdb11g $ORACLE_BASE/product/19.0.0/dbhome_1/dbs/
cp $ORACLE_HOME/dbs/spfiledb11g.ora $ORACLE_BASE/product/19.0.0/dbhome_1/dbs/
Switch to the 19c listener.
lsnrctl stop
export ORACLE_HOME=$ORACLE_BASE/product/19.0.0/dbhome_1
export PATH=${ORACLE_HOME}/bin:$PATH
lsnrctl start
Start the database using the 19c Oracle home, ready for the upgrade.
You can run the upgrade using either of the following commands. The second is actually
just a shorthand for the former.
# Shorthand command.
$ORACLE_HOME/bin/dbupgrade
$ $ORACLE_HOME/bin/dbupgrade
/u01/app/oracle/product/19.0.0/dbhome_1/rdbms/admin/orahome =
[/u01/app/oracle/product/19.0.0/dbhome_1]
/u01/app/oracle/product/19.0.0/dbhome_1/bin/orabasehome =
[/u01/app/oracle/product/19.0.0/dbhome_1]
catctlGetOraBaseLogDir = [/u01/app/oracle/product/19.0.0/dbhome_1]
Number of Cpus = 2
Database Name = db11g
DataBase Version = 11.2.0.4.0
catcon::set_log_file_base_path: ALL catcon-related output will be written to
[/u01/app/oracle/product/19.0.0/dbhome_1/cfgtoollogs/db11g/upgrade20190227131213/
catupgrd_catcon_32060.lst]
Components in [db11g]
Installed [APEX APS CATALOG CATJAVA CATPROC CONTEXT JAVAVM ORDIM OWM SDO XDB
XML XOQ]
Not Installed [DV EM MGW ODM OLS RAC WK]
Parallel SQL Process Count = 4
------------------------------------------------------
Phases [0-107] Start Time:[2019_02_27 19:12:15]
------------------------------------------------------
*********** Executing Change Scripts ***********
Serial Phase #:0 [db11g] Files:1 Time: 130s
*************** Catalog Core SQL ***************
Serial Phase #:1 [db11g] Files:5 Time: 62s
Restart Phase #:2 [db11g] Files:1 Time: 0s
*********** Catalog Tables and Views ***********
Parallel Phase #:3 [db11g] Files:19 Time: 20s
Restart Phase #:4 [db11g] Files:1 Time: 0s
************* Catalog Final Scripts ************
Serial Phase #:5 [db11g] Files:7 Time: 21s
***************** Catproc Start ****************
Serial Phase #:6 [db11g] Files:1 Time: 18s
***************** Catproc Types ****************
Serial Phase #:7 [db11g] Files:2 Time: 11s
Restart Phase #:8 [db11g] Files:1 Time: 1s
**************** Catproc Tables ****************
Parallel Phase #:9 [db11g] Files:67 Time: 29s
Restart Phase #:10 [db11g] Files:1 Time: 0s
************* Catproc Package Specs ************
Serial Phase #:11 [db11g] Files:1 Time: 83s
Restart Phase #:12 [db11g] Files:1 Time: 2s
************** Catproc Procedures **************
Parallel Phase #:13 [db11g] Files:94 Time: 12s
Restart Phase #:14 [db11g] Files:1 Time: 0s
Parallel Phase #:15 [db11g] Files:120 Time: 25s
Restart Phase #:16 [db11g] Files:1 Time: 0s
Serial Phase #:17 [db11g] Files:22 Time: 3s
Restart Phase #:18 [db11g] Files:1 Time: 0s
***************** Catproc Views ****************
Parallel Phase #:19 [db11g] Files:32 Time: 21s
Restart Phase #:20 [db11g] Files:1 Time: 1s
Serial Phase #:21 [db11g] Files:3 Time: 12s
Restart Phase #:22 [db11g] Files:1 Time: 0s
Parallel Phase #:23 [db11g] Files:25 Time: 132s
Restart Phase #:24 [db11g] Files:1 Time: 0s
Parallel Phase #:25 [db11g] Files:12 Time: 78s
Restart Phase #:26 [db11g] Files:1 Time: 0s
Serial Phase #:27 [db11g] Files:1 Time: 0s
Serial Phase #:28 [db11g] Files:3 Time: 4s
Serial Phase #:29 [db11g] Files:1 Time: 0s
Restart Phase #:30 [db11g] Files:1 Time: 0s
*************** Catproc CDB Views **************
Serial Phase #:31 [db11g] Files:1 Time: 1s
Restart Phase #:32 [db11g] Files:1 Time: 0s
Serial Phase #:34 [db11g] Files:1 Time: 0s
***************** Catproc PLBs *****************
Serial Phase #:35 [db11g] Files:293 Time: 25s
Serial Phase #:36 [db11g] Files:1 Time: 0s
Restart Phase #:37 [db11g] Files:1 Time: 0s
Serial Phase #:38 [db11g] Files:6 Time: 5s
Restart Phase #:39 [db11g] Files:1 Time: 1s
*************** Catproc DataPump ***************
Serial Phase #:40 [db11g] Files:3 Time: 55s
Restart Phase #:41 [db11g] Files:1 Time: 0s
****************** Catproc SQL *****************
Parallel Phase #:42 [db11g] Files:13 Time: 83s
Restart Phase #:43 [db11g] Files:1 Time: 1s
Parallel Phase #:44 [db11g] Files:11 Time: 8s
Restart Phase #:45 [db11g] Files:1 Time: 1s
Parallel Phase #:46 [db11g] Files:3 Time: 1s
Restart Phase #:47 [db11g] Files:1 Time: 0s
************* Final Catproc scripts ************
Serial Phase #:48 [db11g] Files:1 Time: 9s
Restart Phase #:49 [db11g] Files:1 Time: 0s
************** Final RDBMS scripts *************
Serial Phase #:50 [db11g] Files:1 Time: 24s
************ Upgrade Component Start ***********
Serial Phase #:51 [db11g] Files:1 Time: 0s
Restart Phase #:52 [db11g] Files:1 Time: 0s
********** Upgrading Java and non-Java *********
Serial Phase #:53 [db11g] Files:2 Time: 521s
***************** Upgrading XDB ****************
Restart Phase #:54 [db11g] Files:1 Time: 0s
Serial Phase #:56 [db11g] Files:3 Time: 32s
Serial Phase #:57 [db11g] Files:3 Time: 3s
Parallel Phase #:58 [db11g] Files:10 Time: 1s
Parallel Phase #:59 [db11g] Files:25 Time: 4s
Serial Phase #:60 [db11g] Files:4 Time: 7s
Serial Phase #:61 [db11g] Files:1 Time: 0s
Serial Phase #:62 [db11g] Files:32 Time: 3s
Serial Phase #:63 [db11g] Files:1 Time: 0s
Parallel Phase #:64 [db11g] Files:6 Time: 5s
Serial Phase #:65 [db11g] Files:2 Time: 29s
Serial Phase #:66 [db11g] Files:3 Time: 84s
**************** Upgrading ORDIM ***************
Restart Phase #:67 [db11g] Files:1 Time: 0s
Serial Phase #:69 [db11g] Files:1 Time: 1s
Parallel Phase #:70 [db11g] Files:2 Time: 42s
Restart Phase #:71 [db11g] Files:1 Time: 0s
Parallel Phase #:72 [db11g] Files:2 Time: 1s
Serial Phase #:73 [db11g] Files:2 Time: 1s
***************** Upgrading SDO ****************
Restart Phase #:74 [db11g] Files:1 Time: 0s
Serial Phase #:76 [db11g] Files:1 Time: 69s
Serial Phase #:77 [db11g] Files:2 Time: 2s
Restart Phase #:78 [db11g] Files:1 Time: 0s
Serial Phase #:79 [db11g] Files:1 Time: 20s
Restart Phase #:80 [db11g] Files:1 Time: 0s
Parallel Phase #:81 [db11g] Files:3 Time: 80s
Restart Phase #:82 [db11g] Files:1 Time: 1s
Serial Phase #:83 [db11g] Files:1 Time: 5s
Restart Phase #:84 [db11g] Files:1 Time: 0s
Serial Phase #:85 [db11g] Files:1 Time: 10s
Restart Phase #:86 [db11g] Files:1 Time: 0s
Parallel Phase #:87 [db11g] Files:4 Time: 99s
Restart Phase #:88 [db11g] Files:1 Time: 0s
Serial Phase #:89 [db11g] Files:1 Time: 0s
Restart Phase #:90 [db11g] Files:1 Time: 0s
Serial Phase #:91 [db11g] Files:2 Time: 8s
Restart Phase #:92 [db11g] Files:1 Time: 1s
Serial Phase #:93 [db11g] Files:1 Time: 0s
Restart Phase #:94 [db11g] Files:1 Time: 0s
******* Upgrading ODM, WK, EXF, RUL, XOQ *******
Serial Phase #:95 [db11g] Files:1 Time: 37s
Restart Phase #:96 [db11g] Files:1 Time: 0s
*********** Final Component scripts ***********
Serial Phase #:97 [db11g] Files:1 Time: 1s
************* Final Upgrade scripts ************
Serial Phase #:98 [db11g] Files:1 Time: 26s
******************* Migration ******************
Serial Phase #:99 [db11g] Files:1 Time: 68s
*** End PDB Application Upgrade Pre-Shutdown ***
Serial Phase #:100 [db11g] Files:1 Time: 0s
Serial Phase #:101 [db11g] Files:1 Time: 0s
Serial Phase #:102 [db11g] Files:1 Time: 140s
***************** Post Upgrade *****************
Serial Phase #:103 [db11g] Files:1 Time: 45s
**************** Summary report ****************
Serial Phase #:104 [db11g] Files:1 Time: 1s
*** End PDB Application Upgrade Post-Shutdown **
Serial Phase #:105 [db11g] Files:1 Time: 0s
Serial Phase #:106 [db11g] Files:1 Time: 0s
Serial Phase #:107 [db11g] Files:1 Time: 75s
------------------------------------------------------
Phases [0-107] End Time:[2019_02_27 19:50:36]
------------------------------------------------------
The database is shutdown at the end of the upgrade process, so you need to start it
before moving on to the post-upgrade actions.
SHUTDOWN IMMEDIATE;
STARTUP UPGRADE;
DBMS_OUTPUT.put_line('l_tz_version=' || l_tz_version);
DBMS_DST.begin_upgrade(l_tz_version);
END;
/
SHUTDOWN IMMEDIATE;
STARTUP;
-- Do the upgrade.
SET SERVEROUTPUT ON
DECLARE
l_failures PLS_INTEGER;
BEGIN
DBMS_DST.upgrade_database(l_failures);
DBMS_OUTPUT.put_line('DBMS_DST.upgrade_database : l_failures=' || l_failures);
DBMS_DST.end_upgrade(l_failures);
DBMS_OUTPUT.put_line('DBMS_DST.end_upgrade : l_failures=' || l_failures);
END;
/
exit;
EOF
# 12) Ignored
# 13) AUTOFIXUP
# AUTOFIXUP
sqlplus / as sysdba <<EOF
@/u01/app/oracle/cfgtoollogs/db11g/preupgrade/postupgrade_fixups.sql
exit;
EOF