Share via


Publish SSDT project using command line

SqlPackage.exe is a command line utility that can be used to automate database deployment. You can read more about this utility at https://msdn.microsoft.com/en-us/library/hh550080(v=VS.103).aspx.

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.

Comments

  • Anonymous
    December 06, 2013
    The comment has been removed
  • Anonymous
    July 28, 2014
    The comment has been removed
  • Anonymous
    February 07, 2015
    The comment has been removed