简体   繁体   English

在Microsoft Windows Server 2008 R2上运行的SQL通知错误

[英]sql notification error running on Microsoft Windows Server 2008 R2

I want to get notification for a new record inserted into the database with this code: 我想获得有关使用以下代码插入数据库的新记录的通知:

var perm = new SqlClientPermission(System.Security.Permissions.PermissionState.Unrestricted);
perm.Demand();
SqlDependency.Stop(connectionString);

SqlDependency.Start(connectionString);

// I got an exception here when running the application "Windows 2008 Ent R2 SP1 64Bit" //运行应用程序“ Windows 2008 Ent R2 SP1 64Bit”时出现异常

Error of starting database Watcher: Cannot find the user 'owner', because it does not exist or you do not have permission. 启动数据库监视程序的错误:找不到用户“所有者”,因为它不存在或您没有权限。

Cannot find the queue 'SqlQueryNotificationService-f41563c5-3c26-4469-8447-3ee41c801a55', because it does not exist or you do not have permission. 找不到队列'SqlQueryNotificationService-f41563c5-3c26-4469-8447-3ee41c801a55',因为该队列不存在或您没有权限。

Invalid object name 'SqlQueryNotificationService-f41563c5-3c26-4469-8447-3ee41c801a55'. 无效的对象名称'SqlQueryNotificationService-f41563c5-3c26-4469-8447-3ee41c801a55'。

I already have done this for the database and the user: 我已经为数据库和用户完成了此操作:

ALTER DATABASE [dbName] SET ENABLE_BROKER 
use [dbName] GRANT SUBSCRIBE QUERY NOTIFICATIONS TO [dbUser]

So where could be the cause? 那么,原因可能在哪里呢?

Thanks in advance. 提前致谢。

看一下MSDN ,您使用的连接有一些限制

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Microsoft Windows Server 2008 R2中的Microsoft Media Foundation - Microsoft Media Foundation in Microsoft Windows Server 2008 R2 Windows Server 2008 R2上未运行的本地Pragramm运行 - Local Pragramm running not running on windows Server 2008 R2 Microsoft SQL Server 2008 R2中的水平分区? - Horizontal partitioning in Microsoft SQL Server 2008 R2? SQL Server 2008 R2 查询通知上的死锁 (SqlDependency) - SQL Server 2008 R2 DeadLock on query Notification (SqlDependency) Windows Server 2008 R2中未运行quartz.net作业 - quartz.net job not running in windows server 2008 R2 在Windows Server 2008 R2上运行c#app时出现KERNELBASE.dll错误? - KERNELBASE.dll error running c# app on Windows Server 2008 R2? 进程在 sql 服务器 2008 R2 上运行,spid = -2 - Process running on sql server 2008 R2 with spid = -2 Windows Service Bus与SQL Server 2008 R2 - Windows Service Bus with SQL Server 2008 R2 Microsoft Excel 无法访问文件“...”。 使用 Microsoft Office 2010 的 Windows Server 2008 R2 有多种可能的原因 - Microsoft Excel cannot access the file “…”. There are several possible reasons Windows Server 2008 R2 with Microsoft Office 2010 错误948:带有SQL Server 2008 R2的Visual Studio 2012 - Error 948 :Visual Studio 2012 with SQL Server 2008 R2
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM