【RDA】使用RDA(Remote Diagnostic Agent)工具對資料庫進行健康檢查
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 oracle@172.17.193.211:/home/oracle/RDA
oracle@172.17.193.211'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 SQL*Plus/iSQL*Plus 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的強大的資料採集功能不限於本文的演示內容,建議朋友們對細節引數進行研究。
Good luck.
secooler
10.03.05
-- The End --
這個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 oracle@172.17.193.211:/home/oracle/RDA
oracle@172.17.193.211'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 SQL*Plus/iSQL*Plus 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的強大的資料採集功能不限於本文的演示內容,建議朋友們對細節引數進行研究。
Good luck.
secooler
10.03.05
-- The End --
來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/519536/viewspace-628759/,如需轉載,請註明出處,否則將追究法律責任。
相關文章
- DB健康檢查使用RDA收集資料
- 利用Oracle RDA( Remote Diagnostic Agent)快速收集Oracle產品分析資料OracleREM
- Remote Diagnostic Agent (RDA) - RAC Cluster Guide (Doc ID 359395.1)REMGUIIDE
- 利用RDA對Oracle做健康檢查Oracle
- Oracle工具(Oracle Tools) – RDA(RemoteDiagnostic Agent)OracleREM
- Remote Diagnostic Agent (RDA) - Getting Started (Doc ID 314422.1)REM
- Remote Diagnostic Agent (RDA) 4 - Getting Started [ID 314422.1]REM
- 使用RDA巡檢MYSQL資料庫MySql資料庫
- RDA工具使用
- oracle巡檢工具-RDAOracle
- Oracle巡檢工具RDA使用手冊Oracle
- oracle診斷工具-RDA使用Oracle
- Oracle診斷工具RDA使用Oracle
- 【轉】oracle診斷工具-RDA使用Oracle
- oracle診斷工具-RDA使用(轉)Oracle
- 安裝EBS前期檢查工具 - RDA - Health Check / Validation Engine GuideGUIIDE
- oracle rdaOracle
- RDA的安裝使用
- 資料庫健康檢查(轉)資料庫
- ORACLE RDA 安裝及使用Oracle
- ORAchk-資料庫健康檢查資料庫
- 安裝EBS前期檢查工具 - RDA - Health Check / Validation Engine Guide 2 結果GUIIDE
- MySQL資料庫健康檢查--MySQL巡檢MySql資料庫
- rda收集資訊命令
- 漫談Oracle資料庫健康檢查Oracle資料庫
- Oracle資料庫健康檢查常用SQLOracle資料庫SQL
- MSSQL資料庫健康檢查--SQL Server巡檢SQL資料庫Server
- 利用Oracle RDA快速收集Oracle產品分析資料Oracle
- oracle 資料庫效能健康檢查指令碼Oracle資料庫指令碼
- oracle資料庫健康檢查報告模板Oracle資料庫
- 資料庫日常健康檢查方式方法資料庫
- (轉)oracle 資料庫效能健康檢查指令碼Oracle資料庫指令碼
- 資料庫健康檢查 sqlplus 指令碼資料庫SQL指令碼
- 如何使用命令列工具檢查資料庫?命令列資料庫
- 使用RDA, 透過反向工程得到邏輯模型模型
- 一個簡單資料庫健康檢查指令碼資料庫指令碼
- oracle 資料庫效能健康檢查指令碼[轉帖]Oracle資料庫指令碼
- 如何使用Java Streams進行資料庫查詢?Java資料庫