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 ...
随机推荐
- 使用JavaScript实现ajax
实现ajax之前必须要创建一个 XMLHttpRequest 对象.如果不支持创建该对象的浏览器,则需要创建 ActiveXObject.具体方法如下: var xmlHttp; function ...
- TCP Socket Http关系
理解Tomcat内部处理网络数据的机制同时需要了解相关的一些术语,这样我们在阅读源码的时候能更加清楚的理解Connector下使用到的Socket通信原理. TCP/IP: 数据在网络传输是基于TCP ...
- 数据库导入导出expdp,impdp
数据库操作 (1)数据库导入导出expdp,impdp 在导入导出数据库的时候,经常会用到exp和imp,在数据量小的情况下可以随意使用,但是当数据量大,表中数据有百万,千万条的时候,就要等好久好久好 ...
- Software-Defined Networking A Comprehensive Survey --阅读_day1
The Internet has led to the creation of a digital society, where (almost) everything is connected an ...
- Microsoft MVP MSDN Magazine 最新期分享
下载地址:http://1105insight.com/portal/wts/uemcmQeeDyaq%5Ev2gAe6c3b0Djd 可在线或下载查看
- VMware Linux下拖拽补丁vmtools的安装和卸载
Linux下拖拽补丁vmtools的安装和卸载 by:授客 QQ:1033553122 Vmware 8.0.4为例子 步骤1.VM->Install Vmware Tools... 步骤2.查 ...
- Mongodb集群——master/slave
集群的配置 (本测试放于同一台机器进行配置,所以IP地址一样,如果是在不同的服务器上更换IP便可以) 1.目录结构 拷贝两份mongodb到/home/scotte.ye/mongo1 ...
- bootstrap使用基础
1.为了适应跨屏浏览,Bootstrap为单元格预定义了4种class ,分别对应于手机.ipad.笔记本电脑.台式机. <div class="row"> <d ...
- 在IE中,JS方法名和input的name重名时,调用该方法无效
在IE中,JS方法名和input的name重名时,调用该方法无效.提示:网页错误详细信息 用户代理: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.1 ...
- TCP是如何实现三次握手的?
什么是三次握手 TCP是网络传输层的协议,提供面向连接的可靠的字节流服务,要通信得先建立连接 所谓三次握手就是指,建立一个TCP连接时,需要CLient与Server发送三个包,确认连接的建立 这一过 ...