SIGNAL procedure - Signal occurrence of a specified alert
The SIGNAL procedure signals the occurrence of a specified alert. The signal includes a message that is passed with the alert. The message is distributed to the listeners (processes that have registered for the alert) when the SIGNAL call is issued.
Syntax
Procedure parameters
- name
- An input argument of type VARCHAR(128) that specifies the name of the alert.
- message
- An input argument of type VARCHAR(32672) that specifies the information to pass with this alert. This message can be returned by the WAITANY or WAITONE procedures when an alert occurs.
Authorization
EXECUTE privilege on the DBMS_ALERT module.
Examples
Use the SIGNAL procedure to signal the occurrence of an alert named alert_test.
SET SERVEROUTPUT ON@
CREATE PROCEDURE proc1()
BEGIN
DECLARE v_name VARCHAR(30) DEFAULT 'alert_test';
CALL DBMS_ALERT.SIGNAL(v_name,'This is the message from ' || v_name);
CALL DBMS_OUTPUT.PUT_LINE('Issued alert for ' || v_name);
END@
CALL proc1@
This example results in the following output:
Issued alert for alert_test