Azure存储模拟器无法使用“数据库'AzureStorageEmulatorDb57'不存在"进行初始化. [英] Azure Storage Emulator fails to init with "The database 'AzureStorageEmulatorDb57' does not exist"

查看:51
本文介绍了Azure存储模拟器无法使用“数据库'AzureStorageEmulatorDb57'不存在"进行初始化.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用Azure存储模拟器时遇到问题.我试图重新初始化数据库,并收到以下错误.

I am having an issue with Azure Storage Emulator. I tried to re-initialise the database and got the error below.

这是在安装Visual Studio 2019预览版之后,但这可能只是偶然的缘故.我尝试了一个小时左右的时间使其运行,然后放弃了,仅使用保留我的文件"选项重置了我的机器,重新安装了Visual Studio 2017和Azure工具,但仍然遇到相同的问题.

This was after installing Visual Studio 2019 Preview but this may just be a co-incidence. I tried for an hour or so to get it running and then gave up and just reset my machine with the "keep my files" option, re-installed Visual Studio 2017 and the Azure Tools but still see the same problem.

我知道重设听起来有些激烈,但是VS 2019在VS2017中破坏了我的Azure函数,因为它们无法启动,所以我希望进行全新安装.

I know a reset sounds a bit drastic but VS 2019 broke my Azure Functions in VS2017, they would not launch so I wanted a clean install.

如果我使用sqllocaldb create(版本13.1.4001.0)手动创建数据库,则可以很好地创建数据库,但是初始化仍然失败,并显示相同的消息.

If I manually create the DB with sqllocaldb create (version 13.1.4001.0), the DB gets created fine but the init still fails with the same message.

有什么想法吗?

C:\ Program Files(x86)\ Microsoft SDKs \ Azure \ Storage模拟器> AzureStorageEmulator.exe初始化Windows Azure存储模拟器5.7.0.0命令行工具找到了SQL实例(localdb)\ MSSQLLocalDB.在SQL实例'(localdb)\ MSSQLLocalDB'上创建数据库AzureStorageEmulatorDb57.无法创建数据库'AzureStorageEmulatorDb57':数据库'AzureStorageEmulatorDb57'不存在.提供有效的数据库名称.若要查看可用的数据库,请使用sys.databases.一项或多项初始化操作失败.解决这些错误,然后尝试再次运行存储模拟器.错误:无法创建数据库'AzureStorageEmulatorDb57':数据库'AzureStorageEmulatorDb57'不存在.提供有效的数据库名称.要查看可用的数据库,请使用sys.databases..

C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator>AzureStorageEmulator.exe init Windows Azure Storage Emulator 5.7.0.0 command line tool Found SQL Instance (localdb)\MSSQLLocalDB. Creating database AzureStorageEmulatorDb57 on SQL instance '(localdb)\MSSQLLocalDB'. Cannot create database 'AzureStorageEmulatorDb57' : The database 'AzureStorageEmulatorDb57' does not exist. Supply a valid database name. To see available databases, use sys.databases.. One or more initialization actions have failed. Resolve these errors before attempting to run the storage emulator again. Error: Cannot create database 'AzureStorageEmulatorDb57' : The database 'AzureStorageEmulatorDb57' does not exist. Supply a valid database name. To see available databases, use sys.databases..

推荐答案

  1. 如果Azure模拟器正在运行,请停止它.
  2. 打开SSMS并连接到您的(localdb)实例.
  3. 手动创建"AzureStorageEmulatorDb57".
  4. 以管理员身份打开命令提示符.
  5. 运行"AzureStorageEmulator.exe init".
  6. 运行VS项目.

这篇关于Azure存储模拟器无法使用“数据库'AzureStorageEmulatorDb57'不存在"进行初始化.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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