レック・テクノロジー・コンサルティング株式会社TECH BLOG

RDA(Remote Diagnostic Agent) -基本編-

はじめまして。Re:Qエンジニアの"MT-2"と申します。

今回はオラクルの小技シリースということで、
オラクル社のサポート・サービス契約すると無償で利用できるお便利ツール群の中から、
RDAというツールについて紹介をしたいと思います。
 

RDAとは

 
RDA(Remote Diagnostic Agent)は、オラクル社のあらゆる製品環境(Database、BI、
Cloud Control、VM、Weblogicなど)から詳細な構成情報を収集するPerlスクリプトです。
RDAを使えばプラットフォーム共通でコマンドの違いを意識せずに情報を取得できます。

DBの場合、ディクショナリや動的パフォーマンスビューを確認するSQLを自分で作成しますが、RDAの場合その必要もありません。
 
SQL使って出力すると、SQL*Plusのフォーマット設定をしっかりとしていないと非常に見づらいものになりますが、RDAの場合はHTMLで出力されるため、そういったことありません。ただ、入力する項目の多さや煩わしさが少しあるのですが、それは次回応用編で解決したいと思います。

それでは、今回はRDAの導入からDatabaseのレポート作成までを行っていきましょう。

環境は以下のとおりです。

- OS:Oracle Linux 5
- DB:Database 11.2.0.3
- SID:orcl (シングルDB(非ASM))

1.ダウンロード
 
上記のNote 314422.1のページからダウンロードできます。
RDAは最新版がリリースされると以前のバージョンはダウンロードできません。
今回使用するバージョンは8.0.2のLinux(x86-64)版になります。

2.インストール
 
ダウンロードしたファイルを任意のディレクトリに展開します。
ここでは/home/oracleの下で展開します。

[oracle@db1 ~]$ unzip p17902921_802_Linux-x86-64.zip
[oracle@db1 ~]$ cd rda
[oracle@db1 ~]$ export LANG=C
[oracle@db1 ~]$ ./rda.sh -c

何も表示されなければOKです。

3.設定
 
次に取得対象の製品及び製品の環境情報を入力していきます。
すべてを表示すると非常に長いため、今回はデータベース周りの部分のみ抜粋しています。
その他の設定はすべてデフォルトで設定されているものを選択しています。

[oracle@db1 ~]$ ./rda.sh
Enter the network domain name for this server
>

Warning: No domain has been specified
Do you want to specify a new value (Y/N)? N
★ 本環境ではドメインの指定はしていないので設定はしません。

------------------------------------------------------------------------------
RDA.BEGIN: Initializes the Data Collection
------------------------------------------------------------------------------
Enter the Oracle home to be used for data analysis
Hit "Return" to accept the default (/u01/app/oracle/product/11.2.0/dbhome_1)
>
~中略~
------------------------------------------------------------------------------
OS.ONET: Collects Oracle Net Information
------------------------------------------------------------------------------
Do you want RDA to collect Oracle Net information (Y/N)?
Hit "Return" to accept the default (N)
> Y
★ Oracle Netの情報を収集するのでYにします。
------------------------------------------------------------------------------
DB.DB: Controls Oracle RDBMS Data Collection
------------------------------------------------------------------------------
Is there a Oracle database for RDA to analyze (Y/N)?
Hit "Return" to accept the default (Y)
>
★ Databaseの情報収集設定をするのでEnter

Enter an Oracle User ID (user identifier only) to view DBA_ and V$ tables. If
RDA will be run under the Oracle software owner's ID, then enter a '/' here,
and select Y at the SYSDBA prompt to avoid being prompted for the database
password at run time.
Hit "Return" to accept the default (system)
>
★ データディクショナリや動的パフォーマンスビューにアクセスできるユーザを
を指定します。systemで問題ないのでそのままEnter

Is 'system' a SYSDBA user (will connect as SYSDBA) (Y/N)?
Hit "Return" to accept the default (N)
> Y
★ SYSDBA権限がないと取得できない情報がある場合はYを選択します。
今回はYを設定します。

Enter the Oracle SID to be analyzed
Hit "Return" to accept the default (orcl)
>
★ 収集対象のORACLE_SIDを指定します。環境変数ORACLE_SIDを設定していれば、デ   フォルトに設定されます。

Enter the query target description
Hit "Return" to accept the default (Using system as SYSDBA at orcl)
>
★ そのままEnter

Is a local connection required (Y/N)?
Hit "Return" to accept the default (Y)
>
★ Yを選択

Enter the Oracle SID to be analyzed
Hit "Return" to accept the default (orcl)
>
★ 分析対象のOracle SIDの確認。

Enter the database target description
Hit "Return" to accept the default (Database orcl)
>
Select the Oracle home for 'Database orcl'
1 Default home /u01/app/oracle/product/11.2.0/dbhome_1

D Define a new Oracle home target
E Edit an Oracle home target

Enter the item number or the action letter.
> 1
★ 収集対象DBのORACLE_HOMEを指定します。こちらも環境変数に設定
しているものがデフォルトになるので、1を入力してEnter
複数のORACLE_HOMEがある場合は、Dで新しいORACLE_HOMEを設定す
ることが可能です

Enter the Oracle base
Hit "Return" to accept the default (/u01/app/oracle)
>
★ 収集対象DBのORACLE_BASEを確認します。間違ってなければEnter

Enter the Oracle base target description
Hit "Return" to accept the default (Oracle base /u01/app/oracle)
>
★ 同上

Select the Oracle base for 'Database orcl'
1 Oracle base /u01/app/oracle

D Define a new Oracle base target
E Edit an Oracle base target

Enter the item number or the action letter.
Hit "Return" to accept the default (1)
> 1
★ ORACLE_HOMEと同じように情報収集対象のORACLE_BASEを選択します。

Is the INIT.ORA for the database to be analyzed located on this machine? (Y/N)
Hit "Return" to accept the default (N)
>
★ 本環境ではSPファイルを使用しているためデフォルトのNのままEnter

Select a database target for 'orcl':
1 Database orcl

D Define a new database target
E Edit a database target

Enter the item number or the action letter.
Hit "Return" to accept the default (1)
>
★ そのままReturn

Select a query target:
1 Using system as SYSDBA at orcl

D Define a new query target
E Edit a query target

Enter the item number or the action letter.
Hit "Return" to accept the default (1)
>
Return" to accept the default (1)
★ そのままReturn。
以上でDatabaseに関する収集は終了です。
あとはひたすらreturnの繰り返しになります。

------------------------------------------------------------------------------
RDA.STATUS: Produces the Remote Data Collection Reports
------------------------------------------------------------------------------
------------------------------------------------------------------------------
RDA.LOAD: Produces the External Collection Reports
------------------------------------------------------------------------------
------------------------------------------------------------------------------
RDA.FILTER: Controls Report Content Filtering
------------------------------------------------------------------------------
------------------------------------------------------------------------------
RDA.EXTRA: Collects User Defined Data
------------------------------------------------------------------------------
------------------------------------------------------------------------------
RDA.END: Finalizes the Data Collection
------------------------------------------------------------------------------

4.情報収集
 
設定した情報で情報取得を開始します。
[oracle@db1 ~]$ ./rda.sh
------------------------------------------------------------------------------
RDA Data Collection Started 13-Jan-2014 13:54:20
------------------------------------------------------------------------------
Processing RDA.BEGIN module ...
Enter the password for "SYSTEM as SYSDBA" at "orcl":
Please re-enter it to confirm: ★パスワードを入力します
Entries do not match. Please try again ...
Enter the password for "SYSTEM as SYSDBA" at "orcl":
Please re-enter it to confirm:
Processing OS.PERF module ...
Processing RDA.CONFIG module ...
Processing SAMPLE.SAMPLE module ...
Processing OS.OS module ...
Processing OS.PROF module ...
Processing OS.NET module ...
Processing OS.ONET module ...
Listener checks may take a few minutes. Be patient...
Processing listener LISTENER
Processing OS.INST module ...
Processing DB.DBA module ...
Processing OFM.WREQ module ...
This can take time. Be patient ...
Processing OFM.IREQ module ...
Processing RDA.LOAD module ...
Processing RDA.END module ...
------------------------------------------------------------------------------
RDA Data Collection Ended 13-Jan-2014 13:55:17
-----------------------------------------------------------------------------
You can review the reports by transferring the /home/oracle/rda/output
directory structure to a location where you have web-browser access. Then,
point your browser at this file to display the reports:
RDA__start.htm

Based on your server configuration, some possible alternative approaches
are:
- If your client computer with a browser has access to a web shared
directory, copy the ? directory structure to the web shared directory and
visit this URL:
http://machine:port/web_shared_directory/RDA__start.htm
or
- If your client computer with a browser has FTP access to the server
computer with the ? directory, visit this URL:
ftp://oracle@db1/rda/output

If this file was generated to assist in resolving a Service Request, please
send /home/oracle/rda/RDA_output_db1.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.

Please note: Do not submit any health, payment card or other sensitive
production data that requires protections greater than those specified in
the Oracle GCS Security Practices
(http://www.oracle.com/us/support/library/customer-support-security-practices-  069170.pdf).
Information on how to remove data from your submission is available at
https://support.oracle.com/rs?type=doc&id=1227943.1

5.確認
 
デフォルト設定だとoutputというディレクトリの下にレポートが生成されるので、
ブラウザからRDA__start.htmlと指定して確認します。

同じ設定で、再度取得したい場合はrda.shを実行します。
設定を変える場合は、以下のようにオプションを指定します。

[oracle@db1 ~]$ ./rda.sh -Sfn

以上がRDAの基本的な使い方になります。

今回は、Databaseのコア部分のみ収集しましたが、他にも様々なオプションがありますので
より詳細な情報についてはMy Oracle SupportのNote 314422.1を参照してください。

さて、便利なRDAですが、やはり対話形式だと確認事項が多く面倒ですよね。
次回は応用編として、非対話型で行うケースについて紹介をさせて頂きたいと思います。

この記事をシェアする

  • Facebook
  • X
  • Pocket
  • Line
  • Hatena
  • Linkedin

資料請求・お問い合わせはこちら

ページトップへ戻る