ERROR: ERROR: Unable to get oracle owner for /u01/app/oracle/product/11.2.0.4/dbhome
Oracle一体机x7更新Oracle补丁如下报错
[root@dm01dbadm01 software]# opatch auto /u01/software/33880541 -oh /u01/app/oracle/product/11.2.0.4/dbhome
Executing /u01/app/12.1.0.2/grid/perl/bin/perl /u01/app/oracle/product/11.2.0.4/dbhome_1/OPatch/crs/patchDB.pl -patchdir /u01/software -patchn 33880541 -oh /u01/app/oracle/product/11.2.0.4/dbhome
This is the main log file: /u01/app/oracle/product/11.2.0.4/dbhome_1/cfgtoollogs/opatchauto2022-05-19_14-45-37.log
This file will show your detected configuration and all the steps that opatchauto attempted to do on your system:
/u01/app/oracle/product/11.2.0.4/dbhome_1/cfgtoollogs/opatchauto2022-05-19_14-45-37.report.log
ERROR: ERROR: Unable to get oracle owner for /u01/app/oracle/product/11.2.0.4/dbhome
opatch auto failed.
切换并查看用户
##这里看到属于root,无法启动切换成Oracle用户,故补丁升级失败
[root@dm01dbadm01 ~]# su - oracle -c "echo $USER"
root
执行以下命令,重新更新补丁
[root@dm01dbadm01 ~]# export USER=oracle
[root@dm01dbadm01 ~]# su - oracle -c "echo $USER"
oracle
[root@dm01dbadm01 software]# opatch auto /u01/software/33880541 -oh /u01/app/oracle/product/11.2.0.4/dbhome_1
Executing /u01/app/12.1.0.2/grid/perl/bin/perl /u01/app/oracle/product/11.2.0.4/dbhome_1/OPatch/crs/patchDB.pl -patchdir /u01/software -patchn 33880541 -oh /u01/app/oracle/product/11.2.0.4/dbhome_1
This is the main log file: /u01/app/oracle/product/11.2.0.4/dbhome_1/cfgtoollogs/opatchauto2022-05-19_14-46-06.log
This file will show your detected configuration and all the steps that opatchauto attempted to do on your system:
/u01/app/oracle/product/11.2.0.4/dbhome_1/cfgtoollogs/opatchauto2022-05-19_14-46-06.report.log
Stopping RAC /u01/app/oracle/product/11.2.0.4/dbhome_1 ...
Stopped RAC /u01/app/oracle/product/11.2.0.4/dbhome_1 successfully
patch /u01/software/33880541/32758914/custom/server/32758914 apply successful for home /u01/app/oracle/product/11.2.0.4/dbhome_1
ERROR: patch /u01/software/33880541/33711121 apply failed for home /u01/app/oracle/product/11.2.0.4/dbhome_1
Starting RAC /u01/app/oracle/product/11.2.0.4/dbhome_1 ...
Started RAC /u01/app/oracle/product/11.2.0.4/dbhome_1 successfully
opatch auto failed to apply some patches.
查看补丁集,这里已经是最新的2022-04-19补丁
[oracle@dm01dbadm01 ~]$ opatch lspatches
33711121;DATABASE PATCH FOR EXADATA (Apr 2022 - 11.2.0.4.220419) : (33711121)
32758914;OCW PATCH SET UPDATE 11.2.0.4.210720 (32758914)
22731026;
4247037;
27923163;OJVM PATCH SET UPDATE 11.2.0.4.180717