Tag: dbms_workload_repository

How to drop snapshots?

-- drop snapshot, it will not generate an error if the snap id is out of range SQL> EXEC dbms_workload_repository.drop_snapshot_range(low_snap_id=>1, high_snap_id=>10); PL/SQL procedure successfully completed.

How to change AWR retention, interval, topnsql?

Using dbms_workload_repository.modify_snapshot_settings, one can modify retention, interval, and topnsql. 1- Get the dbid which is needed to passs to dbms_workload_repository.modify_snapshot_settings SQL> select dbid from v$database; DBID ---------- 1992878807 2- Set retention, interval and top sql: retention=>value in minutes so (45 days * 24 (hours per day) * 60 minutes per hour = 64800), max value … Continue reading How to change AWR retention, interval, topnsql?