如何使用Visual Studio将Azure SQL备份(.bacpac)导入LocalDB? [英] How to import Azure SQL backup (.bacpac) to LocalDB using Visual Studio?

查看:127
本文介绍了如何使用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.

这篇关于如何使用Visual Studio将Azure SQL备份(.bacpac)导入LocalDB?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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