本文标题:如何在10g和11g上收集crs日志 How To Collect CRS Logs On 10g And 11g 链接 http://www.alandcheung.com/?p=189
Oracle RAC环境下诊断问题无一是比较麻烦的,大量的CRS logs散落在不同的目录下,很容易遗忘。但Oracle推出的一个居家旅行必备的小脚本,极大的方便了日志的收集。
It’s not a easy work to collect CRS logs, for they are separated in different directories. But a Oracle published script eases the collection.
这个脚本在$ORA_CRS_HOME下,10.2以后所有CRS都会默认安装这个脚本。
The script was located in $ORA_CRS_HOME/bin and was default installed in CRS 10.2 and later.
这个脚本的使用也不复杂,确认使用root用户
And the script is easy to use,ensure log in as root
10gR2
1. 确认ORA_CRS_HOME环境变量设置到了正确的CRS HOME路径
Ensure environment variable ORA_CRS_HOME is set to CRS home
2. 确认ORACLE_BASE环境变量已经设置
Ensure environment variable ORACLE_HOME is set
3. 确认hostname已经设置
Ensure environment variable HOSTNAME is set
4. Run ./diagcollection.pl –collect
该脚本会将收集的信息生成: crsData_.tar.gz, ocrData_.tar.gz, oraData_.tar.gz, coreData_.tar.gz
The script will create: crsData_.tar.gz, ocrData_.tar.gz, oraData_.tar.gz, coreData_.tar.gz
11gR1
1. 确认ORA_CRS_HOME环境变量已经设置
Ensure environment variable ORA_CRS_HOME is set
2. 运行
run
./diagcollection.pl –crshome=$ORA_CRS_HOME –collect
该脚本会将收集的信息生成: crsData_.tar.gz, ocrData_.tar.gz, oraData_.tar.gz, coreData_.tar.gz, os_.tar.gz
The script will create: crsData_.tar.gz, ocrData_.tar.gz, oraData_.tar.gz, coreData_.tar.gz, os_.tar.gz
11gR2
1. 运行
run
/bin/diagcollection.sh
该脚本会将收集的信息生成: crsData_.tar.gz, ocrData_.tar.gz, oraData_.tar.gz, coreData_.tar.gz, os_.tar.gz
The script will create: crsData_.tar.gz, ocrData_.tar.gz, oraData_.tar.gz, coreData_.tar.gz, os_.tar.gz
在windows平台上运行diagcollection.pl命令,需要设置以下变量
On Windows Platform need to use “set” command to set environment variables
set ORACLE_HOME=
set ORA_CRS_HOME=
set ORACLE_BASE=
Reference MOS 330358.1