是否有一个可伸缩的替代SQL Server查询通知在从SQL Server应用程序引发事件? [英] Is there a scalable alternative to SQL Server Query Notifications for raising events in an application from SQL Server?

查看:162
本文介绍了是否有一个可伸缩的替代SQL Server查询通知在从SQL Server应用程序引发事件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

SQL Server查询通知是一个伟大的工具,但它似乎没有内置扩展得非常好。想要每个应用程序/需要通知已保持开放的连接到数据库的就是了通知的时间(通常在应用程序运行的整个时间)的持续时间。

SQL Server Query Notifications is a great tool, but it doesn't seem built to scale very well. Every application that wants/needs notifications has to keep an open connection to the database for the duration of the time it wants notifications (typically the entire time the application is running).

我打开创造性的解决方案。关闭我的头顶,我只是想将一个服务,将订阅的SQL Server查询通知可能再通知客户端应用程序在服务器上的。在这种情况下,你只有1个数据库连接打开(为什么不只是把它打开所有的时间),然后将您的客户端应用程序可以只订阅通知服务。

I am open to creative solutions. Off the top of my head I just thought of putting a service on the server that would subscribe to SQL Server Query Notifications which could then notify the client applications. In this case you have only 1 database connection open (and why not just leave it open all the time), and then your client applications could just subscribe to the service for notification.

想法?

推荐答案

您可能要考虑建筑使用SQL Server服务代理和db_mail或外部激活自己的解决方案。

You may want to look into building your own solution using SQL Server Service Broker and db_mail or external activators.

这篇关于是否有一个可伸缩的替代SQL Server查询通知在从SQL Server应用程序引发事件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆