的dbDacFx提供商使用SQLCMD變量我試圖用dbDacFx提供商部署我dacpac文件來使用msdeploy。此數據庫項目使用名爲UserName的變量來創建登錄名和用戶等。此值需要在部署期間傳遞。與MsDeploy
,所以我做這樣的事情......
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"
,但我得到了以下的(順便說一句錯誤消息的網址不存在)
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.
怎麼看用戶SqlCmd變量與MSDeploy中的DbDacFx提供程序?
感謝
我想你的建議,但我得到以下錯誤代碼:ERROR_EXECUTING_METHOD 更多信息:無法部署包。 缺少以下SqlCmd變量的值:用戶名。 瞭解更多:http://go.microsoft.com/fwlink/?LinkId=221672#ERROR_EXECUTING_M ETHOD。 錯誤:無法部署軟件包。 錯誤:缺少以下SqlCmd變量的值:用戶名。 錯誤計數:1. –
我目前有嘗試上述修正後同樣的問題...你能找到一個解決? – misterManager