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. C语言复合梯形公式实现定积分

    假设被积函数为   f x ,积分区间为   , a b ,把区间   , a b 等分成 n 个小区间, 各个区间的长度为 h ,即   / h b a n   ,称之为“步长” ...

  2. 记录.net 中的常见术语

    --Entity Framework和NHibernate --EF和NH都是一种ORM技术.就是对象关系模型映射. --NHibernate和Entity Framework 4.0优劣势争论 -- ...

  3. Minix

    [1]  MINIX是一种基于微内核架构的类UNIX计算机操作系统,由Andrew S. Tanenbaum发明.MINIX最初发布于1987年,开放全部源代码给大学教学和研究工作.2000年重新改为 ...

  4. Mybatis的ResultMap的使用(转)

    本篇文章通过一个实际工作中遇到的例子开始吧: 工程使用Spring+Mybatis+Mysql开发.具体的业务逻辑很重,对象之间一层一层的嵌套.和数据库表对应的是大量的model类,而和前端交互的是V ...

  5. HDU 4957 Poor Mitsui

    题解:记答案为ans,已知,对一个确定的顺序,计算所用的时间长短就是从最后向前计算,计算方法如下: ans+=(p[i].b+ans*p[i].a)/(v-p[i].a) 那么,应该如何调整顺序使得答 ...

  6. Mysql 学习记录

    ( xampp 的mysql 与 直接用 dnf 安装的 mysql 有冲突! ) 1. 数据库基本知识: 一张表的行 又称为 记录 一张表的列 又称为 字段 表结构:所有字段,规定了你的每一条记录所 ...

  7. Linux2.6中的Slab层

          还记得一个进程创建的时候是什么给它分配的“进程描述符”吗?没错,是slab分配器,那么,这个slab分配器是个什么东西呢?       分配和释放数据结构是所有内核中最普遍的操作之一.为了 ...

  8. 【LINUX】SHELL syntax error:unexpected end of file

    解决思路: DOS下文件和Linux下文件格式差异问题导致的. DOS下的文本文件是以\r\n作为断行标志的,表示成十六进制就是0D 0A.而Unix下的文本文件是以\n作为断行标志的,表示成十六进制 ...

  9. 五毛的cocos2d-x学习笔记07-计时器、数据读写、文件读写

    调度器: 定时任务是通过调度器实现的.cocos2d-x推荐用调度器而不是其他方法实现定时任务.Node类都知道如何调度和取消调度事件. 有3种调度器: 默认调度器:schedulerUpdate() ...

  10. Bootstrap第一天

    1.代码引入: 第一步:在html5文档 <meta name="viewport" content="width=device-width, initial-sc ...