Azure 存储模拟器无法初始化
Azure storage emulator unable to initialize
我已将 Azure 存储模拟器从 2.3 升级到 2.4。 WAStorageEmulator.exe 已重命名为 AzureStorageEmulator.exe 但这不是问题。
当我运行
AzureStorageEmulator init -forcecreate
我只是得到一个错误 Google returns zero 结果:
Error: User-specified instance not found. Please correct this and re-run initial
ization.
编辑
我必须启动和停止,然后才能启动。因为我安装了以前版本的模拟器,所以我的本地 SQL 服务器实例上已经有 WAStorageEmulatorDb34。在我执行 运行 init 命令后,我可以看到 没有新的数据库被创建 (比如 WAStorageEmulatorDb42).
所以我认为最新版本可能正在使用旧数据库。然后我 运行 在 MSSMS 中查询以检查现有的 blob 容器,我仍然可以看到我在旧模拟器上创建的两个容器,其中包含我添加的 blob。
当我随后访问 Visual Studio 中的 Development Azure Storage 时,它显示没有任何容器。所以新版本显然不使用旧数据库。 但是哪一个? 它在哪里?
好的,所以我想我会 运行 再初始化一次,但使用额外的参数将数据库放在我的 SQL 服务器实例上:
AzureStorageEmulator init -server localhost -sqlinstance MSSQLSERVER -forcecreate
然后我得到了上述错误。再次...
我正在 运行宁 CMD 作为具有提升权限的管理员。
最终有效的解决方案
Additional info
Azure Storage Emulator normally creates tables in the LocalDB storage. Depending on the emulator version these may be in various DB instances. You can check each storage emulator version's configuration in
%USERPROFILE%\AppData\Local\[AzureStorageEmulatorFolder]\*.config
Different versions have different folder names from DevelopmentStorage, WAStorageEmulator to latest (4.2) AzureStorageEmulator.
In this subfolder you'll find at least one config file that will correspond to your installed Azure storage emulator's version. If you open it, you'll see how it's configured and where it saved its tables. This is also true if you create initialization on any existing full SQL server instance.
当我尝试初始化我的 Azure 存储模拟器 (ASE) 时出现的问题是我还提供了 SQL 服务器的实例,这是默认实例 (MSSQLSERVER)。我一开始就不应该提供这些信息,而应该只提供有关服务器的信息
所以正确的命令行调用是
AzureStorageEmulator init -server localhost -forcecreate
这在我的本地 SQL 服务器上创建了我的数据库。从这里开始,如何从现有的 ASE 数据库(如果您之前已有)迁移到新的数据库将取决于您。
我 运行 遇到的问题或多或少是用户错误。
Azure 存储模拟器 4.6
Error : User-specified instance not found. Please correct this and
re-run initialization.
和
Resolution : I didn't have a windows authenticated login to my local
sql instance.
我已将 Azure 存储模拟器从 2.3 升级到 2.4。 WAStorageEmulator.exe 已重命名为 AzureStorageEmulator.exe 但这不是问题。
当我运行
AzureStorageEmulator init -forcecreate
我只是得到一个错误 Google returns zero 结果:
Error: User-specified instance not found. Please correct this and re-run initial ization.
编辑
我必须启动和停止,然后才能启动。因为我安装了以前版本的模拟器,所以我的本地 SQL 服务器实例上已经有 WAStorageEmulatorDb34。在我执行 运行 init 命令后,我可以看到 没有新的数据库被创建 (比如 WAStorageEmulatorDb42).
所以我认为最新版本可能正在使用旧数据库。然后我 运行 在 MSSMS 中查询以检查现有的 blob 容器,我仍然可以看到我在旧模拟器上创建的两个容器,其中包含我添加的 blob。
当我随后访问 Visual Studio 中的 Development Azure Storage 时,它显示没有任何容器。所以新版本显然不使用旧数据库。 但是哪一个? 它在哪里?
好的,所以我想我会 运行 再初始化一次,但使用额外的参数将数据库放在我的 SQL 服务器实例上:
AzureStorageEmulator init -server localhost -sqlinstance MSSQLSERVER -forcecreate
然后我得到了上述错误。再次...
我正在 运行宁 CMD 作为具有提升权限的管理员。
最终有效的解决方案
Additional info
Azure Storage Emulator normally creates tables in the LocalDB storage. Depending on the emulator version these may be in various DB instances. You can check each storage emulator version's configuration in
%USERPROFILE%\AppData\Local\[AzureStorageEmulatorFolder]\*.config
Different versions have different folder names from DevelopmentStorage, WAStorageEmulator to latest (4.2) AzureStorageEmulator.
In this subfolder you'll find at least one config file that will correspond to your installed Azure storage emulator's version. If you open it, you'll see how it's configured and where it saved its tables. This is also true if you create initialization on any existing full SQL server instance.
当我尝试初始化我的 Azure 存储模拟器 (ASE) 时出现的问题是我还提供了 SQL 服务器的实例,这是默认实例 (MSSQLSERVER)。我一开始就不应该提供这些信息,而应该只提供有关服务器的信息
所以正确的命令行调用是
AzureStorageEmulator init -server localhost -forcecreate
这在我的本地 SQL 服务器上创建了我的数据库。从这里开始,如何从现有的 ASE 数据库(如果您之前已有)迁移到新的数据库将取决于您。
我 运行 遇到的问题或多或少是用户错误。
Azure 存储模拟器 4.6
Error : User-specified instance not found. Please correct this and re-run initialization.
和
Resolution : I didn't have a windows authenticated login to my local sql instance.