Chinaunix首页 | 论坛 | 博客
  • 博客访问: 143124
  • 博文数量: 34
  • 博客积分: 1557
  • 博客等级: 上尉
  • 技术积分: 245
  • 用 户 组: 普通用户
  • 注册时间: 2009-11-22 19:30
文章分类

全部博文(34)

文章存档

2017年(1)

2016年(1)

2015年(4)

2014年(2)

2011年(8)

2010年(6)

2009年(12)

我的朋友

分类: Oracle

2015-03-21 14:57:08

原文地址:rac如何打补丁9413827 作者:hxl

 
最近将rac数据库从11.2.0.1升级到11.2.0.4,在升级检查中发现缺少补丁9413827,下面的说明如何打该补丁,过程如下(前提条件是到官网下载该补丁的介质,并上传到两个节点上):
./runcluvfy.sh stage -pre crsinst -upgrade -n node1,node2 -rolling -src_crshome /u01/app/grid/11.2.0 -dest_crshome /u01/app/grid/11.2.0 -dest_version 11.2.0.4.0 -fixup -fixupdir /home/grid/fixup –verbose

 Checking for Oracle patch "9413827 or 9706490" in home "/u01/app/grid/11.2.0".

  Node Name     Applied                   Required                  Comment  

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

  node2         missing                   9413827 or 9706490        failed   

  node1         missing                   9413827 or 9706490        failed    



1.验证环境

[grid@node1 /]$ cd $ORACLE_HOME/OPatch
[grid@node1 ~]$./opatch lsinventory -detail -oh /u01/app/grid/11.2.0
[oracle@node1 /]$ cd $ORACLE_HOME/OPatch
[oracle@node1 ~]$./opatch lsinventory -detail -oh /u01/product/oracle/11.2.0/db_1


[grid@node2 /]$ cd $ORACLE_HOME/OPatch
[grid@node2 ~]$./opatch lsinventory -detail -oh /u01/app/grid/11.2.0
[oracle@node2 /]$ cd $ORACLE_HOME/OPatch
[oracle@node2 ~]$./opatch lsinventory -detail -oh /u01/product/oracle/11.2.0/db_1


2.关闭实例
使用oracle用户登录节点1
[oracle@node1 OPatch]$ srvctl stop home -o $ORACLE_HOME -s /home/oracle/sfile -n node1
登录到节点2上执行
[oracle@node1 OPatch]$ ssh node2
Last login: Fri Feb 28 09:05:31 2014 from 192.168.56.1
[oracle@node2 ~]$ srvctl stop home -o $ORACLE_HOME -s /home/oracle/sfile -n node2




3.关闭进程
root用户登录节点1
[root@node1 install]# /u01/app/grid/11.2.0/crs/install/rootcrs.pl -unlock


切换到节点2
[root@node1 install]# ssh node2
root@node2's password: 
Last login: Mon Mar  3 09:12:25 2014 from 192.168.56.1


[root@node2 ~]# /u01/app/grid/11.2.0/crs/install/rootcrs.pl -unlock


4.保存数据库配置文件
[oracle@node1 scripts]$ pwd
/u02/9413827/custom/server/9413827/custom/scripts
[oracle@node1 scripts]$ ./prepatch.sh  -dbhome $ORACLE_HOME
./prepatch.sh completed successfully.


登录到节点2
[oracle@node1 scripts]$ ssh node2
Last login: Mon Mar  3 16:44:45 2014 from node1


[oracle@node2 scripts]$ pwd
/soft/9413827/custom/server/9413827/custom/scripts
[oracle@node2 scripts]$ ./prepatch.sh  -dbhome $ORACLE_HOME
./prepatch.sh completed successfully.
[oracle@node2 scripts]$ 


5.给CRS打补丁
在节点1上执行
[grid@node1 9413827]$ /u01/app/grid/11.2.0/OPatch/opatch  napply /u02/9413827/ -local -oh /u01/app/grid/11.2.0/  -id 9413827


切换到节点2
[grid@node1 9413827]$ ssh node2
Last login: Mon Mar  3 09:13:02 2014 from 192.168.56.1


[grid@node2 9413827]$ /u01/app/grid/11.2.0/OPatch/opatch  napply /soft/9413827/ -local -oh /u01/app/grid/11.2.0/  -id 9413827
Invoking OPatch 11.1.0.6.6


Oracle Interim Patch Installer version 11.1.0.6.6
Copyright (c) 2009, Oracle Corporation.  All rights reserved.


UTIL session


Oracle Home       : /u01/app/grid/11.2.0
Central Inventory : /u01/product/oraInventory
   from           : /etc/oraInst.loc
OPatch version    : 11.1.0.6.6
OUI version       : 11.2.0.1.0
OUI location      : /u01/app/grid/11.2.0//oui
Log file location : /u01/app/grid/11.2.0/cfgtoollogs/opatch/opatch2014-03-03_17-14-31PM.log


Patch history file: /u01/app/grid/11.2.0/cfgtoollogs/opatch/opatch_history.txt


List of Homes on this system:


OPatchSession cannot load inventory for the given Oracle Home /u01/app/grid/11.2.0. Possible causes are:
   No read or write permission to ORACLE_HOME/.patch_storage
   Central Inventory is locked by another OUI instance
   No read permission to Central Inventory
   The lock file exists in ORACLE_HOME/.patch_storage
   The Oracle Home does not exist in Central Inventory


UtilSession failed: OracleHomeInventory gets null oracleHomeInfo


OPatch failed with error code 73


刚开始以为是权限的问题,设置了权限还是报错误,后来发现是两个节点的安装目录下的文件不一致导致的,最后将如下两个目录全部拷贝到节点2,问题解决
/u01/product/oraInventory
/u01/oraInventory


6.给数据库打补丁
在oracle用户下执行
[oracle@node1 db_1]$cd /u01/product/oracle/11.2.0/db_1/OPatch
[oracle@node1 db_1]$ ./opatch napply /u02/9413827/custom/server/ -local -oh $ORACLE_HOME  -id 9413827


切换到节点2
[oracle@node1 db_1]$ ssh node2
Last login: Mon Mar  3 17:02:36 2014 from node1


[oracle@node2 ~]$ cd /u01/product/oracle/11.2.0/db_1/OPatch


[oracle@node2 OPatch]$ ./opatch napply /soft/9413827/custom/server/ -local -oh $ORACLE_HOME  -id 9413827




7.配置CRSHOME
[root@node1 ~]#chmod +w /u01/app/grid/11.2.0/log/node1/agent
[root@node1 ~]#chmod +w /u01/app/grid/11.2.0/log/node1/agent/crsd
切换到节点2
[root@node1 log]# ssh node2
root@node2's password: 
Last login: Mon Mar  3 16:54:41 2014 from node1


[root@node2 ~]# chmod +w /u01/app/grid/11.2.0/log/node2/agent
[root@node2 ~]# chmod +w /u01/app/grid/11.2.0/log/node2/agent/crsd


8.配置RDBMS_HOME
[oracle@node1 scripts]$ cd /u02/9413827/custom/server/9413827/custom/scripts
[oracle@node1 scripts]$ ./postpatch.sh -dbhome $ORACLE_HOME


[oracle@node2 scripts]$cd /soft/9413827/custom/server/9413827/custom/scripts
[oracle@node1 scripts]$ ./postpatch.sh -dbhome $ORACLE_HOME




9.导入之前的状态
启动资源(root用户)
[root@node1 ~]# /u01/app/grid/11.2.0/crs/install/rootcrs.pl -patch
[root@node2 ~]# /u01/app/grid/11.2.0/crs/install/rootcrs.pl -patch


启动数据库(oracle用户)
[oracle@node1 ~]$ srvctl start home -o $ORACLE_HOME -s /home/oracle/sfile -n node1
[oracle@node1 ~]$ srvctl start home -o $ORACLE_HOME -s /home/oracle/sfile -n node2


-- The End --



阅读(1479) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~