无法使用sqlpackage.exe将DACPAC发布到Azure SQL数据库 [英] Unable to publish DACPAC to Azure SQL Database using sqlpackage.exe

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

问题描述

当尝试将DACPAC应用于Azure SQL数据库时,我从sqlpackage.exe获取以下内容:

When trying to apply a DACPAC to an Azure SQL Database I'm getting the following from sqlpackage.exe:

***部署计划生成期间发生错误.部署无法继续. Element或Annotation类SqlDatabaseOptions不包含Property类CatalogCollat​​ion.

*** An error occurred during deployment plan generation. Deployment cannot continue. The Element or Annotation class SqlDatabaseOptions does not contain the Property class CatalogCollation.

我设法将VS2017与SSDT一起使用,以创建一个程序包,然后使用SQL Server Object Explorer将其部署到另一个数据库中,但是当我使用在

I've managed to use VS2017 with SSDT to create a package and then deploy it to another database using the SQL Server Object Explorer but it fails when I use sqlpackage.exe found in

C:\ Program Files(x86)\ Microsoft Visual Studio 14.0 \ Common7 \ IDE \ Extensions \ Microsoft \ SQLDB \ DAC \ 130

C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\SQLDB\DAC\130

Azure SQL数据库兼容性级别设置为140,所以我不确定SSDT(v 15.6.0)是否使用的是较新版本的sqlpacakage.exe,或者在哪里可以找到它?我还尝试从Azure SQL数据库部署VSTS任务运行它,并获得相同的结果.

The Azure SQL Database Compatibility Level is set to 140 so I'm not sure if SSDT (v 15.6.0) is using a more modern version of sqlpacakage.exe, or where I would find it? I've also tried to run it from the Azure SQL Database Deployment VSTS task and get the same result.

我尝试映射在此窗口中找到的命令行开关,但再次,我仍然遇到相同的错误.

I've tried mapping the command line switches found in this window but again, I still get the same error.

是否有我无法找到的SSDT正在使用的sqlpackage.exe版本,还是我缺少的参数?

Is there a version of sqlpackage.exe that SSDT is using that I can't find, or is it a parameter that I'm missing?

作为参考,这是我正在使用的命令:

For reference this is the command that I'm using:

C:\ Program Files(x86)\ Microsoft Visual Studio 14.0 \ Common7 \ IDE \ Extensions \ Microsoft \ SQLDB \ DAC \ 130> sqlpackage.exe/SourceFile:generated.dacpac"/Action:Publish/TargetServerName:" xxxxxxx.database.windows.net"/TargetDatabaseName:" xxxxxxx"/TargetUser:" xxxxxx"/TargetPassword:" xxxxxxx"/TargetTimeout:120

C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\SQLDB\DAC\130>sqlpackage.exe /SourceFile:"generated.dacpac" /Action:Publish /TargetServerName:"xxxxxxx.database.windows.net" /TargetDatabaseName:"xxxxxxx" /TargetUser:"xxxxxx" /TargetPassword:"xxxxxxx" /TargetTimeout:120

推荐答案

似乎您可能需要在计算机上更新Microsoft SQL Server数据层应用程序框架.请在此处下载最新版本.安装后,您将在以下路径C:\ Program Files(x86)\ Microsoft SQL Server \ 130 \ DAC \ bin \ SqlPackage.exe中找到它,并且独立于SSDT/SSMS进行更新.

It seems you may need to update Microsoft SQL Server Data-Tier Application Framework on your computer. Please download the latest version here. After installation, you will find it on the following path C:\Program Files (x86)\Microsoft SQL Server\130\DAC\bin\SqlPackage.exe" and updates independently of SSDT / SSMS.

SSMS具有自己的SqlPackage版本. SSDT也有其自己的版本,您可以在C:\ Program Files(x86)\ Microsoft Visual Studio 14.0 \ Common7 \ IDE \ Extensions \ Microsoft \ SQLDB \ DAC \ 130中找到.

SSMS has its own version of SqlPackage. SSDT has its own version also, which you may find at C:\Program Files (x86)\Microsoft Visual Studio 14.0\Common7\IDE\Extensions\Microsoft\SQLDB\DAC\130.

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

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