设为首页 收藏本站
查看: 698|回复: 0

[经验分享] Oracle 12.1.0.1 GI+DATABASE打PSU-Sysdba

[复制链接]

尚未签到

发表于 2018-9-9 06:52:55 | 显示全部楼层 |阅读模式
  12.1.0.1 打Patch Set Update 12.1.0.1.9 (Oct2015)
  机器:两台OLE6.5的,并且安装好12.1.0.1的RAC
  前期准备:下载好p6880880_121010_Linux-x86-64(OPATCH工具包),p21551666_121010_Linux-x86-64(GI和DATABASE的PSU)
  实施过程:
  首先升级GI软件的OPATCH工具
  su - grid
  --我的p6880880_121010_Linux-x86-64放在/u01/app/opatch/目录下
  cd /u01/app/opatch/
  unzip p6880880_121010_Linux-x86-64
  [grid@rac1 opatch]$ which crs_stat
  /u01/app/grid/12.1.0.1/bin/crs_stat
  --将原先的OPatch 工具进行备份
  su -
  cd /u01/app/grid/12.1.0.1/
  mv OPatch/ OPatch_bak
  ---将解压好的OPatch复制到/u01/app/grid/12.1.0.1/ 进行opatch升级
  mv /u01/app/opatch/OPatch/   /u01/app/grid/12.1.0.1
  su - grid
  [grid@rac1 OPatch]$ ./opatch version
  OPatch Version: 12.1.0.1.9
  OPatch succeeded.
  --database软件的opatch升级
  su - oracle
  cd /u01/app/opatch/
  --同样的以ORACLE用户来解压OPatch工具
  unzip p6880880_121010_Linux-x86-64
  [oracle@rac1 opatch]$ which sqlplus
  /u01/app/oracle/12.1.0/db_1/bin/sqlplus
  mv /u01/app/oracle/12.1.0/db_1/OPatch /u01/app/oracle/12.1.0/db_1/OPatch_bak
  mv /u01/app/opatch/OPatch/ /u01/app/oracle/12.1.0/db_1
  cd /u01/app/oracle/12.1.0/db_1/OPatch
  [oracle@rac1 OPatch]$ ./opatch version
  OPatch Version: 12.1.0.1.9
  OPatch succeeded.
  以上升级OPatch工具均要在两个节点上进行
  接下来升级GI
  升级前可以先对GI软件进行备份
  su -
  crsctl stop crs
  然后把GI软件tar
  其实就算补丁打失败了也可以rollback
  cd /u01/app/grid/12.1.0.1/OPatch/ocm/bin/
  [grid@rac1 bin]$ chmod u+x emocmrsp
  [grid@rac1 bin]$ ./emocmrsp
  OCM Installation Response Generator 10.3.7.0.0 - Production
  Copyright (c) 2005, 2012, Oracle and/or its affiliates.  All rights reserved.
  Provide your email address to be informed of security issues, install and
  initiate Oracle Configuration Manager. Easier for you if you use your My
  Oracle Support Email address/User Name.
  Visit http://www.oracle.com/support/policies.html for details.
  Email address/User Name:
  You have not provided an email address for notification of security issues.
  Do you wish to remain uninformed of security issues ([Y]es, [N]o) [N]:  y
  The OCM configuration response file (ocm.rsp) was successfully created.
  [grid@rac1 bin]$
  [grid@rac1 bin]$
  [grid@rac1 bin]$ ls -l
  total 16
  -rwxr-x--- 1 grid oinstall 9063 Nov 27  2009 emocmrsp
  -rw-r--r-- 1 grid oinstall  621 Oct 28 11:26 ocm.rsp
  [oracle@rac1 OPatch]$ cd /u01/app/oracle/12.1.0/db_1/OPatch
  [oracle@rac1 bin]$ ls -l
  total 12
  -rwxr-x--- 1 oracle oinstall 9063 Nov 27  2009 emocmrsp
  [oracle@rac1 bin]$ chmod u+x emocmrsp
  [oracle@rac1 bin]$ ls -l
  total 12
  -rwxr-x--- 1 oracle oinstall 9063 Nov 27  2009 emocmrsp
  [oracle@rac1 bin]$ ./emocmrsp
  OCM Installation Response Generator 10.3.7.0.0 - Production
  Copyright (c) 2005, 2012, Oracle and/or its affiliates.  All rights reserved.
  Provide your email address to be informed of security issues, install and
  initiate Oracle Configuration Manager. Easier for you if you use your My
  Oracle Support Email address/User Name.
  Visit http://www.oracle.com/support/policies.html for details.
  Email address/User Name:
  You have not provided an email address for notification of security issues.
  Do you wish to remain uninformed of security issues ([Y]es, [N]o) [N]:  y
  The OCM configuration response file (ocm.rsp) was successfully created.
  ----检查每个数据库的库存信息的一致性。
  /u01/app/grid/12.1.0.1/OPatch/opatch lsinventory -detail -oh /u01/app/grid/12.1.0.1
  /u01/app/oracle/12.1.0/db_1/OPatch/opatch lsinventory -detail -oh /u01/app/oracle/12.1.0/db_1
  /u01/app/grid/12.1.0.1/OPatch/opatchauto apply /u01/app/patch/21551666 -ocmrf /u01/app/grid/12.1.0.1/OPatch/ocm/bin/ocm.rsp
  --开始升级GI和database(我是GI+DATABASE一起打psu的,也可以分开打)
  [root@rac1 ~]# /u01/app/grid/12.1.0.2/OPatch/opatchauto apply /u01/app/patch/21551666 -ocmrf /u01/app/grid/12.1.0.2/OPatch/ocm/bin/ocm.rsp
  OPatch Automation Tool
  Copyright (c)2014, Oracle Corporation. All rights reserved.
  OPatchauto Version : 12.1.0.1.9
  OUI Version        : 12.1.0.1.0
  Running from       : /u01/app/grid/12.1.0.2
  opatchauto log file: /u01/app/grid/12.1.0.2/cfgtoollogs/opatchauto/21551666/opatch_gi_2015-10-28_15-21-23_deploy.log
  Parameter Validation: Successful
  Configuration Validation: Successful
  Patch Location: /u01/app/patch/21551666
  Grid Infrastructure Patch(es): 17077442 17303297 21352619
  DB Patch(es): 17077442 21352619
  Patch Validation: Successful
  Grid Infrastructure home:
  /u01/app/grid/12.1.0.2
  DB home(s):
  /u01/app/oracle/12.1.0/db_1
  Performing prepatch operations on CRS Home... Successful
  Applying patch(es) to "/u01/app/oracle/12.1.0/db_1" ...
  Patch "/u01/app/patch/21551666/17077442" successfully applied to "/u01/app/oracle/12.1.0/db_1".
  Patch "/u01/app/patch/21551666/21352619" successfully applied to "/u01/app/oracle/12.1.0/db_1".
  Applying patch(es) to "/u01/app/grid/12.1.0.2" ...
  Patch "/u01/app/patch/21551666/17077442" successfully applied to "/u01/app/grid/12.1.0.2".
  Patch "/u01/app/patch/21551666/17303297" successfully applied to "/u01/app/grid/12.1.0.2".
  Patch "/u01/app/patch/21551666/21352619" successfully applied to "/u01/app/grid/12.1.0.2".
  Performing postpatch operations on CRS Home... Successful
  SQL changes, if any, are applied successfully on the following database(s): rac
  Apply Summary:
  Following patch(es) are successfully installed:
  GI Home: /u01/app/grid/12.1.0.2: 17077442,17303297,21352619
  DB Home: /u01/app/oracle/12.1.0/db_1: 17077442,21352619
  opatchauto succeeded.
  ---以上步骤分别在两台机器上都要操作。
  --升级完后要对数据库进行应用,RAC只要在其中一个实例上运行就可以了
  su - oracle
  cd $ORACLE_HOME/OPatch
  ./datapatch -verbose
  cd $ORACLE_HOME/rdbms/admin
  sqlplus / as sysdba
  SQL> @utlrp.sql
  set line 200
  col COMMENTS for a20
  col ACTION_TIME for a30
  SELECT * FROM dba_registry_history;

  ACTION_TIME                    ACTION                         NAMESPACE                      VERSION                               >  ------------------------------ ------------------------------ ------------------------------ ------------------------------ ---------- ------------------------------ --------------------
  16-SEP-15 11.26.40.379388 AM   APPLY                          SERVER                         12.1.0.1                                0 PSU                            Patchset 12.1.0.0.0
  28-OCT-15 04.55.43.831149 PM   APPLY                          SERVER                         12.1.0.1                                9 PSU                            PSU 12.1.0.1.9
  28-OCT-15 04.55.47.057407 PM   APPLY                          SERVER                         12.1.0.1                                9 PSU                            PSU 12.1.0.1.9
  28-OCT-15 04.55.49.236190 PM   APPLY                          SERVER                         12.1.0.1                                9 PSU                            PSU 12.1.0.1.9
  28-OCT-15 04.55.50.409272 PM   APPLY                          SERVER                         12.1.0.1                                9 PSU                            PSU 12.1.0.1.9
  --查询结果是数据库已经应用了补丁了。


运维网声明 1、欢迎大家加入本站运维交流群:群②:261659950 群⑤:202807635 群⑦870801961 群⑧679858003
2、本站所有主题由该帖子作者发表,该帖子作者与运维网享有帖子相关版权
3、所有作品的著作权均归原作者享有,请您和我们一样尊重他人的著作权等合法权益。如果您对作品感到满意,请购买正版
4、禁止制作、复制、发布和传播具有反动、淫秽、色情、暴力、凶杀等内容的信息,一经发现立即删除。若您因此触犯法律,一切后果自负,我们对此不承担任何责任
5、所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其内容的准确性、可靠性、正当性、安全性、合法性等负责,亦不承担任何法律责任
6、所有作品仅供您个人学习、研究或欣赏,不得用于商业或者其他用途,否则,一切后果均由您自己承担,我们对此不承担任何法律责任
7、如涉及侵犯版权等问题,请您及时通知我们,我们将立即采取措施予以解决
8、联系人Email:admin@iyunv.com 网址:www.yunweiku.com

所有资源均系网友上传或者通过网络收集,我们仅提供一个展示、介绍、观摩学习的平台,我们不对其承担任何法律责任,如涉及侵犯版权等问题,请您及时通知我们,我们将立即处理,联系人Email:kefu@iyunv.com,QQ:1061981298 本贴地址:https://www.iyunv.com/thread-568357-1-1.html 上篇帖子: centos7 安装 oracle 11G 下篇帖子: oracle 开发中用到的函数总结
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

扫码加入运维网微信交流群X

扫码加入运维网微信交流群

扫描二维码加入运维网微信交流群,最新一手资源尽在官方微信交流群!快快加入我们吧...

扫描微信二维码查看详情

客服E-mail:kefu@iyunv.com 客服QQ:1061981298


QQ群⑦:运维网交流群⑦ QQ群⑧:运维网交流群⑧ k8s群:运维网kubernetes交流群


提醒:禁止发布任何违反国家法律、法规的言论与图片等内容;本站内容均来自个人观点与网络等信息,非本站认同之观点.


本站大部分资源是网友从网上搜集分享而来,其版权均归原作者及其网站所有,我们尊重他人的合法权益,如有内容侵犯您的合法权益,请及时与我们联系进行核实删除!



合作伙伴: 青云cloud

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