I would like to generate a diff file based on the database vs DACPAC comparison. Currently what I am doing is extracting DACPAC from the target database and trying to create a diff file based on that (I am not sure if the DACPAC extraction is the needed step). Everything is OK until the moment when I am trying to use the same config I am using for publishing (to make sure that I am generating the script with the same configuration as I am publishing) using the following command:

"C:\Program Files (x86)\Microsoft SQL Server\130\DAC\bin\sqlpackage.exe"  
/a:Script /sf:F:\tmp\o.dacpac /tf:F:\tmp\n.dacpac /tdn:ScreenerDb  
/p:SqlPublishProfilePath="F:\TMap\Root\Application\Dev\Database\Financials.SQL\Financials.SQL\Publish Configs\Financials.SQL_Dev.publish.xml"

I am getting the following error:

'SqlPublishProfilePath' is not a valid argument for the 'Script' action.

To be fair, I am just trying to achieve following:

  • Create a diff file based on the DB DACPAC and the real database using the same configuration as for publishing.

How can I achieve this?


Per the documentation, use /Profile instead of /p:SqlPublishProfilePath:

Parameter: /Profile
Specifies the file path to a DAC Publish Profile. The profile defines a collection of properties and variables to use when generating outputs

So this should work:

/Profile: "F:\TMap\Root\Application\Dev\Database\Financials.SQL\Financials.SQL\Publish Configs\Financials.SQL_Dev.publish.xml"

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.