重庆思庄Oracle、Redhat认证学习论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 3829|回复: 2
打印 上一主题 下一主题

12c R2集群环境应用PSU

[复制链接]
跳转到指定楼层
楼主
发表于 2017-8-2 16:30:23 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
1、环境说明
OS版本:Oracle Linux 7.3
DB版本:12.2.0.1.0 64bit
数据库运行环境:RAC
psu补丁程序: 2612383012.2.0.1.170718
注意:
1)应用PSU之前,确保磁盘至少有5G的可用空间,否则环境检查的时候会失败,提示如下
Reason: Failed during Analysis:CheckNApplyReport Failed, [ Prerequisite Status: FAILED, Prerequisite output:
The details are:
Failed during Analysis: CheckSystemSpaceFailed, [ Prerequisite Status: FAILED, Prerequisite output:
The details are:
2)应用PSU之前,确保PSU包所属ownergrid且有775的权限,因为应用PSU过程中会切换到grid用户执行脚本。

以下实验以节点1为例,节点2同理

2opatch 工具检查
1grid
[grid@rac01 OPatch]$ ./opatch version
OPatch Version: 12.2.0.1.6
OPatch succeeded.
[grid@rac01 OPatch]$
2oracle
[oracle@rac01 OPatch]$ ./opatch version
OPatch Version: 12.2.0.1.6
OPatch succeeded.

[oracle@rac01 OPatch]$

3opatch检查
1grid
[grid@rac01 OPatch]$ ./opatch lsinv
Oracle Interim Patch Installer version 12.2.0.1.6
Copyright (c) 2017, Oracle Corporation.  All rights reserved.
Oracle Home      : /u01/app/grid/product/12.2.0/grid
Central Inventory : /u01/app/grid/oraInventory
   from           :/u01/app/grid/product/12.2.0/grid/oraInst.loc
OPatch version   : 12.2.0.1.6
OUI version      : 12.2.0.1.4
Log file location :/u01/app/grid/product/12.2.0/grid/cfgtoollogs/opatch/opatch2017-08-01_14-44-14PM_1.log
Lsinventory Output file location :/u01/app/grid/product/12.2.0/grid/cfgtoollogs/opatch/lsinv/lsinventory2017-08-01_14-44-14PM.txt
--------------------------------------------------------------------------------
Local Machine Information::
Hostname: rac01
ARU platform id: 226
ARU platform description:: Linux x86-64
Installed Top-level Products (1):
Oracle Grid Infrastructure 12c                                      12.2.0.1.0
There are 1 products installed in this Oracle Home.
There are no Interim patches installed in thisOracle Home.
Patch level status of Cluster nodes :
PatchingLevel                  Nodes
--------------                  -----
0                               rac01,rac02
--------------------------------------------------------------------------------
OPatch succeeded.
2oracle
[oracle@rac01 OPatch]$ ./opatch lsinv
Oracle Interim Patch Installer version 12.2.0.1.6
Copyright (c) 2017, Oracle Corporation.  All rights reserved.
Oracle Home      : /u01/app/oracle/product/12.2.0/db_2
Central Inventory : /u01/app/grid/oraInventory
   from          : /u01/app/oracle/product/12.2.0/db_2/oraInst.loc
OPatch version   : 12.2.0.1.6
OUI version      : 12.2.0.1.4
Log file location :/u01/app/oracle/product/12.2.0/db_2/cfgtoollogs/opatch/opatch2017-08-01_14-45-02PM_1.log
Lsinventory Output file location :/u01/app/oracle/product/12.2.0/db_2/cfgtoollogs/opatch/lsinv/lsinventory2017-08-01_14-45-02PM.txt
--------------------------------------------------------------------------------
Local Machine Information::
Hostname: rac01
ARU platform id: 226
ARU platform description:: Linux x86-64
Installed Top-level Products (1):
Oracle Database 12c                                                 12.2.0.1.0
There are 1 products installed in this Oracle Home.
There are no Interim patches installed in thisOracle Home.
--------------------------------------------------------------------------------

OPatch succeeded.

4OPatch升级
说明:应用该psu要求OPatch工具版本为12.2.0.1.7或更高

1)上传最新OPatch工具
分享到:  QQ好友和群QQ好友和群 QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
收藏收藏 支持支持 反对反对
回复

使用道具 举报

沙发
 楼主| 发表于 2017-8-2 16:35:13 | 只看该作者
7、运行Datapatch
(1)登陆数据库,open所有pdb
说明:两个节点都open所有pdb

SQL> show pdbs;
    CON_ID CON_NAME                       OPEN MODE  RESTRICTED
---------- ------------------------------ ---------- ----------
         2 PDB$SEED                       READ ONLY  NO
         3 ORCLPDB                        MOUNTED
SQL> alter pluggable database all open;

Warning: PDB altered with errors.

打开pdb时有警告,分析alert日志
****************************************************************
Post plug operations are now complete.
Pluggable database ORCLPDB with pdb id - 3 is now marked as NEW.
****************************************************************
ORCLPDB(3):Database Characterset for ORCLPDB is AL32UTF8
2017-08-02T14:54:06.316613+08:00
ORCLPDB(3):***************************************************************
ORCLPDB(3):WARNING: Pluggable Database ORCLPDB with pdb id - 3 is
ORCLPDB(3):         altered with errors or warnings. Please look into
ORCLPDB(3):         PDB_PLUG_IN_VIOLATIONS view for more details.
ORCLPDB(3):***************************************************************

根据提示查询PDB_PLUG_IN_VIOLATIONS视图,查询结果如下:

SQL> select Name,CAUSE,ERROR_NUMBER,MESSAGE,STATUS from PDB_PLUG_IN_VIOLATIONS;
ORCLPDB    SQL Patch                  0 DBRU bundle patch 170718 (DATABASE RELEASE UPDATE 12.2.0.1.170718): Installed in the CDB but not in the PDB.   PENDING
message为:dbru成功应用在CDB但是没有应用在PDB,直接忽略

(2)运行Datapatch
说明:./datapatch –verbose只在其中一个节点运行即可
部分日志如下:
[oracle@rac01 ~]$ cd $ORACLE_HOME/
[oracle@rac01 db_2]$ cd OPatch
[oracle@rac01 OPatch]$ ./datapatch -verbose
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
        LANGUAGE = (unset),
        LC_ALL = (unset),
        LANG = "us"
    are supported and installed on your system.
perl: warning: Falling back to the standard locale ("C").
SQL Patching tool version 12.2.0.1.0 Production on Wed Aug  2 15:05:11 2017
Copyright (c) 2012, 2017, Oracle.  All rights reserved.

Log file for this invocation: /u01/app/oracle/cfgtoollogs/sqlpatch/sqlpatch_40267_2017_08_02_15_05_12/sqlpatch_invocation.log

Connecting to database...OK
Note:  Datapatch will only apply or rollback SQL fixes for PDBs
       that are in an open state, no patches will be applied to closed PDBs.
       Please refer to Note: Datapatch: Database 12c Post Patch SQL Automation
       (Doc ID 1585822.1)
Bootstrapping registry and package to current versions...
catconExec failed during bootstrap
................................
................................
................................
    SQL> ALTER SYSTEM KILL SESSION '109,17887' force timeout 0 -- process 40353
      2  /
   
    System altered.
   
    SQL>
    SQL>
    SQL> ALTER SYSTEM KILL SESSION '107,38288' force timeout 0 -- process 40354
      2  /
   
    System altered.
   
    SQL>
    SQL>
    SQL> ALTER SYSTEM KILL SESSION '100,45134' force timeout 0 -- process 40356
      2  /
   
    System altered.
..........................................
..........................................
..........................................


回复 支持 反对

使用道具 举报

板凳
 楼主| 发表于 2017-8-2 16:36:25 | 只看该作者
8、验证
(1)grid用户
[grid@rac01 ~]$ cd $ORACLE_HOME
[grid@rac01 grid]$ cd OPatch
[grid@rac01 OPatch]$ ./opatch lsinv
Oracle Interim Patch Installer version 12.2.0.1.9
Copyright (c) 2017, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/app/grid/product/12.2.0/grid
Central Inventory : /u01/app/grid/oraInventory
   from           : /u01/app/grid/product/12.2.0/grid/oraInst.loc
OPatch version    : 12.2.0.1.9
OUI version       : 12.2.0.1.4
Log file location : /u01/app/grid/product/12.2.0/grid/cfgtoollogs/opatch/opatch2017-08-02_15-59-51PM_1.log

Lsinventory Output file location : /u01/app/grid/product/12.2.0/grid/cfgtoollogs/opatch/lsinv/lsinventory2017-08-02_15-59-51PM.txt

--------------------------------------------------------------------------------
Local Machine Information::
Hostname: rac01
ARU platform id: 226
ARU platform description:: Linux x86-64

Installed Top-level Products (1):

Oracle Grid Infrastructure 12c                                       12.2.0.1.0
There are 1 products installed in this Oracle Home.


Interim patches (3) :

Patch  26123830     : applied on Wed Aug 02 14:19:07 CST 2017
Unique Patch ID:  21405588
Patch description:  "DATABASE RELEASE UPDATE: 12.2.0.1.170718 (26123830)"
   Created on 7 Jul 2017, 00:33:59 hrs PST8PDT
   Bugs fixed:
     23026585, 24336249, 24929210, 24942749, 25036474, 25110233, 25410877
     25417050, 25427662, 25459958, 25547901, 25569149, 25600342, 25600421
     25606091, 25655390, 25662088, 24385983, 24923215, 25099758, 25429959
     25662101, 25728085, 25823754, 22594071, 23665623, 23749454, 24326846
     24334708, 24560906, 24573817, 24578797, 24609996, 24624166, 24668398
     24674955, 24744686, 24811725, 24827228, 24831514, 24908321, 24976007
     25184555, 25210499, 25211628, 25223839, 25262869, 25316758, 25337332
     25455795, 25457409, 25539063, 25546608, 25612095, 25643931, 25410017
     22729345, 24485174, 24509056, 24714096, 25329664, 25410180, 25607726
     25957038, 25973152, 26024732, 24376878, 24589590, 24676172, 23548817
     24796092, 24907917, 25044977, 25736747, 25766822, 25856821, 25051628
     24534401, 24835919, 25050160, 25395696, 25430120, 25616359, 25715167
     25967985

Patch  25586399     : applied on Wed Aug 02 14:18:21 CST 2017
Unique Patch ID:  21306685
Patch description:  "ACFS Patch Set Update : 12.2.0.1.170718 (25586399)"
   Created on 16 Jun 2017, 00:35:19 hrs PST8PDT
   Bugs fixed:
     24679041, 24964969, 25098392, 25078431, 25491831

Patch  26002778     : applied on Wed Aug 02 14:14:13 CST 2017
Unique Patch ID:  21306682
Patch description:  "OCW Patch Set Update : 12.2.0.1.170718 (26002778)"
   Created on 3 Jul 2017, 03:26:30 hrs PST8PDT
   Bugs fixed:
     26144044, 25541343, 25715179, 25493588, 24932026, 24801915, 25832375
     25728787, 25825732, 24578464, 25832312, 25742471, 25790699, 25655495
     25307145, 25485737, 25505841, 25697364, 24663993, 25026470, 25591658
     25537905, 24451580, 25409838, 25371632, 25569634, 25245759, 24665035
     25646592, 25025157, 24732650, 24664849, 24584419, 24423011, 24831158
     25037836, 25556203, 24464953, 24657753, 25197670, 24796183, 20559126
     25197395, 24808260



--------------------------------------------------------------------------------

OPatch succeeded.
[grid@rac01 OPatch]$
(2)oracle用户
[oracle@rac01 ~]$ cd $ORACLE_HOME
[oracle@rac01 db_2]$ cd OPatch
[oracle@rac01 OPatch]$ ./opatch lsinv
Oracle Interim Patch Installer version 12.2.0.1.9
Copyright (c) 2017, Oracle Corporation.  All rights reserved.


Oracle Home       : /u01/app/oracle/product/12.2.0/db_2
Central Inventory : /u01/app/grid/oraInventory
   from           : /u01/app/oracle/product/12.2.0/db_2/oraInst.loc
OPatch version    : 12.2.0.1.9
OUI version       : 12.2.0.1.4
Log file location : /u01/app/oracle/product/12.2.0/db_2/cfgtoollogs/opatch/opatch2017-08-02_15-59-04PM_1.log

Lsinventory Output file location : /u01/app/oracle/product/12.2.0/db_2/cfgtoollogs/opatch/lsinv/lsinventory2017-08-02_15-59-04PM.txt

--------------------------------------------------------------------------------
Local Machine Information::
Hostname: rac01
ARU platform id: 226
ARU platform description:: Linux x86-64

Installed Top-level Products (1):

Oracle Database 12c                                                  12.2.0.1.0
There are 1 products installed in this Oracle Home.


Interim patches (2) :

Patch  26123830     : applied on Wed Aug 02 14:11:03 CST 2017
Unique Patch ID:  21405588
Patch description:  "DATABASE RELEASE UPDATE: 12.2.0.1.170718 (26123830)"
   Created on 7 Jul 2017, 00:33:59 hrs PST8PDT
   Bugs fixed:
     23026585, 24336249, 24929210, 24942749, 25036474, 25110233, 25410877
     25417050, 25427662, 25459958, 25547901, 25569149, 25600342, 25600421
     25606091, 25655390, 25662088, 24385983, 24923215, 25099758, 25429959
     25662101, 25728085, 25823754, 22594071, 23665623, 23749454, 24326846
     24334708, 24560906, 24573817, 24578797, 24609996, 24624166, 24668398
     24674955, 24744686, 24811725, 24827228, 24831514, 24908321, 24976007
     25184555, 25210499, 25211628, 25223839, 25262869, 25316758, 25337332
     25455795, 25457409, 25539063, 25546608, 25612095, 25643931, 25410017
     22729345, 24485174, 24509056, 24714096, 25329664, 25410180, 25607726
     25957038, 25973152, 26024732, 24376878, 24589590, 24676172, 23548817
     24796092, 24907917, 25044977, 25736747, 25766822, 25856821, 25051628
     24534401, 24835919, 25050160, 25395696, 25430120, 25616359, 25715167
     25967985

Patch  26002778     : applied on Wed Aug 02 14:10:14 CST 2017
Unique Patch ID:  21306682
Patch description:  "OCW Patch Set Update : 12.2.0.1.170718 (26002778)"
   Created on 3 Jul 2017, 03:26:30 hrs PST8PDT
   Bugs fixed:
     26144044, 25541343, 25715179, 25493588, 24932026, 24801915, 25832375
     25728787, 25825732, 24578464, 25832312, 25742471, 25790699, 25655495
     25307145, 25485737, 25505841, 25697364, 24663993, 25026470, 25591658
     25537905, 24451580, 25409838, 25371632, 25569634, 25245759, 24665035
     25646592, 25025157, 24732650, 24664849, 24584419, 24423011, 24831158
     25037836, 25556203, 24464953, 24657753, 25197670, 24796183, 20559126
     25197395, 24808260



--------------------------------------------------------------------------------

OPatch succeeded.
[oracle@rac01 OPatch]$

(3)查看dba_registry_sqlpatch
SQL> select PATCH_ID,PATCH_UID,VERSION,ACTION,STATUS,ACTION_TIME,BUNDLE_SERIES,BUNDLE_ID,PATCH_DESCRIPTOR from dba_registry_sqlpatch;

  PATCH_ID  PATCH_UID VERSION   ACTION   STATUS     ACTION_TIME          BUNDLE_SERIES    BUNDLE_ID PATCH_DESCRIPTOR
---------- ---------- --------- -------- ---------- -------------------- --------------- ---------- ------------------------------
  26123830   21405588 12.2.0.1  APPLY    SUCCESS    02-AUG-17 10.56.06.2 DBRU                170718 <?xml version="1.0" encoding="
                                                    92889 AM                                        GBK"?>
                                                                                                    <sqlPatch ID="26123830" unique
                                                                                                    PatchID="2140
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|手机版|小黑屋|重庆思庄Oracle、Redhat认证学习论坛 ( 渝ICP备12004239号-4 )

GMT+8, 2024-11-28 14:04 , Processed in 0.125801 second(s), 22 queries .

重庆思庄学习中心论坛-重庆思庄科技有限公司论坛

© 2001-2020

快速回复 返回顶部 返回列表