sqlcachedependency

Enabling Service Broker in SQL Server 2008

夙愿已清 提交于 2019-12-20 08:24:54
问题 I am integrating SqlCacheDependency to use in my LinqToSQL datacontext. I am using an extension class for Linq querys found here - http://code.msdn.microsoft.com/linqtosqlcache I have wired up the code and when I open the page I get this exception - "The SQL Server Service Broker for the current database is not enabled, and as a result query notifications are not supported. Please enable the Service Broker for this database if you wish to use notifications." its coming from this event in the

SqlCacheDependency via Service Broker Notifications - SELECT sensitive ONLY on particular columns

≯℡__Kan透↙ 提交于 2019-12-12 03:43:50
问题 Is it possible to define a Notification on SELECT, but in that way: the Broker would reset Cache only if columns written in select has changed. So Column Sensitive approach. I don't want the cache resets if some unimportant column in the table are changed. I will have a SELECT with INNER JOIN. Thanks in advance for help. 回答1: The theory goes that if you restrict your SELECT columns to contain only the columns of interest, you should be notified only if those columns changed. However the

Asp.net sql cache dependency programmatically configuration

余生长醉 提交于 2019-12-11 13:42:23
问题 I've a question regarding SqlCacheDependency configuration. Every resource I've read requires the developer to define the polled databases into web.config. This is not a good scenario for our application that connects to different databases, because we don't want to edit web.config each time we add / remove a database. We tried to configure it using SqlCacheDependency and SqlCacheDependencyAdmin in application startup but it seems that you must anyway configure everything in web.config. Do

ASP.NET set cache dependency with a SqlCommand

给你一囗甜甜゛ 提交于 2019-12-10 10:34:14
问题 Is this an effective way to set the cache item dependent on the query? HttpRuntime.Cache.Insert( "ListLanguages", list, new SqlCacheDependency(command), DateTime.UtcNow.AddMinutes(AppConfiguration.CacheExpiration.MinimumActivity), Cache.NoSlidingExpiration); command is a SqlCommand initialized previously as: SqlCommand command = new SqlCommand("Listlanguages", connection); where "ListLanguages" is a stored procedure which is simply a select. I find this an easier and more failure-proof method

ASP.NET set cache dependency with a SqlCommand

一世执手 提交于 2019-12-06 09:23:17
Is this an effective way to set the cache item dependent on the query? HttpRuntime.Cache.Insert( "ListLanguages", list, new SqlCacheDependency(command), DateTime.UtcNow.AddMinutes(AppConfiguration.CacheExpiration.MinimumActivity), Cache.NoSlidingExpiration); command is a SqlCommand initialized previously as: SqlCommand command = new SqlCommand("Listlanguages", connection); where "ListLanguages" is a stored procedure which is simply a select. I find this an easier and more failure-proof method than aggregated cache dependency (I mean failure-proof because I don't have to aggregated the tables

Performance questions for SQL Cache Dependency

我是研究僧i 提交于 2019-12-04 15:46:57
问题 I'm working on a project where we are thinking of using SQLCacheDependency with SQL Server 2005/2008 and we are wondering how this will affect the performance of the system. So we are wondering about the following questions Can the number of SQLCacheDependency objects (query notifications) have negative effect on SQL Server performance i.e. on insert, update and delete operations on affected tables ? What effect (performance wise) would for example 50000 different query notifications on a

Enabling Service Broker in SQL Server 2008

独自空忆成欢 提交于 2019-12-02 15:24:42
I am integrating SqlCacheDependency to use in my LinqToSQL datacontext. I am using an extension class for Linq querys found here - http://code.msdn.microsoft.com/linqtosqlcache I have wired up the code and when I open the page I get this exception - "The SQL Server Service Broker for the current database is not enabled, and as a result query notifications are not supported. Please enable the Service Broker for this database if you wish to use notifications." its coming from this event in the global.asax protected void Application_Start() { RegisterRoutes(RouteTable.Routes); //In Application

How does a SqlCacheDependency know when to communicate back to any listeners when data in a table changes?

随声附和 提交于 2019-11-30 09:46:52
I have been doing some research and I can see most of the plumbing for this system however I'm not sure how sql server knows when to fire a message back to any listeners (applications) when data in a table changes, for instance. I'll start by explaining what I understand up to the point that I'm getting lost. 1) Service Broker needs to be enabled on the database and some permissions need to be set. 2) The database schema should be deployed. 3) Using aspnet_regsql.exe, enable sql cache dependency for the database and tables you need to cache data for (this step creates a table to track changes

How does a SqlCacheDependency know when to communicate back to any listeners when data in a table changes?

两盒软妹~` 提交于 2019-11-29 14:35:25
问题 I have been doing some research and I can see most of the plumbing for this system however I'm not sure how sql server knows when to fire a message back to any listeners (applications) when data in a table changes, for instance. I'll start by explaining what I understand up to the point that I'm getting lost. 1) Service Broker needs to be enabled on the database and some permissions need to be set. 2) The database schema should be deployed. 3) Using aspnet_regsql.exe, enable sql cache