How to setup Oracle Automatic Workload Repository - AWR
This article explains the steps to setup Oracle Automatic Workload Repository.
A list of the snapshots
|
1 2 3 4 5 6 7 |
set lines 100 pages 999 select snap_id , snap_level , to_char(begin_interval_time, 'dd/mm/yy hh24:mi:ss') begin from dba_hist_snapshot order by 1 / |
Producing a report
|
1 |
@$ORACLE_HOME/rdbms/admin/awrrpt.sql |
The retention and interval time settings
|
1 2 3 4 5 |
col snap_interval format a30 col retention format a30 select snap_interval , retention from dba_hist_wr_control |
Changing the interval settings
|
1 |
exec dbms_workload_repository.modify_snapshot_settings (interval => 30) -- Gets a snapshot every 30 mins |
Changing the retention periods
|
1 |
exec dbms_workload_repository.modify_snapshot_settings (retention => 10*24*60) -- Set to 10 days |
Taking a snapshot manually
|
1 |
exec dbms_workload_repository.create_snapshot |
Listing all the baselines
|
1 2 3 4 5 6 7 8 9 |
set lines 100 col baseline_name format a40 select baseline_id aseline_name , start_snap_id , end_snap_id from dba_hist_baseline order by 1 / |
Creating a baseline
|
1 |
exec dbms_workload_repository.create_baseline (<start snap>, <endsnap>,'<name>') |
Deleting a baseline
|
1 |
exec dbms_workload_repository.drop_baseline('<baseline name>') |
Activating the default snapshot (active by default)
|
1 |
dbms_scheduler.enable('GATHER_STATS_JOB') |
Deactivating the default snapshot (active by default)
|
1 |
dbms_scheduler.disable('GATHER_STATS_JOB') |
The system time model
|
1 2 3 4 5 |
set lines 100 pages 999 select stat_name , value from v$sys_time_model order by value desc |
The session time model
|
1 2 3 4 5 |
select stat_name , value from v$sess_time_model where sid = '&sid' order by value desc |
Active Session History (ASH) report, identifying active sessions and information about them
|
1 |
@ORACLE_HOME/rdbms/admin/ashrpt.sql |
Kategori seçin...
