Why is my SqlPackage DeployReport returning an empty report?

我怕爱的太早我们不能终老 提交于 2019-12-11 02:55:39

问题


I'm trying to run a DeployReport action with SqlPackage.exe, but it is returning an empty report which I didn't expect since I've dropped several views and SProcs (it shows by running a Compare action in Visual Studio). According to the docs, DeployReport should

DeployReport: Creates an XML report of the changes that would be made by a publish action.

I'm using VS2012 against a 2008 R2 SQL server for the database project. Here's the command:

SqlPackage.exe /action:DeployReport /TargetDatabaseName:MyDb /TargetServerName:myServer /TargetUser:user /TargetPassword:password /SourceFile:c:\path\to\project\bin\Debug\project.dacpac

Here's the generated report:

<?xml version="1.0" encoding="utf-8"?><DeploymentReport xmlns="http://schemas.microsoft.com/sqlserver/dac/DeployReport/2012/02"><Alerts /></DeploymentReport>

回答1:


Try like this:

SqlPackage.exe /action:DeployReport /TargetConnectionString:"{connection string}" /SourceFile:"{dacpac file}" /OutputPath:"{output file}"


来源:https://stackoverflow.com/questions/21110955/why-is-my-sqlpackage-deployreport-returning-an-empty-report

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!