While developing for Windows Azure, I recently got lots of
StorageExceptions reading “(500) Internal Server Error.”.
After some googling I found an article that says I should switch to SQL Server Express. So far, so good. But how do I do this?
- Download SQL Server Express. (If you’re using Visual Studio, chances are that you’ve already installed SQL Server Express.) You may also want to down SQL Server Management Studio (same download link).
- Make sure SQL Server is running. Go to
All Programs -> Microsoft SQL Server 2012 -> Configuration Tools -> SQL Server Configuration Manager. Under
SQL Server Servicesmake sure
SQL Server (SQLEXPRESS)is running. (Otherwise start it by right-clicking on it and clicking on
SQL Server Management Studio.
Connect to Serverunder
Server Nameclick on the dropdown button and choose
<Browse for more...>. You can then select your local SQL server instance. It should by named like
Databaseslater something like
DevelopmentStorageDb22will appear, once we switched the development storage to SQL Sever.
All Programs -> Windows Azure SDK, right-click on
Windows Azure Storage command lineand choose
Run as administrator.
DSInit /sqlInstance:SQLEXPRESSand hit return. (More information on DSInit)
Update: The Azure Development Table Storage’s size seems to be limited to 4 GB (even though since SQL Server Express 2012 it should be 10 GB). You can see the size of your database (or of the
PRIMARY file group, to be more precise) in the database properties in SQL Server Configuration Manager:
As you can see in the image, my database is already full. (Initially the size is about 3 MB.) Once you get there, you’ll see error messages like these in your Development Storage logs:
Could not allocate space for object ‘dbo.TableRow’.’PK_dbo.TableRow’ in database ‘DevelopmentStorageDb22′ because the ‘PRIMARY’ filegroup is full. Create disk space by deleting unneeded files, dropping objects in the filegroup, adding additional files to the filegroup, or setting autogrowth on for existing files in the filegroup.
To “fix” this problem, you can only delete the database or delete Table Storage tables to decrease the database’s size.