I have a small table (approx. 200 rows) which changes all the time (couple of times per second).
I was looking for a solution where i could receive notification from the database each time it changes, rather than polling it (let's say 5-10 times per second).
Moreover, i would like to receive only the changed rows each time and not fetching the whole table - i have found this rather difficult to implement this utilizing SqlDependency class.
Couple of things to take under consideration:
- I do not have control over the changes in the table nor do i have the ability to receive the data other than using the database.
- I intend to build a service which will broadcast the changes to my front servers
Is there a way to do this using SqlDependency?
What is the best practice given this case?
BTW: i am using SQL server 2012
Thanks in Advance
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…