Oracle 11.2.0.4 DataGuard 环境打PSU,OJVM PSU补丁快速参考
环境:RHEL6.5 + Oracle 11.2.0.4 DataGuard physical standby
主库和备库都是单节点。
需求:主备库同时应用160719的PSU和OJVM PSU补丁。
先参考MOS文档 ID 278641.1 的解决方案如下:
SOLUTION
Process Overview:
In the primary disable log shipping to the standby site.
Shutdown the standby site and apply interim patchsets to the RDBMS binaries as per the README. This includes Patchset/Patchset Update(PSU)/Critical Patch Update (CPU). You will not be able to and do not need to run the scripts(catpatch.sql etc) against the standby rdbms itself. Start the standby site to mount only, do not restart managed recovery.
Shutdown the primary site, apply the Patchset/PSU/CPU patch to the RDBMS binaries and patch the RDBMS itself using the instructions in the README (run catpatch/catbundle/catcpu etc).
NOTE: The latest Patchsets for Oracle 11gR2 (11.2.0) require to be installed into a new ORACLE_HOME. So mind to reset your Environment and copy corresponding Files (like SPFILE, Network Files,..) to the new ORACLE_HOME, too. Follow the Database Upgrade Guide for further Details.
Start the primary site, re-enable log shipping to the standby.
At the standby site restart redo apply/managed recovery and the RDBMS changes implemented in the Primary Site through catpatch/catbundle/catcpu will also be applied to the standby.
NOTE: Step 5. should be done immediately after upgrading the Database Binaries on the Standby Database. It is to ensure the Data Dictionary (CATPROC)-Version matches the Version of the Database Binaries. If this does not match (eg. when you upgrade the Standby Database Binaries first and perform a Role Change on the Standby before you upgrade the Primary) you may run into severe Problems. Having different Patchlevels in a Data Guard Physical Standby Database Environment is not supported anyway, see
Mixed Oracle Version support with Data Guard Redo Transport Services (Doc ID 785347.1)
for further Details and Reference.
- Checks to perform to ensure the patch has been applied successfully at the primary and standby sites.
提炼核心步骤就是:
- 1.主库禁用日志传送到备库
- 2.关闭备库应用补丁,但不执行脚本(catpatch.sql等),启动到mount,不启用日志恢复
- 3.关闭主库应用补丁,执行脚本(run catpatch/catbundle/catcpu等)
- 4.启动主库,重新开启日志传送到备库
- 5.备库开启日志恢复
- 6.检查补丁应用情况
1.主库禁用日志传送到备库
```
主库;
show parameter log_archive_dest_state_X
alter system set log_archive_dest_state_X=defer scope=both sid='*';
SQL> show parameter log_archive_dest_2
NAME TYPE VALUE
log_archive_dest_2 string SERVICE=ZHZYNEW2 ASYNC LGWR VA
LID_FOR=(ONLINE_LOGFILES,PRIMA
RY_ROLE) DB_UNIQUE_NAME=ZHZYNE
W2
SQL> show parameter log_archive_dest_state_2
NAME TYPE VALUE
log_archive_dest_state_2 string enable
所以我这里的环境执行:
SQL> alter system set log_archive_dest_state_2=defer scope=both;
<h1 id="2">2.关闭备库应用补丁,但不执行脚本(catpatch.sql等),启动到mount,不启用日志恢复</h1>
lsnrctl stop
SQL> shutdown immediate;
1).OPatch更新
2).应用PSU补丁 但不执行数据库脚本
3).应用OJVM PSU补丁 但不执行数据库脚本
NOTE:上面步骤跟《[Oracle 11.2.0.4单实例打PSU,OJVM PSU补丁快速参考](http://www.cnblogs.com/jyzhao/p/5895617.html)》区别不大,但是注意只是软件应用补丁,不要执行数据库脚本。
最后启动数据库到mount,启动监听
SQL> startup mount;
lsnrctl start
<h1 id="3">3.关闭主库应用补丁,执行脚本(run catpatch/catbundle/catcpu等)</h1>
lsnrctl stop
SQL> shutdown immediate;
1).OPatch更新
2).应用PSU补丁 执行数据库脚本
3).应用OJVM PSU补丁 执行数据库脚本
<h1 id="4">4.启动主库,重新开启日志传送到备库</h1>
最后确认正常启动主库数据库和监听, 然后重新开启日志传送到备库
SQL> alter system set log_archive_dest_state_X=enable scope=both sid='*'
这里环境就是:
SQL> alter system set log_archive_dest_state_2=enable scope=both;
<h1 id="5">5.备库开启日志恢复</h1>
mount状态开启日志恢复:
SQL> startup mount;
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE disconnect;
最终可以切换为ADG:
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE CANCEL;
SQL> ALTER DATABASE OPEN;
SQL> ALTER DATABASE RECOVER MANAGED STANDBY DATABASE USING CURRENT LOGFILE DISCONNECT;
<h1 id="6">6.检查补丁应用情况</h1>
$ORACLE_HOME/OPatch/opatch lspatches
$ORACLE_HOME/OPatch/opatch lsinventory
SQL> select ACTION_TIME,ACTION,NAMESPACE,VERSION,BUNDLE_SERIES,ID from registry$history;
这里尤其注意第三项,备库只有在ADG模式下才可以查询。
主库补丁应用的查询结果:
SQL> r
1* select ACTION_TIME,ACTION,NAMESPACE,VERSION,BUNDLE_SERIES,ID from registry$history
ACTION_TIME ACTION NAMESPACE VERSION BUNDLE_SERIES ID
24-AUG-13 12.03.45.119862 PM APPLY SERVER 11.2.0.4 PSU 0
08-JUL-16 02.50.00.349757 PM APPLY SERVER 11.2.0.4 PSU 0
22-SEP-16 03.48.39.295292 PM jvmpsu.sql SERVER 11.2.0.4.160719OJVMPSU 0
22-SEP-16 03.49.37.935537 PM APPLY SERVER 11.2.0.4 PSU 160719
22-SEP-16 03.51.55.999773 PM APPLY SERVER 11.2.0.4.160719OJVMPSU 0
22-SEP-16 03.51.56.010800 PM APPLY 23177551
6 rows selected.
ADG模式下,最终备库补丁应用的查询结果:
SQL> select ACTION_TIME,ACTION,NAMESPACE,VERSION,BUNDLE_SERIES,ID from registry$history;
ACTION_TIME ACTION NAMESPACE VERSION BUNDLE_SERIES ID
24-AUG-13 12.03.45.119862 PM APPLY SERVER 11.2.0.4 PSU 0
08-JUL-16 02.50.00.349757 PM APPLY SERVER 11.2.0.4 PSU 0
22-SEP-16 03.48.39.295292 PM jvmpsu.sql SERVER 11.2.0.4.160719OJVMPSU 0
22-SEP-16 03.49.37.935537 PM APPLY SERVER 11.2.0.4 PSU 160719
22-SEP-16 03.51.55.999773 PM APPLY SERVER 11.2.0.4.160719OJVMPSU 0
22-SEP-16 03.51.56.010800 PM APPLY 23177551
6 rows selected.
至此已确定主库备库都已经成功完成应用PSU,OJVM PSU补丁。
<h1 id="7">Reference</h1>
- How do you apply a Patchset,PSU or CPU in a Data Guard Physical Standby configuration (文档 ID 278641.1)
Oracle 11.2.0.4 DataGuard 环境打PSU,OJVM PSU补丁快速参考的更多相关文章
- Oracle 11.2.0.1 ADG环境MRP进程遭遇ORA-600异常终止
环境:Linux + Oracle 11.2.0.1 ADG 现象:发现备库没有应用日志 1. 数据库查询备库目前状态 发现备库目前没有应用日志,apply lag已经显示备库有3天21小时多没有应用 ...
- Oracle 11.2.0.1 ADG环境MRP进程遭遇ORA
环境:Linux + Oracle 11.2.0.1 ADG现象:发现备库没有应用日志 1. 数据库查询备库目前状态发现备库目前没有应用日志,apply lag已经显示备库有3天21小时多没有应用日志 ...
- Oracle 11.2.0.4在线(Online mode)打补丁14084247解决WRH$_ACTIVE_SESSION_HISTORY不会自动切割的问题
安装了Oracle Database Release 11.2.0.4之后,发现WRH$_ACTIVE_SESSION_HISTORY始终不会自动分割删除, 后来才发现需要应用补丁:14084 ...
- Oracle安装部署,版本升级,应用补丁快速参考
一.Oracle安装部署 1.1 单机环境 1.2 Oracle RAC环境 1.3 Oracle DataGuard环境 1.4 主机双机 1.5 客户端部署 二.Oracle版本升级 2.1 单机 ...
- Oracle 11.2.0.4单实例打PSU,OJVM PSU补丁快速参考
写在前面: 1.Oracel打每个补丁的操作有时存在差异,所以不管多熟悉,都应该在打任何补丁之前阅读新补丁中附带的readme. 2.Oracle每季度都会更新一个最新的PSU,本文最新指的是当前最新 ...
- Oracle 11.2.0.4单实例打补丁
Oracle 11.2.0.4单实例打PSU,OJVM PSU补丁快速参考 写在前面: · 1.Oracel打每个补丁的操作有时存在差异,所以不管多熟悉,都应该在打任何补丁之前阅读新补 ...
- Oracle 11.2.0.4.0 Dataguard部署和日常维护(1)-数据库安装篇
本次测试环境 系统版本 CentOS release 6.8 主机名 ec2t-userdata-01 ec2t-userdata-01 IP地址 10.189.102.118 10.189.100. ...
- 【Oracle】11G 11.2.0.4 RAC环境打补丁
一.准备工作 1,数据库环境 操作系统版本 : RedHat 7.2 x64 数据库版本 : Oracle 11.2.0.4 x64 RAC Grid : 11.2 ...
- 完整记录一则Oracle 11.2.0.4单实例打PSU补丁的过程
本文记录了打PSU的全过程,意在体会数据库打PSU补丁的整个过程. 1.OPatch替换为最新版本2.数据库软件应用19121551补丁程序3.数据库应用补丁4.验证PSU补丁是否应用成功 1.OPa ...
随机推荐
- ASP.NET Core 1.1 简介
ASP.NET Core 1.1 于2016年11月16日发布.这个版本包括许多伟大的新功能以及许多错误修复和一般的增强.这个版本包含了多个新的中间件组件.针对Windows的WebListener服 ...
- SuperMap iClient for JavaScript 新手入门
地理信息系统(英语:Geographic Information System,缩写:GIS)是一门综合性学科,结合地理学与地图学,已经广泛的应用在不同的领域,是用于输入.存储.查询.分析和显示地理数 ...
- 做一个gulp+webpack+vue的单页应用开发架子
1.目标 最近项目上的事情不多,根据我自己的开发习惯,决定开发一些简单的开发架子,方便以后事情多的时候直接套用.本文讲的一个gulp+webpack+vue的单页应用架子,想要达到的目的: 可以通过命 ...
- WebForm获取GET或者POST参数到实体的转换,ADO.NET数据集自动转换实体
最近在修改维护以前的webform项目(维护别人开发的.....)整个aspx没有用到任何的控件,这个我也比较喜欢不用控件所以在提交信息的时候需要自己手动的去Request.QueryString[] ...
- iOS开发之ReactiveCocoa下的MVVM(干货分享)
最近工作比较忙,但还是出来更新博客了,今天给大家分享一些ReactiveCocoa以及MVVM的一些东西,干活还是比较足的.在之前发表过一篇博文,名字叫做<iOS开发之浅谈MVVM的架构设计与团 ...
- AFNetworking 3.0 源码解读(十一)之 UIButton/UIProgressView/UIWebView + AFNetworking
AFNetworking的源码解读马上就结束了,这一篇应该算是倒数第二篇,下一篇会是对AFNetworking中的技术点进行总结. 前言 上一篇我们总结了 UIActivityIndicatorVie ...
- 从源码浅析MVC的MvcRouteHandler、MvcHandler和MvcHttpHandler
熟悉WebForm开发的朋友一定都知道,Page类必须实现一个接口,就是IHttpHandler.HttpHandler是一个HTTP请求的真正处理中心,在HttpHandler容器中,ASP.NET ...
- 【C#公共帮助类】 ToolsHelper帮助类
这个帮助类,目前我们只用到了两个,我就先更新这两个,后面有用到的,我会继续更新这个Helper帮助类 在Tools.cs中 有很多方法 跟Utils里是重复的,而且Utils里的方法更加新一点,大家可 ...
- 纸箱堆叠 bzoj 2253
纸箱堆叠 (1s 128MB) box [问题描述] P 工厂是一个生产纸箱的工厂.纸箱生产线在人工输入三个参数 n, p, a 之后,即可自动化生产三边边长为 (a mod P, a^2 mod p ...
- BPM SharePoint解决方案分享
一.需求分析 SharePoint作为微软推出的协同类平台产品,为客户提供了门户.内容.文档.流程.社区.搜索.BI等一系列的解决方案,然而其流程功能由于设计理念差异,不能完全满足客户的需求,主要原因 ...