Oracle RDA-Remote Diagnostic Agent
<>
RDA是Remote Diagnostic Agent
的简称,是Oracle用来收集、分析数据库的工具,运行该工具不会改变系统的任何参数,RDA收集的相关数据非常全面,可以简化我们日常监控、分析数据库的工作,Oracle
Support也建议我们在反馈相关问题时,提供RDA收集的数据,这样可以为快速解决问题提供一个有力的保证。
一、支持的操作系统
IBM AIXIntel Linux (RedHat and SuSE)HP-UX (10.* and 11.*)HP
Tru64Sequent Dynix/PtxSun Solaris (2.6 - 2.10)Windows XP
Professionalwindows 2000 Workstation and ServerWindows 2003
Server
二、支持的Oracle产品
Oracle RDBMS Server (Standard and Enterprise Editions)Oracle RAC
Cluster (Single Node Collection)Oracle Application Server (iAS
1.0.2.x/9.0.x/10.1.2.x, HTTP Server)Oracle Management Server and
Intelligent Agent (Grid Server, Agent Server, DB Control)OLAP
ProdUCts (Express Server, Financial Analyzer, and Demand Planning
Server)Oracle Developer (Forms and Reports)Oracle Collaboration
Suites (Email Server and Internet Directory)
三、主要用于诊断数据库的以下方面的问题
性能、安装、配置、升级、移植以及内部错误问题.
四、RDA的安装
工具下载:http://www.blogJava.net/Files/beauty_beast/rda.rar
在Unix操作系统的安装说明:1、工具下载完后不要在window操作系统下做解压缩,脚本的文件格式会破坏。2、FTP上传是采用二进制方式。3、执行解压缩命令example:gunzip
rda.tar.gztar xvf rda.tar4、在解压缩后的目录下执行 ./rda.sh -c 测试是否正常
五、RDA的使用
在Unix操作系统中,oracle推荐在数据库创建用户下执行(一般即为oracle用户)。第一次使用需要做一个采集的初始配置。执行命令:。/rda.sh
-S 执行命令后,会有个向导化的界面让你根据当前数据库的实际安装的产品完成初始配置。 完成配置后rda目录下会生成配置文件
setup.cfg、setup.bak, 假如需要重新调整配置参数,可以直接修改该文件。
初始配置完毕后要采集数据,执行命令:。/rda.sh假如要看到具体的采集过程,可以执行命令:。/rda.sh
-v在采集过程中有可能需要你输入数据库相关用户的密码。采集完成后,在rda目录下根据初始配置文件会生成格式为zip的报告文件以及采集日志,默认文件位置。/output/RDA.$machine_name.zip.解压缩该文件,访问
__start.htm,就可以看到这次采集的数据的具体信息。使用时的注重点:1、有时不能生成zip格式的报告文件,这跟客户端是否安装压缩工具有关,需要自行解压缩相关报告文件。2、假如需要安装已生成的配置再次采集,删除已生成的报告文件,然后执行命令:。/rda.sh
-Svf 重新设置后再执行采集命令 ./rda.sh -v
六。采集数据分析
报告文件主要包括数据库对应机器的操作系统软、硬件环境、用户设置以及数据库具体的信息(初始参数、运行事件、日常监控等)在日常的维护当中,我们主要
1、关注RDBMS下的几个统计信息。Database SPFile Parameters spfile中数据库相关初始参数的设置SGA
Information 查看系统全局区当前内存信息Sessions and Processes
采集时间内的数据库会话相关信息V$System_Event
数据库实例整个运行期间所有进程事件的等待统计视图V$Session_Wait 会话等待事件以及相关定位信息数据Latch
Information 竞争相关信息(翻译不是很准确)Tablespaces
数据库表空间信息(表空间类型、对应数据文件使用率、是否可扩展等等)Database Files
数据库对应数据文件信息(文件位置、使用率等)Invalid Objects
失效的数据库对象,日常监控假如发现有失效,需要维护人员手工重新编译all errors 日常执行的数据库错误在
V$System_Event、 V$Session_Wait 主要关注(buffer busy waits、db file
scattered read、db file sequential read、enqueue、free buffer
waits、latch free、log file sync、log file paralle write
这些事件。2、关注RDBMS Log/Trace Files 的信息alert.log 数据库系统级日志last errors
数据库最近的异常日志、根据trace文件位置,可以查看具体错误信息
<>
root@xxxxx # su - oracle
This is a private computer facility in MKL.
Access for any reason must be specifically authorized by the
owner.
$ ls
Apache bin dbs jar lib
……………
rda.tar
sqlplus ultrasearch
……………
$ ls -l *.tar
-rwxrwxrwx 1
k3402 dba 1269760 May 18 15:05 rda.tar
$ tar -xvpf rda.tar
x rda/rda.bat, 2918 bytes, 6 tape blocks
x rda/rda.pl, 26891 bytes, 53 tape blocks
x rda/rda.sh, 3017 bytes, 6 tape blocks
x rda/RDA, 0 bytes, 0 tape blocks
x rda/RDA/Macro, 0 bytes, 0 tape blocks
………..
x rda/modules/rdamtop.toc, 46 bytes, 1 tape blocks
x rda/modules/rdatop.toc, 43 bytes, 1 tape blocks
x rda/DISCLAIM.txt, 4087 bytes, 8 tape blocks
x rda/README_Unix.txt, 12662 bytes, 25 tape blocks
x rda/README_Windows.txt, 12546 bytes, 25 tape blocks
x rda/modules/rda.log, 3959 bytes, 8 tape blocks
$ ls
Apache classes dm jdk network
…………
rda sqlplus weboamlib
bin demo jdbc mgw oradata rda.tar srvm wwg
$ cd rda
$ ls
DISCLAIM.txt README_Unix.txt modules rda.pl
RDA README_Windows.txt rda.bat rda.sh
测试是否正常:
$ ./rda.sh –c
如果第一次使用需要做一个采集的初始配置:
$ ./rda.sh -S
At this point, it should be possible to collect the diagnostic
information.
sqlplus should connect to the database with the userid specified
during the
setup.
With the same command used so far, start the data
collection:
./rda.pl
[-v]
or
./rda.sh
[-v]
The -v option is optional. It allows to see the collection
progression.
Once it has completed, the results will be packaged for sending
it to Oracle
Support Services, if this file was generated to assist in
resolving a TAR.
Selective data collection is also possible. For more details,
the command
usage can be displayed by specifying the -h option, or complete
manual page
with the -M option.
如果不是第一次使用需要做一个采集的初始配置:
$ ./rda.sh -Svf
Setting up ...
- S000INI ...
-------------------------------------------------------------------------------
S000INI: Initializes the Data Collection
-------------------------------------------------------------------------------
The output file prefix is used to easily identify all files
belonging to the
same data collection. It must start with a letter and may only
contain
alphanumerical characters.
Enter the prefix for all the files generated
Hit 'Return' to accept the default (RDA):
Enter the directory used for all the files generated
Hit 'Return' to accept the default (output):
Do you want to keep report packages from previous runs
(Y/N)?
Hit 'Return' to accept the default (N):
Enter the Oracle Home to be analyzed
Hit 'Return' to accept the default (/home/oracle):
……………….
- S999END ...
-------------------------------------------------------------------------------
S999END: Finalizes the Data Collection
-------------------------------------------------------------------------------
At this point, it should be possible to collect the diagnostic
information.
sqlplus should connect to the database with the userid specified
during the
setup.
With the same command used so far, start the data
collection:
./rda.pl
[-v]
or
./rda.sh
[-v]
The -v option is optional. It allows to see the collection
progression.
Once it has completed, the results will be packaged for sending
it to Oracle
Support Services, if this file was generated to assist in
resolving a TAR.
Selective data collection is also possible. For more details,
the command
usage can be displayed by specifying the -h option, or complete
manual page
with the -M option.
Updating the setup file ...
$
$
初始配置完毕后要采集数据,执行命令:
$./rda.sh
假如要看到具体的采集过程,可以执行命令:
$ ./rda.sh -v
Collecting diagnostic data ...
-------------------------------------------------------------------------------
RDA Data Collection Started 18-May-2009 15:49:53
-------------------------------------------------------------------------------
Processing Initialization module ...
Enter the password for 'SYSTEM':
Please re-enter it to confirm:
Processing CFG module ...
Processing Sampling module ...
Processing OS module ...
Processing PROF module ...
Processing PERF module ...
Processing NET module ...
Processing networking information (network files, sql*net
files)...
Listener checks may take a few minutes. please be patient...
Processing listener status, services and log
for listener LISTENER
Processing Oracle installation module ...
Processing RDBMS module ...
Processing LOG module ...
Processing Web Server module ...
Processing Web Server (iAS 1.x) module ...
Processing HTTP Server ...
Processing End module ...
-------------------------------------------------------------------------------
RDA Data Collection Ended 18-May-2009 15:51:51
-------------------------------------------------------------------------------
Generating the reports ...
- RDA_CFG_database.txt ...
- RDA_OS_cpu_info.txt ...
- RDA_OS_memory_info.txt ...
- RDA_OS_ism_info.txt ...
- RDA_OS_disk_info.txt ...
- RDA_OS_kernel_info.txt ...
- RDA_OS_packages.txt ...
- RDA_OS_patches.txt ...
- RDA_OS_sysdef.txt ...
- RDA_OS_system_error_log.txt ...
- RDA_OS_nls_env.txt ...
- RDA_OS_java_version.txt ...
- RDA_OS_etc_conf.txt ...
- RDA_OS_tracing.txt ...
- RDA_PROF_env.txt ...
- RDA_PROF_ulimit.txt ...
- RDA_PROF_profiles.txt ...
- RDA_PROF_etc_profile.txt ...
- RDA_PROF_dot_profile.txt ...
- RDA_PROF_dot_dtprofile.txt ...
- RDA_PERF_perf_over.txt ...
- RDA_PERF_top_sql.txt ...
- RDA_NET_ifconfig.txt ...
-
RDA_NET_tcpip_settings.txt ...
- RDA_NET_udp_settings.txt ...
- RDA_NET_adapters.txt ...
- RDA_NET_lstatus.txt ...
- RDA_NET_sqlnet_sqlnet_ora.txt ...
- RDA_NET_sqlnet_tnsnames_ora.txt ...
- RDA_NET_sqlnet_listener_ora.txt ...
- RDA_NET_hs_inithsodbc_ora.txt ...
- RDA_NET_netenv.txt ...
- RDA_NET_netperf.txt ...
- RDA_NET_etc_files.txt ...
-
RDA_INST_oratab.txt ...
- RDA_INST_oracle_home.txt ...
- RDA_INST_orainst_loc.txt ...
- RDA_INST_orainventory_logdir.txt ...
- RDA_INST_installAction_logs.txt ...
- RDA_INST_oraInstall_err.txt
...
- RDA_INST_oraInstall_out.txt ...
- RDA_INST_make_report.txt ...
- RDA_INST_opatch_report.txt ...
- RDA_DBA_versions.txt ...
- RDA_DBA_init_ora.txt ...
- RDA_DBA_vparameters.txt ...
- RDA_DBA_vspparameters.txt ...
- RDA_DBA_voption.txt ...
- RDA_DBA_dba_registry.txt ...
- RDA_DBA_sga_info.txt ...
- RDA_DBA_ses_procs.txt ...
- RDA_DBA_vlicense.txt ...
- RDA_DBA_vcompatibility.txt ...
- RDA_DBA_nls_parms.txt ...
- RDA_DBA_jvm_info.txt ...
- RDA_DBA_vcontrolfile.txt ...
- RDA_DBA_log_info.txt ...
- RDA_DBA_undo_info.txt ...
- RDA_DBA_database_properties.txt ...
- RDA_DBA_vsystem_event.txt ...
- RDA_DBA_vresource_limit.txt ...
- RDA_DBA_vsession_wait.txt ...
- RDA_DBA_latch_info.txt ...
- RDA_DBA_tablespace.txt ...
- RDA_DBA_datafile.txt ...
- RDA_DBA_replication.txt ...
- RDA_DBA_security.txt ...
-
RDA_DBA_security_files.txt ...
- RDA_DBA_spatial.txt ...
- RDA_DBA_aq_data.txt ...
- RDA_DBA_partition_data.txt ...
- RDA_DBA_text.txt ...
- RDA_LOG_alert_log.txt ...
- RDA_LOG_last_errors.txt ...
- RDA_LOG_log_trace.txt ...
- RDA_IAS_web_env.txt ...
- RDA_IAS_cfg_files.txt ...
- RDA_IAS_apache_over.txt ...
- RDA_IAS_apache_logs.txt ...
- RDA_IAS_jserv_conf.txt ...
- RDA_IAS_signon.txt ...
- RDA_IAS_signonp.txt ...
- RDA_IAS_apache_bin.txt ...
- RDA_END_report.txt ...
- RDA_IAS_lc_Apache_Apache_conf_httpd_conf.txt ...
- RDA_IAS_lc_Apache_Apache_conf_oracle_apache_conf.txt ...
- RDA_IAS_lc_Apache_Jserv_etc_jserv_conf.txt ...
- RDA_IAS_lc_Apache_jsp_conf_ojsp_conf.txt ...
-
RDA_IAS_lc_Apache_modplsql_cfg_plsql_conf.txt ...
- RDA_IAS_lc_oem_webstage_oem_conf.txt ...
- RDA_IAS_lc_rdbms_demo_aqxml_conf.txt ...
- RDA_IAS_lc_sqlplus_admin_isqlplus_conf.txt ...
- RDA_IAS_lc_xdk_admin_xml_conf.txt ...
- RDA_IAS_jserv_javaversions.txt ...
- RDA_IAS_ss_Apache_Apache_bin_apachectl.txt ...
- RDA_IAS_pc_Apache_modplsql_cfg_wdbsvr_app.txt ...
- RDA_IAS_jc_Apache_Jserv_etc_jserv_properties.txt ...
- RDA_IAS_jc_Apache_Jserv_etc_zone_properties.txt ...
- RDA_IAS_jc_Apache_Jserv_etc_jservSoap_properties.txt ...
- RDA_IAS_jc_soap_webapps_soap_WEBINF_config_soap_properties.txt
...
- RDA_IAS_jl_Apache_Jserv_logs_mod_jserv_log.txt ...
- RDA_END_system.txt ...
- Report index ...
Packaging the reports ...
You can view your report by:
- Copying the output directory to a web shared directory and go
to:
http://machine:port/web_shared_directory/RDA__START.htm
or
- Trying your browser directly:
ftp://oracle@xxxxx./rda/output/RDA__START.htm
If this file was generated to assist in resolving a Service
Request,
please send output/RDA.RDA_xxxxx.zip
to Oracle Support by uploading the file via Metalink.
If ftp'ing the file, please be sure to ftp in BINARY format.
Updating the setup file ...
$
<>:
$ pwd
/home/oracle/rda/output
$
通过Xmanger连接到xxxxx,找到RDA_START.htm:
双击”RDA_start.htm”:
在此,可以查看刚才收集到结果。
<
RDA>>
删除已生成的报告文件,然后执行命令:
$cd /home/oracle/rda/output
$ rm -r *
$cd /home/oracle/rda
重新设置:
$./rda.sh -Svf
再执行采集命令:
$./rda.sh -v