Escolar Documentos
Profissional Documentos
Cultura Documentos
Automatic:
By default AWR snapshot is taken every one hour and is retained for one week.
To change these default values, run the following command.
BEGIN
DBMS_WORKLOAD_REPOSITORY.modify_snapshot_settings(
retention => 14400,
-- Minutes (= 10 Days). Current value retained if NULL.
interval => 15);
-- Minutes. Current value retained if NULL.
END;
Manual:
To capture the AWR report manually, run the following command:
EXEC DBMS_WORKLOAD_REPOSITORY.create_snapshot;
Running this script will throw prompt asking for the below mentioned things,
Specify the report type:
Choose HTML.
Specify the number of days of snapshots to choose from:
Choose 2 days.
Specify the Begin and End Snapshot Ids:
For example say we have captured 8 snapshots during the entire Load test starting from
snapshot id: 121 to 128.
We need to run the awrrpt.sql eight times to generate 8 AWR reports. To generate the first report
we need to give Begin snapshot id as 121 and end snapshot id as 122. And for second report the
Begin snapshot id as 122 and End snapshot id as 123 and so on. For the last report the Begin
snapshot id would be 128 and End snapshot id is 122 (Not 121).