使用 OPatch 检查清单并执行补丁前检查
Oracle补丁与生命周期命令
# OPatch version (must meet the minimum in the patch README; update with patch 6880880 if needed)
$ORACLE_HOME/OPatch/opatch version
# Installed patches: short list / detailed inventory
$ORACLE_HOME/OPatch/opatch lspatches
$ORACLE_HOME/OPatch/opatch lsinventory -detail -oh $ORACLE_HOME
# Pre-apply checks (in the unzipped patch directory):
cd /u01/stage/<patch_id>
$ORACLE_HOME/OPatch/opatch prereq CheckConflictAgainstOHWithDetail -ph ./
$ORACLE_HOME/OPatch/opatch prereq CheckSystemSpace -ph ./
# For Grid Infrastructure / RAC homes (as root), analyze mode:
# opatchauto apply /u01/stage/<patch_id> -analyze作用
列出已应用到 Oracle Home 的二进制补丁(RU、one-off),并在应用新补丁前检查其是否与现有补丁冲突以及磁盘空间是否充足。
适用场景
季度 RU/安全补丁之前、支持人员在 SR 中要求提供清单输出时,以及比较两个环境的补丁级别时。
注意
以拥有 Oracle Home 的操作系统用户(oracle)运行命令;opatchauto 需要 root。prereq 检查是只读的,不影响数据库,但如果报告冲突,在从 Oracle Support 获得合并/overlay 补丁之前不要应用。应用前备份 Oracle Home(tar)和清单(inventory)。