根据:http://msdn.microsoft.com/en-us/library/system.web.caching.sqlcachedependency.aspx
如果我使用SQL2005,我必须这样写:
<configuration>
<connectionStrings>
<add name="Northwind" connectionString="Data Source=(local); Initial Catalog=northwind; Integrated Security=true"; providerName="System.Data.SqlClient" />
</connectionStrings>
<system.web>
<caching>
<sqlCacheDependency enabled = "true" pollTime = "60000" >
<databases>
<add name="northwind"
connectionStringName="Northwind"
pollTime="9000000"
/>
</databases>
</sqlCacheDependency>
</caching>
</system.web>
</configuration>但是sql 2008又如何呢?我正在启用服务代理,
我正在创建sqlCacheDpendency并将命令放在那里
当我更改Table时,它不会删除缓存的项。
发布于 2011-08-08 04:35:51
阅读The Mysterious Notification来理解它是如何工作的,然后你就可以理解如何troubleshoot它(或者用ssbdiagnose欺骗)。数据库的EXECUTE AS上下文最有可能由于数据库移动而孤立dbo而失效。sys.transmission_queue中的transmission_status值将清楚地显示这一点。如果为true,修复方法是将dbo映射到有效的登录:
ALTER AUTHORIZATION ON DATABASE::[<dbname>] TO [sa];否则,解决方案取决于问题原因,请使用上面链接的故障排除步骤。
https://stackoverflow.com/questions/6971323
复制相似问题