One of the more difficult jobs that database professionals have to endure is maintaining installation and upgrade scripts for their databases from release to release. Many methods and tools are used such as loose SQL scripts run via SQLCMD or even writing a homegrown system to handle the creating and upgrading of databases. The biggest headaches are making sure dependencies among objects are observed so an install or upgrade does not fail and also to create scripts to update a database from a previous schema version to the latest. These processes are usually manual and they can be labor intensive. Unfortunately, this also means that they can be prone to error.
SQL Server Data Tools (SSDT) SQL Projects offer excellent functionality to relieve developers of the mundane, manual tasks involved with maintaining databases. If your company licenses Visual Studio 2010 or 2012 Professional or greater, you have the ability to create Visual Studio SSDT SQL Projects. With these projects, you can add your database objects and the Visual Studio engine will figure out for you the dependencies between objects as well as the differences between schemas and apply them which can mitigate some of the errors that can occur when working with scripts manually.
In this tutorial, we will examine the following steps in creating a SSDT SQL Project: