Oracle12c打补丁

本文详细描述了在Docker容器中使用OPatch进行Oracle数据库补丁升级的过程,包括文件上传、解压、检查冲突、安装更新及后续验证步骤。
摘要由CSDN通过智能技术生成

补丁介质

p32579057_122010_Linux-x86-64.zip

p6880880_122010_Linux-x86-64.zip

本文主要介绍docker安装下补丁升级操作,补丁文件可官网下载

1、将文件上传至/root目录下,并将oracle oracle权限组

2、容器内新建/opt/oracle/pach_ora目录

docker exec -it oracle /bin/bash

cd /opt/oracle/

mkdir pach_ora

3、将文件复制到容器内并解压

docker cp p32579057_122010_Linux-x86-64.zip oracledb:/opt/oracle/pach_ora

docker cp p6880880_122010_Linux-x86-64.zip oracledb:/opt/oracle/pach_ora

docker cp actions.xml oracledb:/opt/oracle/pach_ora

docker exec -it oracledb /bin/bash

cd /opt/oracle/pach_ora

unzip p32579057_122010_Linux-x86-64.zip && unzip p6880880_122010_Linux-x86-64.zip

4、将actions.xml 文件复制到指定目录

cd /opt/oracle/pach_ora

mv actions.xml /opt/oracle/pach_ora/32579057/32540149/32507738/etc/config/

chown -R oracle:oinstall actions.xml

5、关闭oracle服务和监听

shutdown immediate;

lsnrctl stop

6、OPatch升级备份升级

cd $ORACLE_HOME

mv OPatch/ OPatch_bk

cp -R /opt/oracle/pach_ora/OPatch/ ./

cd OPatch

7、检查补丁冲突

./opatch prereq CheckConflictAgainstOHWithDetail -ph /opt/oracle/pach_ora/32579057/32473172/

./opatch prereq CheckConflictAgainstOHWithDetail -ph /opt/oracle/pach_ora/32579057/32540149/26839277/

./opatch prereq CheckConflictAgainstOHWithDetail -ph /opt/oracle/pach_ora/32579057/32540149/31802727/

./opatch prereq CheckConflictAgainstOHWithDetail -ph /opt/oracle/pach_ora/32579057/32540149/32231681/

./opatch prereq CheckConflictAgainstOHWithDetail -ph /opt/oracle/pach_ora/32579057/32540149/32507738/

./opatch prereq CheckConflictAgainstOHWithDetail -ph /opt/oracle/pach_ora/32579057/32540149/32542421/

8、安装更新补丁

./opatch apply /opt/oracle/pach_ora/32579057/32473172/(成功)

./opatch apply /opt/oracle/pach_ora/32579057/32540149/26839277/(有警告)

./opatch apply /opt/oracle/pach_ora/32579057/32540149/31802727/(成功)

./opatch apply /opt/oracle/pach_ora/32579057/32540149/32231681/(有警告)

./opatch apply /opt/oracle/pach_ora/32579057/32540149/32507738/(有一个报错)

./opatch apply /opt/oracle/pach_ora/32579057/32540149/32542421/(有警告)

9、使用opatch 生效

./opatch lsinventory

10、启动数据库,执行脚本

sqlplus / as sysdba

Startup

@?/rdbms/admin/dbmsrman.sql

@?/rdbms/admin/prvtrmns.plb

11、退出执行最后一步

cd $ORACLE_HOME/OPatch

./datapatch -verbose

12、查询升级后版本

select * from dba_registry_history;

select * from dba_registry_sqlpatch;

select PATCH_ID, PATCH_UID,VERSION,ACTION, STATUS,ACTION_TIME,DESCRIPTION from dba_registry_sqlpatch;

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

日月星城2

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值