问题
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