Use DBMS_PIPE package to send a message. : DBMS_PIPE « System Packages « Oracle PL / SQL






Use DBMS_PIPE package to send a message.

    

DECLARE
  v_PipeName VARCHAR2(30) := 'MyPipe';
  v_Status INTEGER;
BEGIN
  DBMS_PIPE.PACK_MESSAGE(SYSDATE);
  DBMS_PIPE.PACK_MESSAGE(123456);
  DBMS_PIPE.PACK_MESSAGE('This is a message sent from the pipe!');
  
  v_Status := DBMS_PIPE.SEND_MESSAGE(v_PipeName);
  IF v_Status != 0 THEN
    DBMS_OUTPUT.PUT_LINE('Error ' || v_Status || 
                         ' while sending message');
  END IF;
END;
/



--

   
    
    
  








Related examples in the same category

1.DBMS_PIPE.PACK_MESSAGE
2.DBMS_PIPE.UNPACK_MESSAGE
3.dbms_pipe.remove_pipe
4.Use DBMS_PIPE package to receive a message.
5.Use DBMS_PIPE.PACK_MESSAGE in a trigger
6.Define an anonymous block to populate the local private pipe.
7.An anonymous block program to create a pipe.
8.An anonymous block program to delete a pipe
9.An Oracle9i Pipelined Table Function
10.Run a DBMS_PIPE.RECEIVE_MESSAGE call to empty the local buffer
11.This script deletes a pipe if it exists in the context of the current session, then recreates it.
12.This script unpacks the local buffer.