Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio 2013 Publish Database to Azure

I have created a new "Database" project in Visual Studio 2013. I have set the Target platform to "Windows Azure SQL Database". The project is nearly empty, with the exception of one .sql file to create a Schema.

When I try to publish the project, it takes several minutes and ends with:

Creating publish preview... Failed to import target model [database_name]. Detailed message Unable to reconnect to database: Timeout expired. The timeout period elapsed prior to completion of the operation or the server is not responding.

I have tested the connection string, and it works.

What do I need to do to publish to Azure? Thanks.

like image 729
p07r0457 Avatar asked Sep 27 '14 01:09

p07r0457


2 Answers

Like Hesham mentioned in the comments, I also had this issue with the new Basic tier of Azure SQL Database. Switching the tier to Standard S0 size fixed the issue. So if you're having issues with the Basic tier, try scaling up to publish, then scale back down when you're finished.

like image 195
Paul Avatar answered Oct 01 '22 18:10

Paul


Check this answer from MSDN forum, worked with me perfectly!

In order to change the command timeouts used in Visual Studio 2013 you will need to change the following registry setting:

HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\12.0\SQLDB\Database\QueryTimeoutSeconds

Source:

http://social.msdn.microsoft.com/Forums/sqlserver/en-US/7e869f10-529b-41af-b54f-709a420308f6/publish-database-to-a-new-basic-scale-db-from-vs2013-times-out?forum=ssdsgetstarted

like image 28
Hesham Avatar answered Oct 01 '22 17:10

Hesham