Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Schema Comparison times out

On doing a Schema Comparison in Visual Studio 2013 between a Database Project and an Azure SQL Database, I keep getting the following timeout errors:

Error 1 An error was received from SQL Server while attempting to reverse engineer elements of type Microsoft.Data.Schema.Sql.SchemaModel.ISqlUser: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.

Error 2 ExecuteReader requires an open and available Connection. The connection's current state is closed.

I am doing this on a Windows Server 2012 R2 virtual machine hosted in Azure.

  • The 1433 port in allowed in the firewall
  • The VM's IP is allowed on the SQL (Azure) Database Server

I can query the database just fine using Visual Studio's SQL Server Object Explorer, so I can be sure of my connectivity and account login.

Are there any other security settings which could be giving me these problems?

like image 290
Dave New Avatar asked Mar 19 '23 09:03

Dave New


1 Answers

You SQL Database Azure connection will timeout if you exceed your Database Throughput Unit (DTS) limit. This can easily happen if you are using the Basic Service Tier of the SQL Database on Azure.

The Basic service tier is capped at 5 Database Throughput Units (5 DTUs), so if you have a lot of comparisons, it may exceed the threshold. Try upgrading to Standard service tier of SQL Database, (which has a threshold limit of 10 DTUs), and see if the problem goes away.

To understand more about timeout expiring while publishing to SQL database, see the follow post:

http://blogs.msdn.com/b/sqlblog/archive/2014/11/13/timeout-expired-while-publishing-to-sql-database-via-ssdt.aspx

The timeout error message is misleading.

like image 138
mcolhoun Avatar answered Mar 24 '23 19:03

mcolhoun