Slow SQLExpress in Visual Studio
I was finding that opening the ASPNETDB.MDB database in the server explorer window was taking an age with the default configuration.
My solution after hours of trawling the web was:
1. In SQL Server Management Studio Express(free download), attach the ASPNETDB.MDB from your TheBeerHouseVB\TBH_Web\App_Data folder and name it BEERHOUSE or similar
2. Still in SQLMS, right-click on BEERHOUSE, click on options, change 'auto-close' to 'false' (which is the default for SQLServer non Express editions)
3. Add a data connection in the VS Server Explorer window instead of the ASPNETDB.MDB (this connection will reappear if you try and delete it but it can be ignored). When you click on the Server Name dropdown ~./sqlexpress.beerhouse.dbo should appear as you have already added it in SQLMS.
4. Then alter the connection string in web.config (modify for your own settings obviously):
<add name="LocalSqlServer" connectionString="Data Source=.\SQLExpress;Initial Catalog=BEERHOUSE;Integrated Security=True" providerName="System.Data.SqlClient"/>
and you end up with a VS Server Explorer which doesn't take 2mins to view an SP. It still takes 10 secs on 1st opening but much better than before.
Last edited by jimjamjo; May 10th, 2009 at 06:09 AM..
|