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.
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 [18.104.22.168.0] +ASM:/oracle/product/grid/bin:crsctl query has softwareversion Oracle High Availability Services version on the local node is [22.214.171.124.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/126.96.36.199/grid cp V840012-01_12.2_GI_Linux64x.zip /oracle/product/188.8.131.52/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.
Make sure that database connected via ASM should be down. Click yes.
If you want to register with EM then click here and provide the information.
Provide 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.
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.
Post upgrade, check the GI version.
+ASM:/oracle/product/184.108.40.206/grid:>crsctl query has releaseversion Oracle High Availability Services release version on the local node is [220.127.116.11.0] +ASM:/oracle/product/18.104.22.168/grid:>crsctl query has softwareversion Oracle High Availability Services version on the local node is [22.214.171.124.0]
Post upgrade verification.
+ASM:/oracle/product/126.96.36.199/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/188.8.131.52/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.
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.
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 184.108.40.206.0 Upgrade-To version: 220.127.116.11.0 ======================================= Status of the database prior to upgrade ======================================= Database Name: CSTST Container Name: CDB$ROOT Container ID: 1 Version: 18.104.22.168.0 Compatible: 22.214.171.124.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.
Now select options like parallel upgrade, re-compile invalid objects etc.. See screen Shot.
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 126.96.36.199 Fails With ORA-00001:Unique Constraint”. Database upgrade to 188.8.131.52 of a 184.108.40.206 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.