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 [12.1.0.2.0]
+ASM:/oracle/product/grid/bin:crsctl query has softwareversion
Oracle High Availability Services version on the local node is [12.1.0.2.0]

Run Cluvfy to check further the system set up.

./runcluvfy.sh 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/12.2.0.1/grid
cp V840012-01_12.2_GI_Linux64x.zip /oracle/product/12.2.0.1/grid
unzip V840012-01_12.2_GI_Linux64x.zip

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
./gridSetup.sh

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.

ASM

ASM.png

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

ASM

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.

ASM.png

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

ASM

View summary page and progress…

ASM

ASM.png

Run the root scripts.

.ASM

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

ASM

Post upgrade, check the GI version.

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

Post upgrade verification.

+ASM:/oracle/product/12.2.0.1/grid:>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/12.2.0.1/grid/
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.

ASM

Install database software.

db1

Single instance database installation.

db2

Select Enterprise edition.

db3

Provide the Oracle software and oracle base location.

db4

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

db5

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

db7

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
12.2.0.1.0

Upgrade-To version: 12.2.0.1.0

=======================================
Status of the database prior to upgrade
=======================================

Database Name: CSTST
 Container Name: CDB$ROOT
 Container ID: 1
 Version: 12.1.0.2.0
 Compatible: 12.1.0.2.0
 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:
 /oracle/cfgtoollogs/DB_NAME/preupgrade/preupgrade_fixups.sql
 /oracle/cfgtoollogs/DB_NAME/preupgrade/postupgrade_fixups.sql

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

Capture_LI

db_up

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”.

db_up3_LI

Second error is at PDB level and this is known bug 25717371. See my other post regarding “Upgrade to 12.2.0.1 Fails With ORA-00001:Unique Constraint”. Database upgrade to 12.2.0.1 of a 12.1.0.2 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.

db_up4_LI

Upgrade Summary as below.

db_up1

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

/oracle/cfgtoollogs/DB_NAME/preupgrade/postupgrade_fixups.sql

Related Post:

Upgrade to 12.2.0.1 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:

WordPress.com Logo

You are commenting using your WordPress.com 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