Re: DBMS_PIPE and DBMS_ALERT questions
Date: Wed, 14 Sep 94 10:53:52 -0500
Message-ID: <2988640268.3.p00775_at_psilink.com>
Cary -
>DATE: 13 Sep 1994 10:21:37 -0400
>FROM: Cary B. O'Brien <cobrien_at_access1.digex.net>
>
>We are thinking about using the DBMS_PIPE and/or DBMS_ALERT for
>synchronizing processes (rather than polling for work/changes), and
>I have some questions. The rough idea is to have triggers that
>either send a message down a pipe or signal an alert to indicate
>that some other process should wake up and do some work. Environment
>is Unix Server + Some unix clients + some DOS clients, NOT using SQL*NET.
>
>1. Is this a stable feature in oracle? I.E. might it go away in a
> future release. Since the comments in the .sql (rdbms/admin/dbmspipe.sql
> and rdbms/admin/dbmsalrt.sql on our Sun os 4.1 system) say dont
> use things starting with ORA$, implying that oracle uses them, I
> would guess it is.
>
I am an avid supporter of the DBMS_PIPE feature to Oracle. I develop commercial system management applications and make frequent use of this powerful feature. Most other DBMS' have a similar feature, so I can't see Oracle getting rid of it. If they do then my software could be in deep doo-doo! Oracle has several products that use this feature as well, so I sincerely doubt it will disappear any time soon.
>2. Does anyone have any positive or negative comments about doing
> things this way?
>
As long as you don't mind keeping a server process around that listens
to the pipe, it's a great way to go. Also, bear in mind that you will
need some way to shutdown the server process when you want to do
an Oracle shutdown. If you don't use SHUTDOWN IMMEDIATE then the shutdown
will hang until the server listener terminates which in my case it
never does. I solved this by making the server listener shutdown upon
receipt of a special "SHUTDOWN" message that can be sent through a simple
SQL script.
I would STRONGLY recommend building a wrapper package around DBMS pipe so that you don't have to grant execute access directly to the DBMS_PIPE package itself, since it could easily be hosed by a malicious user either overflowing the pipe or sending garbage down it. Besides, it's a security risk for commercial developers like me who rely on the integrity of data in the pipe.
If you have further questions, feel free to ask!
Dave Trahan BrainTree Technology, Inc. p00775_at_psilink.comReceived on Wed Sep 14 1994 - 17:53:52 CEST