automatic workload repository.pdf

4
Published on Jul 2 2006 # 21 (21 reads) 10g (http://remidian.com/category/oracle/new-features/10g/) Automatic Workload Repository Automatic Workload Repository 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). [[email protected]] 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); Página 1 de 4 Automatic Workload Repository | remidian.com 26/09/2015 http://remidian.com/2006/07/automatic-workload-repository/

Upload: modesto-lopez-ramos

Post on 08-Jul-2016

216 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Automatic Workload Repository.pdf

Published on Jul 2 2006 # 21 (21 reads) 10g (http://remidian.com/category/oracle/new-features/10g/)

Automatic Workload Repository

Automatic Workload Repository

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 (7days).

[[email protected]]SQL> select snap_interval, retention

2 from dba_hist_wr_control3 /

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);

Página 1 de 4Automatic Workload Repository | remidian.com

26/09/2015http://remidian.com/2006/07/automatic-workload-repository/

Page 2: Automatic Workload Repository.pdf

[[email protected]]SQL> begin

2 dbms_workload_repository.modify_snapshot_settings3 ( interval => 604 , retention => 31 * 24 * 60);5 end;6 /

PL/SQL procedure successfully completed.

[[email protected]]SQL> select snap_interval, retention

2 from dba_hist_wr_control3 /

SNAP_INTERVAL RETENTION-------------------------------- ------------------------------+00000 01:00:00.0 +00031 00:00:00.0

History

Five latest snapshots

Página 2 de 4Automatic Workload Repository | remidian.com

26/09/2015http://remidian.com/2006/07/automatic-workload-repository/

Page 3: Automatic Workload Repository.pdf

[[email protected]]SQL> select *

2 from (3 select snap_id, startup_time, begin_interval_time, end_interval_

time4 from dba_hist_snapshot5 order by snap_id6 )7 where rownum < 68 /

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

24 30-JUN-06 05.59.11.000 PM 30-JUN-06 06.02.04.711 PM 30-JUN-06 07.00.29.599 PM

25 30-JUN-06 05.59.11.000 PM 30-JUN-06 07.00.29.599 PM 30-JUN-06 08.00.33.577 PM

26 30-JUN-06 05.59.11.000 PM 30-JUN-06 08.00.33.577 PM 30-JUN-06 09.00.39.837 PM

27 30-JUN-06 05.59.11.000 PM 30-JUN-06 09.00.39.837 PM 30-JUN-06 10.00.38.742 PM

[[email protected]]SQL> exec dbms_workload_repository.create_snapshot;

PL/SQL procedure successfully completed.

[[email protected]]SQL> select *

2 from (3 select snap_id, startup_time, begin_interval_time, end_interval_

time4 from dba_hist_snapshot5 order by snap_id6 )7 where rownum < 68 /

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

Página 3 de 4Automatic Workload Repository | remidian.com

26/09/2015http://remidian.com/2006/07/automatic-workload-repository/

Page 4: Automatic Workload Repository.pdf

24 30-JUN-06 05.59.11.000 PM 30-JUN-06 06.02.04.711 PM 30-JUN-06 07.00.29.599 PM

25 30-JUN-06 05.59.11.000 PM 30-JUN-06 07.00.29.599 PM 30-JUN-06 08.00.33.577 PM

26 30-JUN-06 05.59.11.000 PM 30-JUN-06 08.00.33.577 PM 30-JUN-06 09.00.39.837 PM

27 30-JUN-06 05.59.11.000 PM 30-JUN-06 09.00.39.837 PM 30-JUN-06 10.00.38.742 PM

@see

Página 4 de 4Automatic Workload Repository | remidian.com

26/09/2015http://remidian.com/2006/07/automatic-workload-repository/