database-project

In Visual Studio, change the keyboard to use an F key for "execute sql"

In Visual Studio 2010, I have a Database Project. I can use this without issue to view, edit, create sprocs, etc. How can I change the keyboard to allow me to use an F key for "execute sql" as I would use F5 in MSSMS. I can't seem to find the right binding sequence in Tools-Options-Keyboards and figured it would be faster to ask the com...

Is there a way in a visual studio database project to exclude certain object during deployment?

I have a scenario where I am using a visual studio 2010 database project to deploy changes to multiple database installations, but on certain ones I want to exclude a set of views from that copy. Is there a way using build configurations to exclude these views from being deployed? ...

Why are schema capitalizations inconsistent in Visual Studio database projects?

So I've run into a somewhat maddening bug (perhaps) with Visual Studio database projects, specifically in 2010 Ultimate. Basically, let's say I have two .schema.sql files, like so: File 1 CREATE SCHEMA [Test] GO File2 CREATE SCHEMA [AuditTest] GO This compiles down and is deployed as: PRINT N'Creating [AuditTest]...'; GO CREAT...

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

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...

Visual Studio 2010 Macro to delete SQL files from a database project

I've discovered that in Visual Studio 2010 Professional it is possible to refresh the database for a SQL Server Database Project (This feature is normally only available to the Premium and Ultimate versions). All you need to do is delete all the SQL files from the "Schema Objects" folder (but leave the folder structure intact) and the "...

Automating Database Project Deployment

I'm using the method outlined in this question to automate the database deploy with Hudson. When I deploy the project from within Visual Studio, everything works fine and it updates the target database. When it runs in Hudson, I get this warning: "Deploy warning TSD01266: The source's object [DBName] is different than the target's vers...

Is there a table designer for VS2010 database project?

Am I missing something here? It seems that the only options to create a new table in a database project in VS2010 is: Create a table object as a file, then create all constraints (defaults) as separate files, then create each index as a separate file, and primary key as a separate file and on and on... Or Create the entire table schem...

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? ...

Database first database projects

Hi Allm I have been working on a new project for a little while and already have the Database in sqlServer2008. I would like to put the DB into a database project to make installation better. Is there a way to import an exisiting database into a DB project? Thanks, EDIT: This is in VisualStudio 2010 btw... oops! ...

Disable deserialzation Database Project Schema

Recently we started working with Database project in Visual Studio 2010. I have added a reasonably large database to the solution and imported all objects. All warnings have been eliminated so it builds fine. The one thing that really annoys me is that when you open the solution, the database project will start to load the database sch...

Opening Visual Studio .dbp projects in MonoDevelop

Is there a way to open a Visual Studio 2008 database project (.dbp) in MonoDevelop? The project is in SVN, and needs to remain compatible with Visual Studio, because I'm not the only programmer who works on it. Is there an add-in or something for this that I'm missing/not aware of, or am I just going to have to stick with Visual Studio...

Visual Studio 2010 database deployment

I have a database project and a setup project in my Visual Studio 2010 solution. What's the simplest way to have this database created by the setup project? I was hoping it would be simple enough to just add the database project output to the setup package and that would magically work, but it doesn't look like it's that simple. Let me ...

How to run the VS2010 Sql Server project's deployment script

I'm confused, if I select the "Create a deployment script" option and 'deploy' the project, i get a SQL file that uses non-SQL syntax for variables like $database. How can I execute that deployment script? I'm pretty sure SQL Server management Studio doesn't understand the syntax. It seems to me the only way to actually deploy, is to...

Reference Class Library in Sql Server Clr Project

I am trying to reference a class library from a Visual C# SQL CLR Database Project but I get the error A reference to 'class library' could not be added. SQL Server projects can reference only other SQL Server projects. Is there a way to add the reference so I don't need to duplicate the code in that class library? EDIT - Solutio...

In the new Visual Studio 2010 SQL Server project type, what is the .dbproj.schemaview file for?

And should I add it to the source code repository? ...

Managing database scripts in your solutions

I usually create a solution folder in Visual Studio and put my DB scripts in them. I always use at least this set of scripts: Drop model Create model script User functions Stored procedures Static data (lookup tables) Test data (not deployed) Then I simply combine them and run against an SQL Server so I'm able to recreate the whole D...

Is it possible to open a Visual Studio 2008 Database Project with VS2008 Development Edition?

I have a Visual Studio 2008 Team System Development Edition installed and a solution that contains a Database Project. Is there any addon that I can install to make Studio load this project? ...

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

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.T...

How do I split apart a database project?

I've got three database projects. I'd like to have the base project contain common tables and other common objects. And then, I'd like to have the other two projects contain version specific objects that will work with different versions of an application, in other words, depending on the version of the application I will be interfacing ...

Error creating dbschema file with VSDBCMD.exe

I have a VS 2010 database project that needs a database reference to a Dynamics CRM database. I have remote access to the 32-bit Windows 2003 R2 SP2 server. My strategy is to create a .dbschema file and use it as the reference. The two best resources I have found for creating the .dbschema file are http://stackoverflow.com/questions/276...