SQL Schema Comparison Error "Target is unavailable"

dave picture dave · May 26, 2016 · Viewed 27.7k times · Source

When comparing an SQLServer project in Visual Studio 2015 Update 2 against a database SQL Server 2012, it shows the error "Target is unavailable" or "Source is unavailable" when change the direction.

It used to work properly a couple of months ago. Is there any workaround? I couldn't find any.

Answer

Stacy Vicknair picture Stacy Vicknair · Aug 8, 2016

I have found that using username@servername as the username for connecting will fix the issue when it happens against Azure databases. I've had connections that have historically worked without doing this suddenly stop and then this has fixed it for me.

For instance, when using a login of mylogin and connecting to myserver.database.windows.net, if I instead use [email protected] as the username I won't get the "Source is unavailable" issue.