【問題處理】diagcollection.pl採集指令碼執行出錯——'crshome' is missing

secooler發表於2010-11-19
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部落格 ” ,連結:http://blog.itpub.net/519536/viewspace-679467/,如需轉載,請註明出處,否則將追究法律責任。

相關文章