我正在尝试使用 SqlPackage.exe 运行 DeployReport 操作,但它返回了一个空报告,这是我没想到的,因为我已经删除了几个 View 和 SProc(它通过在 Visual Studio 中运行比较操作来显示)。
根据docs , DeployReport 应该
DeployReport: Creates an XML report of the changes that would be made by a publish action.
我将 VS2012 用于数据库项目的 2008 R2 SQL 服务器。
这是命令:
SqlPackage.exe /action:DeployReport /TargetDatabaseName:MyDb /TargetServerName:myServer /TargetUser:user /TargetPassword:password /SourceFile:c:\path\to\project\bin\Debug\project.dacpac
这是生成的报告:
<?xml version="1.0" encoding="utf-8"?><DeploymentReport xmlns="http://schemas.microsoft.com/sqlserver/dac/DeployReport/2012/02"><Alerts /></DeploymentReport>
最佳答案
像这样尝试:
SqlPackage.exe /action:DeployReport /TargetConnectionString:"{connection string}" /SourceFile:"{dacpac file}" /OutputPath:"{output file}"
关于visual-studio-2012 - 为什么我的 SqlPackage DeployReport 返回空报告?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/21110955/