Oracle數(shù)據(jù)庫(kù)診斷工具RDA的安裝與使用詳解
Oracle數(shù)據(jù)庫(kù)診斷工具RDA的相關(guān)知識(shí)是本文我們主要要介紹的內(nèi)容,RDA是Remote Diagnostic Agent 的簡(jiǎn)稱(chēng),是Oracle用來(lái)收集、分析數(shù)據(jù)庫(kù)的工具,運(yùn)行該工具不會(huì)改變系統(tǒng)的任何參數(shù),RDA收集的相關(guān)數(shù)據(jù)非常全面,可以簡(jiǎn)化我們?nèi)粘1O(jiān)控、分析數(shù)據(jù)庫(kù)的工作,Oracle Support也建議我們?cè)诜答佅嚓P(guān)問(wèn)題時(shí),提供RDA收集的數(shù)據(jù),這樣可以為快速解決問(wèn)題提供一個(gè)有力的保證。
一、支持的操作系統(tǒng)
- IBM AIX
- Intel Linux (RedHat and SuSE)
- HP-UX (10.* and 11.*)
- HP Tru64
- Sequent Dynix/Ptx
- Sun Solaris (2.6 - 2.10)
- Windows XP Professional
- Windows 2000 Workstation and Server
- Windows 2003 Server
二、支持的Oracle產(chǎn)品
- 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)
- Oracle Networking products
三、主要用于診斷數(shù)據(jù)庫(kù)的以下方面的問(wèn)題
性能、安裝、配置、升級(jí)、移植以及內(nèi)部錯(cuò)誤問(wèn)題。
四、RDA的安裝(版本4.12-080530)
工具下載: metalink上(需要metalink賬號(hào))
在Unix操作系統(tǒng)的安裝說(shuō)明:
1、工具下載完后不要在window操作系統(tǒng)下做解壓縮,腳本的文件格式會(huì)破壞。
2、ftp上傳是采用二進(jìn)制方式。
3、執(zhí)行解壓縮命令:
$ gunzip rda.tar.gz
$ tar xvf rda.tar
4、測(cè)試是否正常
$ cd rda
$ ./rda.sh -c
五、RDA的使用
在Unix操作系統(tǒng)中,oracle推薦在數(shù)據(jù)庫(kù)創(chuàng)建用戶(hù)下執(zhí)行(一般即為oracle用戶(hù)),第一次使用需要做一個(gè)采集的初始配置。
執(zhí)行命令:$ ./rda.sh -S,執(zhí)行命令后,會(huì)有個(gè)向?qū)Щ慕缑孀屇愀鶕?jù)當(dāng)前數(shù)據(jù)庫(kù)的實(shí)際安裝的產(chǎn)品完成初始配置。 完成配置后rda目錄下會(huì)生成配置文件 setup.cfg、setup.bak,如果需要重新調(diào)整配置參數(shù),可以直接修改該文件。
配置過(guò)程一般是默認(rèn)值,或者按照提示輸入?yún)?shù),特殊地方如下:
- -------------------------------------------------------------------------------
- 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 '/' here,
- and select Y at the SYSDBA prompt to avoid being prompted 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
- -------------------------------------------------------------------------------
初始配置完畢后要采集數(shù)據(jù),執(zhí)行命令:$ ./rda.sh
如果要看到詳細(xì)的采集過(guò)程,可以執(zhí)行命令:$ ./rda.sh -v
Enter sysman user password:
Please re-enter it to confirm:
在采集過(guò)程中有可能需要你輸入數(shù)據(jù)庫(kù)相關(guān)用戶(hù)的密碼。
采集完成后,在rda目錄下根據(jù)初始配置文件會(huì)生成格式為zip的報(bào)告文件以及采集日志, 默認(rèn)文件位置./output/RDA.$machine_name.zip。
解壓縮該文件,訪問(wèn) <report_group>__start.htm,就可以看到這次采集的數(shù)據(jù)的詳細(xì)信息。
$ cd output
$ ls -l *zip
-rw-r--r-- 1 oracle oinstall 1911090 11月 28 14:49 RDA.RDA_game.zip
$ sz RDA.RDA_game.zip
使用時(shí)的注意點(diǎn):
1、有時(shí)不能生成zip格式的報(bào)告文件,這跟客戶(hù)端是否安裝壓縮工具有關(guān),需要自行解壓縮相關(guān)報(bào)告文件。
2、如果需要安裝已生成的配置再次采集,刪除已生成的報(bào)告文件,然后執(zhí)行命令:$ ./rda.sh -Svf,重新設(shè)置后再執(zhí)行采集命令:$ ./rda.sh -v 。
六、采集數(shù)據(jù)分析
報(bào)告文件主要包括數(shù)據(jù)庫(kù)對(duì)應(yīng)機(jī)器的操作系統(tǒng)軟、硬件環(huán)境、用戶(hù)設(shè)置以及數(shù)據(jù)庫(kù)詳細(xì)的信息(初始參數(shù)、運(yùn)行事件、日常監(jiān)控等)。
在日常的維護(hù)當(dāng)中,我們主要關(guān)注點(diǎn):
1、關(guān)注RDBMS下的幾個(gè)統(tǒng)計(jì)信息
Database SPFile Parameters spfile中數(shù)據(jù)庫(kù)相關(guān)初始參數(shù)的設(shè)置。
SGA Information 查看系統(tǒng)全局區(qū)當(dāng)前內(nèi)存信息。
Sessions and Processes 采集時(shí)間內(nèi)的數(shù)據(jù)庫(kù)會(huì)話(huà)相關(guān)信息。
V$System_Event 數(shù)據(jù)庫(kù)實(shí)例整個(gè)運(yùn)行期間所有進(jìn)程事件的等待統(tǒng)計(jì)視圖。
V$Session_Wait 會(huì)話(huà)等待事件以及相關(guān)定位信息數(shù)據(jù)。
Latch Information 競(jìng)爭(zhēng)相關(guān)信息(翻譯不是很準(zhǔn)確) 。
Tablespaces 數(shù)據(jù)庫(kù)表空間信息(表空間類(lèi)型、對(duì)應(yīng)數(shù)據(jù)文件使用率、是否可擴(kuò)展等等)。
Database Files 數(shù)據(jù)庫(kù)對(duì)應(yīng)數(shù)據(jù)文件信息(文件位置、使用率等)。
Invalid Objects 失效的數(shù)據(jù)庫(kù)對(duì)象,日常監(jiān)控如果發(fā)現(xiàn)有失效,需要維護(hù)人員手工重新編譯。
all errors 日常執(zhí)行的數(shù)據(jù)庫(kù)錯(cuò)誤。
在V$System_Event、 V$Session_Wait 主要關(guān)注(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 數(shù)據(jù)庫(kù)系統(tǒng)級(jí)日志。
last errors 數(shù)據(jù)庫(kù)最近的異常日志、根據(jù)trace文件位置,可以查看詳細(xì)錯(cuò)誤信息。
關(guān)于Oracle數(shù)據(jù)庫(kù)診斷工具RDA的安裝與使用的相關(guān)知識(shí)就介紹到這里了,希望本次的介紹能夠?qū)δ兴斋@!
【編輯推薦】






