In this post, The flavor of this DevOps series is SQL Server 🙂 I will start my new DevOps series writing about automate build and deployment of Azure SQL Database with Continuous Integration and Continuous Deployment.

One of key benefits of developing database with SSDT is you can easily integrate Application Lifecycle Management (ALM) practices to database development. You can develop and manage your database in source control such as Git, automate build with continuous integration and orchestrate releases with continuous deployment.

In this series , I will walk through a series of end-to-end scenarios of continuous integration and deployment. After playing through these scenarios, you will have a complete build and deployment automation setup for your Azure SQL Database from where you can venture into more advanced techniques. For simplicity I will use Visual Studio Team Services and Azure so that you can enable the whole practice in a few minutes without writing any complex script or code.

Part 1. Prerequisite for Azure SQL Database Build and Deployment Automation

Let’s start.

Download and install Visual Studio 2015 with the latest update.

Download and install SQL Server Data Tools with the latest update.

Create Team Project in Azure if you don’t have one yet.

  • Login to https://portal.azure.com
  • Click + NEW >> Developer Services >> Team Project to create a new team project.
  • Create a Team Services account if you don’t have one.
  • Select Git for Version Control.
  • Enable Pin to dashboard checkbox for easy access.
  • Click Create button.

team project

Once the provisioning is complete, go to your team project on the portal and click Open in Visual Studio.

open in vs

It will start Visual Studio and connect VS to your team project.

Team Explorer will ask you to install Git tools if not installed already and clone repository. Simply follow the instructions in the Visual Studio UI.

clone repo

Let’s create a database project that will be your Azure SQL Database.

Create a new VS solution with SQL Server Database Project by clicking New… under Solutions section in Team Explorer, and selecting SQL Server in the templates list.

Double-click to open the solution.

create new solution1

Go to Solution Explorer >> Project settings.

Change Target platform to Microsoft Azure SQL Database V12 on the database project settings page.

Save the change.

change project target

Click Team Explorer >> Changes.

Click Commit and Sync to check in the database project to both local Git repository and your team project.

commit and sync

Open team project web portal by clicking Team Explorer >> Home >> Project | Web Portal.

This is your main workplace to setup build and deployment automation.

web portal

Go to Code on the main menu. Your database project should be checked in like shown below.

You have completed the one-time software and account setup and created an empty database project that we can play with in this tutorial.

source control

in the next post, we will start with Part 2 to learn how to enable build automation on your database.

Stay Tuned 😉