DBMS_PIPE.RECEIVE_MESSAGE with timeout : DBMS_PIPE « System Packages « Oracle PL/SQL Tutorial






SQL>
SQL>
SQL> CREATE OR REPLACE FUNCTION receive_message (pipe IN VARCHAR2)
  2     RETURN VARCHAR2
  3  IS
  4     stat PLS_INTEGER;
  5     retval VARCHAR2(4096);
  6  BEGIN
  7     stat := DBMS_PIPE.RECEIVE_MESSAGE (pipe, timeout => 10);
  8     IF stat = 0
  9     THEN
 10        DBMS_PIPE.UNPACK_MESSAGE (retval);
 11     END IF;
 12     RETURN retval;
 13  END;
 14  /

Warning: Function created with compilation errors.

SQL>
SQL> show error
Errors for FUNCTION RECEIVE_MESSAGE:

LINE/COL ERROR
-------- -----------------------------------------------------------------
7/4      PL/SQL: Statement ignored
7/12     PLS-00201: identifier 'DBMS_PIPE' must be declared
10/7     PL/SQL: Statement ignored
10/7     PLS-00201: identifier 'DBMS_PIPE' must be declared
SQL>
SQL>








31.18.DBMS_PIPE
31.18.1.DBMS_PIPE.CREATE_PIPE
31.18.2.DBMS_PIPE.RECEIVE_MESSAGE with timeout
31.18.3.DBMS_PIPE.SEND_MESSAGE with timeout
31.18.4.DBMS_PIPE.SEND_MESSAGE
31.18.5.DBMS_PIPE.PACK_MESSAGE
31.18.6.DBMS_PIPE.REMOVE_PIPE
31.18.7.DBMS_PIPE.RECEIVE_MESSAGE
31.18.8.Use dbms_pipe package
31.18.9.DBMS_PIPE.RESET_BUFFER
31.18.10.DBMS_PIPE.UNPACK_MESSAGE and record type
31.18.11.Use DBMS_PIPE to pack message and send message