【RDA】使用RDA(Remote Diagnostic Agent)工具對資料庫進行健康檢查 分類: Linux RDA英文全稱叫做“Oracle Remote Diagnostic Agent”。 這個Oracle診斷工具是用perl編寫的,包含非常豐富的診斷腳本,使用它可以非常便利的採集到Or ...
【RDA】使用RDA(Remote Diagnostic Agent)工具對資料庫進行健康檢查
分類: Linux
RDA英文全稱叫做“Oracle Remote Diagnostic Agent”。
這個Oracle診斷工具是用perl編寫的,包含非常豐富的診斷腳本,使用它可以非常便利的採集到Oracle資料庫伺服器系統配置和資料庫的詳細信息。
如果您在向Oracle支持人員尋求幫助時能夠提供一份RDA報告,將會大大的縮短問題處理的周期,避免信息的反覆採集。
RDA不會更改資料庫伺服器的任何配置,僅僅是採集信息,瞭解系統。大家可以放心使用RDA工具。
這篇文章給大家介紹一下這個RDA工具的使用方法,供參考。
1.下載RDA安裝包
參考MOS(Metalink Note):314422.1
“Remote Diagnostic Agent (RDA) 4 - Getting Started [ID 314422.1]”文章中提供了不同操作系統版本的介質下載。
這裡選擇“Linux x86 (64-bit)”版本進行演示操作。
該工具支持以下操作系統:
Apple Mac OS X
HP OpenVMS
HP Tru64
HP-UX Itanium
HP-UX PA-RISC (32-bit)
HP-UX PA-RISC (64-bit)
IBM AIX on POWER Systems (32-bit)
IBM AIX on POWER Systems (64-bit)
IBM Dynix/Ptx
IBM Linux on POWER
IBM zSeries Based Linux
Linux Itanium
Linux x86 (32-bit)
Linux x86 (64-bit)
Microsoft Windows (32-bit)
Microsoft Windows (64-bit)
Sun Solaris Intel (32-bit)
Sun Solaris Intel (64-bit)
Sun Solaris SPARC (32-bit)
Sun Solaris SPARC (64-bit)
2.在資料庫伺服器上創建一個RDA目錄
創建的RDA目錄需要保證有足夠的空間可用。
ora10g@secDB /home/oracle$ mkdir RDA
3.將下載到的安裝文件上傳到伺服器上
$ scp p9079828_418_LINUX.zip [email protected]:/home/oracle/RDA
[email protected]'s password:
p9079828_418_LINUX.zip 100% 26MB 8.8MB/s 00:03
4.解壓文件
1)解壓
ora10g@secDB /home/oracle/RDA$ unzip p9079828_418_LINUX.zip
Archive: p9079828_418_LINUX.zip
inflating: readme.txt
creating: rda/
creating: rda/RDA/
... 此處省略大量解壓信息 ...
inflating: rda/rda_linux56
creating: rda/ccr/
inflating: rda/ccr/ccr-Production-10.3.2.0.0-Linux-i386.zip
2)解壓後,當前目錄下將會創建一個rda目錄和一個readme.txt文件
ora10g@secDB /home/oracle/RDA$ ls -ltr
total 27M
-r--r--r-- 1 oracle oinstall 48 Dec 4 14:45 readme.txt
drwxr-xr-x 6 oracle oinstall 4.0K Dec 4 14:45 rda/
-rwx------ 1 oracle oinstall 27M Mar 5 02:07 p9079828_418_LINUX.zip*
3)readme.txt文件記錄了RDA軟體的版本信息
ora10g@secDB /home/oracle/RDA$ vi readme.txt
RDA/OCM bundle for RDA 4.18-091204 for linux_x86
~
5.驗證RDA工具安裝是否成功
1)第一種方法
ora10g@secDB /home/oracle/RDA/rda$ perl rda.pl -cv
Loading the file list ...
Checking the directory '.' ...
Checking the directory 'RDA' ...
Checking the directory 'RDA/Handle' ...
Checking the directory 'RDA/Library' ...
Checking the directory 'RDA/Library/Remote' ...
Checking the directory 'RDA/Local' ...
Checking the directory 'RDA/Object' ...
Checking the directory 'RDA/Operator' ...
Checking the directory 'RDA/Value' ...
Checking the directory 'hcve' ...
Checking the directory 'modules' ...
No issues found
2)第二種方法
ora10g@secDB /home/oracle/RDA/rda$ rda.sh -cv
Loading the file list ...
Checking the directory '.' ...
Checking the directory 'RDA' ...
Checking the directory 'RDA/Handle' ...
Checking the directory 'RDA/Library' ...
Checking the directory 'RDA/Library/Remote' ...
Checking the directory 'RDA/Local' ...
Checking the directory 'RDA/Object' ...
Checking the directory 'RDA/Operator' ...
Checking the directory 'RDA/Value' ...
Checking the directory 'hcve' ...
Checking the directory 'modules' ...
No issues found
經檢查,RDA工具安裝沒有問題。
6.配置並運行RDA
1)驗證perl是否可用
ora10g@secDB /home/oracle/RDA/rda$ perl -V
2)保證rda.sh和rda.pl兩個文件具有執行許可權
ora10g@secDB /home/oracle/RDA/rda$ ls -l rda.sh rda.pl
-r-xr-xr-x 1 oracle oinstall 47K Nov 30 16:02 rda.pl
-r-xr-xr-x 1 oracle oinstall 3.5K Jan 14 2009 rda.sh
如果不具有執行許可權,可以使用下麵的命令進行調整。
ora10g@secDB /home/oracle/RDA/rda$ chmod +x rda.sh rda.pl
3)使用“-L modules”選項列出所有可供採集的模塊
通過下麵的這個列表體現出了RDA在資料庫採集方面的強大優勢。
ora10g@secDB /home/oracle/RDA/rda$ ./rda.sh -L modules
Available data collection modules are:
ACFS Collects ASM Cluster File System Information
ACT Collects Oracle E-Business Suite Application Information
ADBA Collects ACS Oracle Database Assessment
ADX Collects AutoConfig and Rapid Clone Information
AGT Collects Enterprise Manager Agent Information
APEX Collects APEX Information
ASAP Collects Oracle Communications ASAP Information
ASBR Collects Application Server Backup and Recovery Information
ASG Collects Application Server Guard Information
ASIT Collects Oracle Application Server Installation Information
ASM Collects Automatic Storage Management Information
B2B Collects Oracle Business to Business Information
BAM Collects Business Activity Monitoring Information
BEE Collects Beehive Information
BI Collects Oracle Business Intelligence Enterprise Edition Info.
BPEL Collects Oracle BPEL Process Manager Information
BR Collects Database Backup and Recovery Information
BRM Collects Oracle Communications BRM Information
CCR Collects OCM Diagnostic Information
CFG Collects Key Configuration Information
COHR Collects Oracle Coherence Information
CONT Collects Oracle Content Services Information
CRID Collects Oracle Access Manager (COREid) Information
D2PC Collects Distributed Transaction Information
DB Controls RDBMS Data Collection
DBA Collects RDBMS Information
DBC Collects Database Control Information
DBM Collects RDBMS Memory Information
DEV Collects Oracle Developer Information
DG Collects Data Guard Information
DNFS Collects Direct NFS Information
DSCS Collects Discussions Information
DSCV Collects Oracle Discoverer Information
ECM Controls Oracle Enterprise Content Management 11g Data Collection
EM Collects Enterprise Manager OMS and Repository Info (Obsolete)
END Finalizes the Data Collection
EPMA Collects Enterprise Performance Management Architect Information
ESB Collects Enterprise Service Bus Information
ESS Collects Oracle Essbase Information
ESSO Collects Oracle Enterprise Single Sign-On Information
EXA Collects Exadata Information
FLTR Controls Report Content Filtering
GRDN Collects Oracle Guardian Information
GRID Controls Grid Control Data Collection
GTW Collects Transparent/Procedural Gateway Information
HFM Collects Oracle Hyperion Financial Management information
HPL Collects Oracle Hyperion Planning Information
IA Collects Intelligent Agent Information
IAS Collects Web Server Information
IFS Collects iFS (iFS, CMSDK, Files) Information
INI Initializes the Data Collection
INST Collects the Oracle Installation Information
IPSA Collects Oracle Communications IP Service Activator Information
J2EE Collects J2EE/OC4J Information
JDBC Collects Oracle Java DB Connectivity (JDBC) Information
JDEV Collects Oracle JDeveloper Information
JIVE Collects Jive Information
LANG Collects Oracle Language Information
LOAD Produces the External Collection Reports
LOG Collects Database Trace and Log Files
MAIL Collects Oracle Collaboration Suite Mail Information
MSLG Collects Microsoft Languages Information
ND Collects Oracle Communications Network Discovery Information
NET Collects Network Information
NM Collects Oracle Communications Network Mediation Information
NPRF Samples Performance Information (root not required)
OCAL Collects Oracle Calendar Information
OCFS Collects Oracle Cluster File System Information
OCM Setting up Configuration Manager Interface
OCS Controls Oracle Collaboration Suite Data Collection
ODI Collects Oracle Data Integrator Information
ODM Collects Oracle Data Mining Information
OES Collects Oracle Express Server Information
OID Collects Oracle Internet Directory Information
OIM Collects Oracle Identity Manager Information
OLAP Collects OLAP Information
OMM Collects Oracle Multimedia or Oracle interMedia Information
OMS Collects Oracle Management Server Information (obsolete)
ONET Collects Oracle Net Information
OS Collects the Operating System Information
OVD Collects Oracle Virtual Directory Information
OVMM Collects Oracle VM Manager Information
OVMS Collects Oracle VM Server Information
OWB Collects Oracle Warehouse Builder Information
OWSM Collects Oracle Web Services Manager Information
PDA Collects Oracle Portal Information
PDBA Collects PeopleSoft Information from an Oracle Database
PERF Collects Performance Information
PLNC Collects Oracle PL/SQL Native Compilation Information
PROF Collects the User Profile
PS Collects Oracle Communications Policy Services Information
PWEB Collects PeopleSoft Information from Web Application Server
RAC Collects Cluster Information
RACD Performs a Database Hang Analysis
RDSP Produces the Remote Data Collection Reports
RET Collects Oracle Retail Information
REXE Performs the Remote Data Collections
RPRF Samples Performance Information (root privileges required)
RSRC Collects Database Resource Manager Information
RTC Collects Real Time Communication Information
SEBL Collects Siebel Information
SES Collects Oracle Secure Enterprise Search Information
SMPL Controls Sampling
SOA Collects Oracle SOA Suite Information
SP Collects SQLPlus/iSQLPlus Information
SSO Collects Single Sign-On Information
STC Collects Streams Configuration Information
STM Collects Streams Monitoring Information
TOPL Collects Oracle TopLink Information
TTEN Collects Oracle TimesTen In-Memory Database Information
UCM Collects Oracle Universal Content Management Information
UOA Collects Oracle Universal Online Archive 11g Information
WAC Collects Web Access Client Information
WCI Collects Oracle WebCenter Information
WEBC Collects Oracle Web Cache Information
WKSP Collects Workspaces Information
WLS Collects Oracle WebLogic Server Information
WMC Collects Webmail Client Information
WRLS Collects Wireless Information
XDB Collects XDB Information
XSMP Samples User Defined Data
XTRA Collects User Defined Data
4)我們選擇四個模塊(OS DB DBA INST)配置一下
只要按照提示的信息進行配置即可,基本上都可以使用預設設置的內容。
需要註意的是最後兩步我們這裡輸入“/”和“Y”,目的是在運行RDA採集信息的過程中不需要輸入密碼,避免交互操作。
ora10g@secDB /home/oracle/RDA/rda$ ./rda.sh -S OS DB DBA INST
-------------------------------------------------------------------------------
S000INI: Initializes the Data Collection
-------------------------------------------------------------------------------
RDA uses the output file prefix to identify all files belonging to the same
data collection. The prefix must start with a letter and must contain only
alphanumeric characters.
Enter the prefix to be used for all the generated files
Hit 'Return' to accept the default (RDA)
Enter the directory used for all the files to be generated
Hit 'Return' to accept the default (/home/oracle/RDA/rda/output)
Do you want to keep report packages from previous runs (Y/N)?
Hit 'Return' to accept the default (N)
Is a fresh collection performed as the default action (Y/N)?
Hit 'Return' to accept the default (Y)
Enter the Oracle home to be used for data analysis
Hit 'Return' to accept the default (/oracle/app/oracle/product/10.2.0/db_1)
Enter the domain name for this server
localhost.localdomain
S010CFG: Collects Key Configuration Information
S090OCM: Set up the Configuration Manager Interface
RDA benefits from Oracle Configuration Manager by improving its data
collection. Oracle Configuration Manager (OCM) collects the configuration
information and uploads it to the OCM Repository in connected mode. When OCM
is configured in disconnected mode, it adds the OCM payload to the RDA report
packages in future RDA runs.
Select the mode that you want to install Oracle Configuration Manager in
/oracle/app/oracle/product/10.2.0/db_1
C Connected Mode
D Disconnected Mode
Enter the letter corresponding to your choice
Hit 'Return' to accept the default (C)
Do you want to install OCM Database collection scripts (Y/N)?
Hit 'Return' to accept the default (Y)
Enter a SYSDBA user for installing the OCM Database collection scripts
Hit 'Return' to accept the default (sys)
Is /oracle/app/oracle/product/10.2.0/db_1 an Oracle E-Business Suite Database
Oracle home (Y/N)?
Hit 'Return' to accept the default (N)
S909RDSP: Produces the Remote Data Collection Reports
S919LOAD: Produces the External Collection Reports
S990FLTR: Controls Report Content Filtering
S999END: Finalizes the Data Collection
S100OS: Collects the Operating System Information
S130INST: Collects the Oracle Installation Information
S200DB: Controls RDBMS Data Collection
Is there a database for RDA to analyze (Y/N)?
Hit 'Return' to accept the default (Y)
Is the database associated to the current Oracle home (Y/N)?
Hit 'Return' to accept the default (Y)
Enter the Oracle SID to be analyzed
Hit 'Return' to accept the default (ora10g)
Is the INIT.ORA for the database to be analyzed located on this system? (Y/N)
Hit 'Return' to accept the default (Y)
Enter the location of the spfile or the INIT.ORA (including the directory and
file name)
Hit 'Return' to accept the default
(/oracle/app/oracle/product/10.2.0/db_1/dbs/spfileora10g.ora)
Enter an Oracle User ID (userid only) to view DBA_ and V$ tables. If RDA will
be run under the Oracle software owner's ID, enter a forward slash (/) here,
and enter Y at the SYSDBA prompt to avoid a prompt for the database password
at runtime.
Hit 'Return' to accept the default (system)
/
Is '/' a SYSDBA user (will connect as SYSDBA) (Y/N)?
Hit 'Return' to accept the default (N)
Y
S201DBA: Collects RDBMS Information
配置完成後,會在當前目錄下生成output目錄和配置文件setup.cfg(如果再次執行配置過程,會生成備份文件setup.bak,只保存一份備份文件。)。
配置文件setup.cfg是可編輯的,可以直接對其進行調整。
5)此時再使用“-L modules”選項查看,如果模塊名前有“”號表示已經配置過。
這裡為顯示清晰,省略一部分輸出信息。最後一行有關於“”號的解釋
ora10g@secDB /home/oracle/RDA/rda$ ./rda.sh -L modules
Available data collection modules are:
ACFS Collects ASM Cluster File System Information
... ...
DB Controls RDBMS Data Collection
DBA Collects RDBMS Information
DBC Collects Database Control Information
... ...
FLTR Controls Report Content Filtering
... ...
INST Collects the Oracle Installation Information
... ...
OS Collects the Operating System Information
... ...
XTRA Collects User Defined Data
A '' before a module name indicates that its setup has been done.
6)我們使用“-vCRP OS DB DBA INST”選項運行RDA對系統進行信息採集
ora10g@secDB /home/oracle/RDA/rda$ ./rda.sh -vCRP OS DB DBA INST
Collecting diagnostic data ...
-------------------------------------------------------------------------------
RDA Data Collection Started 05-Mar-2010 07:21:40
-------------------------------------------------------------------------------
Processing Initialization module ...
Processing OCM module ...
Processing CFG module ...
Processing OS module ...
Processing Oracle installation module ...
Processing RDBMS module ...
Processing RDSP module ...
Processing LOAD module ...
Processing End module ...
-------------------------------------------------------------------------------
RDA Data Collection Ended 05-Mar-2010 07:22:11
-------------------------------------------------------------------------------
Generating the reports ...
- RDA_OS_numactl.txt ...
- RDA_DBA_partition_data.txt ...
- RDA_INST_inventory_xml.txt ...
- RDA_DBA_vHWM_Statistic.txt ...
- RDA_DBA_vcontrolfile.txt ...
- RDA_DBA_vsystem_event.txt ...
- RDA_DBA_spatial.txt ...
- RDA_DBA_text.txt ...
- RDA_CFG_database.txt ...
- RDA_END_files.txt ...
- RDA_DBA_ses_procs.txt ...
- RDA_INST_oracle_home.txt ...
- RDA_DBA_sga_info.txt ...
- RDA_DBA_tablespace.txt ...
- RDA_DBA_log_info.txt ...
- RDA_DBA_vresource_limit.txt ...
- RDA_INST_R00015_log_trace_log.txt ...
- RDA_DBA_nls_parms.txt ...
- RDA_DBA_undo_info.txt ...
- RDA_INST_oracle_install.txt ...
- RDA_OS_packages.txt ...
- RDA_OS_ntpstatus.txt ...
- RDA_DBA_versions.txt ...
- RDA_OS_disk_info.txt ...
- RDA_DBA_vfeatureusage.txt ...
- RDA_END_report.txt ...
- RDA_DBA_CPU_Statistic.txt ...
- RDA_DBA_replication.txt ...
- RDA_OS_kernel_info.txt ...
- RDA_DBA_datafile.txt ...
- RDA_INST_L00011_oh_inv.txt ...
- RDA_OS_etc_conf.txt ...
- RDA_INST_L00010_homes.txt ...
- RDA_DBA_invalids.txt ...
- RDA_DBA_security_files.txt ...
- RDA_OS_misc_linux_info.txt ...
- RDA_DBA_sequences.txt ...
- RDA_DBA_vfeatureinfo.txt ...
- RDA_INST_make_report.txt ...
- RDA_DBA_voption.txt ...
- RDA_INST_orainventory_logdir.txt ...
- RDA_DBA_vparameters.txt ...
- RDA_OS_cpu_info.txt ...
- RDA_OS_hugepage.txt ...
- RDA_DBA_aq_data.txt ...
- RDA_OS_sysdef.txt ...
- RDA_DBA_vsession_wait.txt ...
- RDA_DBA_services.txt ...
- RDA_OS_tracing.txt ...
- RDA_OS_linux_release.txt ...
- RDA_DBA_all_errors.txt ...
- RDA_INST_oratab.txt ...
- RDA_DBA_latch_info.txt ...
- RDA_DBA_vlicense.txt ...
- RDA_CFG_homes.txt ...
- RDA_DBA_jobs.txt ...
- RDA_OS_memory_info.txt ...
- RDA_OS_libc.txt ...
- RDA_OS_services.txt ...
- RDA_OS_nls_env.txt ...
- RDA_OS_java_version.txt ...
- RDA_DBA_vcompatibility.txt ...
- RDA_DBA_vspparameters.txt ...
- RDA_INST_comps_xml.txt ...
- RDA_DBA_security.txt ...
- RDA_DBA_init_ora.txt ...
- RDA_DBA_dba_registry.txt ...
- RDA_CFG_oh_inv.txt ...
- RDA_OS_system_error_log.txt ...
- RDA_DBA_database_properties.txt ...
- RDA_INST_orainst_loc.txt ...
- RDA_END_system.txt ...
- Report index ...
Packaging the reports ...
RDA.RDA_secDB.zip created
Updating the setup file ...
解釋一下用到的選項含義。
v選項含義:詳細顯示報告生成過程,如果不加這個選項,僅會顯示上面輸出的第一部分內容;
C選項含義:採集診斷信息;
R選項含義:生成HTML格式的報告;
P選項還以:對生成的報告文件打包,壓縮成zip格式。
7.獲得RDA的幫助信息
演示過程中我們使用了v、C、R和P選項,如何獲得更多選項的說明信息呢?方法有兩種。
1)獲得簡略的幫助信息
使用“-h”選項查看詳細的幫助文檔。
ora10g@secDB /home/oracle/RDA/rda$ ./rda.sh -h
Usage: rda.pl [-bcdflntvwxy] [-ABCDEHIKLMPQRSTV] [-e list] [-m dir]
[-s name] [-o out] [-p prof] arg ...
-A Authentify user through the setup file
-B Start background collection
-C Collect diagnostic information
-D Delete specified modules from the setup
-E Explain specified error numbers
-H Halt background collection
-I Regenerate the index
-K Kill background collection
-L List the modules available
-M Display the related manual pages
-O Render output specifications from STDIN
-P Package the reports (tar or zip)
-Q Display the related setup questions
-R Generate specified reports
-S Setup specified modules
-T Execute test modules
-V Display component version numbers
-b Don't backup setup file before saving
-c Check the RDA installation and exit
-d Set debug mode
-e list Specify a list of alternate setting definitions (var=val,...)
-f Set force mode
-h Display the command usage and exit
-l Use a lock file to prevent concurrent usage of a setup file
-m dir Specify the module directory ('modules' by default)
-n Start a new data collection
-o out Specify the file for background collection output redirection
-p prof Specify the setup profile ('Default' by default)
-q Set quiet mode
-s name Specify the setup name ('setup' by default)
-t Set trace mode
-v Set verbose mode
-w Wait as long as the background collection daemon is active
-x Produce module cross reference
-y Accept all defaults and skip all pauses
2)獲得詳細的幫助信息
使用“-M”選項查看詳細的幫助文檔。
內容非常詳細,這裡不做展示。
如果做進一步的查找,這個詳細幫助文檔內容是由下麵rda.pod文件格式化後生成的。
ora10g@secDB /home/oracle/RDA/rda$ ls -l ./modules/rda.pod
-r--r--r-- 1 oracle oinstall 15K Nov 23 20:37 ./modules/rda.pod
8.查看RDA生成的報告
內容簡潔實用,查詢方便。
9.小結
RDA工具對於資料庫健康檢查的意義是重大的,使用RDA可以快速準確的獲取資料庫的基本信息(數據採集整體時間最常一般不會超過15分鐘),對於資料庫的故障亦有裨益。
RDA的強大的數據採集功能不限於本文的演示內容,建議朋友們對細節參數進行研究。