VS2013 schema compare: "Source is unavailable" when running against SQL Server 2016 Express
Asked Answered
D

8

11

I'm trying to run a schema comparison using Visual Studio 2013.5 with SQL Server Data Tools 12.0.50730.0 against a SQL Server 2016 (13.0.300) Express database.

I can configure the source connection OK, and when I hit 'Test Connection' in the connection properties dialog it says "Test connection succeeded."

However, when I hit 'Compare' in the schema comparison window it says "Initializing Comparison..." for a few seconds, then "Source is unavailable: "

This only happens if I use a SQL Server 2016 as the source, other servers work fine.

Is this a bug?

EDIT: I have also tried using SSDT 14.0.50730.0 in VS2015 and I get the same error.

Dam answered 26/8, 2015 at 17:44 Comment(1)
What fixed it for me was just restarting Visual Studio.Pomeroy
P
5

SQL Server Data Tools support for SQL Server 2016 is now GA and the latest update through Extensions and Updates in VS2013 and VS2015 will resolve this issue for you. You can also download directly from this page for VS2015, and this page for VS2013.

Pettit answered 6/6, 2016 at 16:17 Comment(0)
O
6

In Visual Studio 2017 I had the same issue and the only solution that worked for me was:

Close Visual Studio, open it and try again :) It seems to be a caching issue. Another option is to rename the DB but that's not a nice way of workarounding this issue.

Okay answered 28/7, 2017 at 16:2 Comment(0)
P
5

SQL Server Data Tools support for SQL Server 2016 is now GA and the latest update through Extensions and Updates in VS2013 and VS2015 will resolve this issue for you. You can also download directly from this page for VS2015, and this page for VS2013.

Pettit answered 6/6, 2016 at 16:17 Comment(0)
S
4

I had this error. Once I changed the server name from "pcname" to its IP "192.168.1.xxx" it worked.

Subsellium answered 26/6, 2016 at 9:0 Comment(0)
I
1

The tools for SQL Server 2016, like the database engine itself, are still in preview. The July RTM release of SSDT doesn't include support for SQL Server 2016. You'll need to download and install the "SSDT June Preview" release from here: https://msdn.microsoft.com/library/mt204009.aspx

Insure answered 26/8, 2015 at 20:11 Comment(0)
P
1

I have found that using username@servername as the username for connecting will fix the issue when it happens against Azure databases. Not sure if this works for non-Azure. 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.

Pikeperch answered 8/8, 2016 at 16:8 Comment(1)
This is very important for Azure databases. Saved me tons of hours.Vendible
P
1

I was having the same problem connecting to AWS RDS instance. The only changes that I can tell caused the problem were upgrading to VS2015 and SSDT 14.0.61021.0

I added the following to the connection string and some combination of them fixed the problem:

;Connect Timeout=60;Encrypt=False;TrustServerCertificate=True;Persist Security Info=True

I figured this out by recreating the comparison then comparing the two .scmp files

Polaroid answered 13/12, 2016 at 16:14 Comment(1)
I also had a problem with AWS RDS DBs. The solution for me was to make sure the Server Name fields both ended in ,1433. For example: server-name.randomstring.us-east-1.rds.amazonaws.com,1433Glutamate
I
0

When I had this error message, the solution was to use a login that had the sysadmin server role.

Immigrant answered 6/6, 2016 at 8:34 Comment(0)
A
0

It seems to be a cache issue. I get it resolved by

  1. Connect to some other Database on the same server
  2. Compare schema against target project
  3. Remove history of your main database from the connections
  4. Restart Visual Studio
  5. Create connection with your main database and compare schema again

Hope it works for you!

Accountant answered 9/10, 2020 at 7:11 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.