4

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>
Anton
  • 1,346
  • 11
  • 31

1 Answers1

4

Try like this:

SqlPackage.exe /action:DeployReport /TargetConnectionString:"{connection string}" /SourceFile:"{dacpac file}" /OutputPath:"{output file}"
Otake
  • 874
  • 3
  • 8
  • 21
  • I tried this suggestion as well, but getting the same result: https://stackoverflow.com/questions/67956360/sqlpackage-deployreport-generate-empty-xml – arielma Jun 13 '21 at 08:53