SSDT SQL project using Visual Studio 2012



We will now go over creating the initial SSDT SQL project using Visual Studio 2012


NOTE: This tutorial is working with Visual Studio 2012 and SQL Server 2014. The latest Visual Studio 2012 SSDT that supports SQL Server 2014 can be downloaded >here.

After starting Visual Studio 2012, create a new SQL project as follows:

Click on FILE->New->Project

New SSDT Project

You will be presented with the following New Project screen. The Name and Solution name will contain default values in them. You can change these as you see fit. Navigate down to Templates->Other Languages->SQL Server. In this tutorial, we'll be targeting SQL Server 2014 so we choose SQL Server Database Project as our project type. We're going to create a new project named FutBol and create a new solution called FutBol to house it. You can also choose, if you wish, the root Location on the server where you'd like to create files for the solution and project. After choosing the project type and entering the project and solution names, we click OK

SSDT SQL Project

Now that the solution and it's project has been built, The right hand side of the application should display a couple of new panes. The first will be the Solution Explorer where you can see the various support files that the project will use in building/upgrading a database. The second will be a Properties pane.

Solution Explorer

Clicking on the Properties folder within the Solution Explorer, there are several options for controlling Build and Publish behaviors. These editable options can control the behavior and final output of your database.

SSDT Properties

I'd like to point out 2 specific areas under Project Settings: Target Platform and Database Settings. The Target Platform you choose should be set to the lowest SQL Server version you're supporting. In the example above, it's set to SQL Server 2014. If I had a SQL Server 2012 instance I was supporting as well, I would set it to SQL Server 2012 which would support publishing to both SQL Server 2012 and SQL Server 2014. The Database Settings control various database specific options such as what collation you want to publish, SET options (i.e. SET ANSI_NULLS ON, etc.), and default Recovery Model.

Last Update: 7/22/2014

Comments For This Article


get free sql tips
agree to terms

Learn more about SQL Server tools