9

Using .Net 4.0 and SQL Server 2008 R2

I have been looking into utilizing SqlDependency / SqlNotifications for monitoring some database structures. Is the best process / practice for this to utilize the SqlDependency / SqlNotifications with SQL Server Service broker?

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
  2. Service Broker External Activation
scarpacci
  • 8,957
  • 16
  • 79
  • 144
  • 2
    FYI - SQL Notification services was deprecated, so I wouldn't try to go down that path. This sounds somewhat related (not exactly) to: http://stackoverflow.com/questions/877273/change-notification-with-sql-server-2008 – NotMe Feb 15 '12 at 19:10
  • What kind of structures? Data? Schema? Also, why do you want to do this / what problem are you trying to solve? – RQDQ Feb 15 '12 at 19:10
  • @RQDQ we have a high volume application where we have to perform quite a few DB lookups. I wanted to try and eliminate some of this overhead by caching or leveraging something else to store the static data...until changed – scarpacci Feb 15 '12 at 19:15
  • @ChrisLively thanks.....I will take a look at the stack question – scarpacci Feb 15 '12 at 19:15
  • @RQDQ...sorry also meatn to say it is for Data Changes – scarpacci Feb 15 '12 at 19:16

1 Answers1

4

Check out event notifications:

http://msdn.microsoft.com/en-us/library/ms175854.aspx

Jimbo
  • 2,529
  • 19
  • 22