Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Configuring SqlCacheDependency with aspnet_regsql

Tags:

sql

asp.net

I'm trying to prepare my database for use with SQLCacheDependency and using the aspnet_regsql utility to setup the aspnet change notification table and appropriate triggers.

When I run the following:

aspnet_regsql -S PC199 -E -d mydatabase -ed

I get the error: 'The argument '-S' is invalid.'

I'm using SQL Server 2008 and .NET 4.

like image 638
Ryan Tomlinson Avatar asked Mar 04 '26 14:03

Ryan Tomlinson


1 Answers

The -S argument should be a valid argument to identify the server that hosts the database you want to run the command against. Not completely sure but you might need to add ".exe" to the end of the command name like so:

aspnet_regsql.exe -S localhost -E -ed -d Northwind -et -t Employees

You can find more info about aspnet_regsql.exe here: http://msdn.microsoft.com/en-us/library/ms229862(v=vs.80).aspx

like image 70
longda Avatar answered Mar 07 '26 05:03

longda



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!