I tried to compare two different databases objects/schema in ssdt visual studio 2013. Both the databases have similar tables. while comparing all the tables are not detected. what might be the reason ? can some one help me on this ?
Most likely a lack of primary keys (maybe unique keys/constraints). If you need more flexibility, Red-Gate's SQL Compare has more options to define columns to use in the case that there aren't any defined unique constraints.
Related
With SQL DB projects in Visual Studio, I can easily right click on table or column names and it provides an option to rename them, and then provides an opportunity to apply the name change to all other SPs, views etc which reference that table/column. However, with SQL DataWarehouse tables, this option does not seem to be available. Does anyone know if I am missing something, or if there is a workaround to help refactor the code?
Thank you.
I haven't needed to edit reports in several months, so I'm not sure specifically when the below behavior changed. I'm on Visual Studio 2015 Update 1 Professional with the latest version of SSDT as of this post (April 2016, 14.0.60413.0). The situation is the same in Visual Studio 2013 Update 5.
I have a database with a ton of information in it for various products. I'm trying to use SSDT (report designer) in VS to filter down to only retrieve a single result for a report on a given product in the table, but this doesn't appear to be possible.
In previous versions of SSDT in Visual Studio, I was able to right-click a dataset and edit the query manually. I would SELECT the columns I wanted, then I could add my own WHERE clause to filter by a report parameter. I cannot do this anymore--the options no longer exist. I can edit the query manually, but only at the level of the data source. That isn't helpful because the data source has no concept of a parameter to filter by, only the report does. This MSDN article is incorrect here, see the screenshot below.
What is the correct way to retrieve only a single result for (or filter in general) a given dataset in SSDT/Visual Studio report designer?
Dataset properties (field names redacted):
There are only two ways in which to retrieve only a single result.
Within SQL Server restrict your data using a WHERE clause or similar concept (INNER JOIN etc etc)
within SSRS restrict your data using a parameter
These are the only methods.
I am looking to compare two databases using the Data Compare tool in Visual Studio. I've found a number of articles on how to do that, but I cannot get to the Data menu they are referring to in all those articles.
I want to know if there is a way to turn the data compare feature on in VS, so that I can actually see the Data menu and then proceed.
I found that the way to do data compare in Visual Studio 2013 is by using:
Tools->SQL Server->New Data Comparison/New Schema Comparison.
In Visual Studio 2013, is there a way to ignore column ordering when doing a Schema Compare? I see that this feature was removed from Visual Studio 2012 (according to this: https://stackoverflow.com/a/13848952/188740), but I'm hoping it was brought back in version 2013.
Here's a quick visual to illustrate what I'd like to ignore:
As described on this blog post, Ignore column order is now an option in SSDT version 17.0, which is compatible with Visual Studio 2015.
If you’ve ever had to deal with accidental data
motion when putting a column in the middle of a table definition,
you’ll know how hard this can be to spot and manage. In this release
you can now check the “Ignore Column Order” option in the Advanced
Publish Options. This will append new columns to the end of an
existing table rather than altering the table structure to add the
column in its listed position.
You can find the setting by going into the Advanced... button section of your publish profile, as well as in the Advanced... button section of the database project properties' Debug tab.
You can also achieve the same effect by adding the following element to your publish.xml file:
<IgnoreColumnOrder>True</IgnoreColumnOrder>
Unfortunately I do not know of a way to have this work in Visual Studio 2013, but hopefully you have upgraded to a newer version of Visual Studio by now :)
Ignore column order is now available in VS2015.
Additionally, for relational and Azure SQL databases SSDT 17.0 GA includes a highly requested improvement to ignore column order in upgrade plans as well as numerous other bug fixes.
See: https://blogs.msdn.microsoft.com/ssdt/2017/04/19/announcing-the-general-availability-ga-release-of-ssdt-17-0-april-2017/
The 'Ignore column order' setting is not available in visual studio 2013. There are Tentive to reintroduce this option in the future.
Sources: Microsoft
This feature is also available in Azure Data studio -> Schema Compare -> Ignore Column Order.
When using Visual Studio 2010 to update a typed dataset, it is updating the Insert command, but it simply deletes the Update and Delete commands.
I have the Generate Update commands set to true.
Any ideas why it isn't generating the other statements?
(This is a legacy app with lots of queries, so I can't just delete the Datatable and recreate it)
It is because the table didn't have the primary key set in SQL Server.