![](/img/trans.png)
[英]How to configure Web role on Azure Compute Emulator to work like local IIS (static URL)
[英]How to Configure Azure Storage Emulator to work with local SQLServer
我正在嘗試使用Local SQL server 2012配置Azure存儲模擬器2.4。
執行此命令時,無法創建數據庫。
C:\Program Files (x86)\Microsoft SDKs\Azure\Storage Emulator>WAStorageEmulator.exe init -server ThisPC -sqlinstance SQLEXPRESS -forcecreate
Windows Azure Storage Emulator 3.3.0.0 command line tool
Error: Cannot create database.
到我的Sql Sever Manager我使用服務器名稱ThisPC \\ SQLEXPRESS登錄。
請幫我告訴我錯過了哪些信息。
- - - - - - - - - 更新 - - - - - - - - -
C:\\Program Files (x86)\\Microsoft SDKs\\Azure\\Storage Emulator>WAStorageEmulator.exe init -server (local)\\SQLExpress -forcecreate
Windows Azure存儲模擬器3.3.0.0命令行工具錯誤:無法創建數據庫。
如果查看AppData \\ Local \\ WAStorageEmulator \\ WAStorageEmulator.3.3.config,您將找到:
<SQLInstance>(local)\SQLExpress</SQLInstance>
感謝Gaurav提醒我日志,我檢查了我的事件查看器:
無法創建文件'C:\\ Program Files \\ Microsoft SQL Server \\ MSSQL10.SQLEXPRESS \\ MSSQL \\ DATA \\ WAStorageEmulatorDb33.mdf',因為該文件已存在
它說SQL DB文件存在,因此刪除了該文件並重試了該命令,工作正常,並且存儲模擬器也已啟動。 (命令在一段時間后第二次嘗試可能是某些SQL緩存問題)
我想基於OP的帖子/評論中的信息提出一個答案,這些信息來自未來的讀者,經過一些搜索后會到達這里。
這很容易,並且實際上相關的主要信息是您必須首先刪除位於以下位置的現有數據庫文件:
C:\\用戶\\\\ WAStorageEmulatorDb33.mdf
然后,您可以重新初始化仿真器。 因此,運行Azure存儲模擬器並使用所需的SQL實例對其進行初始化:
WAStorageEmulator.exe init -server(本地)\\ SQLExpress
可能出錯的事情:
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.