SQL> @F:\perf\awr\awr_generate.sql
Current Instance
~~~~~~~~~~~~~~~~
DB Id DB Name Inst Num Instance
----------- ------------ -------- ------------
1481259953 ORCL 1 orcl
Instances in this Workload Repository schema
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
DB Id Inst Num DB Name Instance Host
------------ -------- ------------ ------------ ------------
* 1481259953 1 ORCL orcl WIN-JQK18VPJ
9K8
Using 1481259953 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 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 10429 11 11月 2018 00:00 1
10430 11 11月 2018 01:00 1
10431 11 11月 2018 02:00 1
10432 11 11月 2018 03:00 1
10433 11 11月 2018 04:00 1
10434 11 11月 2018 05:00 1
10435 11 11月 2018 06:00 1
10436 11 11月 2018 07:00 1
10437 11 11月 2018 08:00 1
10438 11 11月 2018 09:00 1
10439 11 11月 2018 10:00 1
10440 11 11月 2018 11:00 1
10441 11 11月 2018 12:00 1
10442 11 11月 2018 13:00 1
10443 11 11月 2018 14:00 1
10444 11 11月 2018 15:00 1
10445 11 11月 2018 16:00 1
10446 11 11月 2018 17:00 1
10447 11 11月 2018 18:00 1
10448 11 11月 2018 19:00 1
10449 11 11月 2018 20:00 1
Specify the Begin and End Snapshot Ids
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
输入 begin_snap 的值: 10447
Begin Snapshot Id specified: 10447
输入 end_snap 的值: 10449
End Snapshot Id specified: 10449
Specify output script name
~~~~~~~~~~~~~~~~~~~~~~~~~~
This script produces output in the form of another SQL script
The output script contains the commands to generate the AWR Reports
The default output file name is awr-gene.sql
Script written to awr-gene.sql - check and run in order to generate AWR report
s...
SQL> @awr-gene.sql
Beginning AWR Generation...
Creating AWR Report awrrpt_1_20181111_1800__20181111_1900.html for instance numb
er 1 snapshots 10447 to 10448