0

Here's my current dilemma: I need to migrate the database, including the data, from SQL server version 13 to version 12. The source is on an Azure box and the destination is on my local box. I can't install SQL server 2016 on my local box; that isn't an option. How do I do this?

shiggity
  • 501
  • 4
  • 12

3 Answers3

0

It seems that the answer is in insert scripts, which I didn't realize was a thing. There's good information at How to generate an INSERT script for an existing SQL Server table that includes all stored rows?

Edit: Another answer says NOT to generate INSERT scripts to copy all the data from a DB. I tried it and it seemed to fail because of some truncation in the script itself (it ended up being over 11 GB). A developer I'm working with suggested the bcp utility (documentation at this link), which I have not yet tried.

Community
  • 1
  • 1
shiggity
  • 501
  • 4
  • 12
0

I would recommend you to use SQL Database Migration Wizard

EvertonMc
  • 373
  • 1
  • 10
  • Thanks, but this says "SQL Database Migration Wizard (SQLAzureMW) is designed to help you migrate your SQL Server 2005/2008/2012/2014 databases to Azure SQL Database"--I need to migrate the other way! – shiggity Dec 16 '16 at 19:26
  • Researched a bit - I'm not allowed "for security reasons" to connect to an Azure box from mine. It looks like this tool requires a direct connection. – shiggity Dec 16 '16 at 20:07
0

Can you try using SqlPackage to Export the Azure database?

I've recently done the opposite of you, exporting SQL Server 2012 databases to Azure SQL V12. I used a combination of SqlPackage and Visual Studio with SQL Server Data Tools.

Basically I made a SQL Project based on the source databases (SQL Server 2012 hosted), set the target platform to Microsoft Azure SQL V12 and fixed any errors and warnings that wasn't supported in Azure SQL V12.

I then did a schema compare between the source database and the SQL Project. With this I generated a script which I ran against a copy of the source database.

Lastly I used SqlPackage to make a .bacpac from the database I ran the script against, which I could then deploy to Azure.

If you do the opposite maybe it'll work. It is important that when working with Azure SQL that you have updated software.

Jonas
  • 146
  • 7