1. 程式人生 > 其它 >ERROR: ERROR: Unable to get oracle owner for /u01/app/oracle/product/11.2.0.4/dbhome

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