Signal along with the entries in a table : DBMS_ALERT « System Packages « Oracle PL/SQL Tutorial






SQL>
SQL>
SQL> create table job_table
  2  ( job_id     int primary key,
  3    alert_name varchar2(30),
  4    message    varchar2(2000)
  5  )
  6  /

Table created.

SQL>
SQL> create or replace procedure background_alert( p_job in int )
  2  as
  3      l_rec job_table%rowtype;
  4  begin
  5      select * into l_rec from job_table where job_id = p_job;
  6      dbms_alert.signal( l_rec.alert_name, l_rec.message );
  7      delete from job_table where job_id = p_job;
  8      commit;
  9  end;
 10  /


SQL>
SQL>
SQL> drop table job_table
  2  /

Table dropped.

SQL>








31.1.DBMS_ALERT
31.1.1.DBMS_ALERT.REGISTER
31.1.2.dbms_alert.waitone
31.1.3.Call dbms_alert.signal in a loop
31.1.4.Signal along with the entries in a table
31.1.5.Singal with dbms_alert.signal
31.1.6.Registers the alert for the session
31.1.7.Call DBMS_ALERT.SIGNAL in a trigger