dbms_alert

-- Method dbms_alert.waitone will be in waiting state until it receive a signal
DECLARE
	l_msg VARCHAR2(32767);
	l_status NUMBER;
BEGIN
	dbms_alert.register('MY_ALERT_NAME');
	dbms_alert.waitone('MY_ALERT_NAME', l_msg, l_status, dbms_alert.maxwait );
	DBMS_OUTPUT.PUT_LINE('l_status=' || l_status || ', l_msg=' || l_msg );
	dbms_alert.remove('MY_ALERT_NAME');
END;
/

-- Script to send a signal
BEGIN
	dbms_alert.signal( 'MY_ALERT_NAME', 'Some message' );
	COMMIT;
END;
/

Last edited Jul 11, 2012 at 10:15 PM by alekseiv, version 1

Comments

No comments yet.