views:

357

answers:

3

I've got a SQLServer Database and an application (.NET) that configures data on that database. On the other hand, I've got an application (VC++) that reads that data from the database and must be 'informed' a soon as possible of any change in the data saved on the database.

I would like to receive a signal from the database engine when some data had been changed by the first app. Of course, I can code some kind of message that comunicates both apps but my question is if exists that mechanism (some kind of ultra-trigger that warns the other app) in SQLServer or in any API for accessing SQLServer (Native, OLE DB, or even ODBC)

PS: Apologize for my english

A: 

You can use a SQL Agent Job that will notify the other app starting it with sp_start_job. Check this out.

Vinko Vrsalovic
A: 

If your requirements include guaranteed delivery (e.g. no lost events) - you might want to consider an MSMQ based strategy.

Accessing MSMQ from Microsoft SQL Server

http://www.codeproject.com/KB/database/SqlMSMQ.aspx

Microsoft Support Knowledge Base Article: 555070 Posting Message to MSMQ from SQL Server

http://support.microsoft.com/kb/555070

Kelvin Meeks
A: 

I found this awesome article that might interest you. link text

TheDirtyMexican