ITPub博客

首页 > 数据库 > > 【问题处理】diagcollection.pl采集脚本执行出错——'crshome' is missing

【问题处理】diagcollection.pl采集脚本执行出错——'crshome' is missing

作者:secooler 时间:2020-02-11 01:17:08 0 删除 编辑
1.问题现象
1)在root用户下设置必须的环境变量
[root@rac1 ~]# export ORACLE_BASE=/oracle/app/oracle
[root@rac1 ~]# export ORACLE_HOME=$ORACLE_BASE/product/10.2.0/db_1
[root@rac1 ~]# export ORA_CRS_HOME=/oracle/app/crs

2)确认环境变量设置正确
[root@rac1 ~]# echo $ORACLE_BASE
/oracle/app/oracle
[root@rac1 ~]# echo $ORACLE_HOME
/oracle/app/oracle/product/10.2.0/db_1
[root@rac1 ~]# echo $ORA_CRS_HOME
/oracle/app/crs
[root@rac1 ~]# echo $HOSTNAME
rac1

3)问题报错如下
[root@rac1 ~]# cd $ORA_CRS_HOME/bin
[root@rac1 bin]# ./diagcollection.pl --collect
Production Copyright 2004, 2005, Oracle.  All rights reserved
Cluster Ready Services (CRS) diagnostic collection tool
Mandatory argument 'crshome' is missing.

2.问题原因
这是由于Oracle的Bug导致的,有关该Bug在MOS的“Bug 6899547: DIAGCOLLECTION.PL FAILS WITH MANDATORY ARGUMENT 'CRSHOME' IS MISSING”有记载。

3.处理方法
此时即便即便在操作系统上显式地指定crshome环境变量是不能解决该问题的。需要在使用该脚本的时候使用“--crshome $ORA_CRS_HOME”选项显式的给出。
[root@rac1 bin]# ./diagcollection.pl --collect --all --crshome $ORA_CRS_HOME
Production Copyright 2004, 2005, Oracle.  All rights reserved
Cluster Ready Services (CRS) diagnostic collection tool
The following CRS diagnostic archives will be created in the local directory.
crsData_rac1.tar.gz -> logs,traces and cores from CRS home. Note: core files will be packaged only with the -core option.
ocrData_rac1.tar.gz -> ocrdump, ocrcheck etc
coreData_rac1.tar.gz -> contents of CRS core files in text format

Collecting crs data
/bin/tar: Removing leading `/' from member names
Collecting OCR data
Collecting information from core files
No corefiles found
The following Oracle Home diagnostic archives will be created in the local directory.
oraData_rac1.tar.gz -> logs, traces and cores from Oracle Home
Collecting oracle home data
/bin/tar: Removing leading `/' from member names

信息采集成功。

4.更多的参考信息
参见MOS:
diagcollection.pl errors "Mandatory argument 'crshome' is missing" [ID 785907.1]

5.小结
文中提到的问题直到Oracle 11.1.0.7版本才修复完成,针对Oracle 10.2.0.4给出了修复的Patch,可以酌情对其进行修复。

Good luck.

secooler
10.11.19

-- The End --

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/519536/viewspace-3161608/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论
Oracle ACE 总监,阿里云MVP,北京大学理学硕士,恩墨学院创始人,教育专家,中国区 Cloudera 首位官方授权大数据讲师,金牌培训专家,BDA大数据联盟创始人,OCM联盟创始人,ACCUG创始人、ACOUG核心专家,Blogger。

注册时间:2008-03-16

  • 博文量
    1601
  • 访问量
    8477134