Questions tagged [database-project]

Visual Studio Database Projects allow developers to create, manage, update, and deploy databases with the same development tools and processes as any other source code project.

A Visual Studio Database Project is a standard project Visual Studio project type that gives database developers the same level of integration with the development process as other source code project type. Different versions of Visual Studio has included different levels of support for database projects and database development.

Visual Studio 2005 introduced a project type called a "database project", which was primarily a collection of SQL scripts. There was no build or deployment support for this project. It did have source control integration and permitted execution of scripts directly against a referenced connection. This type of project is considered obsolete, and is no longer provided with Visual Studio.

Visual Studio 2008 Database Edition GDR introduced a new project, also called a "database project", to replace the previous project type. This new project type, a dbproj, behaved more like a source code project, in that it supported refactoring, code analysis, and had explicit build and deployment support within Visual Studio. Visual Studio 2010 included this project as its sole form of database project.

Visual Studio 11 includes a newer form of the database project, called a SQL Server Data Tools or SSDT project. (SSDT projects are also available as an add-on to Visual Studio 2010). These sqlproj projects are similar to VS2010 database projects, but provide better integration into the Visual Studio IDE, support SQL Azure deployment, and provide a new connected Object Explorer experience within Visual Studio.

This tag is appropriate for questions on any of these database project types, or the Visual Studio tools that are used to manage them (such as vsdbcmd).

631 questions
296
votes
1 answer

What is the function of the DBMDL File in VS database project

What is the function of the DBMDL file in a visual studio database project?
Jet Basrawi
  • 3,185
  • 2
  • 15
  • 14
263
votes
2 answers

Visual Studio 2015 Database Project directory contains a file with extension jfm

Assuming we have a database project called MyDatabase then a file called MyDatabase.jfm appears in the root of the project directory. It is exclusively locked while the project is open in Visual Studio It is a binary file It has only started…
74
votes
16 answers

Visual Studio 2013: Database Project MSBuild error

I've got a database project as part of my solution in Visual Studio 2013. Been working perfectly for the last 3 weeks and now suddenly today it won't build and so I cannot publish any changes. I'm getting an MSBuild error: "C:\Program Files …
GooseZA
  • 1,015
  • 1
  • 10
  • 19
62
votes
4 answers

How to properly manage database deployment with SSDT and Visual Studio 2012 Database Projects?

I'm in the research phase trying to adopt 2012 Database Projects on an existing small project. I'm a C# developer, not a DBA, so I'm not particularly fluent with best practices. I've been searching google and stackoverflow for a few hours now but I…
57
votes
4 answers

VS2013 Database Project fails to build

I created a new SQL Server Database Project in VS2013 (Update 3) and attempted to build but it fails. The only build output I receive follows: ------ Build started: Project: Database1, Configuration: Debug Any CPU ------ Creating a model to…
chief7
  • 14,263
  • 14
  • 47
  • 80
50
votes
12 answers

Update target button is disabled after schema comparison

I have created database project using VS 2012. Once the schema comparison is done, the update target button should be enabled to sync with target, but it's not getting enabled. How can I fix this? I'm using VS 2012 with SP 3, SQL Server 2012,
Aruna
  • 1,962
  • 4
  • 25
  • 50
44
votes
2 answers

VS2012 Post-Deployment script referring to several other scripts

I have created a database project in VS2012. I added database structure. It works fine to publish and compare database. Now on publish I want to automatically load several tables with default data. I created five script files with INSERT statements…
Jakob Lithner
  • 4,225
  • 6
  • 38
  • 59
43
votes
8 answers

Visual Studio database project fails to publish, no error messages

I have several database projects in the same solution. They all fail to publish. My Visual Studio version is Enterprise 2015. My SQL Server version is 12.0.4459.0. The projects used to publish correctly on my machine. They publish correctly on…
Giles Roberts
  • 6,407
  • 6
  • 48
  • 63
40
votes
5 answers

Visual Studio 2013 database project drop column

Does anyone know the best way to drop an existing column from the database when there are rows of data in the datatable. What I tried doesn't seem to want to work. I included a pre deployment script in with the database project that does GO if…
DRobertE
  • 3,478
  • 3
  • 26
  • 43
37
votes
6 answers

'Incorrect SET Options' Error When Building Database Project

We are using Visual Studio and a database project to generate our database. I just made a number of database changes (including adding a new table named Correspondence) imported those changes into the database project, and attempted to deploy…
Jonathan Wood
  • 65,341
  • 71
  • 269
  • 466
29
votes
2 answers

SSDT Schema Compare add blank lines to the schema files

I am using Schema Compare feature in Visual Studio 2017 to compare a database with database project (.sqlproj). If I apply some changes to the project it also adds blank lines to some of the schema files. After some investigation I found that I'm…
29
votes
1 answer

Default to the T-SQL Pane view within Visual Studio 2012 Database Project

When working with a Database Project in Visual Studio 2012, VS defaults to the "Design-View" pane when you add or edit a table. While you can work in split-screen mode, the T-SQL pane defaults to the bottom pane. As I prefer to work with T-SQL…
26
votes
4 answers

Visual Studio 2012 - Database Project - setting a default profile for publish

Just wondering if anyone knows how to set a saved publish profile as the default i.e. profile that's automatically loaded when I select publish. I love the new profile approach but I'm a bit over having to reselect the same profile over and over…
Rob
  • 10,004
  • 5
  • 61
  • 91
25
votes
1 answer

Re-Importing/Updating a SQL Server database project after I modify the DB in Mgmt Studio

My team is working with a .NET 2008 DB Project in their solution so we have some way to persist the schema between machines and through development and keep things consistent. My preferred way of changing the database and keeping track of said…
Bryan A
  • 3,598
  • 1
  • 23
  • 29
25
votes
4 answers

Best practice to populate static data using a Visual Studio 2010 database project?

How do you populate your database with static, source-controlled data using a Visual Studio database project? I have tried all three strategies below, finding each one to be progressively better than the last. I am using but not completely satisfied…
Tim Partridge
  • 3,365
  • 1
  • 42
  • 52
1
2 3
42 43