How to enabel sql server notification on database as well as table using sql server 2005


I am ASP.NET developer. I have  implemented caching in my site.

I am using

"System.Web.Caching.SqlCacheDependencyAdmin.EnableNotifications("Data Source=<Data Source name>;Initial Catalog=<database name>User ID=<user id>;pwd=<password>;Pooling=true;Min Pool Size=0;Max Pool Size=1000;")


"SqlCacheDependencyAdmin.EnableTableForNotifications("Data Source=<Data Source name>;Initial Catalog=<database name>User ID=<user id>;pwd=<password>;Pooling=true;Min" Pool Size=0;Max Pool Size=1000;","<table name>")

in my global.asax so that in my page i can use SqlDependency="CommandNotification" in my page which i want to cache.

Locally it works fine for me, means i have tested the application with caching in my local system.

But the thing is that my application is on host server if i use above statement in global.asax then it result with error like security issue.

So i have to enable sql notification in remote database then only my site works.

I know we can do it using aspnet_regsql(using .net command prompt), but we can't run .net command in remote host server.

So is there any script (using sql server 2005) which can enable sql notification on my remote database as well as table because in my host server.?

We can send this script to host server administrator so that he can run...

Or is there any other approach,please suggest me.


Thanks & Regards,

Abdul Javed Khan

9/5/2008 2:16:37 PM 8807 articles. 0 followers. Follow

2 Replies

Similar Articles

[PageSpeed] 39
Get it on Google Play
Get it on Apple App Store


If this question is confusing you then could you please tell me what privilege my account must have so that i can run




from my .NET application. because write now my account is not having enough privilege to run these command


Thanks & Regards,

Abdul Javed Khan

9/8/2008 4:04:12 AM

Hi Abdul,

Based on my understanding, your concern is an alternative to run aspnet_regsql.exe on the hoster server. If I have misunderstood your concern, please let me know.

For this issue, we can use SQL Server Profiler to catch the executed T-SQL scripts that enables SQL Cache Dependency, for example, they are creating notification table, stored procedure, triggers and so on. You can copy the catched T-SQL scripts and run them on hoster’s query analyzer. About how to use SQL Server Profiler, please refer to the following link:

Using SQL Server Profiler

Alternatively, we can generate T-SQL scripts from the existing local database for all the objects that associate with SQL Cache Dependency, and then execute the T-SQL scripts on the hoster side. The Database Publishing Wizard utility can help to generate T-SQL scripts.

Microsoft SQL Server Database Publishing Wizard 1.1

At last, you may want to check the following article that discusses the similar secnario.

Using SQL Cache Dependency

Benson Yu
Microsoft Online Community Support

Please remember to mark the replies as answers if they help and unmark them if they provide no help. This can be beneficial to other community members reading the thread.
9/11/2008 9:21:27 AM

Similar Artilces:

This version of Microsoft Sql Server Management Studio can only be used to connect to Sql Server 2000 and Sql Server 2005 servers
When I connect SQL Server 2005 to a remote database i get the error: "This version of Microsoft Sql Server Management Studio can only be used to connect to Sql Server 2000 and Sql Server 2005 servers". Can I confirm it is because: the remote db is of SQL Server 2008? There is a soln mentioned in Did anybody try this (installing 2008 express: I am just checking again, whether it will disturb my existing SQL Server installation, in any means...? Though it is mentioned that it will g...

Migrating sql server 2005 express database to sql server 2005 database
Hi, I have an application developed using VWD and sqlserver express database. The express database is turning out to be small in size and we need to migrate to larger sqlserver 2005 database. What are the steps for this migration, please list in detail. Regards, Sandyhttp://www.thequinn.infohttp://www.sksdataservices.com Hi Sandy, To move a database from SQL Express to SQL 2005, you can use the following steps. 1. If your database file is attached to the server instance, you will need to detach it first using SQL management studio. If it is under App_Data folde...

How to connect to Remote SQL Server database using SQL Server 2005 Express
Hi,I've an account with a hosting service provider online for SQL Server database. I've downloaded SQL Server 2005 Express from ASP.Net. How can I use it to connect to my SQL Server Database which is sitting on remote server? The hosting provider gave me following things to connect to the remote database.Server NameDatabase NameUser NamePasswordRegards,A.K.R    Anyone? I don't want to ask the obvious, but is there not a Read Me file included with the download of SQL Express which would explain how to connect? Sorry I can't be more helpful, but I've only ever briefly ...

Can I use Bugzilla with Sql server 2000 or sql server 2005 as backend Database
I have Just Successfully installed Bugzilla My installation are Bugzilla 2.2 Apachec Webserver ActivePerl 7.8 Mysql 5.0 Now I like That My Database should be Sql server 2000 or sql server 2005 Can I do that [As I also see that I required some Perl module of Mysql as well] ...

I imported a SQL Table into SQL DataBase, But I can not update this table even with SQL Server management Studio
I imported a SQL Table into SQL DataBase, But I can not update this table even with SQL Server management Studio When I change any data on mentioned table above, Red exclamation sign appears left of the record . How can I correct this problem?  Thanks. Try running the UPDATE via Query Analyzer...and see if you get an error.***********************Dinakar NethiLife is short. Enjoy it.***********************...

Moving SQL Server 2005 Database to SQL Server 2005 Express
Hi, I have SQL Server 2005 in my Development machine but the hosting server has only SQL server 2005 Express. I was wondering if I develop the DB in SQL server 2005 would be able to move/deploy it to SQL Server Express in the production server? If so how? Can I just generate the script and then run it on the productions server? Or there is a better/easier way? Thanks in advanceShuaib----------------------- I don't anticipate any problems creating database in SQL Server 2005 and moving it to Express. If you need to generate the script to create an empty shell (no d...

moving an sql server 2005 database to a sql server 2000 database
I am trying to move a database which I wrote in SQL Server 2005 to a SQL Server 2000 database. I'm not sure the best way to do this....... Can anyone enlighten me?.....   this article explains it.,289625,sid87_gci1149585_tax301536,00.html hth,mcm pizzamaker74: I am trying to move a database which I wrote in SQL Server 2005 to a SQL Server 2000 database. I'm not sure the best way to do this....... Can anyone enlighten me?..... If both are in the same network or box just register the 2005 with the 2000 cr...

Problem with creating new SQL server database in VWDExpress using SQL Server 2005 Express
 when I try to create a SQL Database from Visual Web Developer 2005 Express Edition, I get the following error message: "Connections to SQL Server files (*.mdf) require SQL Server Express 2005 to function properly.  Please verify the installation of the component or download from the URL" When I go to that URL, it brings me to the page to download SQL Server Express 2005. any ideathanks for advance  Did you install SQL Server Express on your server/system? JeffPlease: Don't forget to click "Mark as Answe...

How to create a data diagram in SQL Server 2005 Management Studio for a SQL Server 2000 database
Hello: I have an old database created in SQL Server 2000, now I can open, access it in SQL Server 2005 Management Studio, but I can't create Data Diagrams. Please advise on how to make it work.... Thank you Expand the database folder in Object Explorer and the first folder under the databases is the "Database Diagrams". Right click -> New database diagram.***********************Dinakar NethiLife is short. Enjoy it.*********************** Thank you for replying :)  but that only works for database created in SQL Server 2005, my database is created in SQL Server ...

Restoring a SQL Server Express 2005 Database to SQL Server Standard 2005
Hello,If I backup and restore an express database to sql server 2005 standard, will there still be limitations in regards to the database size, cpu...etc.? Thanks,Jon  I suppose that no. Limitations are connected to SQL engine not to database itself. But probably if your database will grow up connected to SQL Standard and you will try to move it back to SQL express you will be in trouble.  ThanksJPazgier...

SQL Server 2000 and SQL Server 2005 in the same server
Can enyone please send me a link to a white paper explaining how to run both SQL Server 2000 and 2005 in the same machine?Thanks. I don't know about the white paper but I had both running on my machine for a while by making the SQL 2000 a named instance. So for SQL 2005 connection strings my server name was (local) while for SQL 200 using the named instance it was (local)\joesql where joesql was the instance nameHope it helps,Joe http://www.joeaudette.com

Migrate Database from SQL Server 2005 beta 3 to Sql Server 2005 Release
Do you now, How can I move database with datas to release version of sql server? Procedores backup/restore can't help becouse of unsuported version database. Any ideas? What about generate a schema script?  Then run an install of your schema in a new query.  You could at least get the db schema but not the data.Eric RamseurRainbow Portal 2.0 AdminDownload Rainbow 2.0!!Rainbow Code Rainbow Portal CommunityC# 2005 Group but I have many datas...

SQL Server 2005 Installation problems with SQL Server Express & SQL Server 2000
Hi Guys, I have had SQL Server Express and Sql Server Management Studio Express installed on my machine for some time and recently tried to install a trial of SQL Server 2005 as well.  (Yes, I'm migrating from Visual Studio Express to Visual Studio Professional, just as in tended!) Everything went fine except that nothing seemed to be installed.  I searched in all the obvious places - both on the Start/Programs menu and on the hard-drive: nothing. A check under Add/Remove Programs showed that Sql Server 2005 Express was installed, but called SQL Server 2005. So after a number o...

Can microsoft SQL Server 2005 database upgrade to microsoft SQL Server 2008 database?
I have a microsoft SQL Server 2005 database, I don't know how to upgrade the 2005 database to 2008 database, I try to use SQL Server Management Studio Express 2008 to open the 2005 database, it's OK, does it mean that the 2005 database have been upgraded to 2008 database? BTW, is SQL Server 2005 database compatible with SQL Server 2008 database completely?SuperCool Multiple ZIP - A utility to unzip multiple files and work with multiple zip filesSuperCool Random Number Generator Yes. It is compatible. Anyhow go through this url for more information

Web resources about - How to enabel sql server notification on database as well as table using sql server 2005 -

Fire alarm notification appliance - Wikipedia, the free encyclopedia
A fire alarm notification appliance is an active fire protection component. A notification appliance may use audible, visible, or other stimuli ...

Facebook To Allow Users To Opt Out Of Notifications Directly Via Drop-Down Menu
Facebook continues to give its users more and easier controls over the notifications they receive, announcing Wednesday that it will implement ...

Smartphone email notifications 'a toxic source of stress', psychologists say
The secret to happiness is to turn off notifications from your smartphone email app, according to a new study.

My top 2015 essays on Uber, online dating, push notifications, Apple Watch, and more
... this out: In the meantime, below are a list of my top essays from 2015. It includes writing on a bunch of topics: Uber, Dating apps, Push notifications ...

Incipio debuts ClamCase keyboards for iPad Pro, mini 4 + Air 2, adds power, notifications
... three for the iPad Air 2, and one for the iPad mini 4. Some of the keyboards feature premium features such as an integrated screen for notifications, ...

Launcher with Notification Center Widget adds more magic
If you regularly use Launcher with Notification Center Widget to perform actions with a tap, then an update today, Jan. 20, giving you more options ...

Contextual and Granular Notification Controls
I love getting notifications on my phone. I’ve written a lot about notifications, at one point calling the notifications screen “my home screen.” ...

How Twitter used Doze in Android 6.0 Marshmallow to Improve Notification Performance
... Android M we have a greater ability to be good citizens when it comes to conserving battery life. This feature lets us specify which notifications ...

What notifications look like when you’re famous on Instagram
Ever wonder what life would be like if you were Instafamous with millions of followers blasting your pics with likes? Seeing your feed blow up ...

Tip: Don’t Forget About the Nexus 6P’s Notification Light
Did you know that the Nexus 6P has a notification light? It does. It’s not on by default, though, which is a shame, because it’s a nice addition ...

Resources last updated: 1/23/2016 9:41:03 AM