30.06.2013 Views

Under the Hood of .NET Memory Management - Simple Talk

Under the Hood of .NET Memory Management - Simple Talk

Under the Hood of .NET Memory Management - Simple Talk

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Chapter 5: Application-Specific Problems<br />

We also need to run aspnet_regsql to register <strong>the</strong> database and tables for notification.<br />

aspnet_regsql -d MyDatabase -E -S . –ed<br />

aspnet_regsql -d MyDatabase -E -S . -et -t ReferenceTable<br />

Listing 5.3: Registering <strong>the</strong> database and tables for notification.<br />

aspnet_regsql is a handy tool when it comes to creating key databases used by <strong>the</strong><br />

membership provider for ASP.<strong>NET</strong>. It can also be used to add or remove options on an<br />

existing database. In this case, we will use it to configure cache dependency options.<br />

If you want to know a bit more about how to use it, Table 5.1 summarizes some <strong>of</strong> <strong>the</strong><br />

key options.<br />

-d The name <strong>of</strong> <strong>the</strong> database to act on<br />

-E Tells <strong>the</strong> command to use windows au<strong>the</strong>ntication<br />

-S The name <strong>of</strong> <strong>the</strong> server. "." Means to use <strong>the</strong> current server<br />

-ed Enables SQL cache dependency<br />

-dd Disables SQL cache dependency<br />

-et Enables SQL cache dependency on a table<br />

-dt Disables SQL cache dependency on a table<br />

-t Specifies which table to enable caching on<br />

-lt Lists <strong>the</strong> tables that have cache dependency enabled<br />

Table 5.1: The key options for aspnet_regsql.<br />

Finally, we need to configure <strong>the</strong> caching element in <strong>the</strong> config file (Listing 5.4).<br />

149

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!