SQL Dependency on SQL Server 2008 Express

时光毁灭记忆、已成空白 提交于 2019-12-03 20:57:53
Remus Rusanu

To understand how SQL Dependency works I recommend you read The Mysterious Notification. To troubleshoot it follow the normal Troubleshooting Dialogs steps. The typical culprit is indeed, as in the article you found, the EXECUTE AS context required by Service Broker message delivery. You would see this easily from the transmission_status of the notification messages is sys.transmission_queue and changing the database owner to a valid login (ALTER AUTHORIZATION ON DATABASE::[<dbname>] TO [sa]) will fix it. However there could be other problems, the troubleshooting steps in my link will help you find them.

As @Remus has pointed out, my assumptions based on the misleading documentation were wrong: SQL Server Express does support Service Broker to some extent, despite many online sources stating that it does not support SSB it all. Leaving this up here though so that searches may yield the dialog that ensued.

It seems that SqlDependency relies on Query Notifications. Query notifications in turn rely on Service Broker. Service Broker is not supported in SQL Server Express. This page doesn't list Query Notifications explicitly:

http://msdn.microsoft.com/en-us/library/cc645993(SQL.100).aspx

But from there you can see that Service Broker is supported by Express as a client only, and from the following page you can see that Service Broker is a dependency (no pun intended):

http://msdn.microsoft.com/en-us/library/ms130764(v=SQL.100).aspx

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!