使用 SqlPackage.exe 将 DACPAC 发布到 SQL Server 2014? [英] Publish DACPAC to SQL Server 2014 using SqlPackage.exe?

查看:38
本文介绍了使用 SqlPackage.exe 将 DACPAC 发布到 SQL Server 2014?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用 SQL Server Data Tools 安装的 SqlPackage.exe 成功地将 DACPAC 发布到 SQL Server 2008-2012 实例(通常位于 C:\Program Files (x86)\Microsoft SQL Server\110\DAC\bin).但是,在尝试使用相同的 SqlPackage.exe 将面向 2014 年的 DACPAC 发布到 SQL Server 2014 实例时,我得到以下信息:

I've been successfully publishing DACPACs to SQL Server 2008-2012 instances using SqlPackage.exe, as installed by SQL Server Data Tools (and typically found in C:\Program Files (x86)\Microsoft SQL Server\110\DAC\bin). However, in attempting to publish a 2014-targeted DACPAC to a SQL Server 2014 instance using this same SqlPackage.exe, I get the following:

*** Could not deploy package.
Internal Error. The database platform service with type Microsoft.Data.Tools.
Schema.Sql.Sql120DatabaseSchemaProvider is not valid. You must make sure the
service is loaded, or you must provide the full type name of a valid database
platform service.

我找到的关于此的信息很少;我发现的最接近的是 问题 发布到 Azure.

I've found minimal info regarding this; the closest I have found is was a problem publishing to Azure.

我一直在更新 SSDT 补丁,但我猜测我拥有的 SqlPackage.exe(显示 11.0.2902.0 版本)根本不兼容.我可以使用 Visual Studio 2012 的 Publish 命令发布到同一个实例,因此实例本身似乎不是问题.

I've kept up to date with SSDT patches but would guess that the SqlPackage.exe I have (which shows an 11.0.2902.0 version) is simply incompatible. I am able to publish to this same instance using Visual Studio 2012's Publish command so the instance itself does not seem to be the issue.

是否有更新版本的 SqlPackage 可以支持将 2014 DACPAC 发布到 2014 服务器?或者另一种可编写脚本的方式来做到这一点?

Is there a newer version of SqlPackage available that would support publishing a 2014 DACPAC to a 2014 server? Or another scriptable way to do this?

推荐答案

是的,有一个支持 SQL Server 2005-2016 的新版本可用,它安装到与以前(SQL Server 2012 及更低版本)版本不同的位置.事实上,您将拥有不同的安装位置,具体取决于您是仅使用 SSDT,还是将其作为 SSMS 或独立安装程序的一部分进行安装.

Yes, there is a new version supporting SQL Server 2005-2016 available and it installs into a different location than the previous (SQL Server 2012 and lower) version. In fact, you'll have different install locations depending on if you just use SSDT or if you install it as part of SSMS or the standalone installer.

  • SSDT 在最新版本的 Visual Studio 中安装 Dac DLL.这是为了避免需要全部更新以使用最新代码的并行问题(Visual Studio 2012 与 2013 与 SSMS).

  • SSDT installs the Dac DLLs inside Visual Studio in the latest releases. This is to avoid side by side issues (Visual Studio 2012 vs 2013 vs SSMS) that required all to be updated to use the latest code.

  • 如果您已更新到最新的 SSDT,您会发现 SqlPackage.exe 和VS 安装目录\Common7\IDE\Extensions\Microsoft\SQLDB\DAC\130 中的相关 DLL.对于 VS2013,VS 安装目录为 C:\Program Files (x86)\Microsoft Visual Studio 12.0,VS2015 为 14.0.
  • If you have updated to the latest SSDT, you'll find SqlPackage.exe and the related DLLs in the VS Install Directory\Common7\IDE\Extensions\Microsoft\SQLDB\DAC\130. For VS2013 the VS install directory is C:\Program Files (x86)\Microsoft Visual Studio 12.0, and it's 14.0 for VS2015.

SQL Server Management Studio (SSMS) 和独立的 Dac Framework MSI 都安装到系统范围的位置.这是C:\Program Files (x86)\Microsoft SQL Server\130\Dac\bin.

SQL Server Management Studio (SSMS) and the standalone Dac Framework MSI both install to the system-wide location. This is C:\Program Files (x86)\Microsoft SQL Server\130\Dac\bin.

这篇关于使用 SqlPackage.exe 将 DACPAC 发布到 SQL Server 2014?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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