添加VS 2015 SDK后Azure存储模拟器失败 [英] Azure Storage Emulator fails after adding VS 2015 SDK

查看:64
本文介绍了添加VS 2015 SDK后Azure存储模拟器失败的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经安装了适用于VS2013的Azure SDK 2.5和工具,并且可以正常工作了一段时间.今天,我安装了VS2015的SDK和工具,现在我的Azure存储模拟器无法启动.在第一次尝试启动它时,我遇到了SqlException:

I've had the Azure SDK 2.5 and Tools for VS2013 installed and working fine for quite a while. Today I installed the SDK and Tools for VS2015 and now my Azure Storage Emulator won't start up. On the first try to start it I got a SqlException:

Unhandled Exception: System.Data.SqlClient.SqlException:
An error occurred while processing the log for database If possible,
restore from backup. If a backup is not available, it might be
necessary to rebuild the log.

重新启动计算机后,出现一个较小的错误:

After rebooting the machine, I'm getting a lesser error:

C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator>WAStorageEmulator start Windows Azure Storage Emulator
3.4.0.0 command line tool Error: The storage emulator needs to be initialized. Please run the 'init' command.

但是运行init无效:

But running init doesn't work:

C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator>WAStorageEmulator init Windows Azure Storage Emulator 3.4.0.0 command line tool Error: Cannot create database.

以-inprocess开头表示我的登录失败.我是计算机的管理员,所以很奇怪.

Starting with -inprocess says my login in failing. I'm an admin on the machine so this is odd.

C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator>WAStorageEmulator start -inprocess
Windows Azure Storage Emulator 3.4.0.0 command line tool
Cannot open database "WAStorageEmulatorDb34" requested by the login. The login failed.
Login failed for user 'DOMAIN\genslow'.
3/24/2015 10:00:57 AM [Info] Starting Service: Blob
3/24/2015 10:00:57 AM [Verbose_debug] [Nephos.Storage] { Initialize
3/24/2015 10:00:57 AM [Info_debug] Loading config Param NephosAllowPathStyleUris (Allow path-style URIs) read: true
3/24/2015 10:00:57 AM [Info_debug] Successfully loaded NephosAllowPathStyleUris: True
3/24/2015 10:00:57 AM [Info_debug] Loading config Param NephosIncludeInternalDetailsInErrorResponses (Include internal details in error responses) read: false
3/24/2015 10:00:57 AM [Info_debug] Successfully loaded NephosIncludeInternalDetailsInErrorResponses: False
3/24/2015 10:00:57 AM [Info_debug] Loading config Param StampName (Stamp Name) read: StorageEmulator
3/24/2015 10:00:57 AM [Info_debug] BlockBlob: Load Interval failed. IsGC: True, Exception    at System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt)
   at Microsoft.WindowsAzure.DevelopmentStorage.Store.BlockBlobGarbageCollector.GetTimerIntervalOrDefault(Boolean isGC)
3/24/2015 10:00:57 AM [Info_debug] BlockBlob: Load Interval failed. IsGC: False, Exception    at System.Number.ParseDouble(String value, NumberStyles options, NumberFormatInfo numfmt)
   at Microsoft.WindowsAzure.DevelopmentStorage.Store.BlockBlobGarbageCollector.GetTimerIntervalOrDefault(Boolean isGC)
3/24/2015 10:00:57 AM [Verbose_debug] [Nephos.Storage] } Initialize
Service Status: Blob http://127.0.0.1:10000/ True
3/24/2015 10:00:57 AM [Info] Starting Service: Queue
3/24/2015 10:00:57 AM [Verbose_debug] [Nephos.Queue] { Initialize
3/24/2015 10:00:57 AM [Info_debug] Loading config Param NephosAllowPathStyleUris (Allow path-style URIs) read: true
3/24/2015 10:00:57 AM [Info_debug] Successfully loaded NephosAllowPathStyleUris: True
3/24/2015 10:00:57 AM [Info_debug] Loading config Param NephosIncludeInternalDetailsInErrorResponses (Include internal details in error responses) read: false
3/24/2015 10:00:57 AM [Info_debug] Successfully loaded NephosIncludeInternalDetailsInErrorResponses: False
3/24/2015 10:00:57 AM [Info_debug] Loading config Param StampName (Stamp Name) read: StorageEmulator
3/24/2015 10:00:57 AM [Verbose_debug] [DevelopmentStorage.Queue] } Initialize
Service Status: Queue http://127.0.0.1:10001/ True
3/24/2015 10:00:57 AM [Info] Starting Service: Table
3/24/2015 10:00:57 AM [Verbose_debug] [Nephos.Table] { Initialize
3/24/2015 10:00:57 AM [Info_debug] Loading config Param NephosAllowPathStyleUris (Allow path-style URIs) read: true
3/24/2015 10:00:57 AM [Info_debug] Successfully loaded NephosAllowPathStyleUris: True
3/24/2015 10:00:57 AM [Info_debug] Loading config Param NephosIncludeInternalDetailsInErrorResponses (Include internal details in error responses) read: false
3/24/2015 10:00:57 AM [Info_debug] Successfully loaded NephosIncludeInternalDetailsInErrorResponses: False
3/24/2015 10:00:57 AM [Info_debug] Loading config Param StampName (Stamp Name) read: StorageEmulator
3/24/2015 10:00:57 AM [Info] NOT using custom threadpool for blocking calls
Service Status: Table http://127.0.0.1:10002/ True

使用-inprocess运行init会给出以下详细信息:

Running init with -inprocess gives the following detail:

C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator>WAStorageEmulator init -inprocess
Windows Azure Storage Emulator 3.4.0.0 command line tool
Added reservation for http://127.0.0.1:10000/ in user account DOMAIN\genslow.
Added reservation for http://127.0.0.1:10001/ in user account DOMAIN\genslow.
Added reservation for http://127.0.0.1:10002/ in user account DOMAIN\genslow.

Found SQL Instance (localdb)\MSSQLLocalDB.

Creating database WAStorageEmulatorDb34 on SQL instance '(localdb)\MSSQLLocalDB'.
Cannot create database 'WAStorageEmulatorDb34' : Database 'WAStorageEmulatorDb34' already exists. Choose a different database name..
One or more initialization actions have failed. Resolve these errors before attempting to run the storage emulator again.
Error: Cannot create database 'WAStorageEmulatorDb34' : Database 'WAStorageEmulatorDb34' already exists. Choose a different database name..

那么无论如何要从中恢复,还是我应该卸载所有内容并重新开始?

So is there anyway to recover from this or should I uninstall everything and start over?

推荐答案

您可以使用以下过程从涉及数据库的大多数初始化问题中恢复.请注意,仿真器中的所有当前数据都将丢失.

You can use the following process to recover from most init problems involving the database. Note that any data in the emulator currently will be lost.

删除SQL实例:

sqllocaldb stop MSSQLLocalDB
sqllocaldb delete MSSQLLocalDB

现在删除以下数据库文件:

Now delete the following database files:

%USERPROFILE%\AzureStorageEmulatorDb*.mdf
%USERPROFILE%\AzureStorageEmulatorDb*.ldf

最后,重新创建sql实例:

Finally, recreate the sql instance:

sqllocaldb start MSSQLLocalDB

然后重试模拟器init.

Then retry the emulator init.

这篇关于添加VS 2015 SDK后Azure存储模拟器失败的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆