为什么我的 SqlPackage DeployReport 返回空报告? [英] Why is my SqlPackage DeployReport returning an empty report?

查看:27
本文介绍了为什么我的 SqlPackage DeployReport 返回空报告?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用 SqlPackage.exe 运行 DeployReport 操作,但它返回了一个空报告,这是我没有预料到的,因为我已经删除了多个视图和 SProc(它通过在 Visual Studio 中运行比较操作来显示)).根据 docs,DeployReport 应该

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:针对发布操作将进行的更改创建 XML 报告.

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

我将 VS2012 用于数据库项目的 2008 R2 SQL 服务器.指令如下:

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

这是生成的报告:

<?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}"

这篇关于为什么我的 SqlPackage DeployReport 返回空报告?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆