oracle rda

netwant發表於2013-05-20
oracle rda [@more@]
1 RDA(RemoteDiagnostic Agent)是oracle用來收集、分析資料庫的工具,執行該工具不會改變系統的任何引數,RDA收集的相關資料非常全面,可以簡化我們日常監控、分析資料庫的工作。一般Oracle 原廠的人巡檢也是使用RDA工具。 不過一般國內的DBA 巡檢時很少使用這個工具,一般都是透過AWR 或者自己整幾個指令碼,跑了在分析一下就ok了。在MOS 上建立SR(Service Request)時(我08年剛接觸Oracle時,那是MOS 上還是稱呼Tar,後來改成了SR了)。 Oracle 也會要求客戶上傳RDA的資訊。 透過RDA 可以快速的瞭解系統的狀況。RDA 是用Perl 指令碼寫出來的。 可以透過MOS 下載RDA。 RDA 是一個客戶端,解壓縮之後就可以直接使用了。
2.1 Platforms Supported
At this time,RDA has been successfully tested to run on the following Supported platforms:
1) Apple Mac OS X/Darwin
2) HP OpenVMS Alpha 7.3-2 andabove
3) HP OpenVMS Itanium
4) HP Tru64 UNIX
5) HP-UX Itanium
6) HP-UX PA-RISC (32 and 64 bit)
7) IBM AIX on POWER Systems(32 and64 bit)
8) IBM Dynix/Ptx
9) IBM Linux on POWER
10) IBM zSeries Based Linux
11) Linux Itanium
12) Linux x86 (32 and 64 bit)
13) Microsoft Windows 2000Workstation and Server
14) Microsoft Windows 2003 Server
15) Microsoft Windows 2008
16) Microsoft Windows Vista
17) Microsoft Windows XPProfessional
18) Sun Solaris Intel
19) Sun Solaris SPARC (32 and 64bit)
2.2 FollowingPlatforms are NOT Supported:
IBM Z/OS(OS/390)
You can run RDAalso on other platforms that support Perl 5.005 and later. However, OracleSupport recommends testing on a non-production server first because theperformance is unpredictable. For example, you will receive errors when RDAattempts to run utilities and commands that are not supported on theseplatforms.
3.1 RDA 安裝
1)Choose or create a directory orarea on your UNIX server. Make sure you have sufficient space for the RDAoutput (~150MB). It does not matter where you create this directory or what itis named, but the same user that runs RDA must own it. Do not use a directorythat contains an older version of RDA unless you have deleted the previousversion of RDA first. If necessary, you can reuse prior setup files.
Note: The rda.zip creates a directory named "rda" containing all the requiredfiles when you extract it.
--解壓之後會建立rda的目錄
Do not extract the contents of the RDA archive on a Windows client first or youwill have to remove the ^M characters from the end of each line in all of theshell scripts in order for them to run.
--不要在windows 平臺上解壓縮linux 的RDA。 因為這樣會移除shell指令碼每行的^M 字元。
2)FTP the downloaded rda.zip fileto your UNIX server in binary mode and place it in the directory chosen in step1.
3)Extract the .zip archivecontents into a new directory, preserving the directory structure of thearchive. Do not extract into a directory that contains an older RDA version.For example:
unzip rda.zip
4)Make sure the RDA command(rda.sh and rda.pl) is executable. To verify, enter the following command:
chmod +x
--確認rda.sh 和 rda.pl 指令碼的許可權。 這2個指令碼作用是一樣的,只是一個是shell,一個是perl,都是用來收集資訊的,如果我們要使用RDA,就是執行其中一個指令碼就可以了。
5) You can verify the RDA installation using the following command:
./-cv
--rda 不需要安裝,解壓縮之後就可以使用了。
3.2 RDA使用說明
關於RDA的詳細使用說明,參考:
RemoteDiagnostic Agent (RDA) 4 - FAQ [ID 330363.1]
在Linux/Unix作業系統中,oracle推薦在資料庫建立使用者下執行(oracle使用者)。在第一次使用RDA時, 會在命令列上有一些互動的資訊,會讓你確實是否收集某些資訊。等確認完畢後,會在rda目錄下面生成2個配置檔案:setup.cfg、setup.bak。 這裡面儲存了互動時確認的資訊。
當我們下次執行RDA時,那麼就不需要再次進行互動資訊的確認。 直接從第一次生成的配置檔案中讀取即可。 這個互動資訊非常多,是需要點耐心來逐步確認的。也可以透過命令生成預設的配置檔案。 如果我們想更改收集的配置,那麼可以直接修改這2個配置檔案。 在執行rda 命令就可以了。
RDA 收集的資訊會預設會放到/rda/output 資料夾下,在第一次執行RDA時,會提示指定RDA檔案已什麼開頭,並儲存在什麼位置。 RDA檔案有2種格式的檔案,一個是html,一個是txt。 其中會有一個_start.htm 的檔案,我們可以透過這個檔案開開始閱讀整個RDA。
在生成RDA 檔案的同時,預設還會把RDA檔案打成一個壓縮包。 這個壓縮包裡的內容和我們output資料夾下的一致。 這個壓縮包是用來傳送oracle的。 一般建立SR時,Oracle 會要求提供這個RDA的壓縮包。
4 MOS 的文件上貼幾個常見的問題
(1)How do I force RDA to run Setup again?
RDA will readthe values it finds in "setup.cfg" first before requiring to answerany setup questions. You can force RDA to start the setup process again intwo(2) ways.
--在非第一次執行RDA的情況下,預設會讀取setup.cfg檔案。 如果要強制的再次setup,有如下2種方法:
Deleting or renaming the"setup.cfg" file :
$ ./rda.pl -S or
c:>rda.cmd -S or
$ ./rda.sh -S
Running the following RDAcommand:
$ ./rda.pl -Sfn or
c:>rda.cmd -Sfn or
$ ./rda.sh -Sfn
(2)How do I force RDA to collect data again?
RDA will readthe values it finds in directory first, if it finds data thathas not been collected it will attempt to collect that data. However if youwant RDA to collect data again you can execute the following commands. (-v: verbose , C: collect , R: render into html, P:Package contents of output directory into archive, and f : forceexecution of all commands.
$ ./rda.sh -vCRPf or
c:>rda.cmd -vCRPf or
$ ./rda.pl -vCRPf or
$./rda.sh -vf or
c:>rda.cmd -vf
Finally, if youneed to run data collection for specific module again you can just run thefollowing command (OS: Operating system and DBA: Database)
$ ./rda.sh -vCRP OS DB or
c:>rda.cmd -vCRP OS DBA
Note: Thecollection process will execute must faster and you will not receive anynotices when it completes. This also overwrite the data in the outputdirectory.
(3)Where is the RDA output located?
The output is aset of HTML files that are located in the RDA output directory which you specified at setup (the default is /rda/output). You can review the data collected, by using a Web Browser to open the following file located in theoutput directory:
RDA__start.htm
Note that the first part of the name "RDA" can be different, depending on your specific RDA setup.
The final outputis also packaged in an archive located in the output directory chosen during RDA setup -- the packaged output file will have a .zip, .tar, .tar.gz,or .tar.Z extension.
If the data collection was generated to assist in resolving a Service Request, send the report archive (note: file name varies, but ends in .zip, .tar, .tar.gz,or .tar.Z ; e.a: RDA.RDA_db_autoxyz.zip) to Oracle Support by uploading the file via My Oracle Support. If FTP'ing the file, please be sure to FTP in BINARY format. Do not rename the file, as the file name helps OracleSupport quickly identify that RDA output is attached to the service request.>
Note: Thefinal output directory may not contain an archive file (.zip, .tar, .tar.gz,or .tar.Z ). If the archive is missing, please archive all the files inthe manually and send them to Oracle Support. You canuse a packaging/archive utility program like toperform this task.
(4)What does the RDA-nnnnn error mean when I executedRDA?
RDA has a builtin error handling mechanism. You can discover the meaning and possible solutionto the error by using the following RDA command line argument: rda.pl -E {ERROR#} . i.e:
可以使用RDA 命令檢視對應錯誤的詳細說明
$ ./rda.pl -E RDA-14
RDA-00014: %d issue(s) found in the RDA installation
*Cause: issues encountered when checking the RDA installation
*Action: A fresh install of RDA is probably the easiest way to fix file
alteration problems. However, permission problems can result from
other factors:
- If RDA has been installed by another user, the default settings
could be too restrictive. Please review the local context with
that user and your appropriate local authorities.
- Execution permissions can be missing on startup scripts for other
platforms and when perl is not available from the command line.
(5)Can RDA be setup without asking any questions?
Yes. RDA wasdesigned to determine values to setup question from the customer OSenvironment. You can also, pass all default parameters and values in a singlecommand like this:
$ ./rda.pl-Sy -e SQL_SYSDBA=1,SQL_LOGIN=/ OS INST DB
在前面講到,第一次執行RDA時,要確認很多資訊。 那麼可以使用這種方法避免進行互動。 當然如果是初次使用RDA, 還是很有必要了解一下收集的內容。
這裡要注意的事,該命令僅僅是快速的生成配置檔案,並沒有生成RDA的資訊。 我們還是需要再次執行rda.sh 命令的。
(6)Can RDA be scheduled to run automatically via CRONor AT?
Yes. You need tocheck with your OS documentation regarding running scheduling applications likeCRON and AT. Please note you may need purge RDA log files in the directory and encode passwords in your setup.cfgwhen required.
(7)How can I reduce the size or amount of RDA outputfiles?
RDA has 2mechanisms to reduce the size and quantity of trace and log files it collectsand packages in the output file. The first is built into the advance setupprofiles of the various collection modules, specifically for the (INI, DB,WEBC, IAS, GTW, RAC) modules and can be called using the following command(s):
$ rda.sh -S -p expert INI DB or
rda.cmd -S -p expert INI DB or
rda.pl -S -p expert INI DB
The second isusing the using "-e" switch when calling RDA (rda.sh, rda.cmd, orrda.pl):
See modules:DB:[DB_TRACE_AGE, ALERT_TAIL], INI:[RDA_TAIL], GTW:[GATEWAY_TAIL],IAS:[DCM_TAIL], WEBC:[WEBCACHE_TAIL], RAC:[CLUSTER_TAIL]
./rda.sh -e DB_TRACE_AGE=5,ALERT_TAIL=1000 or
./rda.cmd -e DB_TRACE_AGE=5, ALERT_TAIL=1000
(8)How do I verify the RDA package that I installedis not corrupted?
RDA has aninternal file verification system to handle most types of file corruptions, aslong as ./rda.pl, rda.sh, or rda.cmd can be called or not corrupt themselves:It can be run using the following command.
驗證RDA的安裝是否正確
$ ./rda.sh -vc or
C:>rda.cmd -vc or
$ ./rda.pl –vc
(9)Why is RDA taking a long time to run the setupprocess?
Commandexecution can be slow to start when there are difficulties to detect the TCP/IPdomain of the server that RDA is running on. The setup process can takesseveral minutes in some circumstances. The RDA_DOMAINenvironment variable can avoid that.
On UNIX:
$RDA_DOMAIN=oracle.com
./rda.sh -S or
$RDA_DOMAIN=oracle.com
$export RDA_DOMAIN
$./rda.sh -S
On Windows:
C:setRDA_DOMAIN=oracle.com
C:rda.cmd -S
(10)How to disable the parallel collection in RDA 4.18and later?
Set the defaultfor NO_PARALLEL to 1 in modules/S000INI.cfg, and specify NO_PARALLEL=1 in allsetup files already present.
[oracle@rac2 rda]$ catsetup.bak |grep NO_PARALLEL
NO_PARALLEL=0

來自 “ ITPUB部落格 ” ,連結:http://blog.itpub.net/309902/viewspace-1060522/,如需轉載,請註明出處,否則將追究法律責任。

相關文章