使用SqlPackage和DropObjectsNotInSource和DoNotDropUsers进行SQL Dacpac部署 [英] SQL Dacpac Deploy using SqlPackage and DropObjectsNotInSource with DoNotDropUsers

查看:97
本文介绍了使用SqlPackage和DropObjectsNotInSource和DoNotDropUsers进行SQL Dacpac部署的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在我的CI构建中运行SqlPackage,以部署dacpacs并使用/ Profile开关传递publish.xml文件。我在配置文件中设置了以下三个选项:

I am running SqlPackage in my CI build to deploy dacpacs and pass in a publish.xml file using the /Profile switch. I have the following three options set in the profile:

<DropObjectsNotInSource>True</DropObjectsNotInSource>
<DoNotDropPermissions>True</DoNotDropPermissions>
<DoNotDropUsers>True</DoNotDropUsers>

但是,当我运行dacpac部署时,它仍然尝试删除用户。有任何想法吗?

However when I run the dacpac deploy it still tries to drop my users. Any ideas?

推荐答案

SqlPackage.exe处理发布配置文件中存在一个(不幸的)错误,该错误中的DoNotDrop和Exclude选项不兑现。即将发布的SqlPackage.exe版本中将修复此问题。同时,您是否尝试过使用此SqlPackage.exe命令行参数?

There is (unfortunately) a bug in SqlPackage.exe's handling of publish profiles, whereby the DoNotDrop and Exclude options are not honored. This will be fixed in an upcoming version of SqlPackage.exe. In the meantime have you tried using this SqlPackage.exe command line argument?

/p:DoNotDropObjectTypes=Permissions;Users

这篇关于使用SqlPackage和DropObjectsNotInSource和DoNotDropUsers进行SQL Dacpac部署的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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