opatch on-line patch and standby-fisrt patch

on-line patch 有缺陷,不建议使用,standby-fisrt patch 可以考虑使用

#######sample 1
Oracle Patch Assurance - Data Guard Standby-First Patch Apply (文档 ID 1265700.1)

step 1.Perform Patch Binary Installation on Standby Only , (11.2.0.4.0 apply the patch 14368995) 
step 2.Evaluate Patch on Standby Database 
step 3.Data Guard Switchover and Apply Patch to New Physical Standby (11.2.0.4.0 apply the patch 14368995 )

so step 1 and step3 intervals can have maximum 31 day

#########standby DG Standby First Patch 安装

0.Oracle Data Guard Standby First Patch
Oracle Database - Enterprise Edition - Version 11.2.0.1 and later

1.
Data Guard长期支持在主系统和备用系统之间运行不同的配置。 Data Guard完全独立于数据库下的任何内容,因此您可以跨不同站点运行不同版本的操作系统,Oracle Clusterware,硬件或存储软件,而不受版本或时间的限制。 这包括对以下内容的支持:

硬件差异(例如X3 Exadata数据库云服务器和X4 Exadata数据库云服务器)
操作系统的差异(例如Oracle Linux 5.7与Oracle Linux 5.8)
数据库存储的差异(例如,基于Oracle ASM的存储与基于NFS的存储,或Exadata 11.2与Exadata 12.1)
Oracle Clusterware版本和补丁级别的差异(例如11.2.0.3 GIPSU4和11.2.0.3 GIPSU5)

2.
Oracle Data Guard Standby First Patch Apply为主数据库与其物理备用数据库之间的不同数据库主软件提供支持,以滚动方式应用和验证Oracle补丁和补丁包,对主数据库的风险最小。例如,对于data guard standby first补丁应用,首先将数据库主补丁应用到物理备用数据库。
备用服务器用于运行只读工作负载,或者读写工作负载(如果它是快照备用服务器),用于测试和评估补丁程序。通过评估后,补丁将安装在主系统上,从而更好地保证数据库主补丁的有效性和稳定性。

3.
Steps to Perform Data Guard Standby-First Patch Apply
To accomplish Data Guard Standby-First Patch Apply, do the following:

阶段1 - Perform Patch Binary Installation on Standby Only
阶段2 - Evaluate Patch on Standby Database
阶段3 - Complete Patch Installation or Rollback
Option 1: Apply Patch to Primary Database
Option 2: Data Guard Switchover, Apply Patch to New Standby
Option 3: Rollback Patch on Standby System.
NOTE :If Primary and Standby are RAC then follow RAC Patching methods

OPatch supports 3 different patch methods on a RAC environment:

Patching RAC as a single instance (All-Node Patch)
Patching RAC using a minimum down-time strategy (Min. Downtime Patch)
Patching RAC using a rolling strategy - No down time (Rolling Patch)

####
阶段1
1.1.Shutdown all standby instances on the standby database using the following commands (if Patch is not RAC Rolling):

Data Guard configuration managed by SQL*Plus or Data Guard broker:
SQL> shutdown immediate

1.2.Perform binary installation of the patch on the standby according to the patch README.
此时不要为修补程序执行SQL安装(例如,不要运行catbundle.sql或datapatch)。 在主数据库和所有备用数据库将其数据库主目录二进制文件修补到阶段3中的相同级别之后执行SQL安装。

以滚动Data Guard备用优先方式将Oracle Database Proactive Bundle Patch 12.1.0.2.170418安装到数据库软件主目录时,必须在12.1.0.2.170418之上安装补丁26112084。 有关详细信息,请参见文档2267842.1。

1.3.Restart the standby instances after the patch has been applied to all standby database ORACLE_HOME, as follows:

If Active Data Guard is used, then start all standby instances using the following command:

Data Guard configuration managed by SQL*Plus or the Data Guard broker:
SQL> startup

If Active Data Guard is not used, then mount all standby instances using the following command:

Data Guard configuration managed by SQL*Plus or the Data Guard broker:
SQL> startup mount
Restart the media recovery using the following command:

Data Guard configuration managed by SQL*Plus:
SQL> alter database recover managed standby database using current logfile disconnect;

Data Guard configuration managed by Data Guard broker:
The Data Guard broker will automatically restart the media recovery.

###########
第2阶段: 评估备用数据库上的修补程序
Oracle 建议的最佳做法和最全面的评估方法是以以下方式使用快照待机和 Oracle 实际应用程序测试:

可通过以下方式进行不太全面的评价:

如果使用 "活动数据保护" 选项, 请在只读模式下打开备用数据库, 并通过运行只读工作负载来强调备用数据库。
将备用数据库保持在装载状态的托管恢复模式, 并监视备用警报日志和跟踪文件中的任何问题。
复制到剪贴板

###############

阶段3:完成补丁安装或回滚
此时补丁仅应用于备用系统二进制文件; 因此,它只是部分安装。 环境可能保持混合版本状态最多31天。 要完成修补程序安装,必须在主系统上完成二进制安装,并且必须执行SQL安装(如果需要修补程序)。

一共有3个选项:

-》 阶段3选项1
中的主要步骤是将修补程序应用于主数据库,其中包括在主数据库主目录中执行二进制安装,以及对主数据库执行SQL安装。 SQL安装期间对主数据库所做的更改将通过重做传播到备用数据库。 选项1要求停机或完全停止主数据库,具体取决于补丁选择和支持的安装方法。

If the patch is not RAC Rolling Installable, then restart standby database recovery with the standby in mounted mode. Patches that are listed as RAC Rolling Installable in the patch README can be applied on the primary with the standby performing recovery in read only mode. However, patches that are not RAC Rolling Installable must stop read only recovery on the standby, bring the standby database to the mount state, and restart recovery prior to applying the patch to the primary database. For example, run the following command on the standby instance that performs media recovery:

但是,非RAC Rolling Installable的修补程序必须停止备用数据库上的只读恢复,将备用数据库置于装入状态,并在将修补程序应用于主数据库之前重新启动恢复。

3.1.1重启standby 到mount 状态,并开启mrp 服务
Data Guard configuration managed by SQL*Plus:
SQL> shutdown immediate
SQL> startup mount
SQL> alter database recover managed standby database using current logfile disconnect;

3.1.2.根据readme 在主库进行安装
Perform binary installation of the patch to the database home on the primary according to the patch README.

3.1.3.这个时候才可以开启SQL安装,只有在修补了主数据库和所有备用数据库以使用相同的软件之后,才能执行此步骤。
If required, perform SQL installation of the patch according to the patch README. This step may be performed only after the primary and all standby databases have been patched to use the same software.

3.1.4.如果是ADG ,可以开启ADG 模式,可选If using Active Data Guard, then restart into Active Data Guard mode:

Data Guard configuration managed by SQL*Plus:
SQL> alter database recover managed standby database cancel;
SQL> alter database open;
SQL> alter database recover managed standby database using current logfile disconnect;

-》 阶段3选项2

选项2中的主要步骤是执行Data Guard切换,在新的备用数据库主目录中执行二进制安装,以及对新的主数据库执行SQL安装。 在Data Guard切换期间,选项2对主数据库有短暂影响,但在完成补丁安装时对主数据库没有影响。

*注意:对于切换选项2,需要在切换到备用数据库(原始主数据库)之后立即开始修补,然后在主数据库上运行后续的Sql。

3.2.1
执行以下步骤,执行Data Guard切换,完成补丁安装:
按照“Data Guard概念和管理指南”中的说明执行Data Guard切换。
由SQL * Plus管理的Data Guard配置:

主数据库:
SQL> alter database commit to switchover to physical standby with session shutdown;
Standby Database:

Standby Database:
SQL> alter database commit to switchover to primary with session shutdown;
SQL> alter database open;

New Standby Database (Old Primary Database):
SQL> shutdown immediate
SQL> startup mount
SQL> alter database recover managed standby database using current logfile disconnect;

3.2.2但是,非RAC Rolling Installable的修补程序必须停止备用数据库上的只读恢复,将备用数据库置于装入状态,并在将修补程序应用于主数据库之前重新启动恢复。

Data Guard configuration managed by SQL*Plus:
SQL> shutdown immediate
SQL> startup mount
SQL> alter database recover managed standby database using current logfile disconnect;

3.2.3
根据补丁自述文件,在备用系统上对补丁进行二进制安装。

3.2.4
如果需要,请根据补丁自述文件在主数据库上执行补丁的SQL安装。 只有在修补了主数据库和所有备用数据库以使用相同的软件之后,才能执行此步骤。

3.2.5.如果是ADG ,可以开启ADG 模式,可选If using Active Data Guard, then restart into Active Data Guard mode:

Data Guard configuration managed by SQL*Plus:
SQL> alter database recover managed standby database cancel;
SQL> alter database open;
SQL> alter database recover managed standby database using current logfile disconnect;

#######sample 2

on-line patch 有缺陷,不建议使用

注意:
- 如果无法安排停机时间,并且需要紧急应用补丁,则建议使用在线补丁。

- 在线补丁消耗额外的内存,如果永久保留,内存消耗会随着系统中进程数量的增加而增加。

- 强烈建议回滚所有在线修补程序,并在下一个实例关闭或最早的维护时段使用常规(脱机)修补程序替换它们。

opatch on-line patch and standby-fisrt patch的更多相关文章

  1. 使用opatch工具 打补丁Patch 21352635 -(Database Patch Set Update 11.2.0.4.8)

    Patch 21352635 - Database Patch Set Update 11.2.0.4.8 一.OPatch工具检查及升级 OPatch工具包,在安装目录$ORACLE_HOME下,P ...

  2. diff和patch的使用、patch文件的格式解说

    为了弄懂 patch中的 p0   p1    和.orig文件是啥,找到了这篇文章! 来源:http://www.cnblogs.com/super119/archive/2010/12/18/19 ...

  3. git crate patch and check&apply patch(八)

    root@vmuer-VirtualBox:/opt/myProject# git format-patch master0001-add-c.c.patch root@vmuer-VirtualBo ...

  4. Oracle® Database Patch 19121551 - Database Patch Set Update 11.2.0.4.4 (Includes CPUOct2014) - 傲游云浏览

    Skip Headers Oracle® Database Patch 19121551 - Database Patch Set Update 11.2.0.4.4 (Includes CPUOct ...

  5. LPC18xx LPC43xx LPC4370 Bootrom USB DFU FPB - Flash Patch and Breakpoint Unit

    What is the difference between a Bootrom vs bootloader on ARM systems Bootrom Bootrom (or Boot ROM) ...

  6. diff和patch配合使用(转载备用)

    Linux下diff与patch命令的配合使用 在Linux下,diff与patch命令配合使用可以进行简单的代码维护工作. [A] diffdiff命令用于比较文件的差异,可以用于制作patch文件 ...

  7. Linux diff patch

    /***************************************************************************** * Linux diff patch * ...

  8. Oracle RAC环境下如何更新patch(Rolling Patch)

    Oracle RAC数据库环境与单实例数据库环境有很多共性,也有很多异性.对于数据库补丁的更新同样如此,都可以通过opatch来完成.但RAC环境的补丁更新有几种不同的更新方式,甚至于可以在零停机的情 ...

  9. 单机Oracle+asm(11.2.0.3.0) Patch Set Update(11.2.0.3.7 )

    之前写过一篇关于PSU升级的案例,参考如下: http://blog.csdn.net/jyjxs/article/details/8983880 但是,感觉有些地方理解的不是很透彻明白,照猫画虎的比 ...

随机推荐

  1. 浅谈android代码保护技术_加固

    可看原文: http://www.cnblogs.com/jiaoxiake/p/6536824.html 导语 我们知道Android中的反编译工作越来越让人操作熟练,我们辛苦的开发出一个apk,结 ...

  2. 通过批处理操作注册表实现winform应用中Webbrowser以指定的IE版本加载网页

    通过批处理操作注册表实现winform应用中Webbrowser以指定的IE版本加载网页 rem 强制WebBrowser控件使用指定IE版本显示应用的网页 IF EXIST %windir%\Sys ...

  3. Introduction to Partial View

    By Jignesh Trivedi on May 14, 2015 http://www.c-sharpcorner.com/UploadFile/ff2f08/partial-view-in-mv ...

  4. 深数据 - Deep Data

    暂无中文方面的信息,E文的也非常少,原文连接: A lot of great pieces have been written about the relatively recent surge in ...

  5. ORCHARD学习教程-安装

    安装说明:测试对象为正式版1.8 安装方法: 使用Microsoft Web Platform Installer 利用Microsoft WebMatrix 来安装 Working with Orc ...

  6. day3学python 字典+列表集合+文件读取

    字典+列表集合+文件读取 字典示例 ************************ 各地食品的三级菜单************************* 1.使用字典嵌套字典 2.采用死循环思路 3 ...

  7. J2EE 的体系结构

    J2EE 即Java2平台企业版,它提供了基于组件的方式来设计.开发.组装和部署企业应用.J2EE使用多层分布式的应用模型,这个多层通常通过三层或四层来实现: 1.客户层,运行在客户计算机上的组件.  ...

  8. 【离散数学】SDUT OJ 指定长度路径数

    指定长度路径数 Time Limit: 1000 ms Memory Limit: 65536 KiB Submit Statistic Problem Description 题目给出一个有n个节点 ...

  9. Python开发MapReduce系列(二)Python实现MapReduce分桶

    版权声明:本文为博主原创文章,未经博主允许不得转载   首先,先引出两点来展开下面的话题. (1)map阶段的排序是在hash之后,写入磁盘之前进行.排序的两个关键字是partition(分区编号)和 ...

  10. [HAOI2007]理想的正方形 BZOJ1047 二维RMQ

    题目描述 有一个a*b的整数组成的矩阵,现请你从中找出一个n*n的正方形区域,使得该区域所有数中的最大值和最小值的差最小. 输入输出格式 输入格式: 第一行为3个整数,分别表示a,b,n的值 第二行至 ...