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. WCF项目问题2-无法激活服务,因为它需要 ASP.NET 兼容性。没有未此应用程序启用 ASP.NET 兼容性。请在 web.config 中启用 ASP.NET 兼容性,或将 AspNetCompatibilityRequirementsAttribute.AspNetCompatibilityRequirementsMode 属性设置为 Required 以外的值。

    无法激活服务,因为它需要 ASP.NET 兼容性.没有未此应用程序启用 ASP.NET 兼容性.请在 web.config 中启用 ASP.NET 兼容性,或将 AspNetCompatibility ...

  2. CentOS7下源码包方式安装rabbitmq

    1.先安装erlang http://www.cnblogs.com/justphp/p/6093880.html 2.下载rabbitmq rpm包: wget http://www.rabbitm ...

  3. [GO]数组做函数参数

    package main import "fmt" //数组为函数参数,实际上是值传递//实参数据里的每个元素,给形参数组拷贝一份//这里形参的数组其实就是实参的复制品 func ...

  4. Laravel框架中的数据库CURD操作、连贯操作、链式操作的用法

    Laravel是一套简洁.优雅的PHP Web开发框架(PHP Web Framework).它可以让你从面条一样杂乱的代码中解脱出来:它可以帮你构建一个完美的网络APP,而且每行代码都可以简洁.富于 ...

  5. SharePoint 2013备份方法整理

    关于SharePoint备份 SharePoint的备份是一个数据副本,主要用于在系统出现故障后还原和恢复该数据. 备份的工具主要有以下几种(写的不全,欢迎补充.) SharePoint管理中心的备份 ...

  6. ArcGIS 工作经历【IFeatureBuffer】【CAD转SHP】

    由于工作需要,需要基于ArcGIS进行二次开发,软件的开发过程当中有一个非常重要的功能,就是需要把CAD的数据转换为shp文件保存,方便后面的使用编辑,存储. 先说一下功能的前提,需要将CAD转换为s ...

  7. ASP.NET Session原理及处理方法

    session是怎么存储,提取的 1.在服务器端有一个session池,用来存储每个用户提交session中的数据,Session对于每一个客户端(或者说浏览器实例)是“人手一份”,用户首次与Web服 ...

  8. Django 使用第三方服务发送电子邮件

    在 Django 网站中使用 mailgun 的邮件收发服务. 1.在 mailgun 官网上注册个账号(免费,免费账号每个月有10000条收发邮件的服务,对我来说已经完全够用了),注册完成后界面如图 ...

  9. Jenkins项目部署使用教程-----01安装

    基本配置: 1.Linux安装配置jdk环境 1.1.上传到 Linux 服务器:例如: 上传至: cd /usr/local 1.2.解压: rpm -ivh jdk-8u111-linux-x64 ...

  10. 【BZOJ4800】[CEOI2015 Day2]世界冰球锦标赛 (折半搜索)

    [CEOI2015 Day2]世界冰球锦标赛 题目描述 译自 CEOI2015 Day2 T1「Ice Hockey World Championship」 今年的世界冰球锦标赛在捷克举行.\(Bob ...