關於oracle opatch打補丁是 不能用grid使用者直接mvOPatch folder的問題

lcl150800發表於2020-04-20

看到網上有很多朋友會問 更新opatch的時候無法直接使用grid直接mv 老的opatch folder

原因是 上級目錄為root許可權,所以grid用沒有操作opatch folder的許可權

打opatch補丁步驟參考如下: 11g與12C 的更新步驟一樣的,注意 p6880880_122010_Linux-x86-64.zip 補丁所在位置目錄許可權為grid.oinstall屬組 775 許可權

oracle 使用者更新 OPatch  
節點1 
[root@rac12c1 opatch]# su - oracle
[oracle@rac12c1 ~]$ cd $ORACLE_HOME
[oracle@rac12c1 db_1]$ mv OPatch/ OPatch_bak20191213
[oracle@rac12c1 db_1]$ unzip /u01/install/opatch/p6880880_122010_Linux-x86-64.zip -d $ORACLE_HOME
[oracle@rac12c1 db_1]$ OPatch/opatch version
OPatch Version: 12.2.0.1.18
OPatch succeeded.
節點2
[oracle@rac12c2 ~]$ cd $ORACLE_HOME
[oracle@rac12c2 db_1]$ OPatch/opatch version
OPatch Version: 12.2.0.1.6
OPatch succeeded.
[oracle@rac12c2 db_1]$ mv OPatch/ OPatch_bak20191213
[oracle@rac12c2 db_1]$ unzip /u01/install/opatch/p6880880_122010_Linux-x86-64.zip -d $ORACLE_HOME
[oracle@rac12c2 db_1]$ OPatch/opatch version
OPatch Version: 12.2.0.1.18
OPatch succeeded.
GI 使用者更新OPatch (注意觀察使用的使用者)
[root@rac12c1 opatch]# cd /u01/install/
[root@rac12c1 install]#  chown -R grid.oinstall opatch/
[root@rac12c1 install]# cd /u01/app/12.2.0/grid/
[root@rac12c1 grid]# mv OPatch/ OPatch_bak20191213
[root@rac12c1 grid]# su - grid
[grid@rac12c1 ~]$ cd /u01/install/opatch/
[grid@rac12c1 opatch]$ unzip p6880880_122010_Linux-x86-64.zip
[grid@rac12c1 opatch]$ exit
logout
[root@rac12c1 grid]# cd /u01/install/opatch/
[root@rac12c1 opatch]# mv OPatch/ /u01/app/12.2.0/grid/
[root@rac12c1 opatch]# su - grid
[grid@rac12c1 ~]$ cd $ORACLE_HOME
[grid@rac12c1 grid]$ chmod 755 OPatch
[grid@rac12c1 grid]$ OPatch/opatch version
OPatch Version: 12.2.0.1.18
OPatch succeeded.
節點2
[root@rac12c2 opatch]# cd /u01/install/
[root@rac12c2 install]#  chown -R grid.oinstall opatch/
[root@rac12c2 install]# cd /u01/app/12.2.0/grid/
[root@rac12c2 grid]# mv OPatch/ OPatch_bak20191213
[root@rac12c2 grid]# su - grid
[grid@rac12c2 ~]$ cd /u01/install/opatch/
[grid@rac12c2 opatch]$ unzip p6880880_122010_Linux-x86-64.zip
[grid@rac12c2 opatch]$ exit
logout
[root@rac12c2 grid]# cd /u01/install/opatch/
[root@rac12c2 opatch]# mv OPatch/ /u01/app/12.2.0/grid/
[root@rac12c2 opatch]# su - grid
[grid@rac12c2 ~]$ cd $ORACLE_HOME
[grid@rac12c2 grid]$ chmod 755 OPatch
[grid@rac12c2 grid]$ OPatch/opatch version
OPatch Version: 12.2.0.1.18
OPatch succeeded.



來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/22390488/viewspace-2687172/,如需轉載,請註明出處,否則將追究法律責任。

相關文章