find a location for property in a new city

Thursday 10 November 2011

Cannot create database 'DevelopmentStorageDb20110816' in Storage Emulator Azure SDK

I have uncovered this problem before and this time I thought I would spend the time to crack it. When running the Storage Emulator from the Azure SDK or running DSINIT.exe for the first time it needs to initialise; part of this involves creating a new database. This was not running correctly due to a permissions problem which stated "Cannot create database 'DevelopmentStorageDb20110816' : CREATE DATABASE permission denied in database 'master'".

The full report is as follows:

Added reservation for http://127.0.0.1:10000/ in user account MSFT-123\MyUser.
Added reservation for http://127.0.0.1:10001/ in user account MSFT-123\MyUser.
Added reservation for http://127.0.0.1:10002/ in user account MSFT-123\MyUser.

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.

Grant permissions

The user this program is running as must be a sa with full permissions on the database. If this is not the case you can either change the user or GRANT permissions to the current user.

To change the user run the Windows Azure SDK Command Prompt (as administrator) and type 'DSINIT /?'. This will give you details on how to change user, which is to use the /user: argument.

Alternatively you could GRANT the permissions to your default user like so:

USE master
GRANT CREATE DATABASE TO "MYDOMAIN\MyUser"

Either of these solutions should solve your permissions problem with DSINIT.

Cannot GRANT permissions

Unfortunately my problems went further than this still. I believe this is to do with how many times I had installed a SQL Server Express in the past. How irritating is that?! You own the machine and yet you don't seem to have the permissions that reflect that!

Anyway, the solution to make this work once again was (unfortunately) to uninstall SQL Server Express and reinstall it again. This way you will be the owner of the SQL Server Express database engine and you will be able to create all the databases you wish, including your long awaited Storage Emulator database.

A better way to regain admin access

A better way to regain admin access was pointed out to me by a colleague, Michael Coates. You can either solve this loss of administrator on a SQL server by following this troubleshooting guide from MSDN (this worked for one commenter). Or you can run a batch script that will magically do it for you (this didn't work for one commenter). I have not done either of these so take this advice at your own risk. Remember, my way was to delete and reinstall the server so this cannot be more risky, surely?

Follow britishdev on Twitter

28 comments:

  1. The batch file solution didn't work for me. I followed this solution http://support.microsoft.com/kb/937682 and it worked perfectly though. Very easy, better to uninstall Sql server.

    ReplyDelete
  2. Qasat is a static analysis tool which is mainly based on the Android asset packaging. The tool disintegrates the Android package file (APK) into several components, through which the details of an application can be understood. This helps code reviewer to analyze the code easily. Proxy Server List

    ReplyDelete
  3. Fantastic Blog! I might want to thank for the endeavors you have made recorded as a hard copy of this post. I am trusting a similar best work from you later on too. I needed to thank you for these sites! A debt of gratitude is in order for sharing. Extraordinary sites!
    satta result
    gali satta
    disawar result
    satta matka
    satta king
    satta
    satta chart
    disawar satta result
    gali satta result
    gali result

    ReplyDelete
  4. Wholesale printed custom perfume boxes with the highest quality and affordable prices. Free worldwide Delivery and free Custom Perfume Boxes design.

    ReplyDelete
  5. Pacakaging town is a one stop solution for the short-run cbd tincture boxes needs and supplies. At affordable prices. Request a free quote now.

    ReplyDelete
  6. Packaging town is a one stop solution for the short-run tuck top boxes wholesale needs and supplies. At affordable prices. Request a free quote now.

    ReplyDelete
  7. Pacakaging town is a one stop solution for the short-run custom pillow boxes needs and supplies. At affordable prices. Request a free quote now.

    ReplyDelete
  8. Packaging town is a one stop solution for the short-run custom pillow boxes needs and supplies. At affordable prices. Request a free quote now.

    ReplyDelete
  9. Buy fashionable men's sweatshirts at Wild Goat. Shop the Latest Collection of Men's Summer and Winter Sweatshirts for men in Pakistan. Exclusive collection of Men's sweatshirts are available at Wild Goat. Shop the best quality and finest fabrics from Wild Goat. Style a classy look in Wild Goat's finest sweatshirts.

    ReplyDelete
  10. Buy fashionable men's sweatshirts at Wild Goat. Shop the Latest Collection of Men's Summer and Winter Sweatshirts in Pakistan. Exclusive collection of Men's sweatshirts are available at Wild Goat. Shop the best quality and finest fabrics from Wild Goat. Style a classy look in Wild Goat's finest sweatshirts.

    ReplyDelete
  11. buy lahore electronics from alfatah at best prices. Get free shipping

    ReplyDelete
  12. buy jogger pants online from wild goat clothing at best pricces. Get Free shipping

    ReplyDelete
  13. Shop for the leading trends in Men's Jogger and Sweat Pants. Buy the best quality Men's Jogger and Sweat Pants from Wild Goat. Shop for finest Men Jogger Pants, Sweat Pants and Trousers at affordable rates. Style your Gym Look in Wild Goat's Jogger and Sweat pants the way you want. Shipping available all across Pakistan.

    ReplyDelete
  14. Shop for the leading trends in Men's Jogger and Sweat Pants. Buy the best quality Men's Jogger and Sweat Pants from Wild Goat. Shop for finest Men Jogger Pants online, Sweat Pants and Trousers at affordable rates. Style your Gym Look in Wild Goat's Jogger and Sweat pants the way you want. Shipping available all across Pakistan.

    ReplyDelete
  15. Blackbird packaging provide you with any size, shape design,wholesale cookie boxes sooner than any other packaging competitor in the market

    ReplyDelete
  16. This post is very interested. I face many problems in database development. Moreover we provide best HOME INSPECTION Service Glastonbury . Our services are incredibly reasonable, and you will see that we have the best rates in all of the towns.

    ReplyDelete
  17. I understand this problem. when we running the Storage Emulator from the Azure SDK or running DSINIT.exe we face permission problem from database. You provide important information. If you are worried about gutter cleaning, we can solve your problem.
    Gutter Cleaning Services In Oakland Ca. Our expert team provide full quality work.

    ReplyDelete
  18. Now You can get best quality buy multivitamins online pakistan online from medisense where all kind of supplements and vitamins are available.

    ReplyDelete
  19. We do extra care for your babies. Buy best quality baby food in Pakistan at best prices from medisense. Order Now and enjoy free delivery at your doorstep.

    ReplyDelete
  20. Buy Good quality insulin price in Pakistan with affordable rates at your door step. Fast delivery.

    ReplyDelete
  21. Buy jogger pants men from ndure at best prices delivered at your doorstep. Get free shipping

    ReplyDelete
  22. Buy best quality sexual wellness products Pakistan from medisense at your door step. Fast delivery. Order Now!

    ReplyDelete
  23. Now You can get best quality multivitamins in Pakistan online from medisense where all kind of supplements and vitamins are available. Fast delivery. Order Now.

    ReplyDelete
  24. You provide information related to database development in detail. I found informative knowledge in this post. Moreover, We provide thee best Cabinet Refinishing in Manassas for homes and offices at a comfortable price.

    ReplyDelete
  25. Great post! Thank you for sharing informative post with us. Moreover, The iron works in Philadelphia present the best and unique door repairing work.

    ReplyDelete
  26. You provide the information related to creating database. I learn more through this post. Thank you for sharing post. Further, This time to take advantages of Local Real Estate Company in Coachella California for quality work.

    ReplyDelete
  27. Thank you for sharing informative post with us. You select a good topic for writing. You discuss related to database creation. This post is very helpful for Computer students. Further, If you want to get services of kitchen inspection and repairing then I suggest you to hire Kitchen Remodeling Services In Marysville for outstanding work.

    ReplyDelete
  28. The iron works Philadelphia provide the quality work under the professional team. Our aim to fulfill your desire requirements.

    ReplyDelete