Have you seen this error before? If you’ve spent any time with the Windows Azure storage emulator it’s highly probable. Here’s the full text:

    Added reservation for http://127.0.0.1:10000/ in user account COMPUTERUser.
    Added reservation for http://127.0.0.1:10001/ in user account COMPUTERUser.
    Added reservation for http://127.0.0.1:10002/ in user account COMPUTERUser.

    Creating database DevelopmentStorageDb20110816...
    Cannot create database 'DevelopmentStorageDb20110816' : CREATE DATABASE permission
    denied in database 'master'.

    One or more initialization actions have failed. Resolve these errors before attempting
    to run the storage emulator again. These errors can occur if SQL Server was installed
    by someone other than the current user. Please refer to
    http://go.microsoft.com/fwlink/?LinkID=205140 for more details.

And an image of the error:

Development Storage initialization error

This error can occur when running the storage emulator (or running DSINIT.exe) for the first time. The compute emulator needs to initialize itself, which includes creating a local SQL Server database that is used to store data for local Windows Azure storage. The above error indicates that there’s a permissions when trying to create the database.

There are a number of ways to resolve this issue and, like others, I have my favorite approach. I have a script that I run which will add the executing user to the SQL Server sysadmin role.

I’ve published the entire script here: https://gist.github.com/1677788. Simply download and unzip the file. Open up an elevated command prompt and execute the file (i.e. run addselftosqlsysadmin.cmd). Once the script is executed the user can successfully initialize the storage emulator.

I hope this helps!

  • Pingback: Cannot create database ‘DevelopmentStorageDb20110816′ for the Windows Azure Storage Emulator | It's Me on the Cloud!

  • Rakesh Sehgal

    Works wonderfully! Thanks.

  • Anup Warade

    Worked great like charm…. Thanks a lot facing this issue since long back.

  • Munish

    Simply Great Great Great..

  • Joel Mendoza

    Great post, Thank you so much!

  • Monu Puniya

    Awesome i wasted my last 4 hours to resolve this issue. Thanks a lot :)

  • Prashanth B R

    Cool script!!

  • http://www.nachis.com Nachiappan

    thank you so much for the script. Its working like charm!!. Initially it was not working but after rebooting it worked!