开发者

VS2010 Database Project Deployment issue

开发者 https://www.devze.com 2023-03-31 14:23 出处:网络
I used a partial database project to hold my stored proc. When I use the deploy action in VS2010, it generates a SQL script containing all my stored proc to be deployed.

I used a partial database project to hold my stored proc. When I use the deploy action in VS2010, it generates a SQL script containing all my stored proc to be deployed.

However, the script also contain a Drop/Create Database instruction I can't remove, even if I suppress the "Always create database" options in the .sqldeployment file.

I don't want to use the schema compare and synced for depl开发者_StackOverflow社区oyment. I only need a merge script to drop and create my stored proc because the database is handle by DBA.

Any idea?


I had the same issue and I found the solution is to go to the Properties/Deploy tab where you need to specify the "Target connection". If you don't, the "Always re-create database" option is ignored and the deployment script will always contain drop and create database.

Make sure that the "Deployment action" is set to "Create a deployment script" and that the "Always re-create database" option in Deployment configuration file is not ticked.

When you hit "Deploy", it will create merge script with your stored procedures without drop/create database.

0

精彩评论

暂无评论...
验证码 换一张
取 消