SQL Server / SQL Azure Schema Compare
Asked Answered
W

3

30

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.

enter image description here

Is it possible to compare these 2 database types?

Waaf answered 23/2, 2014 at 17:46 Comment(6)
The only way I've been able to do this is to import the SQL 2012 DB to a database project targetting SQL Azure, then compare the project to SQL Azure. Would love to know if there's a better way.Tempo
Thanks @AnthonyChu. I'll give that a try, but it does sound cumbersome. I hope someone can still share a more convenient way.Waaf
The way I do it is as described by Anthony, compare a database project and Azure. It is good practice to have your DB schema in the project and source control anyway.Councilor
@AnthonyChu, if you copy your comment to the answer box, I'll mark is as the accepted answer.Waaf
@Councilor Thanks. And good point regarding source controlling the schema. I don't think enough people do it. I do wish there was a way to compare an on-prem SQL Server DB to a SQL Azure DB in an adhoc manner though... Just being able to see the diff without ability to update would've been nice.Tempo
You can compare a local database to Azure using RedGate schema compare, but that costs extra $$Councilor
M
71

There actually is a non-cumbersome method to overcome this problem. Just open up the schema compare options and make sure the "Allow incompatible platform" box is checked

SQL Compare Options - General

Mcginnis answered 20/4, 2014 at 2:56 Comment(4)
Fantastic! That was the ticket.Waaf
Genius my friend, pure geniusDorty
Anyone want to post how to even get to Schema Compare Options?Corinnacorinne
This error can also occur if you are trying to migrate a database from SQL Server to Azure SQL Database using the tools available within Visual Studio SQL Server Object Explorer. In the Advanced button this option also exists.Oconnell
O
4

Need more reputation to comment, sorry for redundant answer: this window can not be found in VS options. Start comparison and click options button enter image description here

Oxyacetylene answered 14/9, 2015 at 23:26 Comment(0)
T
1

The only way I've been able to do this is to import the SQL 2012 DB to a database project targetting SQL Azure, then compare the project to the SQL Azure database.

Tempo answered 24/2, 2014 at 7:17 Comment(0)

© 2022 - 2025 — McMap. All rights reserved.