How to Publish Visual Studio Database Project in V

2019-04-19 10:06发布

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条回答
我只想做你的唯一
2楼-- · 2019-04-19 10:25

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.

查看更多
登录 后发表回答