简体   繁体   English

如何侦听SQL Server数据库更改

[英]How do I listen for SQL Server database changes

Using .Net 4.0 and SQL Server 2008 R2 使用.Net 4.0和SQL Server 2008 R2

I have been looking into utilizing SqlDependency / SqlNotifications for monitoring some database structures. 我一直在寻求利用SqlDependency / SqlNotifications来监控一些数据库结构。 Is the best process / practice for this to utilize the SqlDependency / SqlNotifications with SQL Server Service broker? 这是将SqlDependency / SqlNotifications与SQL Server Service代理一起使用的最佳过程/实践吗?

Are folks using other methods to accomplish a similar task? 人们是否使用其他方法来完成类似的任务? I could always poll for changes, but I would rather not have to do that. 我总是可以轮询变化,但我宁愿不必那样做。 On the other hand I don't want to introduce a complex scenario into our existing environment either. 另一方面,我也不想在我们现有的环境中引入复杂的场景。

EDIT (Potential Options): 编辑(潜在选项):

  1. SqlDependency 的SqlDependency
  2. Service Broker External Activation Service Broker外部激活

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM