修改AWR報告裡面的topnsql 引數
檢視: dba_hist_wr_control
修改awr相關引數 ,本次主要修改topnsql ,該值預設是30。
[email protected]>exec dbms_workload_repository.modify_snapshot_settings(topnsql => 100);
PL/SQL 過程已成功完成。
[email protected]>exec dbms_workload_repository.modify_snapshot_settings(topnsql => 10);
BEGIN dbms_workload_repository.modify_snapshot_settings(topnsql => 10); END;
*
第 1 行出現錯誤:
ORA-13530: TOPNSQL 10 無效, 必須在 (30, 50000) 範圍內
ORA-06512: 在 "SYS.DBMS_WORKLOAD_REPOSITORY", line 174
ORA-06512: 在 "SYS.DBMS_WORKLOAD_REPOSITORY", line 222
ORA-06512: 在 line 1
[email protected]>exec dbms_workload_repository.modify_snapshot_settings(topnsql => 30);
PL/SQL 過程已成功完成。
[email protected]>exec dbms_workload_repository.modify_snapshot_settings(topnsql => 'DEFAULT');
PL/SQL 過程已成功完成。
[email protected]>
參考文件:
https://docs.oracle.com/cd/E11882_01/appdev.112/e40758/d_workload_repos.htm#ARPLS69140
Table 162-29 MODIFY_SNAPSHOT_SETTINGS Procedure Parameters
Parameter | Description |
---|---|
|
New retention time (in minutes). The specified value must be in the range of If If NOTE: The retention setting must be greater than or equal to the window size of the ' |
|
New interval setting between each snapshot, in units of minutes. The specified value must be in the range If If |
|
|
|
Database identifier in AWR for which to modify the snapshot settings. If |
This example changes the interval
setting to one hour and the retention
setting to two weeks for the local database:
EXECUTE DBMS_WORKLOAD_REPOSITORY.MODIFY_SNAPSHOT_SETTINGS( interval => 60, retention => 20160);
If you query the DBA_HIST_WR_CONTROL
table after this procedure is executed, you will see the changes to these settings.
END。