Questions tagged [schema-compare]

Tooling to compare a database-schema between databases, a live-database and a backup, or a database and a saved schema-definition.

121 questions
115
votes
13 answers

How to compare data between two databases in PostgreSQL?

Is it possible to compare two databases with identical structure? Let say that I have two databases DB1 and DB2 and I want to check if there is a difference in data between them.
sennin
  • 8,552
  • 10
  • 32
  • 47
30
votes
3 answers

SQL Server / SQL Azure Schema Compare

I'd like to compare schemas between SQL Server 2012 and SQL Azure, but I get this error in Visual Studio 2013: A project which specifies SQL Server 2012 as the target platform cannot be published to SQL Azure. Is it possible to compare these 2…
29
votes
2 answers

SSDT Schema Compare add blank lines to the schema files

I am using Schema Compare feature in Visual Studio 2017 to compare a database with database project (.sqlproj). If I apply some changes to the project it also adds blank lines to some of the schema files. After some investigation I found that I'm…
26
votes
11 answers

Can't update with schema compare

Up until today, I was able to use the Schema Compare feature in Visual Studio 2012 to update a database from a database project. But now, for one project I can do the compare, but the update button is greyed out. I am able to use other projects to…
Kris Harper
  • 5,672
  • 8
  • 51
  • 96
21
votes
4 answers

Generate Script button is disabled in visual studio after schema comparison

I would like to create a delta script from the database and my database project. The database as source and database project as target. The Update button works fine without any errors and my Error List contains only this warning: The login for the…
cSteusloff
  • 2,487
  • 7
  • 30
  • 51
19
votes
4 answers

Visual Studio 2013 SQL Schema Compare: Ignore Column Order

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…
Johnny Oshika
  • 54,741
  • 40
  • 181
  • 275
19
votes
1 answer

How to save SQL Schema Compare options in VS 2012?

VS 2010 had a way to save Schema Compare options so that they will be applied to all schema compares. VS 2012 seems to only persist the options for a single compare; once I close the window, all my options revert back to defaults. How do I persist…
roman m
  • 26,012
  • 31
  • 101
  • 133
17
votes
2 answers

Include but not Delete SQL Schema Compare

I am attempting to use SQL Schema Compare in Visual Studio 2013/15 and am running into the problem that discluding tables from delete removes them from being processed at all. The issue is that the tables it is trying to delete are customer made…
Dispersia
  • 1,436
  • 9
  • 23
13
votes
3 answers

How to ignore data loss warning while schema comparison?

While trying to update the database in SQL Schema Comparison in Visual Studio, I am getting the below error. (48,1): SQL72014: .Net SqlClient Data Provider: Msg 50000, Level 16, State 127, Line 6 Rows were detected. The schema update is terminating…
Kgn-web
  • 7,047
  • 24
  • 95
  • 161
13
votes
4 answers

Comparing schema by schema name in Visual Studio and SQL Server

I have a SQL Server database with the default schema and a custom schema. So for example two tables might be database.dbo.table1 and database.customschema.table2. I want to keep the "customschema" under source control, and I have loaded that into my…
9
votes
2 answers

Ignore "Source schema drift detected" Error, Continue With Update

I have a SQL Project in Visual Studio 2017 and I'm using SSDT to update my project from a SQL Database, looks like this: Often the database I'm using as my source is changing(often in small and irrelevant ways), when this occurs I cannot update my…
9
votes
1 answer

How to get past Visual Studio Schema Compare constantly showing differences?

I've created a database project in my solution in Visual Studio 2013 and imported a database from a SQL server. I then did a SQL compare; the source is the database, the destination is the database project. The compare results are showing that one…
MDD
  • 147
  • 9
8
votes
1 answer

Schema compare - Unexpected exception caught during population of source model: Object reference not set to instance object

I've been running a schema compare in a database project in Visual Studio 2017, when I do this I get the following message in the Error List tab: Unexpected exception caught during population of source model: Object reference not set to instance…
d219
  • 2,707
  • 5
  • 31
  • 36
7
votes
3 answers

Visual Studio schema compare can't find generated script

I am performing SQL Server schema comparison using Visual Studio 2017. I am pressing on "Generate script" button of Schema Compare utility and see the message "Update scripts generated successfully" However, I am unable to see the generated…
7
votes
1 answer

How to make 'Schema Compare' of Database->SQL Project respect SQL-CMD Variables

I have a Visual Studio 2013 solution with 2 SQL Projects DB1, DB2. DB1 has a stored procedure that references DB2. If I use a .dacpac and synonyms in procedures SELECT * FROM [$(DB2)].[dbo].[Table1] then Compare Schema from Database to the SQL…
1
2 3
8 9