how to create database project in visual studio 2010

In this step by step tutorial I will show you how to create database project in Visual Studio 2010. For the purpose of this tutorial I will use  Visual Studio 2010.

Let's start with explaning why you would want to create a SQL Server database project. Visual Studio has a template that allows you to store information about SQL Server objects in a centralized place and under TFS (version control) that allows you to build your database project in a controlled environment that is easy to share with other developers but the project allows much more than that. You can use to easily deploy changes to a server and it will perform schema comparison (based on settings you chose) which saves a lot of time when you want to prepare release scripts manually. Additionaly you use can use the database project to enforce certain company standards. There might be certain standards you cannot enforce but you can deploy the project to dev environment and use SQL Server policy-based management to ensure you comply with standards (for instance stored procedures start with usp_ and not system stored procedures sp_)

How to create database project

In Microsoft Visual Studio 2010 I select New Project option. See screenshot below (You can also use the menu).

create new database project

 

Once New Project window is selected I go to Install Templates and select Database, SQL Server, Advanced on the left side and on the right side I select SQL Server 2008 Database Project.

 

I type name of the database project and click ok

 

My new project is added and I can see it in solution explorer.

 

Soon I will add links on how to add tables to database project and how to deploy it. (If I forget use the search bar at the top).

 

Take care

Katie

Ready to learn more?