SqlDependency.Start-异常'无效的对象名称...”

时间:2018-08-08 18:39:52

标签: c# .net sql-server service-broker

我正在尝试使用SqlDependency对象来监视SQL Server中的更改,但是SqlDependency.Start命令存在问题。

在SQL Server中,我发出这些命令

<script>

在我的代码中,我有

CREATE QUEUE PJLTestQueue2;
CREATE SERVICE PJLTestService2 ON QUEUE PJLTestQueue2 ([http://schemas.microsoft.com/SQL/Notifications/PostQueryNotification]);

它抛出并且异常消息是:“无效的对象名称'PJLTestQueue2'。”

我可以发出命令select * from sys.service_queues,然后在输出中看到PJLTestQueue2。

我需要不同地配置队列吗?

我缺少一些权限吗?

0 个答案:

没有答案
相关问题