打开SqlPlus CLI
(Windows系统下演示实例)
AWR(Automatic Workload Repository) Report生成示例
AWR(Automatic Workload Repository) Report生成步骤
SQL*Plus: Release 11.2.0.1.0 Production on 星期三 4月 22 19:09:43 2020
Copyright (c) 1982, 2010, Oracle. All rights reserved.
请输入用户名: sys@LOCALORCL as SYSDBA
输入口令:
连接到:
Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
SQL> @C:\app\kylin\product\11.2.0\dbhome_1\RDBMS\ADMIN\awrrpt.sql
Current Instance
~~~~~~~~~~~~~~~~
DB Id DB Name Inst Num Instance
----------- ------------ -------- ------------
1501012172 ORCL 1 orcl
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'
输入 report_type 的值: html
Type Specified: html
Instances in this Workload Repository schema
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
DB Id Inst Num DB Name Instance Host
------------ -------- ------------ ------------ ------------
* 1501012172 1 ORCL orcl KYLIN
Using 1501012172 for database Id
Using 1 for instance number
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.
输入 num_days 的值: 1
Listing the last day's Completed Snapshots
Snap
Instance DB Name Snap Id Snap Started Level
------------ ------------ --------- ------------------ -----
orcl ORCL 4981 22 4月 2020 00:00 1
4982 22 4月 2020 01:00 1
4983 22 4月 2020 08:52 1
4984 22 4月 2020 10:00 1
4985 22 4月 2020 11:00 1
4986 22 4月 2020 12:00 1
4987 22 4月 2020 13:00 1
4988 22 4月 2020 14:00 1
4989 22 4月 2020 15:00 1
4990 22 4月 2020 16:00 1
4991 22 4月 2020 17:00 1
4992 22 4月 2020 18:00 1
4993 22 4月 2020 19:00 1
Specify the Begin and End Snapshot Ids
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
输入 begin_snap 的值: 4981
Begin Snapshot Id specified: 4981
输入 end_snap 的值: 4992
End Snapshot Id specified: 4992
Specify the Report Name
~~~~~~~~~~~~~~~~~~~~~~~
The default report file name is awrrpt_1_4981_4992.html. To use this name,
press <return> to continue, otherwise enter an alternative.
输入 report_name 的值: 20200422_AWR-Report.html
Using the report name 20200422_AWR-Report.html
最后生成html文件20190424AWR_Report.html存放在 C:\Users\kylin 路径下(本机)。
kylin是HostName