February 18, 2009 at 8:17 am
Hello,
I'm creating a windows service that listens to a sql server database table each second when any insertion occurs this windows service make a lot of work, to accomplish this task I firstly think in the notification services but it creates an auto generated windows service which I can not edit to do my logic and in the same time it works(the notification services) just like my windows service in listening to the table every Generator Quanta.
The question is which is the best implementing my one windows service or using the notification services to send notifications to filesystemwatcher then my service check this file every second?
Thanks
February 18, 2009 at 8:33 pm
If you are on SQL Server 2005, and you are using .NET 2.0 or newer, use a SqlDependency and Enable Service Broker in your database to watch for changes in data using the QueryNotificationService in Service Broker.
http://msdn.microsoft.com/en-us/library/system.data.sqlclient.sqldependency.aspx
http://msdn.microsoft.com/en-us/library/a52dhwx7(VS.80).aspx
Jonathan Kehayias | Principal Consultant | MCM: SQL Server 2008
My Blog | Twitter | MVP Profile
Training | Consulting | Become a SQLskills Insider
Troubleshooting SQL Server: A Guide for Accidental DBAs[/url]
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply