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

Questions by rudhra97   answers by rudhra97

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.

Showing Answers 1 - 0 of 0 Answers

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.

------Funtions------
DBMS_PIPE.CREATE_PIPE:- for creating a pipe
DBMS_PIPE.SEND_MESSAGE:- For sending message
DBMS_PIPE.REMOVE_PIPE:- for removing message
DBMS_PIPE.RECEIVE_MESSAGE:- For receiving message

------Procedures------
DBMS_PIPE.PACK_MESSAGE:- for packing varchar, varchar2, char messages
DBMS_PIPE.PACK_MESSAGE_RAW:-  for Long and Raw messages
DBMS_PIPE.UNPACK_MESSAGE:- FOr Unpacking

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions