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?

abatishchev
  • 98,240
  • 88
  • 296
  • 433
Johnny Oshika
  • 54,741
  • 40
  • 181
  • 275
  • 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 Feb 23 '14 at 22:36
  • 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 Feb 24 '14 at 04:24
  • 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 Feb 24 '14 at 05:46
  • @AnthonyChu, if you copy your comment to the answer box, I'll mark is as the accepted answer. – Johnny Oshika Feb 24 '14 at 06:34
  • @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 Feb 24 '14 at 07:22
  • You can compare a local database to Azure using RedGate schema compare, but that costs extra $$ – Craig Feb 24 '14 at 09:47

3 Answers3

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

SliverNinja - MSFT
  • 31,051
  • 11
  • 110
  • 173
Corillian
  • 907
  • 7
  • 12
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

Atchitutchuk
  • 174
  • 5
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.

Anthony Chu
  • 37,170
  • 10
  • 81
  • 71