ablog

不器用で落着きのない技術者のメモ

AWRのスナップショット取得とレポート出力方法

  • スナップショットを取得する。
$ sqlplus system/manager
SQL> EXECUTE DBMS_WORKLOAD_REPOSITORY.CREATE_SNAPSHOT();
  • レポートを出力する。
$ export NLS_LANG=American_America.JA16EUC
$ sqlplus system/manager
SQL> @?/rdbms/admin/awrrpt.sql

...

Specify the Report Type
~~~~~~~~~~~~~~~~~~~~~~~
Would you like an HTML report, or a plain text report?
Enter 'html' for an HTML report, or 'text' for plain text
Defaults to 'html
Enter value for report_type: text

...

Specify the number of days of snapshots to choose from
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Entering the number of days (n) will result in the most recent
(n) days of snapshots being listed.  Pressing <return> without
specifying a number lists all completed snapshots.


Enter value for num_days: 1

...

Specify the Begin and End Snapshot Ids
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Enter value for begin_snap: 454

...

Enter value for end_snap: 455

...

Specify the Report Name
~~~~~~~~~~~~~~~~~~~~~~~
The default report file name is awrrpt_1_454_455.txt.  To use this name,
press <return> to continue, otherwise enter an alternative.

Enter value for report_name:

...

End of Report
Report written to awrrpt_1_454_455.txt