为 Windows 上的 Oracle 11.2.0.4.0 安装补丁

一、基础环境

操作系统:Windows 10 及 Windows Server 2019 及以上版本

安装路径:D:\ProgramFiles\Oracle

数据库:Oracle Database 11.2.0.4.0 64位

实例名:orcl

补丁文件:

序号 文件名称 文件说明
1 p6880880_112000_MSWIN-x86-64.zip 用于升级 OPatch
2 p31659823_112040_MSWIN-x86-64.zip 主要补丁文件
3 p31740195_112040_MSWIN-x86-64.zip 用于升级 OJVM

二、操作步骤

1、停止实例服务和监听服务

net stop OracleServiceORCL
net stop OracleOraDb11g_home1TNSListener

2、查询 OPatch 版本

D:\ProgramFiles\Oracle\product\11.2.0\dbhome_1\OPatch\opatch.bat version

3、如果不满足需要,升级 OPatch

3.1、备份:将 D:\ProgramFiles\Oracle\product\11.2.0\dbhome_1\OPatch 重命名为 D:\ProgramFiles\Oracle\product\11.2.0\dbhome_1\OPatch_old

3.2、覆盖:解压 p6880880_112000_MSWIN-x86-64.zip 将 OPatch 解压至 D:\ProgramFiles\Oracle\product\11.2.0\dbhome_1

3.3、重新检查版本:

D:\ProgramFiles\Oracle\product\11.2.0\dbhome_1\OPatch\opatch.bat version

OPatch Version: 11.2.0.3.29
OPatch succeeded.

4、查看历史补丁:

D:\ProgramFiles\Oracle\product\11.2.0\dbhome_1\OPatch\opatch.bat lsinventory

5、安装补丁
5.1、解压 p31659823_112040_MSWIN-x86-64.zip 至D盘根目录。

5.2、在解压的路径下执行:

D:\ProgramFiles\Oracle\product\11.2.0\dbhome_1\OPatch\opatch.bat apply

​ 系统开始检查兼容性,按照提示操作即可。

5.3、手动启动Oracle的实例服务和监听服务。

5.4、查询补丁安装情况:

select to_char(t.action_time, 'yyyy-mm-dd HH24:mi:ss'), t.action, t.namespace
	, t.version, t.id, t.bundle_series, t.comments
from dba_registry_history t

5.5、更新补丁信息:执行以下命令,等待命令执行完成后退出,重新查询补丁安装情况。

cd /d D:\ProgramFiles\Oracle\product\11.2.0\dbhome_1\RDBMS\ADMIN
sqlplus / as sysdba
startup force
@catbundle.sql PSU apply

6、升级OJVM
6.1、将 p31740195_112040_MSWIN-x86-64.zip 解压至D盘。cd /d D:\p31740195_112040_MSWIN-x86-64\

6.2、检查是否有冲突:

D:\ProgramFiles\Oracle\product\11.2.0\dbhome_1\OPatch\opatch.bat prereq CheckConflictAgainstOHWithDetail -ph ./

6.3、手动关闭实例、监听、服务

6.4、安装补丁:

D:\ProgramFiles\Oracle\product\11.2.0\dbhome_1\OPatch\opatch.bat apply

6.5、查看是否安装成功:

D:\ProgramFiles\Oracle\product\11.2.0\dbhome_1\OPatch\opatch.bat lspatches

31740195;WINDOWS ORACLE JAVAVM COMPONENT BUNDLE PATCH 11.2.0.4.201020
31659823;Windows Database Bundle Patch : 11.2.0.4.201020 (31659823)

6.6、手动启动实例

net start OracleServiceORCL

6.7、更新补丁信息:

cd D:\ProgramFiles\Oracle\product\11.2.0\dbhome_1\sqlpatch\31740195
sqlplus / as sysdba
shutdown
startup upgrade
@postinstall.sql
startup force

6.8、手动启动实例

net start OracleServiceORCL

6.9、查询补丁安装情况:

select to_char(t.action_time, 'yyyy-mm-dd HH24:mi:ss'), t.action, t.namespace
	, t.version, t.id, t.bundle_series, t.comments
from dba_registry_history t

猜你喜欢

转载自blog.csdn.net/u011046671/article/details/129112956