[oracle@sztech ~]$echo $ORACLE_HOME /u01/app/oracle/product/11.2.0/db_1 [oracle@sztech ~]$cd /u01/app/oracle/product/11.2.0/db_1/OPatch/ [oracle@sztechOPatch]$ ./opatch version OPatch Version:11.2.0.3.4 OPatch succeeded. [oracle@sztechOPatch]$ exit logout [root@sztech ~]#mkdir /psu [root@sztech ~]#cd /psu [root@sztech psu]#ll 总用量 747848 -rw-r--r--. 1 rootroot 666719146 9月 317:23 p20996923_112040_Linux-x86-64.zip -rw-r--r--. 1 rootroot 99065778 8月 1809:54 p6880880_112000_Linux-x86-64.zip [root@sztech psu]#chown -R oracle:dba /psu [root@sztech psu]#su - oracle [oracle@sztech ~]$cd /psu [oracle@sztechpsu]$ ll 总用量 747848 -rw-r--r--. 1oracle dba 666719146 9月 3 17:23p20996923_112040_Linux-x86-64.zip -rw-r--r--. 1oracle dba 99065778 8月 1809:54 p6880880_112000_Linux-x86-64.zip [oracle@sztechpsu]$ cd /u01/app/oracle/product/11.2.0/db_1 [oracle@sztechdb_1]$ mv OPatch/ OPatch.bak [oracle@sztechpsu]$ unzip p6880880_112000_Linux-x86-64.zip -d/u01/app/oracle/product/11.2.0/db_1 [oracle@sztechpsu]$ cd $ORACLE_HOME [oracle@sztechdb_1]$ cd OPatch [oracle@sztechOPatch]$ ./opatch version Java(1.6) could not be located. OPatch cannot proceed! OPatchreturns with error code = 1 报错:找不到Java的位置 [oracle@sztechOPatch]$ which java /usr/bin/java [oracle@sztechOPatch]$ cd /usr/bin [oracle@sztechbin]$ ls -ld /usr/bin/java lrwxrwxrwx. 1 rootroot 22 Jun 29 19:39 /usr/bin/java -> /etc/alternatives/java [oracle@sztechbin]$ cd /etc/alternatives [root@sztechalternatives]# chown -R oracle:dba /etc/alternatives [oracle@sztechpsu]$ unzip p6880880_112000_Linux-x86-64.zip -d/u01/app/oracle/product/11.2.0/db_1 [oracle@sztechpsu]$ cd $ORACLE_HOME [oracle@sztechdb_1]$ cd OPatch [oracle@sztechOPatch]$ ./opatch version Java(1.6) could not be located. OPatch cannot proceed! OPatchreturns with error code = 1 最终原因:是我的数据库版本为32位的,opatch补丁包为64位,位数不同报错; [oracle@sztech ~]$uname –a (查看操作系统的版本) Linux strong2.6.32-358.el6.i686 #1 SMP Tue Jan 29 11:48:01 EST 2013i686 i686 i386 GNU/Linux 重新上传32位的optach补丁包, sftp> cd /psu sftp> lcdD:\360安全浏览器下载 sftp> putD:/360安全浏览器下载/p6880880_112000_LINUX.zip [oracle@sztech psu]$ll 总用量 201604 -rw-r--r--. 1 rootroot 99065778 8月 1809:54 p6880880_112000_Linux-x86-64.zip -rw-r--r--. 1 rootroot 107369448 11月 6 16:17p6880880_112000_LINUX.zip [oracle@sztechOPatch]$ ./opatch lsinv (验证opatch) Oracle 中间补丁程序安装程序版本 11.2.0.3.17 版权所有 (c) 2017, Oracle Corporation。保留所有权利。 Oracle Home : /u01/app/oracle/product/11.2.0/db_1 Central Inventory: /u01/app/oraInventory from :/u01/app/oracle/product/11.2.0/db_1/oraInst.loc OPatchversion : 11.2.0.3.17 OUI version : 11.2.0.4.0 Log file location: /u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch2017-11-07_02-35-49上午_1.log Lsinventory Outputfile location :/u01/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/lsinv/lsinventory2017-11-07_02-35-49上午.txt -------------------------------------------------------------------------------- Local MachineInformation:: Hostname: strong ARU platform id:46 ARU platformdescription:: Linux x86 已安装的顶级产品 (1): Oracle Database11g 11.2.0.4.0 此 Oracle 主目录中已安装 1 个产品。 此 Oracle 主目录中未安装任何中间补丁程序。 -------------------------------------------------------------------------------- OPatch succeeded. [oracle@sztechOPatch]$ ./opatch version OPatch Version:11.2.0.3.17 OPatch succeeded.
|