You can use the below command to implement it.

SET TargetDBName="Database name"
SET DataBaseServer="DB Server name"
SET DbProjectPath="database project folder" C:\Windows\Microsoft.NET\Framework\v4.0.30319\MSBuild.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)\MSBuild\Microsoft\VisualStudio\v10.0\SSDT\Microsoft.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:

稍后继续。。。

use MSBuild cmd to build and deploy the database project.的更多相关文章

  1. Using MSBuild to publish a VS 2012 SSDT .sqlproj database project

    http://blog.danskingdom.com/using-msbuild-to-publish-a-vs-2012-ssdt-sqlproj-database-project-the-sam ...

  2. this compilation unit is not on the build path of a java project

    在eclipse中新建maven project后,会自动生成main\test目录结构,新建一个测试类,然后编辑类文件时,总是提示错误:this compilation unit is not on ...

  3. 【eclipse】eclipse报错:the resource is not on the build path of a java project

    最近在eclipse中,使用svn导入svn上的一个maven项目,但是导入后类的包并没有以源码包的方式显示,而是以普通文件包的方式显示出来,在对类进行F3等操作时就报错:“the resource ...

  4. Failed to execute goal org.apache.tomcat.maven:tomcat7-maven-plugin:2.2:deploy (default-cli) on project Resource: Cannot invoke Tomcat manager: Connection refused: connect -> [Help 1]

    1.问题描述 在 DOS 下执行 tomcat7-maven-plugin 插件部署,启动 Apache Tomcat 服务报错如下: D:\2018\code\XXX>mvn tomcat7: ...

  5. [Windows Azure] How to Deploy a Database to Windows Azure

    How to Deploy a Database to Windows Azure There are several different ways you can move an on-premis ...

  6. 【问题记录系列】the resource is not on the build path of a java project

    在eclipse中新建了一个maven项目搭建Spring源码阅读环境,创建一个bean生产getter和setter方法的时候报错“the resource is not on the build ...

  7. MyEclipse中点击Deploy MyEclipse J2EE Project to Server无响应解决方法

    问题: MyEclipse中点击Deploy MyEclipse J2EE Project to Server无响应 解决方法: 如果工作空间的问题,那么需要删除你工作空间的一个文件就可以解决了.这个 ...

  8. Error-the resource is not on the build path of a java project

    错误描述 eclipse中的the resource is not on the build path of a java project,在Eclipse中点击生成源码时,弹窗提示该错误 解决办法 ...

  9. the resource is not on the build path of a java project错误

    在eclipse中,使用mavenimport了一个工程,但是在对某一个类进行F3/F4/ctrl+alt+H操作的时候报错:“the resource is not on the build pat ...

随机推荐

  1. codeforces 632F. Magic Matrix

    题目链接 给一个n*n的矩阵, 问是否对角线上的元素全都为0, a[i][j]是否等于a[j][i], a[i][j]是否小于等于max(a[i][k], a[j][k]), k为任意值. 前两个都好 ...

  2. codeforces 547B. Mike and Feet 单调栈

    题目链接 用单调栈计算出一个数字, 左边第一个比他小的数字的位置, 右边比第一个他小的数字的位置, 然后len = r[i] - l[i] +1. ans[len] = max(ans[len], a ...

  3. nyoj 228 士兵杀敌(五)

    题目: http://acm.nyist.net/JudgeOnline/problem.php?pid=228 由于该题一开始是进行士兵军功增加,最后才是查找士兵的军功总和,使用一个数组,进行延迟更 ...

  4. Android Memory/Resource Leak总结

    Android的内存/资源泄露,不容易发现,又会引发app甚至是system的一系列问题. 在这里我根据以往碰到的相关问题,总结出了一些检测和修改方法. *有可能造成memory leak的代码是Fr ...

  5. Mac 键盘快捷键

    标签页和窗口快捷键 ⌘-N 打开新窗口. ⌘-T 打开新标签页. ⌘-Shift-N 在隐身模式下打开新窗口. 按 ⌘-O,然后选择文件. 在 Google Chrome 浏览器中打开计算机中的文件. ...

  6. JSP打印九九乘法表

    ##index.jsp: <%@ page language="java" import="java.util.*" pageEncoding=" ...

  7. 使用COCOS2D-X JSB开发,在js页面中设置iOS键盘模式

    XYSDK.h void setKeyboardType(int type); XYSDK.cpp voidXYSDK::setKeyboardType(int type) { #if (CC_TAR ...

  8. IronJs 无相关源?

    在工作中用到了IronJs  一切正常 就是 在启动项目的时候 报错说无相关源,将取消引用之后 就可以正常运行 如果不取消引用需要重新启动~ 是这个样子滴~ 说明: 在编译向该请求提供服务所需资源的过 ...

  9. webservice跨域上传图片

    1.上传文件,在一般处理程序中处理 //1.接收post过来的文件 HttpPostedFile file = context.Request.Files[]; || file.ContentLeng ...

  10. Objective-c 数组对象

    首先我们必须知道数组的概念:数组是有序的对象集合,一般情况下,一个数组的对象都是相同类型的.数组当中也存在可变数组和不可变数组. 1. 不可变数组 (NSArray) 可变数组 NSMutable 是 ...