The CREATE_PIPE function explicitly creates a public or private pipe with the specified name.
For more information about explicit public and private pipes, see the topic about the DBMS_PIPE module.
>>-DBMS_PIPE.CREATE_PIPE--(--pipename--,--+-------------+--,--+---------+--)->< '-maxpipesize-' '-private-'
This function returns the status code 0 if the pipe is created successfully.
EXECUTE privilege on the DBMS_PIPE module.
Example 1: Create a private pipe that is named messages:
SET SERVEROUTPUT ON@
CREATE PROCEDURE proc1()
BEGIN
DECLARE v_status INTEGER;
SET v_status = DBMS_PIPE.CREATE_PIPE('messages');
DBMS_OUTPUT.PUT_LINE('CREATE_PIPE status: ' || v_status);
END@
CALL proc1@
This example results in the following output:
CREATE_PIPE status: 0
Example 2: Create a public pipe that is named mailbox:
SET SERVEROUTPUT ON@
CREATE PROCEDURE proc2()
BEGIN
DECLARE v_status INTEGER;
SET v_status = DBMS_PIPE.CREATE_PIPE('mailbox',0);
DBMS_OUTPUT.PUT_LINE('CREATE_PIPE status: ' || v_status);
END@
CALL proc2@
This example results in the following output:
CREATE_PIPE status: 0