Answered Questions

  • Oracle Dbms Pipe Commands

    give the dbms_pipe commands in oracle of there execution,which are used to send & recieve messages what is the max size can sent at one go

    Star Read Best Answer

    Editorial / Best Answer

    saginandkishore  

    • Member Since Jun-2008 | Jun 24th, 2008


    dbms_pipe is a IPC methodology which allows processes to communicate with each other using pipes.

    The important functions/procedures in this package are

    (1) CREATE_PIPE to create a new pipe
    ==> dbms_pipe.create_pipe(pipename) where pipename can be Oracle supplied or user defined as below

    dbms_pipe.create_pipe(dbms_pipe.unique_session_name) -- Creates a PIPE based on your unique Session ID

    or

    pipename constant varchar2(100) := 'TEST_PIPE';
    dbms_pipe.create_pipe(pipename);

    (2) Having created the pipes try sending some data through the pipe. To send data prepare the data using dbms_pipe.pack_message(mesg_buf) where mesg_buf can be varchar2, char, number. Basically this procedure is overloaded for Numbers, Varchar2 and date. For long and raw data use the corresponding DBMS_PIPE.PACK_MESSAGE_RAW method. This procedure basically places the data into buffer which can be send on any pipe using the dbms_pipe.send_message(pipename) function.

    (3) At the other end of the pipe you can receive the data using dbms_pipe.receive_message function. This functions fetches the data into buffer from where you can unpack the data using dbms_pipe.unpack_message function. This function gets the data in the buffer into a message buffer.

    These are the basic commands that you can use for working with pipes. For more details visit oracle documentation.