1
votes

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 deployment. I only need a merge script to drop and create my stored proc because the database is handle by DBA.

Any idea?

1

1 Answers

1
votes

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.