سؤال

I've got a question. I'm used to using Teamcity + Database project which was able to deploy the database to all of the DTAP servers. I loved the way that worked - it allowed me to deploy to production weekly within 2 minutes.

Now I'm working at a company where the process of deployment involves BATCH scripts and a bunch of alter scripts. Then there's a table that keeps track of which alter scripts where applied to the DB and based on that the DB is updated.

I've proposed to use the Database project with specific deployment configurations, but here's the problem: we're not allowed to access the Acceptance and Production servers. Since we cannot connect to those, we cannot deploy to those servers, NOR use the sql script generated by the database project since we cannot define the target DB.

Sure - we can get a backup of production, put it somewhere and create the script against that, but that's not really convenient.

My question is: is there an elegant way to solve this project, and use some option of the DB project I don't know about that creates a DB script without having to know the target DB ( IF EXISTS all the time perhaps ? ), or is it just BS that we don't have rights to access those servers and should we focus on convincing them to allow us access?

Thanks.

هل كانت مفيدة؟

المحلول

You can generate a dacpac and deploy this to your target database from SSMS or using the sqlpackage.exe command line.

http://msdn.microsoft.com/en-us/library/ee210546.aspx

This generates the deployment script dynamically at deployment time.

Out of interest, what is your motivation to use the database project deployment in favor of the existing batch script process?

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top