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

155 questions
27
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,585
  • 6
  • 37
  • 75
22
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
  • 271
  • 2
  • 8
16
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
  • 681
  • 5
  • 20
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…
13
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…
Greg
  • 377
  • 1
  • 2
  • 11
12
votes
1 answer

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,064
  • 8
  • 24
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,627
  • 4
  • 31
  • 46
12
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
  • 223
  • 2
  • 9
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
  • 387
  • 1
  • 2
  • 8
11
votes
3 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,627
  • 4
  • 31
  • 46
11
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
  • 425
  • 2
  • 6
  • 12
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
9
votes
1 answer

Is there a way to easily validate that a SQL Script is compatible with a specific SQL Server version?

I am currently working on a project that needs to operate in different SQL environments. Most of my developers have SQL Server 2017. The application runs in SQL Azure, and the client has recently started running some environments using SQL Server…
Joe Brinkman
  • 191
  • 2
9
votes
1 answer

Storing CREATE EXTERNAL DATA SOURCE in a SSDT project without exposing the DATABASE SCOPED CREDENTIAL or MASTER KEY secret;

I have a SSDT project that deploys to Azure SQL DB. Recently I added an external table. This required an external data source as follows: CREATE EXTERNAL DATA SOURCE [data_warehouse] WITH ( TYPE = RDBMS, LOCATION =…
Justin Dearing
  • 2,627
  • 4
  • 31
  • 46
1
2 3
10 11