You can use the below command to implement it.
SET TargetDBName="Database name" SET DataBaseServer="DB Server name" SET DbProjectPath="database project folder" C:WindowsMicrosoft.NETFrameworkv4.0.30319MSBuild.exe /t:Deploy /p:TargetDatabase=%TargetDBName%;TargetConnectionString="Data Source=%DataBaseServer%;User ID=XXX;Password=XXX;Pooling=False" "%DbProjectPath%DataBaseProjectName.sqlproj"
You may need to add a user on the DB server. Then you can connect the database server with it.
The problem that you may come accross.
Problem 1: error MSB4019: The imported project "C:Program Files(x86)MSBuildMicrosoftVisualStudiov10.0SSDTMicrosoft.Data.Tools.Schema.SqlTasks.targets" was not found. Confirm that the path in the <Import> declaration is correc
t, and that the file exists on disk.
Solution1:
Solution2:
Problem2: Could not load file or assembly 'Microsoft.Data.Tools.Components, Version=10.3.0.0' or one of its dependencies
Solution1:
稍后继续。。。