Re: Using dbms_pipe

From: David Sisk <>
Date: Wed, 18 Aug 1999 23:03:28 -0400
Message-ID: <cjKu3.1054$>

Dude, great post!

David C. Sisk
Need tech info on Oracle? Visit The Unofficial ORACLE on NT site at
Like original music?  Listen to song samples and buy a CD at

Kenneth C Stahl wrote in message <>...

>For quite some time, several of us on the Oracle forums have been saying
>that for a variety of situations the answer is to use dbms_pipe.
>However, it is one thing to talk about it, it is another thing to show
>how this is done.
>I finally got around to writing a small application which illustrates
>how this is done and the files are attached. Here is how they are used:
>cr_sender.sql - Run this script to create a package called Sender.
>pipelisten.pc - Compile this pro-c program and then run it in the
>background. You can
> either redirect the output or just let it be
>displayed on the screen.
>testsend.sql - Run this pl/sql script when pipelisten is running to send
>a string to an
> implicit pipe
>goodbye.sql - Run this pl/sql script to tell pipelisten to exit.
>All of these assume a default login. If you don't want to use a default
>login then run the sql scripts with whatever login you want to use and
>make the appropriate change to the pro-c program to use that login.
>Normal caveats apply - this program has not been exercised in a variety
>of environments and may not work properly in all cases. It doesn't have
>a great deal of error checking, so it is conceivable that it could have
>problems in some circumstances.
>The pipes used is an implicit pipe which is identified by 'orasend'. It
>is conceivable that you may wish to use an explicit pipe. If you go that
>route then just follow the documentation for dbms_pipe.
>This isn't real fancy. It only illustrates a very basic technique.
>However, I hope you can see that if you can send a string through a
>pipe, you can do virtually anything you want with that string once it is
>received by the listener. You could even, conceivably, pass a full
>command line and then execute it with system(). Or perhaps you could
>send a specific numeric string that can be interpreted to perform a
>specific function. The possabilities are probably limitless. The only
>thing that you may want to think about is that there is a slight delay
>between the time that the message is placed on the pipe and when it is
>received - a second or two from my calculations.
>So, give it a try and enjoy.
Received on Thu Aug 19 1999 - 05:03:28 CEST

Original text of this message