This post will go through the steps to upgrade single database instance from 12.1 to 12.2 with ASM on CDB environment. Both GI and Oracle database software’s are installed under one user as oracle.

GI Upgrade:

The current GI version is as…

+ASM:/oracle/product/grid/bin:crsctl query has releaseversion
Oracle High Availability Services release version on the local node is []
+ASM:/oracle/product/grid/bin:crsctl query has softwareversion
Oracle High Availability Services version on the local node is []

Run Cluvfy to check further the system set up.

./ stage -pre hacfg
Pre-check for Oracle Restart configuration was successful.
CVU operation performed:      stage -pre hacfg
Date:                         May 26, 2017 11:44:20 AM
CVU home:                     /oracle/product/grid12.2/
User:                         oracle

For successful result, now ready for GI upgrade. From 12.2 onwards, the GI is requires un-zipping software into a grid home. There won’t be any GI selection on the GUI. So create new directory for 12.2 GI and unzip the GI software.

mkdir /oracle/product/
cp /oracle/product/

Stop the Databases before GI upgrade and leave ASM running. ASM will be upgraded as part of GI upgrade. If you shut down the ASM then when you run the root scripts, you’ll see an error.

srvctl stop database –d db_name

Now kick off GI upgrade and follow the GUI options.

cd $GI_software_location

Select upgrade GI option.pic1

Make sure that database connected via ASM should be down. Click yes.pic1

If you want to register with EM then click here and provide the information.

ASMProvide OS groups for authentication into ASM. We used the same group but separate groups can be set up depends upon separation of the roles/duties. Installer will complain with one group but can be ignored and continue.



Select oracle base location but not GI home as described earlier. So path will be where you have extracted the software.


Root privileges can be run automatically if provided the root password or user with sudo privileges. Or can be run manually. I decided to run it manually.


Next step, do the prerequisite verification and if missing anything will complain. Swap need to be adjusted and 8G of physical memory minimum.


View summary page and progress…



Run the root scripts.


Root Script summary.ASM_LI

If root script fail at some point, you can fix the problem and re-run the root scripts. I re-ran the scripts after complaining about missing Listener.ora file under ASM home. Once root scripts completed, press okay and then installer will complete the upgrade.ASM


Post upgrade, check the GI version.

+ASM:/oracle/product/>crsctl query has releaseversion
Oracle High Availability Services release version on the local node is []
+ASM:/oracle/product/>crsctl query has softwareversion
Oracle High Availability Services version on the local node is []

Post upgrade verification.

+ASM:/oracle/product/>cluvfy stage -post hacfg

Verifying Oracle Restart Integrity ...PASSED
Verifying OLR Integrity ...PASSED

Post-check for Oracle Restart configuration was successful.

CVU operation performed: stage -post hacfg
Date: Jul 26, 2017 2:32:10 PM
CVU home: /oracle/product/
User: oracle

Database Software Set up:

Next step is to upgrade database from 12.1 to 12.2. Database upgrade is out-of-place and install database software as below.

Unzip Software and run the installer. Select the following options.


Install database software.


Single instance database installation.


Select Enterprise edition.


Provide the Oracle software and oracle base location.


Provide OS groups and in our case, we used same groups.


Check pre-requisite and summary page. Run the root scripts at the end.


Database Upgrade:

Once the DB software is installed, the next step is to upgrade the database. Database version 12.2 provide a new pre-upgrade checkup tool which comes in the form of a jar file. Run below script to see pre and post upgrade script. Run the pre-upgrade script or fix the problems manually.

$ORACLE_HOME/rdbms/admin/java -jar preupgrade.jar TERMINAL
Report generated by Oracle Database Pre-Upgrade Information Tool Version

Upgrade-To version:

Status of the database prior to upgrade

Database Name: CSTST
 Container Name: CDB$ROOT
 Container ID: 1
 Blocksize: 8192
 Platform: Linux x86 64-bit
 Timezone File: 18
 Database log mode: ARCHIVELOG
 Readonly: FALSE
 Edition: EE

Oracle Component Upgrade Action Current Status
 ---------------- -------------- --------------
 Oracle Server [to be upgraded] VALID
 Oracle Workspace Manager [to be upgraded] VALID
 Oracle XML Database [to be upgraded] VALID

Preupgrade generated files:

To upgrade database please run DBUA from 12.2 home.  Select the database for upgrade and check prerequisite.



Now select options like parallel upgrade, re-compile invalid objects etc.. See screen Shot.Capture

Click next and next screen is for database backup. I selected my own backup option and no additional listener required in next step. Review upgrade summary page and watch out for  progress page.

I got stuck with first error at CDB level. The problem related to OWM componment. One view created with an errors.I skipped the view since OWM is not used in your environment. Clicked on re-try after skipping the view in script “owmcvws.plb”.


Second error is at PDB level and this is known bug 25717371. See my other post regarding “Upgrade to Fails With ORA-00001:Unique Constraint”. Database upgrade to of a cloned database will generate the “ORA-00001:Unique Constraint” error. “ORA-00001” occurred when updates the sys.I_DAM_LAST_ARCH_TS$ table at PDB level.

Truncate/delete the data from base table as work around.


Upgrade Summary as below.


Once the database upgrade complete, run the post upgrade script. Also verify the timezone file.


Related Post:

Upgrade to Fails With ORA-00001:Unique Constraint (SYS.I_DAM_LAST_ARCH_TS$)

Oracle Datapump jobs failure : ORA-56935 for existing datapump jobs

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s