Are program events possible in SQL Server

Scenario: the application is running, it connects to the database and registers to listen to a specific event name. Then, using a trigger or stored procedure, when certain criteria are met, the event can be raised. Then the database notifies all applications that have registered that they are listening to this event. Then the application can act and go and do some processing. This eliminates the need for the database to constantly poll the database to ensure that the criteria are met.

This scenario is possible with Interbase / FirebirdSQL, but is it possible with SQL Server (2005 or higher), and if so, what should I look for, as I struggle to find any information about it. If this is not possible, then there is a better way to handle this scenario so as not to interrogate.

+3
source share
2 answers

Yes. You can use Service Broker Notifications for this.

Although I think the caveat in this article is that too many registered customers will still apply. How many customers can you expect from notifications?

+2
source

A potential solution to this could be CLR triggers with a data subscription service.

, , , , (webservice ..) .

0

Source: https://habr.com/ru/post/1757809/


All Articles