REMOVE procedure - Remove registration for a specified alert
The REMOVE procedure removes registration from the current session for a specified alert.
Syntax
Procedure parameters
- name
- An input argument of type VARCHAR(128) that specifies the name of the alert.
Authorization
EXECUTE privilege on the DBMS_ALERT module.
Examples
Use the REMOVE procedure to remove an alert named alert_test.
SET SERVEROUTPUT ON@
CREATE PROCEDURE proc1()
BEGIN
DECLARE v_name VARCHAR(30) DEFAULT 'alert_test';
DECLARE v_msg VARCHAR(80);
DECLARE v_status INTEGER;
DECLARE v_timeout INTEGER DEFAULT 5;
CALL DBMS_ALERT.REGISTER(v_name);
CALL DBMS_OUTPUT.PUT_LINE('Waiting for signal...');
CALL DBMS_ALERT.WAITONE(v_name , v_msg , v_status , v_timeout);
CALL DBMS_OUTPUT.PUT_LINE('Alert name : ' || v_name);
CALL DBMS_OUTPUT.PUT_LINE('Alert status : ' || v_status);
CALL DBMS_ALERT.REMOVE(v_name);
END@
CALL proc1@This example results in the following output:
Waiting for signal...
Alert name : alert_test
Alert status : 1
