问题描述
我想用dbDacFx提供商部署我dacpac文件中使用msdeploy。该数据库项目使用名为变量用户名创建登录名和用户等,这个值需要在部署时被传递。
I am trying to use msdeploy using dbDacFx provider to deploy my dacpac file. This database project uses a variable named UserName to create logins and users etc. Value for this needs to be passed during deployment time.
让我做这样的事情......
So i am doing something like ...
msdeploy.exe -verb:Sync -Source:dbDacFx="c:\dev\pmwuiservices\trunk\Build\database\Database.dacpac"-dest:dbDacFx="Data Source=localhost;Integrated Security=True;Database=UIConfig", -setParam:Kind=SqlCommandVariable,scope=dbDacFx,match=UserName,value="IIS AppPool\ASP.NET V4.0"
但我得到了以下的(顺便提一句的网址错误消息不存在)
but i get the following ( and by the way the url in the error message does not exist)
Info: Adding MSDeploy.dbDacFx (MSDeploy.dbDacFx).
Info: Adding database (data source=localhost;integrated security=True;database=U
IConfig)
Info: Creating deployment plan: Pending.
Info: Verifying deployment plan: Pending.
Info: Deploying package to database: Pending.
Info: Creating deployment plan: Running.
Info: Initializing deployment (Start)
Info: Initializing deployment (Failed)
Info: Creating deployment plan: Faulted.
Info: Verifying deployment plan: Faulted.
Info: Deploying package to database: Faulted.
Error Code: ERROR_EXECUTING_METHOD
More Information: Could not deploy package.
Missing values for the following SqlCmd variables:UserName.
Learn more at: http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_EXECUTING_M
ETHOD.
Error: Could not deploy package.
Error: Missing values for the following SqlCmd variables:UserName.
Error count: 1.
如何能够在一个用户在MSDeploy SQLCMD与DbDacFx提供商的变量?
how can one user SqlCmd variables with DbDacFx provider in MSDeploy ?
感谢
推荐答案
我会证明我得到同样的错误。艾哈迈德Elsayed的文章http://www.iis.net/learn/publish/using-web-deploy/dbdacfx-provider-for-incremental-database-publishing,除了有令人震惊的错别字,不涉及SQLCMD变量两种。我个人无法找到真正的参照像人们所通常期望,如之一的。此外,我发现不明原因的轶事和寓言的变化-setParam:善良和-setParam:类型。而且不文档进行备份,而无需实际可行的解决方案,但它似乎范围可以是一个的文件名的(普通前pression)。话虽如此,我也看到了部分片段由作者的定义范围,为的提供的哪一个指定的参数。理查德的东西,在过去的工作对我来说,让我很舒服前进他的建议。
I will confirm that I get the same error. Ahmed Elsayed's article http://www.iis.net/learn/publish/using-web-deploy/dbdacfx-provider-for-incremental-database-publishing, aside from having egregious typos, doesn't address sqlcmd variables either. I personally couldn't find the "real" reference like one would normally expect, such as the one for dbSqlPackage. Furthermore, I found unexplained anecdotal and allegorical variation between "-setParam:kind" and "-setParam:type". Again without documentation to back it up and without having an actual working solution, it does appear that scope can be a filename (regular expression). That said, I've also seen partial snippets by which the authors are defining scope as the provider to which one assigns the parameter. Richard's stuff has worked for me in the past, so am I comfortable moving forward with his suggestion.
这篇关于使用SQLCMD变量MsDeploy的dbDacFx供应商的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!