以下の内容はhttps://htn20190109.hatenablog.com/entry/2025/03/09/150426より取得しました。


{16 追加}サーバー生成アラートのしきい値の設定



https://docs.oracle.com/cd/F19136_01/admin/monitoring-the-database.html#GUID-5B03BE52-E0FD-4BC0-9B4C-1C55BDEACE24


sqlplus test/test@pdb11

begin
DBMS_SERVER_ALERT.SET_THRESHOLD(
 DBMS_SERVER_ALERT.CPU_TIME_PER_CALL, DBMS_SERVER_ALERT.OPERATOR_GE, '8000', 
 DBMS_SERVER_ALERT.OPERATOR_GE, '10000', 1, 2, 'orcl',
 DBMS_SERVER_ALERT.OBJECT_TYPE_SERVICE, 'pdb11.example.com');
end;
/


set serveroutput on
DECLARE
 warning_operator         BINARY_INTEGER;
 warning_value            VARCHAR2(60);
 critical_operator        BINARY_INTEGER; 
 critical_value           VARCHAR2(60);
 observation_period       BINARY_INTEGER;
 consecutive_occurrences  BINARY_INTEGER;
BEGIN
 DBMS_SERVER_ALERT.GET_THRESHOLD(
 DBMS_SERVER_ALERT.CPU_TIME_PER_CALL, warning_operator, warning_value,
    critical_operator, critical_value, observation_period, 
    consecutive_occurrences, 'orcl',
 DBMS_SERVER_ALERT.OBJECT_TYPE_SERVICE, 'pdb11.example.com');
 
 DBMS_OUTPUT.PUT_LINE('Warning operator:       ' || warning_operator);
 DBMS_OUTPUT.PUT_LINE('Warning value:          ' || warning_value);
 DBMS_OUTPUT.PUT_LINE('Critical operator:      ' || critical_operator);
 DBMS_OUTPUT.PUT_LINE('Critical value:         ' || critical_value);     
 DBMS_OUTPUT.PUT_LINE('Observation_period:     ' || observation_period);
 DBMS_OUTPUT.PUT_LINE('Consecutive occurrences:' || consecutive_occurrences);
END;
/

 

SELECT metrics_name, warning_value, critical_value, consecutive_occurrences 
   FROM DBA_THRESHOLDS 
   WHERE metrics_name LIKE '%CPU Time%';

select * from DBA_THRESHOLDS;
select * from DBA_OUTSTANDING_ALERTS;
select * from DBA_ALERT_HISTORY;

 

 

 

 

 

 




以上の内容はhttps://htn20190109.hatenablog.com/entry/2025/03/09/150426より取得しました。
このページはhttp://font.textar.tv/のウェブフォントを使用してます

不具合報告/要望等はこちらへお願いします。
モバイルやる夫Viewer Ver0.14