Azure Development Storage Database Deleted
Story goes something like this (btw, autonumber in Live Writer won’t let me start at 0):
- Install the tools and sdk to do some Azure development.
- I decide to install a non-Express version of SQL Server 2008.
- I decide I no longer need the SQL Express installation and uninstall it.
- time goes by…..
- One day I decide, after an Azure break, that I need to try something out and fire up studio.
- After creating a new web role and making some changes on a page I attempt to debug.
- Development Fabric starts
- Development Storage fails
Upon a little bit of investigation I find that it cannot connect to the SQL Express instance against which it was installed - duh. If you’ve pulled a similar trick then the following should help. Looking a little more I find is that there is a config file (C:\Program Files\Windows Azure SDK\v1.0\bin\DevelopmentStorage.exe.config) that contains two elements that seem interesting to me:
<connectionStrings>
<add name="DevelopmentStorageDbConnectionString"
connectionString="Data Source=.\SQLEXPRESS;Initial Catalog=DevelopmentStorageDb;Integrated Security=True"
providerName="System.Data.SqlClient" />
</connectionStrings>
and
<service name="Table"
url="https://127.0.0.1:10002/"
dbServer="localhost\SQLExpress"/>
So, I changed them to
<connectionStrings>
<add name="DevelopmentStorageDbConnectionString"
connectionString="Data Source=localhost;Initial Catalog=DevelopmentStorageDb;Integrated Security=True"
providerName="System.Data.SqlClient" />
</connectionStrings>
and
<service name="Table"
url="https://127.0.0.1:10002/"
dbServer="localhost" />
However, this still doesn’t solve the base problem that I have in that I basically deleted the original data files. Had I uninstalled and kept the data files I could connect them into the current default instance of SQL Server on the box, but, in fact, I did not have them and they had to be recreated. This was fortunately easier than I expected it might be. To finish up the “repair” of my development environment I did the following:
- Open Windows Azure SDK Environment command prompt
- Execute the command dsinit /sqlinstance:. /forcecreate /user:[windows account name]
Now you should have the needed database on the default instance and you should be able to debug your project successfully as the development storage should work again.
Comments
- Anonymous
December 04, 2013
Thank you so much. This post really helped.