Database Reference
In-Depth Information
Finally, to drop baselines, the
dbms_workload_repository
package provides the
drop_baseline
procedure.
As parameters, the procedure requires the name of the baseline and, optionally, a flag that specifies whether the
snapshots associated with the baseline are to be dropped (by default, they aren't). For example, the following call
shows how to drop the baseline named
TEST1
as well as the snapshots associated with it:
dbms_workload_repository.drop_baseline(
baseline_name => 'TEST1',
cascade => TRUE
);
Managing the Moving Window Baseline
There's not much to manage for the moving window baseline. In fact, you can modify only the window size by calling the
modify_baseline_window_size
procedure of the
dbms_workload_repository
package. As a parameter, the procedure
requires the new size specified in number of days. For example, the following call shows how to set it to 30 days:
dbms_workload_repository.modify_baseline_window_size(window_size => 30);
The only requirement to fulfill when calling the
modify_baseline_window_size
procedure is that the new
window size can't be greater than the retention period used for the snapshots. If that requirement isn't fulfilled, the
database engine raises the following exception:
ORA-13541: system moving window baseline size greater than
retention
.
To display the current window size, you can use the following query (notice that these are the default values used
from version 11.1 onward):
SQL> SELECT baseline_name, moving_window_size
2 FROM dba_hist_baseline
3 WHERE baseline_type = 'MOVING_WINDOW';
BASELINE_NAME MOVING_WINDOW_SIZE
-------------------- ------------------
SYSTEM_MOVING_WINDOW 8
Statspack
This section describes how to install and configure Statspack, take snapshots, and manage baselines. How to take
advantage of the information stored in the Statspack repository is described later, in the “Analysis Without Diagnostics
Pack” section.
■
oracle database manuals no longer provide information about statspack. you can find detailed information about
installing, configuring, managing, and using statspack in the
spdoc.txt
file, which is available (along with installation
scripts and other utilities) under the $oraCle_home/rdbms/admin directory. the oracle support note “installing and
using standby statspack in 11g” (454848.1) provides information about using statspack with a standby database open in
read-only mode.
Tip