当前位置:  数据库>oracle

Oracle 11.2.0.4 DataGuard 环境打PSU,OJVM PSU补丁快速参考

    来源: 互联网  发布时间:2017-06-24

    本文导语: 环境: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. ...

环境: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;
    2.关闭备库应用补丁,但不执行脚本(catpatch.sql等),启动到mount,不启用日志恢复

    lsnrctl stop
    SQL> shutdown immediate;

    1).OPatch更新
    2).应用PSU补丁 但不执行数据库脚本
    3).应用OJVM PSU补丁 但不执行数据库脚本

    NOTE:上面步骤跟《Oracle 11.2.0.4单实例打PSU,OJVM PSU补丁快速参考》区别不大,但是注意只是软件应用补丁,不要执行数据库脚本。

    最后启动数据库到mount,启动监听
    SQL> startup mount;
    lsnrctl start

    3.关闭主库应用补丁,执行脚本(run catpatch/catbundle/catcpu等)

    lsnrctl stop
    SQL> shutdown immediate;

    1).OPatch更新
    2).应用PSU补丁 执行数据库脚本
    3).应用OJVM PSU补丁 执行数据库脚本

    4.启动主库,重新开启日志传送到备库

    最后确认正常启动主库数据库和监听, 然后重新开启日志传送到备库
    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;
    5.备库开启日志恢复

    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;
    6.检查补丁应用情况

    $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补丁。

    Reference
    • How do you apply a Patchset,PSU or CPU in a Data Guard Physical Standby configuration (文档 ID 278641.1)


        
     
     
     
    本站(WWW.)旨在分享和传播互联网科技相关的资讯和技术,将尽最大努力为读者提供更好的信息聚合和浏览方式。
    本站(WWW.)站内文章除注明原创外,均为转载、整理或搜集自网络。欢迎任何形式的转载,转载请注明出处。












  • 相关文章推荐
  • Oracle将发布41个安全补丁
  • 急求SCO UNIX 5.06的ORACLE补丁包oss459a.z,请问各位大侠,哪里可以下载,急等!!!
  • AS3安装Oracle 9.2.0前,打补丁出错,导致系统无法引导.大侠们帮忙
  • turbolinux7.1 安装 oracle817 的问题 补丁binutils-2.11.92.0.7-2.i586.rpm不能安装
  • 那位仁兄有oracle8i for red hat linux9 的 glibc-2.1.3-stubs.tar.gz 补丁程序?急用!
  • 快一个月了,我参考了所有的安装帖子,下了所有的补丁,Oracle安装依然出错。为什么??想哭。
  • VMware中linux环境下oracle安装图文教程(二)ORACLE 10.2.05版本的升级补丁安装
  • oracle for Linux 的补丁在哪里下??我怎么在Oracle的站点上找不到??
  • Linux下安装Oracle 11G的语义网补丁
  • Oracle 12c发布简单介绍及官方下载地址
  • 在linux下安装oracle,如何设置让oracle自动启动!也就是让oracle那个服务自动启动,不是手动的
  • oracle 11g最新版官方下载地址
  • 请问su oracle 和su - oracle有什么不同?
  • Oracle 数据库(oracle Database)Select 多表关联查询方式
  • 虚拟机装Oracle R12与Oracle10g
  • Oracle数据库(Oracle Database)体系结构及基本组成介绍
  • Oracle 数据库开发工具 Oracle SQL Developer
  • 如何设置让Oracle SQL Developer显示的时间包含时分秒
  • Oracle EBS R12 支持 Oracle Database 11g
  • Oracle 10g和Oracle 11g网格技术介绍
  • SCO unix下安装oracle,但没有光盘,请大家推荐一个oracle下载站点(unix版本的)。谢谢!!!!
  • oracle中如何把表中具有相同值列的多行数据合并成一行
  • 请问大家用oracle数据库, 用import oracle.*;下的东西么? 还是用标准库?
  • Oracle 数据库(oracle Database)性能调优技术详解
  • Linux /$ORACLE_HOME $ORACLE_HOME
  • ORACLE日期相关操作
  • Linux系统下Oracle的启动与Oracle监听的启动
  • ORACLE数据库常用字段数据类型介绍
  • 请问在solaris下安装ORACLE,用root用户和用oracle用户安装有什么区别么?
  • Oracle 12c的九大最新技术特性介绍
  • 网间Oracle的连接,远程连接Oracle服务器??


  • 站内导航:


    特别声明:169IT网站部分信息来自互联网,如果侵犯您的权利,请及时告知,本站将立即删除!

    ©2012-2021,,E-mail:www_#163.com(请将#改为@)

    浙ICP备11055608号-3