Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Visual Studio database project won't deploy to SQL Azure

I've ran into problem very similar to this. I have a .dbproj Visual Studio database project. It deploys just fine in SQL Server Express. Now I want to deploy it to SQL Azure - I change the connection parameters but deployment fails with the following text:

C:\Program Files\MSBuild\Microsoft\VisualStudio\v10.0\TeamData\Microsoft.Data.Schema.TSqlTasks.targets(120,5): Error Deploy01234: The target database schema provider could not be determined. Deployment cannot continue. Done executing task "SqlDeployTask" -- FAILED.

Is deploying .dbproj projects to SQL Azure supported? How do I make Visual Studio deploy the database into SQL Azure? What are other ways to achieve more or less the same results except recreating the database manually using Azure portal?

like image 515
sharptooth Avatar asked Jul 07 '11 13:07

sharptooth


People also ask

How do I connect Visual Studio to Azure SQL Database?

Open your project in Visual Studio. In Solution Explorer, right-click the Connected Services node, and, from the context menu, select Add Connected Service. In the Connected Services tab, select the + icon for Service Dependencies. In the Add Dependency page, select Azure SQL Database.

Can not connect to Azure SQL Server?

Steps to resolve persistent connectivity issuesSet up firewall rules to allow the client IP address. On all firewalls between the client and the Internet, make sure that port 1433 is open for outbound connections. Review Configure the Windows Firewall to Allow SQL Server Access for additional pointers.


2 Answers

If you are using Visual Studio 2012, you can now create a Database project and go to Properties - set its Target Platform to SQL Azure in Project Settings tab. Also you can configure the setting for dacpac output. Use this file to import directly as a new SQL Azure database.

like image 75
whihathac Avatar answered Sep 19 '22 16:09

whihathac


As far as I know, Database projects are still not supported by Windows Azure. You can deploy the project to a local SQL server and then use the "Generate Scripts" feature to port the database to SQL Azure. See this link.

like image 42
Jeremy Seekamp Avatar answered Sep 19 '22 16:09

Jeremy Seekamp