GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

  GeekInterview.com  >  Interview Questions  >  Oracle  >  Basics

 Print  |  
Question:  Oracle Dbms Pipe Commands

Answer: 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


June 06, 2008 19:48:19 #2
 saginandkishore   Member Since: June 2008    Total Comments: 4 

RE: Oracle Dbms Pipe Commands
 
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.

     

 

Back To Question