December 17, 2013 Leave a comment
To deploy to your several environments (DEV, INT, TEST, PRE-PROD, PROD), it’s very easy, you don’t need to install SSDT. Just create a folder with SqlPackage.exe and its dll needed :
1- Create Folder on the target Server (INT, TEST…) -> C:\SSDT\
2- Initialize your environment copying files in the 2 folowing folders from your machine to the created folder in previous step (C:\SSDT\) . If these folders don’t exist on your dev machine, you have to install SSDT.
* C:\Program Files (x86)\Microsoft SQL Server\110\DAC\bin
3- Now, you can use the SqlPackage.exe command from the target Server to deploy/publish your database (*.dacpac file)
C:\SSDT\SqlPackage.exe /Action:Publish /SourceFile:”YourBuildOutputFolder\YourFileName.dacpac” /Profile:”YourBuildOutputFolder\YourFileName.Publish.xml” /tdn:YourDatabaseName /variables:MyVar1=”value1″ /variables:MyVar2=”Value2″