创建快照:
SQL> exec dbms_workload_repository.create_snapshot();
删除快照:
SQL> exec dbms_workload_repository.drop_snapshot_range(low_snap_id=>2542,high_snap_id=>2544,dbid=>1725496767);
修改快照设置:
SQL> exec dbms_workload_repository.modify_snapshot_settings(retention=>43200,interval=>30,topsql=>100,dbid=>1725496767);
查看快照:
SQL> select snap_id,dbid,instance_number,startup_time,begin_interval_time,end_interval_time,flush_elapsed,snap_level,error_count,snap_flag,snap_timezone from dba_hist_snapshot; SNAP_ID DBID INSTANCE_NUMBER STARTUP_TIME BEGIN_INTERVAL_TIME END_INTERVAL_TIME FLUSH_ELAPSED SNAP_LEVEL ERROR_COUNT SNAP_FLAG SNAP_TIMEZONE -------- ---------- --------------- ------------------------- ------------------------- ------------------------- ------------------ ---------- ----------- ---------- ------------- 2412 1725496767 1 26-OCT-15 08.41.58.000 AM 30-OCT-15 09.00.04.802 PM 30-OCT-15 10.00.06.349 PM +00000 00:00:00.1 1 0 0 +0 08:00:00 SQL>