创建AWR 基线(baseline)
查找快照号码
select * from DBA_HIST_SNAPSHOT;
创建awr基线
exec DBMS_WORKLOAD_REPOSITORY. CREATE_BASELINE (
start_snap_id IN NUMBER,
end_snap_id IN NUMBER,
baseline_name IN VARCHAR2);
eg:
exec DBMS_WORKLOAD_REPOSITORY. CREATE_BASELINE (
148 ,
149 ,
'awr' );
通过 dba_hist_baseline 视图可查看已经创建的基线
SQL> select * from DBA_HIST_BASELINE;
DBID BASELINE_ID BASELINE_NAME
---------- ----------- --------------------
2546074315 1 awr
补充:<具体见 Oracle Database PL/SQL Packages and Types Reference >
Managing Baselines with PL/SQL DBMS_WORKLOAD_REPOSITORY Package
Procedure Name Description
CREATE_BASELINE : Create a single AWR baseline
DROP_BASELINE : Drop a single AWR baseline
RENAME_BASELINE : Rename a baseline
CREATE_BASELINE_TEMPLATE : Create a baseline template
DROP_BASELINE_TEMPLATE : Drop a baseline template
MODIFY_BASELINE_WINDOW_SIZE : Modify the window size for the Default Moving Window Baseline