Questions tagged [ssdt]

SQL Server Data Tools is a free component of the SQL Server platform and is available for all SQL Server users. It provides a modern database development experience for SQL Server versions 2005 and up as well as SQL Azure.

From the official description: Microsoft SQL Server Data Tools provides an integrated environment for database developers to carry out all their database design work for any SQL Server platform (both on and off premise) within Visual Studio. Database developers can use the SQL Server Object Explorer in VS to easily create or edit database objects and data, or execute queries.

Developers will also appreciate the familiar VS tools we bring to database development, specifically; code navigation, IntelliSense, language support that parallels what is available for C# and VB, platform-specific validation, debugging and declarative editing in the TSQL Editor, as well as a visual Table Designer for both database projects and online database instances.

SSDT can be downloaded from http://msdn.microsoft.com/en-us/data/hh297027

161 questions
34
votes
2 answers

Why is :r SQLCMD command marked as wrong in Post Deployment Script?

I have worked a couple of times with post deployment scripts and always, intuitively used the build action "PostDeploy", because that is what it is. Now for the first time I try to follow the built-in instruction from the script's template to use…
Magier
  • 4,827
  • 8
  • 48
  • 91
23
votes
2 answers

Referencing system views in SSDT?

I've imported a database into SSDT containing a reference to a system view (specifically, sys.columns). The problem is, that I then get warnings about unresolved references when I build the project From what I've seen on MSDN forums, it looks like…
TomGough
  • 281
  • 2
  • 8
19
votes
1 answer

SQL Server - Adding non-nullable column to existing table - SSDT Publishing

Due to business logic, we need a new column in a table that is critical to ensure is always populated. Therefore it should be added to the table as NOT NULL. Unlike previous questions that explain how to do this manually, this needs to be managed by…
Elaskanator
  • 761
  • 2
  • 9
  • 23
15
votes
3 answers

"Unresolved reference to User" after importing as a VS DB project

I just imported an existing SQL Server 2008R2 production database into a VS 2013 database project. I now get a number of errors along the lines of Error SQL71501: User: [mydbuser] has an unresolved reference to Login [mydbuser]. I don't really need…
Greg
  • 407
  • 1
  • 3
  • 11
14
votes
3 answers

sqlpackage.exe ignoring BlockOnPossibleDataLoss?

I have a dacpac that has set the BlockOnPossibleDataLoss set to false, however the deployment is blocked when I run it with sqlpackage.exe, telling me "The column [a] is being dropped, data loss could occur." However when I use the exact same…
14
votes
3 answers

Schema Migration: SQL Server Data Tools vs Liquibase and Flyway

This might seem like a stupid question, but I've been looking into open source solutions for schema migration, namely Liquibase and Flyway. However, my boss told me that SQL Server Data Tools (SSDT) achieves the same job. I'm not sure if agree, but…
Neo
  • 465
  • 3
  • 6
  • 12
13
votes
3 answers

Option to uncheck all or invert selection in SSDT?

In SQL Server Data Tools (SSDT) after compared the schema, I want to update few changes of mine only (as red-circled in the screenshot). But there are many other changes are listed in the window, I need to manually uncheck all the other items. Is…
Arulkumar
  • 1,137
  • 9
  • 25
13
votes
2 answers

SSDT Schema Compare fails when comparing my DB Project to my Azure Server

I have a SQL Database project that I have built our enterprise DB on. It has deployed several times on internal and AWS hosted SQL servers using SSDT's Schema Compare tool. The problem when I post to Azure Hosted Win 2012 Server running SQL Ent…
Brian Webb
  • 232
  • 2
  • 10
12
votes
4 answers

How do I get SSMS to use the relative path of the current script with :r in sqlcmd mode like SSDT does?

If I have foo.sql and bar.sql in the same folder, foo.sql can reference bar.sql when run from SSDT in sqlcmd mode with :r ".\bar.sql". However, SSMS won't find it. Procmon shows SSMS is looking in %systemroot%\syswow64: How do I tell SSMS to look…
Justin Dearing
  • 2,717
  • 6
  • 36
  • 52
12
votes
3 answers

Excluding a specific table from a SSDT deploy

I have an existing database with everything in schema dbo. I have an SSDT project with objects I am adding to it with schema foo I have a table that looks like this in the project: CREATE table foo.a ( id INT NOT NULL CONSTRAINT…
Justin Dearing
  • 2,717
  • 6
  • 36
  • 52
11
votes
1 answer

SSDT Schema Compare doesn't work while a BULK INSERT is in progress

I'm working at a large ETL and DW project where we use TFS/source control together with both SSIS and SSDT. Today, I found out that while an SSIS package is performing a BULK INSERT into a database table, it is not possible to perform an SSDT Schema…
Dan
  • 397
  • 1
  • 2
  • 9
11
votes
3 answers

SSDT Drop and Recreate Tables when nothing has changed

We have a Visual Studio Database Project consisting of about 129 Tables. It is the primary database for our Internal Web Based CRM/Call Centre product, which is still under active development. We use the SSDT Publish from within VS to deploy to…
OJay
  • 371
  • 2
  • 11
11
votes
1 answer

How to prevent SSDT publishing from dropping columns

I want to create a publishing profile that DOES a complete schema comparison and publishing BUT does not drop any tables or any columns that have been removed between the old and new version. I am aware of the BLOCK possible data loss option in the…
Magier
  • 4,827
  • 8
  • 48
  • 91
10
votes
1 answer

Using a linked server with OPENQUERY in a database project

I have a SQL Server 2008 running a database I want to throw in TFS. Therefore I used a Visual Studio 2013 database project where I imported the DB. After fixing a bunch of errors I'm stuck with only one error left: In one view the devs used…
Chake
  • 191
  • 1
  • 1
  • 8
10
votes
3 answers

Publishing database changes with SSDT that include altering data types of columns

I have a SQL Server Data Tools (VS2012) project that's published automatically during the build process. A column was recently updated from an int to decimal(18,4). As a result of this change, the publishing fails with the error (49,1): SQL72014:…
Daniel Mann
  • 203
  • 1
  • 2
  • 7
1
2 3
10 11