简体   繁体   English

使用msdeploy将SQLCMD变量传递给dbDacFx提供程序

[英]pass SQLCMD variables to dbDacFx provider with msdeploy

I'm currently using msdeploy's dbDacFx provider to deploy a .dacpac to a database. 我目前正在使用msdeploy的dbDacFx提供程序将.dacpac部署到数据库。 The dacpac expects three SQLCMD variables. dacpac需要三个SQLCMD变量。 The syntax I am using looks like this: 我使用的语法如下所示:

-setParam:kind=SqlCommandVariable,scope=Database.dacpac,match=foo1,value="foo1 value"

I've been trying everything I can find but unfortunately there is next to no documentation around this process. 我一直在尝试我能找到的所有东西但不幸的是,这个过程旁边没有任何文档。 The output I am getting from msdeploy says Missing values for the following SqlCmd variables: foo1 foo2 foo3 . 我从msdeploy获得的输出表示Missing values for the following SqlCmd variables: foo1 foo2 foo3

If anybody can spot what I'm doing wrong that would be fantastic. 如果有人能够发现我做错了什么就会很棒。 If anybody knows where to get some documentation that would be fantastic as well. 如果有人知道在哪里获得一些非常棒的文档。 I would gladly accept any answers that say what I should do, but I would love to understand what all of these values are and WHY I'm doing it wrong. 我很乐意接受任何说明我应该做什么的答案,但我很想知道所有这些价值观是什么以及为什么我做错了。

Edit: At this point it would appear that such an option does not exist for dbDacFx. 编辑:此时似乎dbDacFx不存在这样的选项。 Our use case for this feature is attempting to deploy the same template database (managed in visual studio sql projects) to 70+ databases, which we would like to do in parallel. 我们对此功能的使用案例是尝试将相同的模板数据库(在visual studio sql项目中管理)部署到70多个数据库,我们希望这些数据库并行执行。 dbSqlPackage (besides being deprecated) is not thread safe and does not allow for parallel deployments. dbSqlPackage(除了被弃用)不是线程安全的,不允许并行部署。 dbDacFx overcomes this shortcoming however it cannot (in my experimentation) be passed SqlCmdVariables that reside at the project level, and it cannot use publish profiles like dbSqlPackage can. dbDacFx克服了这个缺点,但它不能(在我的实验中)传递驻留在项目级别的SqlCmdVariables,并且它不能使用像dbSqlPackage这样的发布配置文件。 I'm in contact with a member of the web deploy team and will post any updates if I am able to figure out how to overcome any of these shortcomings. 我正在与网络部署团队的成员联系,如果我能够弄清楚如何克服任何这些缺点,我将发布任何更新。

在向MSDeploy团队发送电子邮件给某些Microsoft员工之后......事实证明这是不可能的,但可能会考虑将来的版本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM