Gblog

おもにTips

AWR report を出力するためのSQL

たくさんあるよね。

ルールはこんな感じ。

  • i がつくと、dbid を指定できる。
  • sq は SQLレポート
  • g がつくと、Oracle RAC 用(複数ノードをまとめてだしてくれる)
  • d は比較レポート

 

実際にどんなファイルがあるかというと。

比較レポートって使ったことないけど需要はあるのか?

 

他には、AWR データを別環境に移す際に使う extract/load。

 

$ORACLE_HOME/rdbms/admin 配下をみると他にも awr* ファイルはいろいろあります。ただ、awr*inp.sql や * awr*inpnm.sql はレポート出力用の sql ファイルから call されているようで直接呼び出すものではなさそう。

 

実際に使えそうなのは、awrinfo.sql ぐらいか。AWR で使用している領域の分析用。

Rem    NAME
Rem      awrinfo.sql - Script to output general AWR information
Rem
Rem    DESCRIPTION
Rem      This script will output general Automatic Workload Repository
Rem      (AWR) information such as the size, data distribution, etc. in AWR
Rem      and SYSAUX. The intended use of this script is for diagnosing
Rem      abnormalities in AWR and not for diagnosing issues in the database
Rem      instance. Please look at addmrpt.sql and awrrpt.sql for diagnosing
Rem      database issues.

需要、あるのか?