An anonymous block program to create a pipe. : DBMS_PIPE « System Packages « Oracle PL / SQL






An anonymous block program to create a pipe.

    
SQL> DECLARE
  2
  3    
  4    returnValue INTEGER;
  5
  6  BEGIN
  7
  8    
  9    returnValue := DBMS_PIPE.CREATE_PIPE('PLSQL$THREAD_ABORT', 20000 );
 10
 11    
 12    returnValue := DBMS_PIPE.CREATE_PIPE('PLSQL$THREAD_ABORT_LOCK', 20000 );
 13
 14    
 15    returnValue := DBMS_PIPE.CREATE_PIPE('PLSQL$THREAD_COMMIT', 20000 );
 16
 17    
 18    returnValue := DBMS_PIPE.CREATE_PIPE('PLSQL$THREAD_COMMIT_LOCK', 20000 );
 19
 20    
 21    returnValue := DBMS_PIPE.CREATE_PIPE('PLSQL$THREAD_COMPLETE', 20000 );
 22
 23    
 24    returnValue := DBMS_PIPE.CREATE_PIPE('PLSQL$THREAD_COMPLETE_LOCK', 20000 );
 25
 26    
 27    returnValue := DBMS_PIPE.CREATE_PIPE('PLSQL$THREAD_REGISTER', 20000 );
 28
 29    
 30    returnValue := DBMS_PIPE.CREATE_PIPE('PLSQL$THREAD_REGISTER_LOCK', 20000 );
 31
 32    
 33    IF (returnValue = 0) THEN
 34      DBMS_OUTPUT.PUT_LINE('THREAD_PIPES are created.');
 35    END IF;
 36
 37  EXCEPTION
 38
 39    
 40    WHEN others THEN
 41      DBMS_OUTPUT.PUT_LINE(SQLERRM);
 42      RETURN;
 43
 44  END;
 45  /
THREAD_PIPES are created.

PL/SQL procedure successfully completed.

SQL>
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 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.