如何使用Visual Studio将Azure SQL备份(.bacpac)导入LocalDB?
我认为这将是一个主流方案,但是我找不到如何在 Visual Studio 2013 中将导出的Azure SQL数据库(.bacpac)导入到我的 LocalDB 中>.我是缺少什么还是Visual Studio缺少什么?
I imagine this would be quite a mainstream scenario but I can't find how to import an exported Azure SQL database (.bacpac) into my LocalDB in Visual Studio 2013. Am I missing something or Visual Studio missing something?
(注意:当有人拥有SQL Server Management Studio但我没有它时,这里有解决方案,如果可能的话,我宁愿不安装它.)
(Note: there are solutions here when one has SQL Server management studio but I don't have it and prefer not to install it, if possible.)
如果您的计算机上有此文件夹,则 C:\ Program Files(x86)\ Microsoft SQL Server \ 110 \ DAC \ bin 然后您可以运行以下命令来还原bacpac文件:
If you have this folder on your machine C:\Program Files (x86)\Microsoft SQL Server\110\DAC\bin then you can run this command to restore the bacpac file:
.\SqlPackage.exe /Action:Import /SourceFile:"c:\temp\your.bacpac" /TargetConnectionString:"Data Source=(localdb)\v11.0;Initial Catalog=devdb; Integrated Security=true;"
如果缺少该文件夹,则需要从Microsoft下载工具.
If that folder's missing you will need to download the tooling from Microsoft.