首先你要有一个可以下载补丁集的oracle账号,然后去查找对应的数据库最新补丁集,下载下来后第一件事就是阅读安装须知
我的数据库是11gR2,下载的文档是文档ID 1454618.1
1.把下载的最新psu包解压到$ORACLE_HOME目录下
2./u01/app/oracle/product/11.2.0/dbhome_1/OPatch/把此目录添加到$PATH变量中
3.Ensure that the $PATH definition has the following executables: make, ar, ld, and nm.确保有这几个命令
4.Determine whether any currently installed one-off patches conflict with the PSU patch as follows:
unzip p21948347_112040_.zip
cd 21948347
opatch prereq
CheckConflictAgainstOHWithDetail -ph ./
>Opatch succeeded
冲突检测通过
5.If this is not a Oracle RAC environment,
shut down all instances and listeners associated with the Oracle home that you
are updating.
如果是非rac需要关闭数据库
Opatch
version能看出版本,并查找补丁集是否是最新的
如果直接执行opatch apply可能会报错
>Patch 17478514 requires OPatch version 11.2.0.3.5.
...
需要下载最新的opatch
https://updates.oracle.com/download/6880880.html
1. 移动压缩包到$ORACLE_HOME目录下
2. 移动老的opatch。mv OPatch{,.bak}
3. 解压包
查看opatch版本有报错Opatch已经是最新版本了
等几分钟后出现OPatch succeeded字样
然后按照安装须知执行外部文件
@catbundle.sql psu apply
@$ORACLE_HOME/rdbms/admin/utlrp.sql
编译无效对象
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/31461640/viewspace-2140320/ ,如需转载,请注明出处,否则将追究法律责任。