GD - DB and BI Community

Microsoft Global Deilvery - Database and Business Intelligence Community posts

Publish SSDT project using command line

Publish SSDT project using command line

  • Comments 1
  • Likes

SqlPackage.exe is a command line utility that can be used to automate database deployment. You can read more about this utility at

SqlPackage.exe can be used along with publish profile to publish database in different environments.

Here is how my publish database profile looks like.

On execute the following command line, it will publish your database to the target server mentioned in the profile.

"C:\Program Files (x86)\Microsoft SQL Server\110\DAC\bin\SqlPackage.exe" /pr:"<Path>\SampleDB.publish.xml"

/sf:"<Path>\SampleDB\SampleDB\bin\Debug\SampleDB.dacpac" /a:Publish

If you make any changes to your database project a new build should be generated. 

  • Can the Generate Script be called using command line?

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment