Overview
From 12.2 we have to create an OPatchauto wallet as follows:
Wallet Creation
The Creation of the wallet should be done from the GRID User, in my case: Oracle
[root@lparaca bin]# su - oracle Last login: Mon Jan 29 20:10:55 EST 2018 on pts/0 [oracle@lparaca ~]$ . oraenv ORACLE_SID = [oracle] ? +ASM1 The Oracle base has been set to /u01/app/oracle/product [oracle@lparaca ~]$ cd $ORACLE_HOME/OPatch/auto/core/bin [oracle@lparaca bin]$ ./patchingWallet.sh -walletDir /home/oracle/grid/wallet -create oracle:lparaca:ssh oracle:lparacb:ssh root:lparaca:ssh root:lparacb:ssh -log /ho me/oracle/grid/wallet.log Session log file is /home/oracle/grid/wallet.log Enter Password for oracle:lparaca:ssh: Confirm Password for oracle:lparaca:ssh: Passwords do not match. Enter Password for oracle:lparaca:ssh: Confirm Password for oracle:lparaca:ssh: Enter Password for oracle:lparacb:ssh: Confirm Password for oracle:lparacb:ssh: Enter Password for root:lparaca:ssh: Confirm Password for root:lparaca:ssh: Alias "root:lparaca:ssh" already exists (skipping) Enter Password for root:lparacb:ssh: Confirm Password for root:lparacb:ssh: Alias "root:lparacb:ssh" already exists (skipping)
Check the locations
[oracle@lparaca bin]$ cd /home/oracle/ .bash_history .bash_profile create_service .kshrc .oracle_jre_usage/ .ssh/ .Xauthority .bash_logout .bashrc grid/ .oracle/ spfile.295.966177149 .vnc/ [oracle@lparaca bin]$ cd /home/oracle/grid/ [oracle@lparaca grid]$ ls -lart total 1103108 drwxr-xr-x 8 oracle oinstall 159 Jan 10 23:10 27100009 drwx------. 7 oracle oinstall 242 Jan 23 16:05 .. -rw-r--r-- 1 oracle oinstall 1129576094 Jan 26 15:51 p27100009_122010_Linux-x86-64.zip drwxr-xr-x 2 oracle oinstall 48 Jan 29 20:14 wallet -rw-r--r-- 1 oracle oinstall 509 Jan 29 20:14 wallet.log drwxr-xr-x 4 oracle oinstall 95 Jan 29 20:14 . [oracle@lparaca grid]$ cd wallet [oracle@lparaca wallet]$ ls -lart total 4 -rw-r--r-- 1 oracle oinstall 0 Jan 29 20:14 cwallet.sso.lck drwxr-xr-x 2 oracle oinstall 48 Jan 29 20:14 . -rw------- 1 oracle oinstall 3053 Jan 29 20:14 cwallet.sso drwxr-xr-x 4 oracle oinstall 95 Jan 29 20:14 .. [oracle@lparaca wallet]$ cd ..
Run Analysis
The same as before, run the analysis to check for applicability of this patch. Be sure to have the correct OPatch on both: GRID HOME and RAC DB Home.
[root@lparaca grid_12201]# su - oracle Last login: Mon Jan 29 20:20:21 EST 2018 [oracle@lparaca ~]$ . oraenv ORACLE_SID = [oracle] ? +ASM1 The Oracle base has been set to /u01/app/oracle/product [oracle@lparaca ~]$ cd $ORACLE_HOME [oracle@lparaca grid_12201]$ cd OPatch [oracle@lparaca OPatch]$ ls -lart OPatch failed with error code 14 [oracle@lparaca OPatch]$ ./opatch version OPatch Version: 12.2.0.1.11 OPatch succeeded. [oracle@lparaca OPatch]$
Analyze Applicability
[root@lparaca OPatch]# /u01/app/oracle/grid_12201/OPatch/opatchauto apply /home/oracle/grid/27100009/ -analyze OPatchauto session is initiated at Mon Jan 29 21:09:45 2018 System initialization log file is /u01/app/oracle/grid_12201/cfgtoollogs/opatchautodb/systemconfig2018-01-29_09-09-46PM.log. Session log file is /u01/app/oracle/grid_12201/cfgtoollogs/opatchauto/opatchauto2018-01-29_09-10-02PM.log The id for this session is VTDN Executing OPatch prereq operations to verify patch applicability on home /u01/app/oracle/grid_12201 Executing OPatch prereq operations to verify patch applicability on home /u01/app/oracle/product/12.2.0.1 Patch applicability verified successfully on home /u01/app/oracle/grid_12201 Patch applicability verified successfully on home /u01/app/oracle/product/12.2.0.1 Verifying SQL patch applicability on home /u01/app/oracle/product/12.2.0.1 SQL patch applicability verified successfully on home /u01/app/oracle/product/12.2.0.1 OPatchAuto successful. --------------------------------Summary-------------------------------- Analysis for applying patches has completed successfully: Host:lparaca CRS Home:/u01/app/oracle/grid_12201 ==Following patches were SUCCESSFULLY analyzed to be applied: Patch: /home/oracle/grid/27100009/27335416 Log: /u01/app/oracle/grid_12201/cfgtoollogs/opatchauto/core/opatch/opatch2018-01-29_21-10-08PM_1.log Patch: /home/oracle/grid/27100009/27128906 Log: /u01/app/oracle/grid_12201/cfgtoollogs/opatchauto/core/opatch/opatch2018-01-29_21-10-08PM_1.log Patch: /home/oracle/grid/27100009/26839277 Log: /u01/app/oracle/grid_12201/cfgtoollogs/opatchauto/core/opatch/opatch2018-01-29_21-10-08PM_1.log Patch: /home/oracle/grid/27100009/27144050 Log: /u01/app/oracle/grid_12201/cfgtoollogs/opatchauto/core/opatch/opatch2018-01-29_21-10-08PM_1.log Patch: /home/oracle/grid/27100009/27105253 Log: /u01/app/oracle/grid_12201/cfgtoollogs/opatchauto/core/opatch/opatch2018-01-29_21-10-08PM_1.log Host:lparaca RAC Home:/u01/app/oracle/product/12.2.0.1 ==Following patches were SKIPPED: Patch: /home/oracle/grid/27100009/27128906 Reason: This patch is not applicable to this specified target type - "rac_database" Patch: /home/oracle/grid/27100009/26839277 Reason: This patch is not applicable to this specified target type - "rac_database" Patch: /home/oracle/grid/27100009/27144050 Reason: This patch is not applicable to this specified target type - "rac_database" ==Following patches were SUCCESSFULLY analyzed to be applied: Patch: /home/oracle/grid/27100009/27335416 Log: /u01/app/oracle/product/12.2.0.1/cfgtoollogs/opatchauto/core/opatch/opatch2018-01-29_21-10-08PM_1.log Patch: /home/oracle/grid/27100009/27105253 Log: /u01/app/oracle/product/12.2.0.1/cfgtoollogs/opatchauto/core/opatch/opatch2018-01-29_21-10-08PM_1.log OPatchauto session completed at Mon Jan 29 21:15:47 2018 Time taken to complete the session 6 minutes, 2 seconds [root@lparaca OPatch]#
Patch
[root@lparaca OPatch]# /u01/app/oracle/grid_12201/OPatch/opatchauto apply /home/oracle/grid/27100009/ OPatchauto session is initiated at Mon Jan 29 21:24:42 2018 System initialization log file is /u01/app/oracle/grid_12201/cfgtoollogs/opatchautodb/systemconfig2018-01-29_09-24-44PM.log. Session log file is /u01/app/oracle/grid_12201/cfgtoollogs/opatchauto/opatchauto2018-01-29_09-25-04PM.log The id for this session is WRZE Executing OPatch prereq operations to verify patch applicability on home /u01/app/oracle/grid_12201 Executing OPatch prereq operations to verify patch applicability on home /u01/app/oracle/product/12.2.0.1 Patch applicability verified successfully on home /u01/app/oracle/grid_12201 Patch applicability verified successfully on home /u01/app/oracle/product/12.2.0.1 Verifying SQL patch applicability on home /u01/app/oracle/product/12.2.0.1 SQL patch applicability verified successfully on home /u01/app/oracle/product/12.2.0.1 Preparing to bring down database service on home /u01/app/oracle/product/12.2.0.1 Successfully prepared home /u01/app/oracle/product/12.2.0.1 to bring down database service Bringing down CRS service on home /u01/app/oracle/grid_12201 Prepatch operation log file location: /u01/app/oracle/product/crsdata/lparaca/crsconfig/crspatch_lparaca_2018-01-29_09-30-42PM.log CRS service brought down successfully on home /u01/app/oracle/grid_12201 Performing prepatch operation on home /u01/app/oracle/product/12.2.0.1 Perpatch operation completed successfully on home /u01/app/oracle/product/12.2.0.1 Start applying binary patch on home /u01/app/oracle/product/12.2.0.1 Binary patch applied successfully on home /u01/app/oracle/product/12.2.0.1 Performing postpatch operation on home /u01/app/oracle/product/12.2.0.1 Postpatch operation completed successfully on home /u01/app/oracle/product/12.2.0.1 Start applying binary patch on home /u01/app/oracle/grid_12201 Binary patch applied successfully on home /u01/app/oracle/grid_12201 Starting CRS service on home /u01/app/oracle/grid_12201 Postpatch operation log file location: /u01/app/oracle/product/crsdata/lparaca/crsconfig/crspatch_lparaca_2018-01-29_09-46-50PM.log CRS service started successfully on home /u01/app/oracle/grid_12201 Preparing home /u01/app/oracle/product/12.2.0.1 after database service restarted No step execution required......... Prepared home /u01/app/oracle/product/12.2.0.1 successfully after database service restarted Trying to apply SQL patch on home /u01/app/oracle/product/12.2.0.1 SQL patch applied successfully on home /u01/app/oracle/product/12.2.0.1 OPatchAuto successful. --------------------------------Summary-------------------------------- Patching is completed successfully. Please find the summary as follows: Host:lparaca RAC Home:/u01/app/oracle/product/12.2.0.1 Summary: ==Following patches were SKIPPED: Patch: /home/oracle/grid/27100009/27128906 Reason: This patch is not applicable to this specified target type - "rac_database" Patch: /home/oracle/grid/27100009/26839277 Reason: This patch is not applicable to this specified target type - "rac_database" Patch: /home/oracle/grid/27100009/27144050 Reason: This patch is not applicable to this specified target type - "rac_database" ==Following patches were SUCCESSFULLY applied: Patch: /home/oracle/grid/27100009/27105253 Log: /u01/app/oracle/product/12.2.0.1/cfgtoollogs/opatchauto/core/opatch/opatch2018-01-29_21-32-14PM_1.log Patch: /home/oracle/grid/27100009/27335416 Log: /u01/app/oracle/product/12.2.0.1/cfgtoollogs/opatchauto/core/opatch/opatch2018-01-29_21-32-14PM_1.log Host:lparaca CRS Home:/u01/app/oracle/grid_12201 Summary: ==Following patches were SUCCESSFULLY applied: Patch: /home/oracle/grid/27100009/26839277 Log: /u01/app/oracle/grid_12201/cfgtoollogs/opatchauto/core/opatch/opatch2018-01-29_21-35-33PM_1.log Patch: /home/oracle/grid/27100009/27105253 Log: /u01/app/oracle/grid_12201/cfgtoollogs/opatchauto/core/opatch/opatch2018-01-29_21-35-33PM_1.log Patch: /home/oracle/grid/27100009/27128906 Log: /u01/app/oracle/grid_12201/cfgtoollogs/opatchauto/core/opatch/opatch2018-01-29_21-35-33PM_1.log Patch: /home/oracle/grid/27100009/27144050 Log: /u01/app/oracle/grid_12201/cfgtoollogs/opatchauto/core/opatch/opatch2018-01-29_21-35-33PM_1.log Patch: /home/oracle/grid/27100009/27335416 Log: /u01/app/oracle/grid_12201/cfgtoollogs/opatchauto/core/opatch/opatch2018-01-29_21-35-33PM_1.log OPatchauto session completed at Mon Jan 29 21:52:50 2018 Time taken to complete the session 28 minutes, 9 seconds [root@lparaca OPatch]#
While the patch was being executed, all the resources were migrated to the 2nd node and the Grid Infrastructure was put into “Rolling Patch” Mode:
[root@lparacb patch]# crs_stat -t Name Type Target State Host ------------------------------------------------------------ ora....SM.lsnr ora....er.type ONLINE ONLINE lparacb ora.DATA.dg ora....up.type ONLINE ONLINE lparacb ora....ER.lsnr ora....er.type ONLINE ONLINE lparacb ora....N1.lsnr ora....er.type ONLINE ONLINE lparacb ora....N2.lsnr ora....er.type ONLINE ONLINE lparacb ora....N3.lsnr ora....er.type ONLINE ONLINE lparacb ora.MGMTLSNR ora....nr.type ONLINE ONLINE lparacb ora.asm ora.asm.type ONLINE ONLINE lparacb ora.cvu ora.cvu.type ONLINE ONLINE lparacb ora....SM1.asm application ONLINE ONLINE lparacb ora....CA.lsnr application ONLINE ONLINE lparacb ora....aca.ons application ONLINE ONLINE lparacb ora....aca.vip ora....t1.type ONLINE ONLINE lparacb ora....SM2.asm application ONLINE ONLINE lparacb ora....CB.lsnr application ONLINE ONLINE lparacb ora....acb.ons application ONLINE ONLINE lparacb ora....acb.vip ora....t1.type ONLINE ONLINE lparacb ora....network ora....rk.type ONLINE ONLINE lparacb ora.ons ora.ons.type ONLINE ONLINE lparacb ora.orcl.db ora....se.type ONLINE ONLINE lparacb ora.qosmserver ora....er.type ONLINE ONLINE lparacb ora.scan1.vip ora....ip.type ONLINE ONLINE lparacb ora.scan2.vip ora....ip.type ONLINE ONLINE lparacb ora.scan3.vip ora....ip.type ONLINE ONLINE lparacb [root@lparacb patch]# crsctl query crs activeversion Oracle Clusterware active version on the cluster is [12.2.0.1.0] [root@lparacb patch]# crsctl query crs activeversion -f Oracle Clusterware active version on the cluster is [12.2.0.1.0]. The cluster upgrade state is [ROLLING PATCH]. The cluster active patch level is [0]. [root@lparacb patch]#
Check
After the upgrade, the resources are again split between the nodes:
[root@lparacb patch]# crs_stat -t Name Type Target State Host ------------------------------------------------------------ ora....SM.lsnr ora....er.type ONLINE ONLINE lparaca ora.DATA.dg ora....up.type ONLINE ONLINE lparaca ora....ER.lsnr ora....er.type ONLINE ONLINE lparaca ora....N1.lsnr ora....er.type ONLINE ONLINE lparaca ora....N2.lsnr ora....er.type ONLINE ONLINE lparacb ora....N3.lsnr ora....er.type ONLINE ONLINE lparacb ora.MGMTLSNR ora....nr.type ONLINE ONLINE lparacb ora.asm ora.asm.type ONLINE ONLINE lparaca ora.cvu ora.cvu.type ONLINE ONLINE lparacb ora....SM1.asm application ONLINE ONLINE lparaca ora....CA.lsnr application ONLINE ONLINE lparaca ora....aca.ons application ONLINE ONLINE lparaca ora....aca.vip ora....t1.type ONLINE ONLINE lparaca ora....SM2.asm application ONLINE ONLINE lparacb ora....CB.lsnr application ONLINE ONLINE lparacb ora....acb.ons application ONLINE ONLINE lparacb ora....acb.vip ora....t1.type ONLINE ONLINE lparacb ora....network ora....rk.type ONLINE ONLINE lparaca ora.ons ora.ons.type ONLINE ONLINE lparaca ora.orcl.db ora....se.type ONLINE ONLINE lparacb ora.qosmserver ora....er.type ONLINE ONLINE lparacb ora.scan1.vip ora....ip.type ONLINE ONLINE lparaca ora.scan2.vip ora....ip.type ONLINE ONLINE lparacb ora.scan3.vip ora....ip.type ONLINE ONLINE lparacb
Check the patch level
[root@lparaca ~]# crsctl query crs releasepatch Oracle Clusterware release patch level is [2960767134] and the complete list of patches [26839277 27105253 27128906 27144050 27335416 ] have been applied on the local node. [root@lparaca ~]#