Monitoring data changes in SQLServer 8

  • Hello,

    I need to monitor a table for added/removed rows and send a message to a GUI if those events happen (something like notifications in SQLServer 2005).

    But I have to use SQLServer 8 SP3.

    I though about attaching a trigger to the table in question that generates entries in another table about the performed changes. A running service would then poll the change-table and distribute all found change-information.

    Is there a way to implement this in a more elegant way (without polling) ?

    Thanks

    Nektu

  • What timeframe is expected to report the changes to the table(s)?  If it is "real" time than you will need to have your GUI constantly running "seeing" if there are new items.

    If this is only a few times a day than you could batch mode it

    If you only need to see changes on APP open you could it there

    If you need to do it at the whim of the person who will be monitoring the GUI then you could give them a button

    How often is the GUI monitored?  What is the schedule of the user's monitoring the GUI?  Who is developing the GUI?  Is there collaboration between you and them?



    Good Hunting!

    AJ Ahrens


    webmaster@kritter.net

  • Do the polling at the server. Trigger inserts row in queue table. A stored procedure loops until there's a row in the queue table; it uses WAITFOR to pause a few seconds between checks. GUI executes stored procedure and waits for procedure to return.

    You get quick response time witout the network traffic.

    You may want to have a timeout in the stored procedure to give the GUI some feedback that things are still working.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply