Home » RDBMS Server » Server Administration » DBMS_SERVER_ALERT tablespace full alert timing (>=10.x)
DBMS_SERVER_ALERT tablespace full alert timing [message #598938] Sun, 20 October 2013 09:20 Go to next message
John Watson
Messages: 8960
Registered: January 2010
Location: Global Village
Senior Member
Tablespace usage alerts are checked every ten minutes. You can request a check every minute when you set the threshold, and confirm that this has been set:
orclz> execute DBMS_SERVER_ALERT.SET_THRESHOLD(-
>    metrics_id => DBMS_SERVER_ALERT.TABLESPACE_PCT_FULL,-
>    warning_operator => DBMS_SERVER_ALERT.OPERATOR_GT,-
>    warning_value => '50',-
>    critical_operator => DBMS_SERVER_ALERT.OPERATOR_GT,-
>    critical_value => '75',-
>    observation_period => 1,-
>    consecutive_occurrences => 1,-
>    instance_name => NULL,-
>    object_type => DBMS_SERVER_ALERT.OBJECT_TYPE_TABLESPACE,-
>    object_name => 'SMALL')

PL/SQL procedure successfully completed.

orclz> select OBSERVATION_PERIOD,CONSECUTIVE_OCCURRENCES from dba_thresholds where object_name='SMALL';

OBSERVATION_PERIOD CONSECUTIVE_OCCURRENCES
------------------ -----------------------
                 1                       1

orclz>
but you will still have to wait up to ten minutes for the alert to be raised. Does anyone know whether this frequency can be changed? And why this particular alert behaves differently from all the others? This is the bahaviour in all releases since server alerts arrived.

Any insight will be welcome.
Re: DBMS_SERVER_ALERT tablespace full alert timing [message #598943 is a reply to message #598938] Sun, 20 October 2013 12:14 Go to previous messageGo to next message
Lalit Kumar B
Messages: 3174
Registered: May 2013
Location: World Wide on the Web
Senior Member
Do you get the same value as 1 for observation_period using DBMS_SERVER_ALERT.GET_THRESHOLD?

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, 'inst1',
 DBMS_SERVER_ALERT.OBJECT_TYPE_SERVICE, 'main.regress.rdbms.dev.us.oracle.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;
/ 


I know documentation says, we can also check specific threshold settings with the DBA_THRESHOLDS view. But I would trust on the package more than a view.

Code reference from http://docs.oracle.com/cd/B28359_01/server.111/b28310/monitoring001.htm#CEGDHDEH

[Updated on: Sun, 20 October 2013 15:14]

Report message to a moderator

Re: DBMS_SERVER_ALERT tablespace full alert timing [message #598972 is a reply to message #598943] Mon, 21 October 2013 03:26 Go to previous message
John Watson
Messages: 8960
Registered: January 2010
Location: Global Village
Senior Member
Thank you for your suggestion. The observation period is as requested, no matter how you retrieve it. There is no reason to distrust the view. It is populated by the dbms_server_alert.view_thresholds function.
Previous Topic: Materialized views
Next Topic: Making a dbms_scheduler job to execute in next 10 minutes
Goto Forum:
  


Current Time: Thu Nov 28 23:41:08 CST 2024