2015-09-03_17-30-37 : Clusterware is either not running or not configured. You have the following 2 options: 1. Configure and start the Clusterware on this node and re-run the tool 2. Run the tool with '-oh <GI_HOME>' to first patch the Grid Home, then invoke tool with '-database <oracle database name>' or '-oh <RAC_HOME>' to patch the RAC home Parameter Validation: FAILEDApparently I should not have shutdown GI before starting. Rather than restarting GI, I chose door #2, that is patch GI and DB homes separately. Seems simple enough. Here's the command I used: [code lang="bash"]/u01/app/grid/product/12.1.0/grid/OPatch/opatchauto apply /u01/app/oracle/patches/20996835 -oh /u01/app/grid/product/12.1.0/grid -ocmrf /u01/app/oracle/patches/20996835/unconfig.rsp[/code] Again, all went well for a few moments, and then another failure. This time a file could not be found. This is from the log file:
Patch 20831113: onewaycopyAction : Source File "/u01/app/oracle/patches/20996835/20831113/files/crs/install/dropdb.pl" does not exists or is not readable 'oracle.crs, 12.1.0.2.0': Cannot copy file from 'dropdb.pl' to '/u01/app/grid/product/12.1.0/grid/crs/install/dropdb.pl'That seemed rather odd. The patch is running as root, and the file is definitely readable by root: [code lang="bash"][oracle@ora12102a 20996835]$ ls -l /u01/app/oracle/patches/20996835/20831113/files/crs/install/dropdb.pl -rwx------ 1 oracle asmdba 3541 Jul 12 04:04 /u01/app/oracle/patches/20996835/20831113/files/crs/install/dropdb.pl[/code] Thinking this might just be a one of error, I changed the permissions on this file to global read: [code lang="bash"][oracle@ora12102a 20996835]$ chmod +r /u01/app/oracle/patches/20996835/20831113/files/crs/install/dropdb.pl [oracle@ora12102a 20996835]$ ls -l /u01/app/oracle/patches/20996835/20831113/files/crs/install/dropdb.pl -rwxr--r-- 1 oracle asmdba 3541 Jul 12 04:04 /u01/app/oracle/patches/20996835/20831113/files/crs/install/dropdb.pl[/code] ... and then re-ran the patch command. Unfortunately yet another failure. Similar to the previous error, but of course this time a different file:
Patch 19769480: onewaycopyAction : Source File "/u01/app/oracle/patches/20996835/20831110/19769480/files/sqlpatch/sqlpatch" does not exists or is not readable 'oracle.rdbms, 12.1.0.2.0': Cannot copy file from 'sqlpatch' to '/u01/app/grid/product/12.1.0/grid/sqlpatch/sqlpatch'Checking on the file, again readable by root: [code lang="bash"][oracle@ora12102a 20996835]$ ls -l /u01/app/oracle/patches/20996835/20831110/19769480/files/sqlpatch/sqlpatch -rwx--x--- 1 oracle asmdba 2808 Jul 12 04:03 /u01/app/oracle/patches/20996835/20831110/19769480/files/sqlpatch/sqlpatch[/code] Searching the Oracle Support site on this issue led to this note: OPatch fails with error "sqlpatch does not exists or is not readable" (Doc ID 2026594.1) The solution as per this note is as follows:
Make sure to download the patch as Oracle Software owner and install with same user account.
As a workaround, to fix this error, we have to give the read permission to the file which is issue
Executing the patch as the Oracle software owner however simply does not work: [code lang="bash"][grid@ora12102a ~]$ $ORACLE_HOME/OPatch/opatchauto apply /u01/app/oracle/patches/20996835/ -oh $ORACLE_HOME -ocmrc /u01/app/oracle/patches/20996835/unconfig.rsp Cannot run as 'grid'. Please run as root user.[/code] Ok, so what is the real solution? It was apparent that the reason for these errors is that at some point the patching process is doing an su (or something similar) to the software owners account, in this case the grid user. And grid cannot read that file. The simplest solution seemed to be this: Make all files and directories in the patch directory globally readable. [code lang="bash"][oracle@ora12102a ~]$ cd /u01/app/oracle/patches/20996835/ [oracle@ora12102a 20996835]$ chmod -R +r . [/code] Yes, it was just that easy. Too bad the patch files do not have the correct permissions right out of the box. Following this the patch succeeded for the GI home, and then also for the DB home. And yes, I did run datapatch as well. Has the 12c database stopped crashing? I don't know yet, but will report back later.
References:
- Quick Reference to Patch Numbers for Database PSU, SPU(CPU), Bundle Patches and Patchsets (Doc ID 1454618.1)
- OPatch fails with error "sqlpatch does not exists or is not readable" (Doc ID 2026594.1)
- How to Create an OCM Response file to Apply a Patch in Silent Mode - opatch silent (Doc ID 966023.1)
- Master Note For OPatch (Doc ID 293369.1)
Patches:
- OPatch: p6880880_121010_Linux-x86-64.zip
- GI Patch: p20996835_121020_Linux-x86-64.zip
On this page
Share this
Share this
More resources
Learn more about Pythian by reading the following blogs and articles.
Oracle Database 12c: PSUs vs database proactive bundle patches
Oracle Database 12c: PSUs vs database proactive bundle patches
Jun 14, 2016 12:00:00 AM
12
min read
How to Apply a Standby-First PSU Patch in a 2 node RAC environment
How to Apply a Standby-First PSU Patch in a 2 node RAC environment
Dec 24, 2013 12:00:00 AM
18
min read
Silent Rollback From an Out-of-Place Patching For Oracle 19c GI
Silent Rollback From an Out-of-Place Patching For Oracle 19c GI
Oct 27, 2020 12:00:00 AM
5
min read
Ready to unlock value from your data?
With Pythian, you can accomplish your data transformation goals and more.