Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio database schema compare is very slow

We've been using Visual Studio 2017's SQL Server Schema Comparison for all our (SQL Server 2016) migrations and deployments.

However, recently, it has become very slow, taking hours to process. If we uncheck the "Tables" object, it goes quickly. But when tables are checked, it is stuck on "Initializing comparison..." for ages.

I've not been able to find anything online that has helped us. Any ideas?

Initializing comparison...

like image 928
Andrew van der Watt Avatar asked Nov 28 '17 08:11

Andrew van der Watt


People also ask

How do I compare two db schemas?

To compare database definitions. On the Tools menu, select SQL Server, and then click New Schema Comparison. Alternatively, right-click the TradeDev project in Solution Explorer, and select Schema Compare. The Schema Compare window opens, and Visual Studio automatically assigns it a name such as SqlSchemaCompare1 .

How does SQL schema compare to Visual Studio?

First, open the SQL Server Database project with visual studio, right-click on it, and choose compare schema as depicted. Then, we will select the source and target databases and provide a connection to those.


1 Answers

What seemed to work for us is that if you excluded tables (in Schema Compare Options --> Object types --> Application-scoped -- > Tables), it runs quickly.

After its runs initially, you can compare again with tables selected, and its fine.

With the exception of this, the Visual Studio database Schema Compare is an awesome tool.

like image 149
Andrew van der Watt Avatar answered Sep 23 '22 04:09

Andrew van der Watt