Oracle DBMS_PIPE chat app

forum.sourcecode (2000-2005) & forum.td.sourcecode (2005-2010)
Keith Sandberg

Oracle DBMS_PIPE chat app

Post by Keith Sandberg » 24 Aug 2006, 21:11

 Posted by:  Keith Sandberg 

During a recent consulting gig, I was asked if somehow the Oracle database
could notify someone if certain events occurred. I replied "Of course, just
use Oracle's built-in PL/SQL packages for sending email!". However, a
quick check brought to light the fact that this particular company has a
policy *against* using Oracle for sending email, and the feature is disabled
on all Oracle databases across the entire company (this is a Fortune 500
company!).

With the obvious, easiest method now unavailable -- I turned my attention to
Oracle's DBMS_PIPE package. It provides simple interprocess communications
via VARCHAR text strings. Any connection to the Oracle database can send or
retrieve a text message from any other Oracle connection (provided each
Oracle user has the privs to use DBMS_PIPE, of course!). To satisfy my
client's request, I wrote a little trigger to place messages on a pipe (upon
the desired event)... and a little VBScript client that the user can use to
read the messages.

Thus inspired, I wrote a couple of TD v2.1 apps for using DBMS_PIPE to
send/receive messages. The apps work like a simple chat program.

The "DBMS_PIPE_SERVER" creates the pipe and manages the job of sending the
messages received at the pipe to all connected clients. The
"DBMS_PIPE_CLIENT" is used to connect to the pipe and send messages. The
fun part was that I had to create my own little "protocol", which you can
see in the code. It would be extremely easy to expand the protocol to have
a client perform an action, or start another program, or whatever you can
imagine.

I doubt that these apps will be of much use to anyone... but for the sake of
just showing how something can be done, I'll post it. Have fun!

(done in TD v2.1. Requires use of Oracle 7 or higher.)

You do not have the required permissions to view the files attached to this post.

Tomas Svizensky

Re: Oracle DBMS_PIPE chat app

Post by Tomas Svizensky » 25 Aug 2006, 09:02

 Posted by:  Tomá¹ Sví¾enský 

Hi Keith,

Please send to the newsgroup your samples in APT mode.
Thanks.

Best regards

Keith Sandberg

Re: Oracle DBMS_PIPE chat app

Post by Keith Sandberg » 25 Aug 2006, 14:45

 Posted by:  Keith Sandberg 

you don't have an un-ZIP tool? They're free all over the internet.

Anyway - here are the APT's, in TD v2.1



You do not have the required permissions to view the files attached to this post.

Jeff Luther
Site Admin
Site Admin
United States of America
Posts: 2370
Joined: 04 Mar 2017, 18:34
Location: Palm Springs, California

Re: Oracle DBMS_PIPE chat app

Post by Jeff Luther » 25 Aug 2006, 16:17

 Posted by:  Jeff Luther 

Keith - I think he meant that the SERVER apt was actually--in the zip
file, anyway--in binary format. His suggestion was to send them in text
format. CLIENT apt was text, so I'm sure an oversight on your part.

- Jeff

Keith Sandberg

Re: Oracle DBMS_PIPE chat app

Post by Keith Sandberg » 25 Aug 2006, 16:45

 Posted by:  Keith Sandberg 

oh yes, you're right. my apologies to all

You do not have the required permissions to view the files attached to this post.

Return to “td.sourcecode”

Who is online

Users browsing this forum: [Ccbot] and 0 guests