首页 > 数据库 > Oracle > Oracle生成指定数据库实例的统计报表
这项统计报表一般是针对多实例数据库,前面使用的脚本是生成数据库级别的统计报 表,对于多实例的数据库,有时候 DBA 可能希望看到某个实例的表现,那么本脚本就能派 上用场了。其实操作与上非常类似(都比较简单,需要 DBA 敲的字符加一块也没几个),注 意执行的脚本不同的哟。
SQL> @$ORACLE_HOME/rdbms/admin/awrrpti.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:
此处需指定生成的报表格式,有 txt 和 html 两种选择,默认情况下为 html 格式。
Type Specified: html
Instances in this Workload Repository schema
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
DB Id |
Inst Num DB Name |
Instance |
Host |
|
------------ -------- ------------ ------------ ------------ |
|
||
|
948405229 |
2 JSSDB |
jssdbn2 |
jssdbn2 |
|
* 948405229 |
1 JSSDB |
jssdbn1 |
jssdbn1 |
|
|
|
|
|
Enter value for dbid: 948405229
Using 948405229 for database Id
Enter value for inst_num: 1
Using 1 for instance number
相比标准统计报表的生成,这里多了两个需指定的值,就是选择要生成报表的 DBID 以 及实例的 ID。
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: 2
指定要读取多少天内的快照信息。
|
Listing the last 2 days of Completed Snapshots |
|
|
|
||
|
|
|
|
|
|
Snap |
|
Instance |
DB Name |
Snap Id |
Snap Started |
Level |
|
|
------------ ------------ --------- ------------------ ----- |
|
|
|||
|
jssdbn1 |
JSSDB |
235 22 Oct 2009 00:00 |
1 |
||
|
|
|
236 22 |
Oct 2009 01:00 |
1 |
|
|
|
|
237 22 |
Oct 2009 02:00 |
1 |
|
|
|
|
238 22 Oct 2009 |
03:00 |
1 |
|
|
|
|
239 22 |
Oct 2009 |
04:00 |
1 |
|
|
|
240 22 |
Oct 2009 |
05:00 |
1 |
|
241 22 Oct 2009 06:00 |
1 |
|
242 22 Oct 2009 07:00 |
1 |
|
243 22 Oct 2009 08:00 |
1 |
|
244 22 Oct 2009 09:00 |
1 |
|
245 22 Oct 2009 10:00 |
1 |
|
246 22 Oct 2009 11:00 |
1 |
|
247 22 Oct 2009 12:00 |
1 |
|
248 22 Oct 2009 13:00 |
1 |
|
249 22 Oct 2009 14:00 |
1 |
|
250 22 Oct 2009 15:00 |
1 |
|
251 22 Oct 2009 16:00 |
1 |
|
252 22 Oct 2009 17:00 |
1 |
|
253 22 Oct 2009 18:00 |
1 |
|
254 22 Oct 2009 19:00 |
1 |
|
255 22 Oct 2009 20:00 |
1 |
|
256 22 Oct 2009 21:00 |
1 |
|
257 22 Oct 2009 22:00 |
1 |
|
258 22 Oct 2009 23:00 |
1 |
|
259 23 Oct 2009 00:00 |
1 |
|
260 23 Oct 2009 01:00 |
1 |
|
261 23 Oct 2009 02:00 |
1 |
|
262 23 Oct 2009 03:00 |
1 |
|
263 23 Oct 2009 04:00 |
1 |
|
264 23 Oct 2009 05:00 |
1 |
|
265 23 Oct 2009 06:00 |
1 |
|
266 23 Oct 2009 07:00 |
1 |
|
267 23 Oct 2009 08:00 |
1 |
|
|
|
Specify the Begin and End Snapshot Ids
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Enter value for begin_snap:
.....................
......................
剩下的步骤就与标准统计报表的步骤完全相同,这里就不重复演示了。
更多信息参考http://www.infocool.net/Oracle/index.htm
来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/1700919/viewspace-2114999/ ,如需转载,请注明出处,否则将追究法律责任。