none
Need help with Query Notification / Notification Services / SqlDependency, are they going away? RRS feed

  • Question

  • I have spent the last week trying to build a windows application that would rely on SqlDependency.  Basically, I need to alert users quickly when information in a small table changes.  I don't have it working yet.   I think I have my C# code correct and that my SQL server is not configured correctly.  I spent several hours researching Notification Services on SQL Server 2005 to configure it for this. According to my "SQL Server Unleashed" book, I should be seeing an object for Notification Services on my 2005 server.  I can't get it to display so I decided to reinstall our test SQL 2008 R2 server and try my application over there.  Unfortunately I don't even have the option to install notification services.  That's when I came across this gem of information on wikipedia:

    "SQL Server Notification Services is being Removed from SQL Server 2008 [1], although SQL Server 2005 SP3 allows for the Notification Services components to be run against the SQL Server 2008 Database Engine [2]."   (http://en.wikipedia.org/wiki/SQL_Server_Notification_Services)

    It also seems that I’m supposed to purchase some sort of special licensing from MS to use Notification Services. 

    I don’t want to spend any more energy trying to get my application to work using the SQLDependency class if the service it depends on is going away, or if I need to buy additional licensing.  So I’m hoping to get a few questions answered:

    1.  When they say that SSNS is going away, are they talking about the same technology that SQLDependency connects to?  In other words, am I wasting my time writing an app based on SqlDependecy if we’re planning to migrate to SQL Server 2008 R2 next year?

    2.  Is there a different technology or mechanism to accomplish my goals that is NOT being deprecated?

    3.  If the server tools I need are going to stay, do I need to get licensing, or is that just for when you connect SMS, or SMTP clients?

    4. If the tools are going away, what is the best way to develop my application?  I could get it functioning by frequently polling the table for changes, but it seems to me that having 50 to 100 Windows aps polling the server every 15 to 30 seconds is going to be a horrible death for server response time.

    Wednesday, October 13, 2010 5:45 PM

Answers

  • Query Notifications (aka SqlDependency) is a *totally* different technology than SQL Server Notification Services. It’s not going away. Because the same word is used in both technologies, people often get them confused.
     
    Query Notifications is a mechanism by which you obtain a resultset in such a way that, if the resultset changes, you are notified via a Service Broker message.
     
    SQL Server Notification Services is a product offering for building a specific type of application, like, say, MSN Autos, that notifies customers by email or Instant Messenger if their auto that they’ve registered at the site needs a tune-up.
     
    *Entirely* different.
     
    Cheers,
    Bob Beauchemin
    SQLskills
     
    "Narnian" wrote in message news:e2da1815-a821-4e81-9cc5-ed6810065b30...

    I have spent the last week trying to build a windows application that would rely on SqlDependency.  Basically, I need to alert users quickly when information in a small table changes.  I don't have it working yet.   I think I have my C# code correct and that my SQL server is not configured correctly.  I spent several hours researching Notification Services on SQL Server 2005 to configure it for this. According to my "SQL Server Unleashed" book, I should be seeing an object for Notification Services on my 2005 server.  I can't get it to display so I decided to reinstall our test SQL 2008 R2 server and try my application over there.  Unfortunately I don't even have the option to install notification services.  That's when I came across this gem of information on wikipedia:

    "SQL Server Notification Services is being Removed from SQL Server 2008 [1], although SQL Server 2005 SP3 allows for the Notification Services components to be run against the SQL Server 2008 Database Engine [2]."   (http://en.wikipedia.org/wiki/SQL_Server_Notification_Services)

    It also seems that I’m supposed to purchase some sort of special licensing from MS to use Notification Services. 

    I don’t want to spend any more energy trying to get my application to work using the SQLDependency class if the service it depends on is going away, or if I need to buy additional licensing.  So I’m hoping to get a few questions answered:

    1.  When they say that SSNS is going away, are they talking about the same technology that SQLDependency connects to?  In other words, am I wasting my time writing an app based on SqlDependecy if we’re planning to migrate to SQL Server 2008 R2 next year?

    2.  Is there a different technology or mechanism to accomplish my goals that is NOT being deprecated?

    3.  If the server tools I need are going to stay, do I need to get licensing, or is that just for when you connect SMS, or SMTP clients?

    4. If the tools are going away, what is the best way to develop my application?  I could get it functioning by frequently polling the table for changes, but it seems to me that having 50 to 100 Windows aps polling the server every 15 to 30 seconds is going to be a horrible death for server response time.

    • Marked as answer by Narnian Wednesday, October 13, 2010 11:54 PM
    Wednesday, October 13, 2010 11:27 PM

All replies

  • Query Notifications (aka SqlDependency) is a *totally* different technology than SQL Server Notification Services. It’s not going away. Because the same word is used in both technologies, people often get them confused.
     
    Query Notifications is a mechanism by which you obtain a resultset in such a way that, if the resultset changes, you are notified via a Service Broker message.
     
    SQL Server Notification Services is a product offering for building a specific type of application, like, say, MSN Autos, that notifies customers by email or Instant Messenger if their auto that they’ve registered at the site needs a tune-up.
     
    *Entirely* different.
     
    Cheers,
    Bob Beauchemin
    SQLskills
     
    "Narnian" wrote in message news:e2da1815-a821-4e81-9cc5-ed6810065b30...

    I have spent the last week trying to build a windows application that would rely on SqlDependency.  Basically, I need to alert users quickly when information in a small table changes.  I don't have it working yet.   I think I have my C# code correct and that my SQL server is not configured correctly.  I spent several hours researching Notification Services on SQL Server 2005 to configure it for this. According to my "SQL Server Unleashed" book, I should be seeing an object for Notification Services on my 2005 server.  I can't get it to display so I decided to reinstall our test SQL 2008 R2 server and try my application over there.  Unfortunately I don't even have the option to install notification services.  That's when I came across this gem of information on wikipedia:

    "SQL Server Notification Services is being Removed from SQL Server 2008 [1], although SQL Server 2005 SP3 allows for the Notification Services components to be run against the SQL Server 2008 Database Engine [2]."   (http://en.wikipedia.org/wiki/SQL_Server_Notification_Services)

    It also seems that I’m supposed to purchase some sort of special licensing from MS to use Notification Services. 

    I don’t want to spend any more energy trying to get my application to work using the SQLDependency class if the service it depends on is going away, or if I need to buy additional licensing.  So I’m hoping to get a few questions answered:

    1.  When they say that SSNS is going away, are they talking about the same technology that SQLDependency connects to?  In other words, am I wasting my time writing an app based on SqlDependecy if we’re planning to migrate to SQL Server 2008 R2 next year?

    2.  Is there a different technology or mechanism to accomplish my goals that is NOT being deprecated?

    3.  If the server tools I need are going to stay, do I need to get licensing, or is that just for when you connect SMS, or SMTP clients?

    4. If the tools are going away, what is the best way to develop my application?  I could get it functioning by frequently polling the table for changes, but it seems to me that having 50 to 100 Windows aps polling the server every 15 to 30 seconds is going to be a horrible death for server response time.

    • Marked as answer by Narnian Wednesday, October 13, 2010 11:54 PM
    Wednesday, October 13, 2010 11:27 PM
  • Yay!  I was hoping that was the case.  Thanks.  That means I haven't wasted my time figuring out the C# syntax.

    What keywords should I put into my favorite search engine to get help on setting up SQL Server for SQLDependency?  I'm pretty sure I don't have my act together on the SQL Server side.

    Wednesday, October 13, 2010 11:58 PM