0

We're using Azure SDK 2.3, for team work we hope to use the same stored data of Azure Storage Emulator, so is this possible?

Suppose we have a center machine, which has a running SQL Server instance, our developers can config the storage emulator to store data on that same database:

C:\Program Files (x86)\Microsoft SDKs\Windows Azure\Storage Emulator>wastorageemulator init -server MyServerName -forcecreate -inprocess

And although it said I have no permission to create database, the database indeed was created successfully:

Windows Azure Storage Emulator 3.0.0.0 command line tool
Added reservation for http://127.0.0.1:10000/ in user account DomainName\UserName.
Added reservation for http://127.0.0.1:10001/ in user account DomainName\UserName.
Added reservation for http://127.0.0.1:10002/ in user account DomainName\UserName.

Attempting to use server specified.
User specified an instance through /server or /sqlInstance options.
Probing SQL Instance: 'MyServerName'.
Found SQL Instance MyServerName.
Creating database WAStorageEmulatorDb30 on SQL instance 'MyServerName'.

Granting database access to user DomainName\UserName.
Cannot create database 'WAStorageEmulatorDb30' : User does not have permission t
o perform this action..
One or more initialization actions have failed. Resolve these errors before atte
mpting to run the storage emulator again.
Error: Cannot create database 'WAStorageEmulatorDb30' : User does not have permi
ssion to perform this action..

And now when I run Storage Emulator, it would store the data to remote server database WAStorageEmulatorDb30, even if above said I did't get it.

But question is, if other developer run same command, it would drop/create the same database on that server, and it seems later one would take the owner role of that database, so when I run my Storage Emulator now, it would switch to local automatically, which means we cannot share the same database for our Storage Emulator.

So for team work, it is very annoying. We hope we can do enough test locally, not rely on the cloud, in other words, we need to share the same storage.

Anyone met this issue in real work? Thanks a lot.

3
  • 1
    Are you planning to use blobs? If so the database is one thing, but you need to worry about the files themselves. Apr 17, 2014 at 14:42
  • @LukkhaCoder You're right, the database only store the path of these files, they are placed at my local AppData folder. Huh, it seems I cannot fully host Storage Emulator to remote server, what a pity.
    – Jerry Bian
    Apr 18, 2014 at 1:58
  • I am glad my comment helped. A upvote will really help my reputation. Apr 18, 2014 at 2:38

1 Answer 1

0

Because storage emulator is really suited for local development only, I have not really tried what you're trying to accomplish but I believe if you issue the storage emulator initialization command without -forcecreate parameter, the database is not dropped and all entries are preserved. I just tried that and I was able to see older records in my storage emulator.

So the command you may want to try is:

C:\Program Files (x86)\Microsoft SDKs\Windows Azure\Storage Emulator>wastorageemulator init -server MyServerName -inprocess

Please give it a try and see if that solves your problem.

7
  • I've tried to remove -forcecreate option, it seems other developer could not init emulator to server database anymore. So no official documents say whether we can totally move emulator to use remote SQL Server?
    – Jerry Bian
    Apr 18, 2014 at 2:01
  • Sorry, my bad! I only tried it from my PC. Let me try it in a networked environment and get back to you. Apr 18, 2014 at 2:44
  • I just tried it and unfortunately that didn't work. I was able to connect to the database (though its another story that I was not able to find that database on that server) and was able to create tables and blob containers. Then I asked one of my team members to initialize storage emulator by connecting to the remote SQL Server. The initialization went fine however he was not able to see the tables I created. Also I was not able to see the tables created by this team member of mine. Apr 18, 2014 at 7:24
  • huh, so maybe it's not possible currently. Only thing we can do is waiting for Microsoft to add this feature.
    – Jerry Bian
    Apr 18, 2014 at 8:31
  • You may want to post this idea here: feedback.azure.com/forums/34192--general-feedback. Apr 18, 2014 at 8:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.