Release management process for database
Database deployments are notoriously tricky. Luckily, we have some great tools available to ease the pain! I will show how to use Release Management to manage database deployments but first let's talk about using SSDT to manage database.
Step 1: Use SSDT to manage databases
Traditionally, database changes are handled via SQL scripts. When a developer needs to change the database schema, they write a little SQL script and (if we're lucky!) put it into source control. Then, when it's time to deploy the new code, someone (sometimes a developer, sometimes a DBA) runs the script. This quickly gets hard to manage, because we end up having to ask a lot of questions:
- What database scripts should be run for this deployment?
- What order should the database scripts be run in?
- Who should be running them?
- When should they be running them?
- Are the database scripts able to be safely run multiple times?
When you build a SSDT project, SSDT will generate a file containing your database schema - a DACPAC - and allow you to publish it. Publishing a DACPAC results in your DACPAC's schema being compared to your database's schema, and automatically generates a SQL script containing the necessary SQL statements to make your database match up with your DACPAC schema. It's very configurable, so you can make sure it only automatically does the actions that you want it to!
Okay, so we've solved the problem of how to manage our database schema... we'll use SSDT! But now the question of how to publish our database schema is looming. Well, if you've read my previous blog posts, you probably already know what I'm going to say: Use Release Management for Visual Studio!
Let's start by looking at my application's database. You can see that it's just another project in my web application's solution, so it will build a DACPAC for me whenever I build all the other pieces of my application.
Now I want to deploy this DACPAC whenever I release my website. Let's look at how we can use Release Management to do that.
For the "Source" setting, we can choose "Builds with Application", and we can set our package path to the root of the build drop folder. Since the Release Template we're going to be deploying is already tied to my automated build that generates the DACPAC and my website, all of the details of where the DACPAC is going to come from is already handled for us.
You might also like
Peoples Bark News Berkeleyby johnvance
Celebrate Black History and Womyn's Herstory every day!
PRUNE the SHRUB! ILLEGITIMATE SONOFABUSH!
These ARE available buttons/stickers - check out how to get em' at
our website! all news flashes to firstname.lastname@example.org for publication.
'THERE IS NO WAY TO PEACE, PEACE IS THE WAY'
If you believe that Peoples Bark News Berkeley is an invaluable
contribution and an asset to the community, please consider making a
donation. We are not tax-deductible. Make checks out to:
john vance, c/o A First Amendment Center and mail to:
A First Amendment Center
PO Box 4851
Berkeley, Ca 94704
Peoples Bark News Berkeley
A First Amendment Center
Berkeley, Ca (510) 287-9406
Software Release Methodology
Book (Prentice Hall)
Shielding names of police, prosecutors in online tax records divides lawmakers — WRAL.com
Paul Stam, R-Wake, said counties would spend millions of dollars managing databases where some names were out in the open and others weren't. "This idea that you can have two different sets of records electronically – one at the courthouse and the ..
Architecture and Patterns for IT Service Management, Resource Planning, and Governance: Making Shoes for the Cobbler's Children, Second Edition
Book (Morgan Kaufmann)
Customizing Materials Management Processes in SAP ERP Operations: Learn how to apply the power of SAP MM with your own business processes.
Book (SAP PRESS)
Fukushima Accident: Radioactivity Impact on the Environment
Payware Transact Premier (Includes Store & Forward, Report, Settlement, Terminal and BIN Management)