与外部程序通信的数据库触发器 [英] Database trigger that communicates with an external program
问题描述
我有一个SQLServer数据库和一个在该数据库上配置数据的应用程序(.NET).另一方面,我有一个应用程序(VC ++)从数据库读取该数据,并且必须尽快将存储在数据库中的数据的任何更改通知".
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.
当第一个应用程序更改了某些数据时,我想从数据库引擎接收信号.当然,我可以编写某种代码来组合两个应用程序,但是我的问题是,是否可以在SQLServer或任何用于访问SQLServer的API(本机,OLE DB,甚至是ODBC)
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:为我的英语道歉
PS: Apologize for my english
推荐答案
您可以使用SQL代理作业,该作业将以sp_start_job通知另一个应用程序.将 排除.
You can use a SQL Agent Job that will notify the other app starting it with sp_start_job. Check this out.
这篇关于与外部程序通信的数据库触发器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!