question

arielman2304-0180 avatar image
0 Votes"
arielman2304-0180 asked Cathyji-msft commented

Does the sqlpackage can generate a report in publish action?

I'm using sqlpackage for publish DB project from VS. Per the documentation, there is action for Publish and for DeployReport. It is possible to generate and save the report during the publish action? if I'll run it twice, it will take a lot of time from my CD job in jenkins


sql-server-general
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

1 Answer

Cathyji-msft avatar image
0 Votes"
Cathyji-msft answered Cathyji-msft commented

Hi @arielman2304-0180,

Welcome to Q&A forum.

It is possible to generate and save the report during the publish action?

No.

The Publish action is used to deploy a DACPAC file incrementally to the database server. If the database does not exist, then a new database will be created. However, if the database already exists, then the utility will compare the differences between the source (DACPAC) and the destination (SQL Server Database) and generate the necessary scripts to update the database.

The DeployReport action can be used to prepare an XML report that will list the changes that are going to be applied to a database once it is published.

When you run the cmd, the action type is different, they also have different function. You can not mix them together. And there is no parameter for generating report in publish action. Please refer to MS document SqlPackage Publish parameters, properties, and SQLCMD variables.


If the response is helpful, please click "Accept Answer" and upvote it, as this could help other community members looking for similar queries.
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


· 2
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Ok, but If I'm running DeployReport prior to Publish, can it somehow reduce the public action time?

0 Votes 0 ·

Hi @arielman2304-0180,

No, the DeployReport action is be executed after Publish action. The DeployReport action can be used to prepare an XML report that will list the changes that are going to be applied to a database once it is published.

0 Votes 0 ·