Opatching PSU in Oracle Database 11g Release 2 RAC on RHEL6
Opatching PSU in Oracle Database 11g Release 2(11.2.0.4) RAC on RHEL6
1) 升级opatch工具
1.1) For GI home
su - root
export GI_HOME=$(grep '^+ASM' /etc/oratab |awk -F: '{ print $2 }')
[[ -d "${GI_HOME}/OPatch" ]] && mv ${GI_HOME}/OPatch ${GI_HOME}/OPatch_$(date +%Y%m%d)
.zip -d ${GI_HOME}
ls -ld ${GI_HOME}/OPatch*
chown -R grid:oinstall ${GI_HOME}/OPatch
chmod -R +x ${GI_HOME}/OPatch
ls -ld ${GI_HOME}/OPatch*
su - grid
${ORACLE_HOME}/OPatch/opatch version
# --创建响应文件
(;;echo -e 'Y\n')|${ORACLE_HOME}/OPatch/ocm/bin/emocmrsp -no_banner -output /tmp/ocm.rsp
1.2) For DB home
su - oracle
[[ -d "${ORACLE_HOME}/OPatch" ]] && mv ${ORACLE_HOME}/OPatch ${ORACLE_HOME}/OPatch_$(date +%Y%m%d)
ls -ld ${ORACLE_HOME}/OPatch*
.zip -d ${ORACLE_HOME}
ls -ld ${ORACLE_HOME}/OPatch*
${ORACLE_HOME}/OPatch/opatch version
2) 安装GI PSU补丁
su - root
export GI_HOME=$(grep '^+ASM' /etc/oratab |awk -F: '{ print $2 }')
export DB_HOME=$(grep -Ev '^#|^$|+ASM' /etc/oratab |awk -F: '{ print $2 }')
# su - grid -c "(sleep 3;echo -e '\n';sleep 3;echo -e 'Y\n')|${GI_HOME}/OPatch/ocm/bin/emocmrsp -no_banner -output /tmp/ocm.rsp"
su - grid -c "unzip -oq p28317141_112040_Linux-x86-64.zip -d /apps/soft"
export UNZIPPED_PATCH_LOCATION=/apps/soft/
export LANG=C
${GI_HOME}/OPatch/opatch auto ${UNZIPPED_PATCH_LOCATION}/ -ocmrf /tmp/ocm.rsp
-- 检查确认
su - grid -c "${GI_HOME}/bin/crsctl status res -t"
su - grid -c "${GI_HOME}/OPatch/opatch lspatches;${GI_HOME}/OPatch/opatch lsinventory"
su - oracle -c "${DB_HOME}/OPatch/opatch lspatches;${DB_HOME}/OPatch/opatch lsinventory"
3) 升级数据字典
su - oracle sqlplus /nolog << EOF connect / as sysdba @?/rdbms/admin/catbundle.sql psu apply @?/rdbms/admin/utlrp.sql set lines pages col action_time for a20 col action for a15 col namespace for a12 col version for a18 col col bundle_series for a15 col comments for a28 prompt db version select to_char(t1.action_time,'yyyy-mm-dd hh24:mi:ss') action_time,t1.action,t1.namespace,t1.version,id,t1.bundle_series,t1.comments from dba_registry_history t1 order by t1.action_time; prompt prompt comp info col comp_name for a48 col comp_id for a12 col version for a16 col status for a12 col modified for a20 select t2.comp_id, t2.comp_name, t2.version, t2.status, to_char(to_date(t2.modified,'dd-mm-yyyy hh24:mi:ss'),'yyyy-mm-dd hh24:mi:ss') modified from dba_registry t2 order by t2.modified,t2.comp_id; quit; EOF
4) 安装OJVM PSU
su - oracle
# 关闭db home的所有服务
srvctl stop database -d orcl
# 冲突检查
PATCH_TOP_DIR=/apps/soft/
cd ${PATCH_TOP_DIR}/
opatch prereq CheckConflictAgainstOHWithDetail -ph ./
# 安装补丁
(;;;;echo -e 'Y\n')|${ORACLE_HOME}/OPatch/opatch apply
# 结果检查确认
${ORACLE_HOME}/OPatch/opatch lspatches;${ORACLE_HOME}/OPatch/opatch lsinventory
5) 升级数据字典
sqlplus /nolog << EOF host srvctl start instance -d orcl -i orcl1 connect / as sysdba alter system set cluster_database=false scope=spfile; host srvctl stop instance -d orcl -i orcl1 connect / as sysdba startup upgrade @?/sqlpatch//postinstall.sql alter system set cluster_database=true scope=spfile; host srvctl stop instance -d orcl -i orcl1 host srvctl start database -d orcl connect / as sysdba @?/rdbms/admin/utlrp.sql set lines pages col action_time for a20 col action for a15 col namespace for a12 col version for a24 col col bundle_series for a15 col comments for a28 prompt db version select to_char(t1.action_time,'yyyy-mm-dd hh24:mi:ss') action_time,t1.action,t1.namespace,t1.version,id,t1.bundle_series,t1.comments from dba_registry_history t1 order by t1.action_time; prompt prompt comp info col comp_name for a48 col comp_id for a12 col version for a16 col status for a12 col modified for a20 select t2.comp_id, t2.comp_name, t2.version, t2.status, to_char(to_date(t2.modified,'dd-mm-yyyy hh24:mi:ss'),'yyyy-mm-dd hh24:mi:ss') modified from dba_registry t2 order by t2.modified,t2.comp_id; quit; EOF
Opatching PSU in Oracle Database 11g Release 2 RAC on RHEL6的更多相关文章
- Oracle Database 11g Release 2 Standard Edition and Enterprise Edition Software Downloads
Oracle Database 11g Release 2 Standard Edition and Enterprise Edition Software DownloadsOracle 数据库 1 ...
- Oracle Database 11g Release 2(11.2.0.3.0) RAC On Redhat Linux 5.8 Using Vmware Workstation 9.0
一,简介 二,配置虚拟机 1,创建虚拟机 (1)添加三块儿网卡: 主节点 二节点 eth0: 公网 192.168.1.20/24 NAT eth0: 公网 192.168.1 ...
- 在redhat6.4下安装 Oracle® Database 11g Release 2
OS版本: 安装过程的相关信息: pdksh 安装好后根据需要设置oracle开机自启动http://www.cnblogs.com/softidea/p/3761671.html 设置环境变量NLS ...
- Oracle Database 11G R2 标准版 企业版 下载地址(转)
转自:http://blog.itpub.net/628922/viewspace-759245/ 不需要注册,直接复制到迅雷或其他下载软件中即可下载. oracle 11.2.0.3 下载地址: L ...
- Oracle Database 11g Express Edition学习笔记
修改字符集 使用用户system,通过sqlplus程序连接到Oracle数据库,输入以下命令,查看字符集: SQL> select userenv('language') from dual; ...
- CHAPTER 1 Architectural Overview of Oracle Database 11g
Which SGA structures are required, and which are optional? The database buffer cache, log buffer, an ...
- Oracle Database 12c Release 1下载安装(自身经历)
1.访问Oracle官网:https://www.oracle.com/index.html,下载Oracle Database 12c Release 1 (注意:File1和File2都要下载!! ...
- Oracle Database 11g Express Editon介绍及安装
一.Oracle Database 11g Express版本介绍 公司项目开发中,使用的数据库是Oracle 10g和MySQL 5.5,最新因为开发需要,需要从后台读取一些数据.使用的客户端是PL ...
- Oracle Database 11g Express Edition 使用小结(windows)
如何启动oraclewindows系统服务中有一个服务叫:[OracleService[SID]]SID是你安装oracle xe时候的实例名,如果你没有改默认的是[XE], OracleServic ...
随机推荐
- MFC宏—DECLARE_DYNCREATE
DECLARE_DYNCREATE( class_name ) 参数: class_name 类的实际名字(不用引号括起来). 说明: 使用DECLARE_DYNCREATE宏可以使每个CObject ...
- 找xpath好用的工具(Firefox插件)
WebDriver Element Locator 安装 打开firefox浏览器,进入网址https://addons.mozilla.org/en-US/firefox/ 在搜索框里输入WebDr ...
- c#数据库设计--1、概述
一.数据库设计的概念 数据库设计是将数据库中的数据实体及这些数据实体之间的关系,进行规划和结构化的过程. 二.数据库设计的重要性 设计决定代码量,一将不行,累死三军. 如果一个数据库没有进行一个良好的 ...
- SQL SERVER TRIGGER 触发器
1.触发器简介 触发器是一种特殊的存储过程,它的执行不是由程序调用,也不是手动执行,而是由事件来触发.触发器是当对某一个表进行操作.例如:update.insert.delete这些操作的时候,系统会 ...
- nginx多站点配置
一.安装nginx https://yq.aliyun.com/articles/101144?spm=5176.10695662.1996646101.searchclickresult.70af9 ...
- ActivityManagerService原理&源码
https://www.kancloud.cn/alex_wsc/android-deep2/413386 http://wiki.jikexueyuan.com/project/deep-andro ...
- ESB企业服务总线
ESB是企业服务总线(Enterprise Service Bus)的缩写,是中间件技术与Web Service等技术结合的产物,也是SOA系统中的核心基础设施.ESB就是一个服务的中介,形成服务使用 ...
- Linux 安装redis,redis发布订阅,持久化
安装redis 1.安装redis的方式 -yum (删除这个yum安装的redis,我们只用源码编译安装的) -rpm -源码编译 2.删除原本的redis yum remove redis -y ...
- 从0x7fffffff+1开始的数学期望
-2147483648 Impel Down 蒙奇·D·路飞来到海底监狱Impel Down营救他的哥哥波特卡斯·D·艾斯 n+1层的海底监狱有n个电梯,每个电梯连接着上下两层 不幸的是,这些电梯是& ...
- JTS基本概念和使用
简介 JTS是加拿大的 Vivid Solutions公司做的一套开放源码的 Java API.它提供了一套空间数据操作的核心算法.为在兼容OGC标准的空间对象模型中进行基础的几何操作提供2D空间谓词 ...