database-project

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

杀马特。学长 韩版系。学妹 提交于 2019-12-04 22:20:13
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 while I'm developing. In VS2012 and up, you can set the Default Publish Profile by right-clicking on the .xml profile file and clicking the Set As Default Publish Profile option. It will then be auto-loaded when you click to Publish the project. So I've just discovered how to do this, right click on the specific .xml file (e.g. Debug.publish.xml) that

Visual Studio Database Project and SQL Azure

时光怂恿深爱的人放手 提交于 2019-12-04 17:09:35
问题 I'm really struggling with the best approach for managing a SQL Azure database which is based on a Visual Studio 2010 Database Project. I figured it would be easy enough to use VSDBCMD to create diff scripts for upgrades and then simply run against SQL Azure in SSMS. However, I get the dreaded "The target database schema provider could not be determined. Deployment cannot continue." error. At this point I'm just assuming either SQL Azure doesn't support something in VSDBCMD or vice versa and

Creation of default data in Visual Studio database projects / SQL Server

拈花ヽ惹草 提交于 2019-12-04 08:16:40
Are there way to using data generation plans in VS 2010's database projects to create a set of default data? Or am I barking up the wrong tree i.e. are data generation plans best suited to create dummy example data? We have a bunch of data (default settings, default users etc etc) that needs to be created for each database deployment. It would be nice to have tooling to help us with this, so it can be source controlled and better managed. I'm guessing that there are probably third party alternatives, but I'm hoping there is a built-in Visual-Studio-Way of doing things, so it can integrate

Getting MSBuild and CruiseControl .NET to build and deploy VS2010 database projects

孤街浪徒 提交于 2019-12-04 06:15:35
I almost have a NAnt script together that will build and deploy VS2010 database projects, but one error stands in my way: C:\Program Files (x86)\MSBuild\Microsoft\VisualStudio\v10.0\TeamData\Microsoft.Data.Schema.TSqlTasks.targets(56,5): error MSB4062: The "SqlBuildTask" task could not be loaded from the assembly Microsoft.Data.Schema.Tasks.Sql, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a. Could not load file or assembly 'Microsoft.Data.Schema.Tasks.Sql, Version=10.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a' or one of its dependencies. The system cannot find

Why does my DB project's .dbmdl file change even when I make no changes to the project?

梦想与她 提交于 2019-12-04 02:57:45
问题 I'm running into a small but weird annoyance that seems to be happening to other people, too (for example, check out the revision history of SEDE). I have a SQL Server 2008 database project in Visual Studio 2010 that works properly. When I go to commit/checkin to source control, I'm told that my DB project's .dbmdl file has changed , even when I've made no changes to the project! I'm not sure if the changes are triggered by building my solution (which also includes an ASP.NET MVC application

Case sensitivity and database projects

久未见 提交于 2019-12-04 02:05:16
I created a schema in our SQL Server 2012 database called [Auth] . Then tables and triggers were created as well. Later I was informed that the schema naming standard is lowercase, so it should be [auth] . I renamed the schema in the database project, and all related references. However, the Schema Compare feature doesn't detect the difference, and isn't renaming the schema. This affects our Entity Framework objects, as they should be 'auth' . Is there a way to make the database project see a case change as a change, and update the database? There is an option in the project settings called

Database schema compare options in Visual Studio 2013 - where to set global options?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-04 01:00:18
I'm just in the middle of migrating my solutions from Visual Studio 2010 to Visual Studio 2013. I have this (maybe) silly problem with database comparisons options. I would like to exclude certain object types from comparison globally so that I don't have to do this every time. In Visual Studio 2010 those options were available in Tools -> Options -> Database Tools -> Schema Compare. I cannot find anything corresponding in Visual Studio 2013. There isn't a corresponding option with the SSDT framework (what replaced DB Projects). The best you can do is save your schema compare, then include it

How can I script the deployment of a Visual Studio database project?

血红的双手。 提交于 2019-12-03 15:15:27
How can I script the deployment of a Visual Studio database project? I have a DB project in visual studio and I would like to use it in order to deploy on remote machines via a script. I notice that when I 'deploy' from visual studio, it generates a .sql file. I intercepted this file and tried running it from the command line with osql.exe, but I didn't have any success. Should this work, is there a better way to deploy a database programatically from a database project, may be by referencing in another project and calling some method to deploy it? MSBuild /target:SQLBuild MyProjectName.dbproj

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

时光总嘲笑我的痴心妄想 提交于 2019-12-03 12:05:55
问题 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 schema is through the SQL Server Mangement Studio -- basically, I have a copy of the deployed DB project and make my schema changes to that so there isn't a chance of corrupting my personal development environment. However, when I'd like to move my

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

戏子无情 提交于 2019-12-03 11:02:59
问题 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 directly as opposed to the designer, I constantly am switching to make the T-SQL pane the top-most editor in order to work with the object. Unfortunately, VS does not remember this preference, so each and every time I work with a table I must change to