数据库版本:11.2.0.4
sqlplus /nolog
采用sysdba登陆
connect / as sysdba
Connected.
执行awrrpt.sql脚本,脚本文件位置在$ORACLE_HOME/rdbms/admin/awrrpt.sql
SQL> @/u01/app/oracle/product/11.2.0.4/db_1/rdbms/admin/awrrpt.sql
Current Instance
~~~~~~~~~~~~~~~~
DB Id DB Name Inst Num Instance
----------- ------------ -------- ------------
3392442243 SLNNGK 1 slnngk
指定输出文件的格式,默认为html格式
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:
Type Specified: html
Instances in this Workload Repository schema
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
DB Id Inst Num DB Name Instance Host
------------ -------- ------------ ------------ ------------
* 3392442243 1 SLNNGK slnngk pxc04
Using 3392442243 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.
指定生成快照的日志天数
Enter value for num_days: 1
Listing the last day's Completed Snapshots
Snap
Instance DB Name Snap Id Snap Started Level
------------ ------------ --------- ------------------ -----
slnngk SLNNGK 86 25 Apr 2018 00:00 1
87 25 Apr 2018 00:10 1
88 25 Apr 2018 00:20 1
89 25 Apr 2018 00:30 1
90 25 Apr 2018 00:40 1
91 25 Apr 2018 00:50 1
92 25 Apr 2018 01:00 1
93 25 Apr 2018 01:10 1
94 25 Apr 2018 01:20 1
95 25 Apr 2018 01:30 1
96 25 Apr 2018 01:40 1
97 25 Apr 2018 01:50 1
98 25 Apr 2018 02:00 1
99 25 Apr 2018 02:10 1
100 25 Apr 2018 02:20 1
101 25 Apr 2018 02:30 1
102 25 Apr 2018 02:40 1
103 25 Apr 2018 02:50 1
104 25 Apr 2018 03:00 1
105 25 Apr 2018 03:10 1
106 25 Apr 2018 03:20 1
107 25 Apr 2018 03:30 1
108 25 Apr 2018 03:40 1
109 25 Apr 2018 03:50 1
110 25 Apr 2018 04:00 1
111 25 Apr 2018 04:10 1
112 25 Apr 2018 04:20 1
113 25 Apr 2018 04:30 1
114 25 Apr 2018 04:40 1
115 25 Apr 2018 04:50 1
116 25 Apr 2018 05:00 1
117 25 Apr 2018 05:10 1
118 25 Apr 2018 05:20 1
119 25 Apr 2018 05:30 1
120 25 Apr 2018 05:40 1
121 25 Apr 2018 05:50 1
122 25 Apr 2018 06:00 1
123 25 Apr 2018 06:10 1
124 25 Apr 2018 06:20 1
125 25 Apr 2018 06:30 1
126 25 Apr 2018 06:40 1
127 25 Apr 2018 06:50 1
128 25 Apr 2018 07:00 1
129 25 Apr 2018 07:10 1
130 25 Apr 2018 07:20 1
131 25 Apr 2018 07:30 1
132 25 Apr 2018 07:40 1
133 25 Apr 2018 07:50 1
134 25 Apr 2018 08:00 1
135 25 Apr 2018 08:10 1
136 25 Apr 2018 08:20 1
137 25 Apr 2018 08:30 1
138 25 Apr 2018 08:40 1
139 25 Apr 2018 08:50 1
140 25 Apr 2018 09:00 1
141 25 Apr 2018 09:10 1
Snap
Instance DB Name Snap Id Snap Started Level
------------ ------------ --------- ------------------ -----
slnngk SLNNGK 142 25 Apr 2018 09:20 1
143 25 Apr 2018 09:30 1
起始快照值
Specify the Begin and End Snapshot Ids
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Enter value for begin_snap: 86
Begin Snapshot Id specified: 86
结束快照值
Enter value for end_snap: 141
End Snapshot Id specified: 141
Specify the Report Name
~~~~~~~~~~~~~~~~~~~~~~~
The default report file name is awrrpt_1_86_141.html. To use this name,
press to continue, otherwise enter an alternative.
Enter value for report_name:
Using the report name awrrpt_1_86_141.html
生成的文件名名为awrrpt_1_86_141.html,这个文件保存在sqlplus登陆的当前目录,注意使用oracle登陆的需要在该目录有写权限,否则因为权限问题无法生成文件.
-- The End --
阅读(7401) | 评论(0) | 转发(1) |