How to Publish Visual Studio Database Project in VS 2015

不打扰是莪最后的温柔 提交于 2019-12-22 02:24:19

问题


I was unable to google this.

We have an existing database project (sql server).

Some new files (scripts) were added.

We have an existing server / database where some new scripts need to be run into that context.

In Visual Studio 2015, how can I accomplish this?

I was told to stay inside Visual Studio 2015. Ideally, I'd like to issue one command vs one for each individual script.


回答1:


You have a couple of choices.

  1. The Publish option. This is a totally automated deployment of what's in the db project to the target server. Do this by right-clicking your project and selecting Publish. This option can be used to perform an incremental deployment (only the changes are deployed) or can be used to wipe a database clean followed by a full deployment of the db project, so check all options before performing publishing.
  2. Schema Comparisons. Schema comparisons perform a comparison of the db project to the target database, shows you the differences, and lets you select which differences to deploy. You can perform a schema comparison by adding a new Schema Compare file to your database project.

In short, the publish option allows automated brute force deployments whereas schema comparisons provide more flexibility by letting you choose which changes to deploy but cannot be automated.



来源:https://stackoverflow.com/questions/35165688/how-to-publish-visual-studio-database-project-in-vs-2015

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!