The UNIQUE_SESSION_NAME function returns a unique name for the current session.
This function returns a value of type VARCHAR(128) that represents the unique name for the current session.
EXECUTE privilege on the DBMS_PIPE module.
Create a pipe that has the same name as the current session.
SET SERVEROUTPUT ON@
CREATE PROCEDURE proc1()
BEGIN
DECLARE status INTEGER;
DECLARE v_session VARCHAR(30);
SET v_session = DBMS_PIPE.UNIQUE_SESSION_NAME;
SET status = DBMS_PIPE.PACK_MESSAGE('message1');
SET status = DBMS_PIPE.SEND_MESSAGE(v_session);
CALL DBMS_OUTPUT.PUT_LINE('Sent message on pipe ' || v_session);
END@
CALL proc1@
This example results in the following output:
Sent message on pipe *LOCAL.myschema.080522010048