Oracle Restart Database Upgrade 12c to 19c using Autoupgrade.

Today we are going to see a step by step, how to upgrade an Oracle restart Database 12c to 19c.
1.  Software downloads
 JDK 8:
Oracle 19.3 Database and Grid Infrastructure:
Database Release Update 19.11: Patch 32545013
Grid Infrastructure Release Update 19.11 : Patch 32545008
OPatch : Patch 6880880
2. Prerequisites Grid Infrastructure
According to the Oracle Document 2539751.1, you must apply the patch to fix the bug 21255373 in the Grid home directory. Check if this patche applied in your environment:


opatch lsinventory |grep 21255373
If you have not installed it, the GI PSU patch 29176115 contains the fix for this bug.
3. Upgrade Grid Infrastructure to 19.11
Create a directory on Oracle Grid Infrastructure
mkdir -p /u01/app/grid/product/19.3.0/grid
Copy the 19c grid software to the folder and unzip it:
cd /u01/app/grid/product/19.3.0/grid

unzip -q /tmp/binaries/


3.1   Pre-requisites checks
According to Oracle document 1457357.1, the user that owns Grid needs to run the Orachk tool.
Make sure to download the latest version of Orachk from AHF , then run the following commands:
cd /u01/app/grid/product/19.3.0/grid/suptools/orachk

export GRID_HOME= /u01/app/grid/product/19.3.0/grid


export RAT_ORACLE_HOME=/u01/app/grid/12.1.0

export RAT_DB=

cd /u01/app/grid/product/19.3.0/grid/suptools/orachk

./orachk -u -o pre -profile clusterware,as

This process generates an HTML report as shown in the following image:
Make sure to review the report for all failed, critical, and warning checks and resolve them before you move to the next step.
3.3 Install GI RU 19.11
You need to apply the patch 32545008 in the 19c home directory of the Grid infrastructure.
cd /u01/app/grid/product/19.3.0/grid


./ -silent -applyRU /tmp/binaries/
Finally, it asks to run Do not run the script yet because you need to run it at the end of the Upgrade.


3.4  Validate Grid Infrastructure
Log in as the Grid OS owner user and run the cluster verification utility with the following commands:
cd /u01/app/grid/product/19.3.0/grid/


./ stage -pre hacfg -fixup -verbose

Verifying node application existence ...PASSED
Verifying check incorrectly sized ASM disks ...PASSED
Verifying ASM disk group free space ...PASSED
Verifying network configuration consistency checks ...PASSED
Verifying file system mount options for path GI_HOME ...PASSED
Verifying /boot mount ...PASSED
Verifying OLR Integrity ...PASSED
Verifying Verify that the ASM instance was configured using an existing ASM parameter file. ...PASSED
Verifying User Equivalence ...PASSED
Verifying RPM Package Manager database ...INFORMATION (PRVG-11250)
Verifying Network interface bonding status of private interconnect network interfaces ...PASSED
Verifying /dev/shm mounted as temporary file system ...PASSED
Verifying file system mount options for path /var ...PASSED
Verifying DefaultTasksMax parameter ...PASSED
Verifying zeroconf check ...PASSED
Verifying ASM filter driver configuration ...PASSED
Verifying Systemd login manager IPC parameter ...PASSED
Verifying Kernel retpoline support ...PASSED
3.5  Upgrade Oracle Grid Infrastructure
Before starting the Upgrade, run the following command to bring down the all database running and ensure that the grid services are running on the server. Make sure cluster upgrade status is normal:


cd /u01/app/grid/product/19.3.0/grid

./ -silent -ignorePrerequisites -responseFile /u01/app/grid/product/19.3.0/grid/install/response/duts_upgrade.rsp


Finally, it asks to run Do run the script to finish the Upgrade.
At this point, the process upgrades Grid to 19c, and all the cluster services are running.
crsctl query has softwareversion


4. Upgrade Oracle Database 12c to 19.11


4.1  Install Oracle 19.3


Create a directory on Oracle Database


mkdir -p /u01/app/oracle/product/19.3.0/dbhome_1


Copy the 19c Oracle Database software to the folder and unzip it:


cd /u01/app/oracle/product/19.3.0/dbhom_1    


unzip -q /tmp/binaries/
4.2  Apply Oracle Database RU – 19.11


You need to apply the patch 31281355 in the 19c home directory.  


cd /u01/app/oracle/product/19.3.0/dbhome_1


./runInstaller -silent -applyRU /tmp/binaries/ -responseFile /u01/app/oracle/product/19.3.0/oracle/install/response/duts_upgrade.rsp


Finally, it asks to run Do run the script to finish the Upgrade.


4.3  Upgrade from 12c to 19c using Autoupgrade


For the Upgrade we’ll use the autoupgrade utility.
Create a directory on Oracle Database


mkdir -p /u01/app/oracle/autoupgrade


Copy the autoupgrade.jar to the folder:


cd /u01/app/oracle/autoupgrade


cp /tmp/binaries/autoupgrade.jar .
Create a sample file to use in autoupgrade:


$ORACLE_HOME/jdk/bin/java -jar autoupgrade.jar autoupgrade.jar -create_sample_file config


mv sample_file.cfg 12c_19c.cfg

vi 12c_19c.cfg

#Global configurations
#Autoupgrade's global directory, non-job logs generated,
#temp files created and other autoupgrade files will be
#send here
# Database number 1
Run autoupgrade in analyze mode:


cd /u01/app/oracle/autoupgrade


$ORACLE_HOME/jdk/bin/java -jar autoupgrade.jar autoupgrade.jar -12c_19c.cfg -mode analyze
Note the log files which have been created for each database – as we have only run autoupgrade with the Analyze option, the only directory which is created is prechecks directory.


For each database which has been analyzed, we can review the HTML file which lists the pre-check warnings and recommendations.
Run autoupgrade in fixups mode:


cd /u01/app/oracle/autoupgrade


$ORACLE_HOME/jdk/bin/java -jar autoupgrade.jar autoupgrade.jar -12c_19c.cfg -mode fixups


Run autoupgrade in deploy mode:


cd /u01/app/oracle/autoupgrade


$ORACLE_HOME/jdk/bin/java -jar autoupgrade.jar autoupgrade.jar -12c_19c.cfg -mode deploy
After completing the migration review the HTML file that lists the items that have been updated update.


Change the compatible of Database
alter system set compatible =’’scope=spfile;
Check if the restore point is removed by autoupgrade tool.


I hope this helps you!!!


Stay tuned, following on twitter @aontalba and on Linkedin


André Ontalba


Disclaimer: “The postings on this site are my own and don’t necessarily represent my actual employer positions, strategies or opinions. The information here was edited to be useful for general purposes. Specific data and identifications were removed to allow reach generic audience and be useful.”