FAQ Database Discussion Community


How to get reference to SSDT Database Project memory model from a Visual Studio Extension?

c#,visual-studio,visual-studio-extensions,ssdt,envdte
I'm trying to write a simple extension to the Visual Studio 2013, which should be able to list all tables in a SQL Server Database Project selected by an user of the extension. In order to do that, I need to access in-memory model of the DB project(s). But the...

Publish data with SSDT with new feature Build Contributors and Deployment Plan

sql,deployment,ssdt
I have a SSDT-project. When publishing a new version I want to publish/initialize some data motion in the database as well. This can be done with new feature, but how ? Announcing SQL Server Data Tools - June 2013

SSDT - How to: Incremental Updates?

sql-server,database,version-control,ssdt
I'm using the Database project in Visual Studio. In my scenario I have several customers using different versions of the database. For example, a customer who is in version 5 and another in version 7. I make available an update to version 8. The client version 5 should run the...

SSDT project not loading in visual studio 2012 for azure v12 database

.net,visual-studio-2012,azure,sql-server-2012,ssdt
SSDT project not loading in visual studio 2012 for azure v12 database schema provider. I googled the issue and found that following link would resolve the issue. http://blogs.msdn.com/b/ssdt/archive/2014/12/18/sql-server-database-tooling-preview-release-for-the-latest-azure-sql-database-update-v12-preview.aspx But, the update as per above link would work only on visual studio 2013 version. The actual error shown on trying to...

Database Reference in SSDT project with UDFs and Views

ssdt
Running into a weird issue. Assuming there are two database projects in one empty solution, Bart and Homer. Bart has been added as a Database Reference to Homer. Bart project defines a function: CREATE FUNCTION [dbo].[Message]() RETURNS NVARCHAR(255) AS BEGIN RETURN 'I am a value returned from another database' END...

Instead of column rename the project does column drop and column add

sql-server-2012,ssdt
I'm using SSDT to keep 2 databases synchronized. To do so, I have a database in Server1, a database in Server2 and an Schema in my project. I always make changes in Server1 database, and apply those changes in Server2 database. To do so, I use this workflow: Compare Server1...

How to change SSDT SQLCMD variable in pre-script?

sql-server,ssdt,sqlcmd
I am trying to find out how to change SQLCMD variable on the fly and I couldn't get it working. The goal is to get value from the SELECT and assign SQLCMD variable with that value. I've tried: 1) :servar myVariable SELECT @myVariable = 1 2) Tried to put the...

How to detect if column in SELECT can be null?

c#,sql-server,ssdt,dac,scriptdom
I'm using DacFx at design-time to create a C# data layer that is generated from the sql files in an SSDT database project. See my SqlSharpener project on Github to see what I'm talking about. I'm generating DTO objects that represent a row coming back from a SELECT statement of...

Visual Studio Create Script setting ignores Target Platform

visual-studio-2013,ssdt
For my database project, I put the tick on the Create script (.sql file) in my Project Settings. And Target Platform is set to SQL Server 2008. I have SQL Server 2012 installed on my machine. But the script its generating only works in SQL Server 2012, doesn't work in...

Creating a chart with SSDT to show how many jobs are running at all times

sql-server,charts,ssdt,sql-agent-job
Am trying to find away to plot a chart/graph to show how many jobs are running at any given time through the day, when jobs are starting is easy, but the idea is that it should show how long that it is taking along with this. I've got a Query...

How do I import the subset of a database into a visual studio 2013 project

visual-studio-2013,sql-server-2012,ssdt
I'm trying to upgrade a Visual Studio 2008 database project to a visual studio 2013 database project. I've been getting an error like [dbo].[trigger_name] has an unresolved reference to object [dbo].[table_name] From what I've read here, it seems to say that you can import a subset of a database somehow:...

Customise SQL Compare script output for Database Project

sql-server,visual-studio,ssdt
We've recently started using Database Projects in Visual Studio 2013. So far, it's great! There are some things we'd like to be able to customise and I'm not sure if it's even possible. We'd like to be able to have our post-deployment scripts appended to the SQL that is generated...

Visual Studio 2013 Build Error: Incompatible versions of SQL Server Data Tools and database runtime components are installed on this computer

sql-server,visual-studio-2012,visual-studio-2013,ssdt
I have Visual Studio 2012 and Visual Studio 2013 installed on my development machine. My SQL projects were created with VS2013 and they compile fine from Visual Studio, but they fail with the following message when I use MSBuild from the command line: Build Error: Incompatible versions of SQL Server...

visual studio sql data compare miss some table

sql-server,visual-studio,visual-studio-2013,ssdt
If i use the Data Compare Tool from Visual Studio to update the data. It missed one of my Detailtable. Has some one experience with this problem and know how to fix this? Visual Studio Info Microsoft Visual Studio Professional 2013 Version 12.0.31101.00 Update 4 Microsoft .NET Framework Version 4.5.51650...

Could not load file or assembly Microsoft.SqlServer.TransactSql

sql-server,azure,sql-azure,ssdt,sql-server-2014
Database project build failed. Error Details: Error: MSB4018: The "SqlBuildTask" task failed unexpectedly. System.IO.FileNotFoundException: Could not load file or assembly 'Microsoft.SqlServer.TransactSql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' or one of its dependencies. The system cannot find the file specified. File name: 'Microsoft.SqlServer.TransactSql, Version=12.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91' I also go through this answer on stackoverflow...

SSDT How to: Deploy .dacpac without losing custom client database objects?

sql-server,visual-studio,deployment,version-control,ssdt
I'm using the Database project in Visual Studio. In my scenario I have customers who intuitively customize the database I provide for them. For example, the client contracts a third party to create a customized system for them, then this third creates some tables in my database. I know I...