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 --
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博客 ” ,链接:http://blog.itpub.net/519536/viewspace-679467/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/519536/viewspace-679467/