29
votes

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?

3
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.Anthony Chu
Thanks @AnthonyChu. I'll give that a try, but it does sound cumbersome. I hope someone can still share a more convenient way.Johnny Oshika
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.Craig
@AnthonyChu, if you copy your comment to the answer box, I'll mark is as the accepted answer.Johnny Oshika
@Craig 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.Anthony Chu

3 Answers

70
votes

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

4
votes

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

1
votes

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.