Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6672105
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T03:28:08+00:00 2026-05-26T03:28:08+00:00

We would like to enable Sql Cache Dependency on a database and a few

  • 0

We would like to enable Sql Cache Dependency on a database and a few tables, but we would like to avoid using aspnet_regsql.exe if possible. The database is already in our staging environment and it will be easier to just send the admins a Sql script instead of requiring batch files as well. Is it possible to enable Sql Cache Dependency entirely through Sql scripts, and if so, how?

Thanks!

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T03:28:09+00:00Added an answer on May 26, 2026 at 3:28 am

    aspnet_reqsql.exe doesn’t really do anything to ‘enable’ SqlCacheDependency. SqlCacheDependency is based on SqlDependency which uses SqlNotificationRequest which is the .net side of a Query Notification. Query Notifications are enabled always and cannot be disabled. Query Notifications uses Service Broker to deliver the notification, which is also enabled by default, but which can be disabled in a database. The typical operation that will disable Service Broker in a database is attach or restore. To make sure you do not fall victim to this problem, all you need to do (and this is exactly what aspnet_regsql does) is to run this:

    ALTER DATABASE [<dbname>] SET ENABLE_BROKER WITH ROLLBACK IMMEDIATE;
    

    Another problem that might occur is that the EXECUTE AS context required by Service Broker message delivery may be busted. For a lengthy discussion on how the EXECUTE AS can get busted, see SQL Server stops loading assembly, and the solution is trivial:

    ALTER AUTHORIZATION ON DATABASE::[<dbname>] TO sa;
    

    And finally, if you want to understand how all these work, read The Mysterious Notification.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using MS-SQL-08: Is it possible to somehow temporarily disable dependency checking, so that I
I would like to enable/disable some code based on a custom solution configuration I
I would like to enable users of my application to define a number of
I have a UITextField that I would like to enable auto completion on by:
I have a WPF ListBox that I would like to Enable multiple selection in
Would like to get a list of advantages and disadvantages of using Stored Procedures.
I've created a web enabled database using SQL Server 2005 to store the data
I would like to enable tabbing for my application. And so far it seems
Our application is using SQL Server 2005 as the database. We are using a
We have a simple access database, and would like a button on a form

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.