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 ...
随机推荐
- VB.NET工作记录
1.字符串移除最后一个字符 s = s.Remove(s.Length - 1, 1) 2.日期格式 常用:yyyy-MM-dd HH:mm:ss 毫秒用fff 字符 说明 (:) 时间分隔符.在某些 ...
- LinkedBlockQueue生产消费源码解析
LinkedBlockQueue自JDK1.5以后提供的一种阻塞队列,遵循生产者消费者模式,实现了BlockQueue接口,如图 从它的名字可以了解到它是采用链表的方式实现了阻塞队列,并且定义了“节点 ...
- Spring Security(三)
Spring Security(三) 个性化用户认证流程 自定义登录页面 在配置类中指定登录页面和接收登录的 url @Configuration public class BrowserSecuri ...
- java多线程——线程池源码分析(一)
本文首发于cdream的个人博客,点击获得更好的阅读体验! 欢迎转载,转载请注明出处. 通常应用多线程技术时,我们并不会直接创建一个线程,因为系统启动一个新线程的成本是比较高的,涉及与操作系统的交互, ...
- 你真的了解 Unicode 和 UTF-8 吗?
目录 引言 ASCII 码 什么是 ASCII 码? ASCII 码都包含哪些字符? ASCII 码的局限在哪里? Unicode 什么是 Unicode ? Unicode 的实现方式有几种? Un ...
- Contemplation! Algebra(矩阵快速幂,uva10655)
Problem EContemplation! AlgebraInput: Standard Input Output: Standard Output Time Limit: 1 Second Gi ...
- N皇后问题hdu2553(dfs)
N皇后问题 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Subm ...
- java中递归实现复制多级文件夹
常见的流的用法 递归实现复制多级文件夹 FileInputStream & FileOutputStream String content = null;//用来储存解码后的byte数组 in ...
- TCP连接与OKHTTP复用连接池
Android网络编程(八)源码解析OkHttp后篇[复用连接池] 1.引子 在了解OkHttp的复用连接池之前,我们首先要了解几个概念. TCP三次握手 通常我们进行HTTP连接网络的时候我们会进行 ...
- 使用ThinkPHP实现生成/校验验证码功能
首先了解父类Verity.class.php(ThinkPHP/Library/Think/Verity.class.php)中的一些函数 1:check() 校验验证码是否正确 2:entry()输 ...