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