This script unpacks the local buffer. : DBMS_PIPE « System Packages « Oracle PL / SQL






This script unpacks the local buffer.

    
SQL>
SQL> set serveroutput on size 1000000
SQL> DECLARE
  2
  3    message VARCHAR2(30 CHAR) := NULL;
  4    success INTEGER;
  5
  6  BEGIN
  7
  8    success := DBMS_PIPE.RECEIVE_MESSAGE('ORA$PIPE$00F3B7B50001',1);
  9
 10    IF (success = 0) THEN
 11      DBMS_PIPE.UNPACK_MESSAGE(message);
 12    ELSE
 13      DBMS_OUTPUT.PUT_LINE('Error');
 14      message := TO_CHAR(success);
 15    END IF;
 16
 17    DBMS_OUTPUT.PUT_LINE('Message ['||message||']');
 18
 19  END;
 20  /
Error
Message [1]

PL/SQL procedure successfully completed.

SQL>

   
    
    
    
  








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 package to send a message.
6.Use DBMS_PIPE.PACK_MESSAGE in a trigger
7.Define an anonymous block to populate the local private pipe.
8.An anonymous block program to create a pipe.
9.An anonymous block program to delete a pipe
10.An Oracle9i Pipelined Table Function
11.Run a DBMS_PIPE.RECEIVE_MESSAGE call to empty the local buffer
12.This script deletes a pipe if it exists in the context of the current session, then recreates it.