Prev | Current Page 452 | Next

Richard Niemiec

"Oracle Database 10g Performance Tuning Tips & Techniques"

CREATE_SNAPSHOT ();
To alter the snapshot settings, use the MODIFY_SNAPSHOT_SETTINGS procedure. You can
modify the retention (in minutes) and the interval (in minutes) for snapshots. The following example
changes the interval to 30 minutes for the current database:
execute DBMS_WORKLOAD_REPOSITORY.MODIFY_SNAPSHOT_SETTINGS
( interval => 30);
To drop a range of snapshots, use the DROP_SNAPSHOT_RANGE procedure, specifying the
start and end of the snapshot IDs to drop:
execute DBMS_WORKLOAD_REPOSITORY.DROP_SNAPSHOT_RANGE
(low_snap_id => 1, high_snap_id => 10);
Managing Baselines
You can designate a set of snapshots as a baseline for the performance of the system. The baseline
data will be retained for later comparisons with snapshots. Use the CREATE_BASELINE procedure
to specify the beginning and ending snapshots for the baseline:
execute DBMS_WORKLOAD_REPOSITORY.CREATE_BASELINE
(start_snap_id => 1, end_snap_id => 10,
baseline_name => 'Monday baseline');
When you create a baseline, Oracle will assign an ID to the baseline; you can view past
baselines via the DBA_HIST_BASELINE view. The snapshots you specify for the beginning and
ending of the baseline are maintained until you drop the baseline. To drop the baseline, use the
DROP_BASELINE procedure:
execute DBMS_WORKLOAD_REPOSITORY.DROP_BASELINE
(baseline_name => 'Monday baseline', cascade => FALSE);
If you set the CASCADE parameter of the DROP_BASELINE procedure to TRUE, the related
snapshots will be dropped when the baseline is dropped.


Pages:
440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464
Życie projekty domków letniskowych grzejniki łazienkowe Hotel spa chemia kosmetyki