Академический Документы
Профессиональный Документы
Культура Документы
com
Pgina 1 de 4
A very short howto for the Automatic Workload Repository, the successor of perfstat.
Interval
Some queries;
Listing below shows one snapshot is taken every 20 minutes, the snapshot is stored for a week (7
days).
[SYSTEM@DB01.REMIDIAN.COM]
SQL> select snap_interval, retention
2 from
dba_hist_wr_control
3 /
SNAP_INTERVAL
RETENTION
-------------------------------- -----------------------------+00000 00:20:00.0
+00007 00:00:00.0
Alter the interval to once every hour and store it for a month (31 days);
http://remidian.com/2006/07/automatic-workload-repository/
26/09/2015
Pgina 2 de 4
[SYSTEM@DB01.REMIDIAN.COM]
SQL> begin
2
dbms_workload_repository.modify_snapshot_settings
3
( interval
=> 60
4
, retention => 31 * 24 * 60);
5 end;
6 /
PL/SQL procedure successfully completed.
[SYSTEM@DB01.REMIDIAN.COM]
SQL> select snap_interval, retention
2 from
dba_hist_wr_control
3 /
SNAP_INTERVAL
RETENTION
-------------------------------- -----------------------------+00000 01:00:00.0
+00031 00:00:00.0
History
Five latest snapshots
http://remidian.com/2006/07/automatic-workload-repository/
26/09/2015
Pgina 3 de 4
[SYSTEM@DB01.REMIDIAN.COM]
SQL> select *
2 from
(
3
select snap_id, startup_time, begin_interval_time, end_interval_
time
4
from
dba_hist_snapshot
5
order by snap_id
6
)
7 where rownum < 6
8 /
SNAP_ID STARTUP_TIME
TIME
---------- ------------------------------------------------23 30-JUN-06 05.59.11.000 PM
02.04.711 PM
24 30-JUN-06 05.59.11.000 PM
00.29.599 PM
25 30-JUN-06 05.59.11.000 PM
00.33.577 PM
26 30-JUN-06 05.59.11.000 PM
00.39.837 PM
27 30-JUN-06 05.59.11.000 PM
00.38.742 PM
BEGIN_INTERVAL_TIME
END_INTERVAL_
[SYSTEM@DB01.REMIDIAN.COM]
SQL> exec dbms_workload_repository.create_snapshot;
PL/SQL procedure successfully completed.
[SYSTEM@DB01.REMIDIAN.COM]
SQL> select *
2 from
(
3
select snap_id, startup_time, begin_interval_time, end_interval_
time
4
from
dba_hist_snapshot
5
order by snap_id
6
)
7 where rownum < 6
8 /
SNAP_ID STARTUP_TIME
BEGIN_INTERVAL_TIME
END_INTERVAL_
TIME
---------- ------------------------- ------------------------------------------------23 30-JUN-06 05.59.11.000 PM 30-JUN-06 05.59.11.000 PM 30-JUN-06 06.
02.04.711 PM
http://remidian.com/2006/07/automatic-workload-repository/
26/09/2015
24 30-JUN-06
00.29.599 PM
25 30-JUN-06
00.33.577 PM
26 30-JUN-06
00.39.837 PM
27 30-JUN-06
00.38.742 PM
Pgina 4 de 4
@see
http://remidian.com/2006/07/automatic-workload-repository/
26/09/2015