Oracle数据库数据恢复、性能优化

找回密码
注册
搜索
热搜: 活动 交友 discuz
发新帖

157

积分

0

好友

14

主题
1#
发表于 2014-2-7 14:48:05 | 查看: 5794| 回复: 2
安装PSU 11.2.0.3.8,升级前数据库GI/DB版本11.2.0.3.0 Linux x86-64
升级类型为Patching the GI Home and the Database Home Together, the GI Home Is Not Shared, the Database Home Is Not Shared, ACFS May Be Used
按照文档要求检查冲突、停止ACFS均成功,执行opatch auto时发生hang。具体如下

  1. [root@GG-rac1 OPatch]# ./opatch auto patches/
  2. Executing /u01/app/grid/product/11.2.0/grid/perl/bin/perl ./crs/patch11203.pl -patchdir . -patchn patches -paramfile /u01/app/grid/product/11.2.0/grid/crs/install/crsconfig_params
  3. /u01/app/grid/product/11.2.0/grid/crs/install/crsconfig_params
  4. /u01/app/grid/product/11.2.0/grid/crs/install/s_crsconfig_defs
  5. This is the main log file: /u01/app/grid/product/11.2.0/grid/cfgtoollogs/opatchauto2014-02-07_13-37-16.log
  6. This file will show your detected configuration and all the steps that opatchauto attempted to do on your system: /u01/app/grid/product/11.2.0/grid/cfgtoollogs/opatchauto2014-02-07_13-37-16.report.log
  7. 2014-02-07 13:37:16: Starting Clusterware Patch Setup
  8. Using configuration parameter file: /u01/app/grid/product/11.2.0/grid/crs/install/crsconfig_params
  9. (hang)
复制代码
main log文件中

  1. [root@GG-rac1 ~]# tail -f /u01/app/grid/product/11.2.0/grid/cfgtoollogs/opatchauto2014-02-07_14-15-05.log
  2. 2014-02-07 14:15:08: Successfully removed file: /tmp/filevXaY1H
  3. 2014-02-07 14:15:08: /bin/su exited with rc=75

  4. 2014-02-07 14:15:08: output is
  5. 2014-02-07 14:15:08: Patch type is
  6. 2014-02-07 14:15:08: GI patches are ./patches/17076717 ./patches/16902043
  7. 2014-02-07 14:15:08: DB patches are ./patches/17076717/custom/server/17076717 ./patches/16902043
  8. 2014-02-07 14:15:08: Oracle user for /u01/app/grid/product/11.2.0/grid is grid
  9. 2014-02-07 14:15:08: Running as user grid: /u01/app/grid/product/11.2.0/grid/OPatch/opatch util saveconfigurationsnapshot -configFile /u01/app/grid/product/11.2.0/grid/cfgtoollogs/opatchauto2014-02-07_14-15-05.cfg.log
  10. 2014-02-07 14:15:08: s_run_as_user2: Running /bin/su grid -c ' /u01/app/grid/product/11.2.0/grid/OPatch/opatch util saveconfigurationsnapshot -configFile /u01/app/grid/product/11.2.0/grid/cfgtoollogs/opatchauto2014-02-07_14-15-05.cfg.log '
  11. (hang)
复制代码
查看顶级进程,发现有个java程序CPU占用率100%

  1. [root@GG-rac1 ~]# top
  2. top - 14:15:41 up 8 days, 22:30,  3 users,  load average: 1.98, 2.07, 2.07
  3. Tasks: 304 total,   2 running, 302 sleeping,   0 stopped,   0 zombie
  4. Cpu(s): 13.2%us,  0.2%sy,  0.0%ni, 86.5%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
  5. Mem:  66068508k total, 15920372k used, 50148136k free,   284476k buffers
  6. Swap: 68124664k total,        0k used, 68124664k free, 13626156k cached
  7.   PID USER      PR  NI  VIRT  RES  SHR S %CPU %MEM    TIME+  COMMAND                                                                                                                        
  8. 28399 grid      25   0  530m  35m  11m R 99.6  0.1   0:33.66 /u02/app/oracle/product/11.2.0/db_1/jdk/bin/java -mx150m -cp /u01/app/grid/product/11.2.0/grid/OPatch/ocm/lib/emocmclnt.jar:/u02
  9. 15876 grid      RT   0  327m 122m  53m S  1.3  0.2 131:17.89 /u01/app/grid/product/11.2.0/grid/bin/ocssd.bin                                                                                 
  10. 14180 root      15   0  378m  53m  21m S  1.0  0.1  47:26.92 /u01/app/grid/product/11.2.0/grid/bin/ohasd.bin reboot                                                                          
  11. 16046 root      RT   0  245m  88m  55m S  1.0  0.1  68:23.18 /u01/app/grid/product/11.2.0/grid/bin/osysmond.bin
复制代码
检查java进程的父进程们

  1. [grid@GG-rac1 OPatch]$ ps -ef|grep opatch
  2. root     27925  8799  0 14:15 pts/1    00:00:00 /bin/sh ./opatch auto patches/
  3. root     28286 27999  0 14:15 pts/1    00:00:00 sh -c /bin/su grid -c ' /u01/app/grid/product/11.2.0/grid/OPatch/opatch util saveconfigurationsnapshot -configFile /u01/app/grid/product/11.2.0/grid/cfgtoollogs/opatchauto2014-02-07_14-15-05.cfg.log ' 2>&1
  4. root     28287 28286  0 14:15 pts/1    00:00:00 /bin/su grid -c  /u01/app/grid/product/11.2.0/grid/OPatch/opatch util saveconfigurationsnapshot -configFile /u01/app/grid/product/11.2.0/grid/cfgtoollogs/opatchauto2014-02-07_14-15-05.cfg.log
  5. grid     28288 28287  0 14:15 ?        00:00:00 /bin/sh /u01/app/grid/product/11.2.0/grid/OPatch/opatch util saveconfigurationsnapshot -configFile /u01/app/grid/product/11.2.0/grid/cfgtoollogs/opatchauto2014-02-07_14-15-05.cfg.log
  6. grid     28399 28288 99 14:15 ?        00:05:22 /u02/app/oracle/product/11.2.0/db_1/jdk/bin/java -mx150m -cp /u01/app/grid/product/11.2.0/grid/OPatch/ocm/lib/emocmclnt.jar:/u02/app/oracle/product/11.2.0/db_1/oui/jlib/OraInstaller.jar:/u02/app/oracle/product/11.2.0/db_1/oui/jlib/OraPrereq.jar:/u02/app/oracle/product/11.2.0/db_1/oui/jlib/share.jar:/u02/app/oracle/product/11.2.0/db_1/oui/jlib/orai18n-mapping.jar:/u02/app/oracle/product/11.2.0/db_1/oui/jlib/xmlparserv2.jar:/u02/app/oracle/product/11.2.0/db_1/oui/jlib/emCfg.jar:/u02/app/oracle/product/11.2.0/db_1/oui/jlib/ojmisc.jar:/u01/app/grid/product/11.2.0/grid/OPatch/jlib/opatch.jar:/u01/app/grid/product/11.2.0/grid/OPatch/jlib/opatchsdk.jar:/u01/app/grid/product/11.2.0/grid/OPatch/oplan/jlib/automation.jar:/u01/app/grid/product/11.2.0/grid/OPatch/oplan/jlib/apache-commons/commons-cli-1.0.jar:/u01/app/grid/product/11.2.0/grid/OPatch/jlib/oracle.opatch.classpath.jar:/u01/app/grid/product/11.2.0/grid/OPatch/oplan/jlib/jaxb/activation.jar:/u01/app/grid/product/11.2.0/grid/OPatch/oplan/jlib/jaxb/jaxb-api.jar:/u01/app/grid/product/11.2.0/grid/OPatch/oplan/jlib/jaxb/jaxb-impl.jar:/u01/app/grid/product/11.2.0/grid/OPatch/oplan/jlib/jaxb/jsr173_1.0_api.jar:/u01/app/grid/product/11.2.0/grid/OPatch/oplan/jlib/OsysModel.jar:/u01/app/grid/product/11.2.0/grid/OPatch/oplan/jlib/osysmodel-utils.jar:/u01/app/grid/product/11.2.0/grid/OPatch/oplan/jlib/CRSProductDriver.jar:/u01/app/grid/product/11.2.0/grid/OPatch/oplan/jlib/oracle.oplan.classpath.jar -DOPatch.ORACLE_HOME=/u02/app/oracle/product/11.2.0/db_1 -DOPatch.DEBUG=false -DOPatch.RUNNING_DIR=/u01/app/grid/product/11.2.0/grid/OPatch -DOPatch.MW_HOME= -DOPatch.WL_HOME= -DOPatch.COMMON_COMPONENTS_HOME= -DOPatch.OUI_LOCATION= -DOPatch.FMW_COMPONENT_HOME= -DOPatch.OPATCH_CLASSPATH= -DOPatch.WEBLOGIC_CLASSPATH= oracle/opatch/OPatch util saveconfigurationsnapshot -configFile /u01/app/grid/product/11.2.0/grid/cfgtoollogs/opatchauto2014-02-07_14-15-05.cfg.log -invPtrLoc /u02/app/oracle/product/11.2.0/db_1/oraInst.loc
  7. root     28418 26137  0 14:15 pts/0    00:00:00 tail -f /u01/app/grid/product/11.2.0/grid/cfgtoollogs/opatchauto2014-02-07_14-15-05.log
  8. grid     29615 28567  0 14:20 pts/2    00:00:00 grep opatch
复制代码
28286->28287->28288->28399
28399为100%的JAVA进程而28286就是opatch hang住的地方

手动测试命令

  1. [root@GG-rac1 grid]# su grid -c ' /u01/app/grid/product/11.2.0/grid/OPatch/opatch util saveconfigurationsnapshot -configFile aaa'
  2. OPatch could not create/open history file for writing : /u02/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch_history.txt
  3. /u02/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch_history.txt (Permission denied)
  4. Oracle Interim Patch Installer version 11.2.0.3.5
  5. Copyright (c) 2013, Oracle Corporation.  All rights reserved.
  6. (hang)
复制代码
依然挂起,但出现opatch_history.txt无权操作的错误,而且出现了DB_HOME路径即/u02/app/oracle/product/11.2.0/db_1/cfgtoollogs/opatch/opatch_history.txt


检查root用户环境变量发现设置了ORACLE_HOME=/u02/app/oracle/product/11.2.0/db_1

删除后重新执行,顺利通过
2#
发表于 2014-2-7 14:54:54
好经验!

回复 只看该作者 道具 举报

3#
发表于 2014-2-8 16:24:35
排错的方法值得学习。

回复 只看该作者 道具 举报

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

QQ|手机版|Archiver|Oracle数据库数据恢复、性能优化

GMT+8, 2024-12-21 06:28 , Processed in 0.044125 second(s), 20 queries .

Powered by Discuz! X2.5

© 2001-2012 Comsenz Inc.

回顶部
TEL/電話+86 13764045638
Email service@parnassusdata.com
QQ 47079569