set serveroutput on
DECLARE
v_AlertName VARCHAR2(30) := 'MyAlert';
v_Message VARCHAR2(100);
v_Status INTEGER;
BEGIN
DBMS_ALERT.REGISTER(v_AlertName);
DBMS_ALERT.WAITONE(v_AlertName, v_Message, v_Status);
IF v_Status = 0 THEN
DBMS_OUTPUT.PUT_LINE('Received: ' || v_Message);
ELSE
DBMS_OUTPUT.PUT_LINE('WAITONE timed out');
END IF;
END;
/
--
|