How to net send from Oracle db?
DBAsupport.com Forums - Powered by vBulletin
Results 1 to 7 of 7

Thread: How to net send from Oracle db?

  1. #1
    Join Date
    May 2000
    Location
    Huntsville, AL. USA
    Posts
    52

    Question How to net send from Oracle db?

    I have a requirement whereby I need to have a net send message sent to a particular terminal when a specific value is inserted in a table.

    A rough example would be say you have a table that tracks order and one of the columns is quantity. Since some items are frequently out of stock, you want to be notified any time a record is inserted into this table with more than quantity 'x'. I can see creating a trigger to check for this condition, but I am lost from there.

    What I would like to do is say an order is inserted for 100 items, and I want my trigger to fire for any record where a quantity is greater than 50, so I create a trigger to call something (package,procedure,external prog?) to perform my net send. The purpose of this whole exercise would be to alert me that a "large" order (humor me here) has been placed.

    My question is this: is there some facility in Oracle that would allow me to do this without extensive coding? I can create a simple SQL that has a host command in it that does the net send, and that is accomplished easily enough, but my quandry is how to I get the trigger to run the SQL file? If anyone has a link or some sample code to do this it would be greatly appreciated!

    BTW, the db will be Oracle 8.1.7, and the OS will be Win2k or NT.

    Thx,
    Ray

  2. #2
    Join Date
    May 2002
    Posts
    2,645
    Why settle for net send when you can have Oracle send you email or send a page?

  3. #3
    Join Date
    Jul 2001
    Location
    Slovenia
    Posts
    422
    And it's easier to send email from trigger than to net send from trigger.
    Tomaž
    "A common mistake that people make when trying to design something completely
    foolproof is to underestimate the ingenuity of complete fools" - Douglas Adams

  4. #4
    Join Date
    Jul 2003
    Location
    London
    Posts
    4
    Other things you might want to look at are DBMS_PIPE and DBMS_ALERT. Alert is a multicast and requires that the target client is connected. Pipe is one-to-one and doesn't.

    There are also differences with transactions. You can read all about it in the docs.

    I've successfully used both on the same environment as yourself.

  5. #5
    Join Date
    May 2000
    Location
    Huntsville, AL. USA
    Posts
    52

    Net Send vs Email

    The only issue of sending an email (which I admit would be easier since Oracle has a facility for this) is that none of the machines that need to get the message are running an email client. These client machines are locked down by administrators and users only have access to the application they are to be working with on their computers, so no email, no web access, not even Office apps. Net send is not a requirement, I just need a method to alert them when another user inputs a certain value in a column, just an electronic 'FYI' if you will. I'm sure I could do this in C+, but I was looking for the easy way out...

  6. #6
    Join Date
    May 2002
    Posts
    2,645
    SQL> host net send name_of_your_pc hello

    try it

    You can have a trigger do this

  7. #7
    Join Date
    Aug 2002
    Location
    Colorado Springs
    Posts
    5,253
    Originally posted by stecal
    SQL> host net send name_of_your_pc hello

    try it

    You can have a trigger do this
    You crazy man.
    David Aldridge,
    "The Oracle Sponge"

    Senior Manager, Business Intelligence Development
    XM Satellite Radio
    Washington, DC

    Oracle ACE

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width