dbms_alert.waitone : DBMS_ALERT « System Packages « Oracle PL / SQL






dbms_alert.waitone

  
SQL>
SQL> create table myTable as select rownum id, a.* from all_objects a where rownum < 20;

Table created.

SQL>
SQL>
SQL> declare
  2      myLong   long;
  3      myNumber number;
  4  begin
  5      dbms_alert.register( 'WAITING' );
  6      for i in 1 .. 999 loop
  7          dbms_application_info.set_client_info( i );
  8          dbms_alert.waitone( 'WAITING', myLong, myNumber, 0 );
  9          exit when myNumber = 0;
 10          for x in ( select * from myTable order by 1, 2, 3, 4 )
 11          loop
 12              null;
 13          end loop;
 14      end loop;
 15  end;
 16  /

PL/SQL procedure successfully completed.

SQL>
SQL>
SQL> drop table myTable;

Table dropped.

   
    
  








Related examples in the same category

1.Receiving an alert using DBMS_ALERT.
2.dbms_alert.signal
3.Remove your registered interest in a DBMS_ALERT.
4.Sending an alert through DBMS_ALERT.
5.Register interest in an alert.