SSDT - 跟踪来自 DACPAC 部署的数据库更改 [英] SSDT - Track database changes from DACPAC deployment

查看:33
本文介绍了SSDT - 跟踪来自 DACPAC 部署的数据库更改的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 Visual Studio 2017 和 TFS 2015 创建 SSDT 项目并通过 TFS 部署 DACPAC.

I'm using Visual Studio 2017 and TFS 2015 to create an SSDT project and deploy the DACPAC via TFS.

如果我通过发布配置文件在 Visual Studio 中测试项目,我可以在消息"选项卡中查看对目标数据库的所有更改(例如删除表等).

If I test the project in Visual Studio by publishing a profile, I'm able to view all the changes to the destination database (ex. Dropping Tables, etc) in the "Messages" tab.

当我通过 TFS 发布 DACPAC 时,我没有看到相同类型的输出.部署开始和完成时有时间戳,但没有关于数据库中实际修改内容的信息.

I'm not seeing that same kind of output when I publish the DACPAC through TFS. There are timestamps when Deployment has started and finished, but no information on what is actually modified in the database.

有什么地方可以查看发布 DACPAC 时发生的数据库更改日志吗?

Is there anywhere I can view a log of database changes that occurred when a DACPAC was published?

编辑:我正在 TFS 发布管理中使用 WinRM - SQL Server 数据库部署任务来部署 DACPAC.

EDIT: I'm using a WinRM - SQL Server DB Deployment task in TFS Release Management to deploy the DACPAC.

推荐答案

您可以添加一个命令行 任务以使用 SqlPackage.exe 工具来生成差异报告数据库.语法是:

You could add a command line task to use SqlPackage.exe tool to generate a difference report between database. The syntax is:

/Action:DeployReport /SourceFile:$dacpac-path /TargetConnectionString:$constr /OutputPath:$reportoutputfilepath

有用的链接:

这篇关于SSDT - 跟踪来自 DACPAC 部署的数据库更改的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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