The SQL Server Service Broker for the current database is not enabled, and as a result query notifications are not supported.

当Insus.NET尝试解决此问题《When using SqlDependency without providing an options value, SqlDependency.Start() must be called prior to execution of a command added to the SqlDependency instance.http://www.cnblogs.com/insus/p/5622792.html 时,

又出现另外一个警示:

 
解决方法是,Enable Service Broker on the database:

 

ALTER DATABASE [DataBase Name] SET ENABLE_BROKER WITH ROLLBACK IMMEDIATE
Source Code

 

posted @ 2016-06-28 14:35  Insus.NET  阅读(679)  评论(0编辑  收藏  举报