Tuesday, April 15, 2008

What is Server-Generated Alerts?

A server-generated alert is a notification from the Oracle Database server of an impending problem.

The notification may contain suggestions for correcting the problem.
Notifications are also provided when the problem condition has been cleared.

Server-generated alerts can be based on threshold levels or can issue simply because an event has occurred.

A)Threshold-based alerts:
-----------------------------

Threshold-based alerts can be triggered at both threshold warning and critical levels.

The value of these levels can be customer-defined or internal values, and some alerts have default threshold levels which you can change if appropriate.

For example, by default a server-generated alert is generated for tablespace space usage when the percentage of space usage exceeds either the 85% warning or 97% critical threshold level.

Threshold-based alerts are,
1)Physical Reads Per Second

2)User Commits Per Second

3)SQL Service Response Time

B)Event based Alerts:
----------------------------

Event based alerts are generated because an event has occurred.Some example of event based alerts are,

1)Snapshot Too Old

2)Resumable Session Suspended

3)Recovery Area Space Usage

An alert message is sent to the predefined persistent queue ALERT_QUE owned by the user SYS.

Oracle Enterprise Manager reads this queue and provides notifications about outstanding server alerts, and sometimes suggests actions for correcting the problem.

The alerts are displayed on the Enterprise Manager console and can be configured to send email or pager notifications to selected administrators.

If an alert cannot be written to the alert queue, a message about the alert is written to the Oracle Database alert log.

How to view and change threshold settings of Threshold based Alerts:
---------------------------------------------------------------------------

1)You can view and change threshold settings for the server alert metrics using the SET_THRESHOLD and GET_THRESHOLD procedures of the DBMS_SERVER_ALERTS PL/SQL package.

2)The DBMS_AQ and DBMS_AQADM packages provide procedures for accessing and reading alert messages in the alert queue.

Setting Threshold Levels
-----------------------------


The following example shows how to set thresholds with the SET_THRESHOLD procedure for CPU time for each user call for an instance:

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, 'arju',
DBMS_SERVER_ALERT.OBJECT_TYPE_SERVICE, 'arju.arjubd.com');


In this example, a warning alert is issued when CPU time exceeds 8000 microseconds for each user call and a critical alert is issued when CPU time exceeds 10,000 microseconds for each user call.


Retrieving Threshold Information
-----------------------------------------

SELECT metrics_name, warning_value, critical_value, consecutive_occurrences
FROM DBA_THRESHOLDS
WHERE metrics_name LIKE '%CPU Time%';
Related Documents
Stop Alert Notification for a specified period of time

No comments:

Post a Comment