Mark
Mark

Reputation: 69

Importing Azure SQL database into Visual Studio 2013

I am setting up VS 2013 for development with Azure SQL Database (I am new to Azure). I have set up a database on Azure and a Solution on VS 2013. The local machine is Windows 8.1 Pro, with SQL server 2014 Express. I am trying to import the database on Azure into the VS solution. I have changed the Target platform on VS to “Microsoft Azure SQL Database”. I have checked that VS can see the Azure database by using “Test Connection” – all appears well.

When I start the Import Database, I get the following error:

You cannot import a 1025 database because you project’s target platform is set to 130. To learn more about changing your target platform and/or source database, or the supported database editions for specific target platforms, please refer to Import Schema help page.

I cannot find the help referred to in the error message. I have tried changing the target to SQL server 2014, no joy. Can anyone give me some pointers?

Upvotes: 4

Views: 1004

Answers (5)

Greg Gum
Greg Gum

Reputation: 37875

Importing from Azure into a Sql Server Project works in Visual Studio 2015 with no issues.

Upvotes: 0

Mikl X
Mikl X

Reputation: 1249

For this:

  1. Created the SQL project
  2. Set target to Azure SQL
  3. Instead of "Import" did "Synchronize"

Upvotes: 1

Mark
Mark

Reputation: 69

I was able to work around the problem by working from VS 2013 and creating the Db in VS and publishing to Azure following the tutorial:

https://azure.microsoft.com/en-us/documentation/articles/web-sites-dotnet-get-started/

I hope I will not need to import a Db in the future!

Thank you to all those that edited & answered. I hope to be able to return the favour.

Upvotes: 0

Eric Kang
Eric Kang

Reputation: 501

This issue could be SSDT version issue. Can you download and install the latest RTM or Preview version of SSDT from https://msdn.microsoft.com/en-us/library/mt204009.aspx

If you need to try out all GA and Preview features of Azure SQL DB, SSDT Preview would cover it. Otherwise SSDT RTM version will provide the stability.

Upvotes: 1

Randall
Randall

Reputation: 1521

The numbers refer to they type of sql installation, with 130 being 2014, and 1025 being the azure cloud. Exporting data from azure is a little more complicated than you would expect with a VM, because of the way SQL Azure works behind the scenes. First to literally answer your question here is the link to how to use the import export services so you can get the DB on your local 2014 install. However I imagine what you want to do is actually develop for that server without some painful import export process, which is why I think this link that talks about what tools to use might be more helpful.

Anyway, good luck, SQL azure is very much a product in it's infancy.

Upvotes: 0

Related Questions