Migrating SQL Azure from Global to Mooncake

Source: Internet
Author: User

Before you encounter a problem, here's a note:

Because the two environments can basically be considered isolated, the migration process is basically only exported, imported (and officially recommended):

1. Export the database from global (extension Bacpac) to the BLOB. Done through the Azure Management interface (and, of course, through the azure command line, but it's easier to use the interface)

2. Copy the files from the global blob to the Mooncake blob. Can be downloaded manually, upload, if the file is large, you can also use the Azcopy command line to achieve server-side point-to-point replication.

3, on the mooncake through the BACPAC database import. Done through the Azure management interface

Precautions:

1, import, export, because the database resource consumption is very high (I set the DTU alarm rules, during the export of the DTU basically stay more than 95%), it is recommended to first put the database scale up. I've lifted the S1 level to the S2 level (DTU has risen from 20 to 50).

2, the export process will be very slow, to have patience (50DTU of the case, the measured export speed of about 7gb/hours, yes, the hour ...) )

3. This kind of import and export similar across two products will likely encounter problems (see below)

Although both global and mooncake are identified as V12 versions of the database (equivalent to SQL Server 2014), the build is likely to be inconsistent.

This error was encountered during this import:

"Error importing Database:could not the Read schema model header information from the package. The model version ' 3.5 ' is not supported "

The reason is that global is slightly newer than the mooncake version, which causes the file structure of the exported import to be incompatible

The solution is to first adjust some of the global database settings to mooncake consistent, for model version 3.5, the following T-SQL is executed:

ALTER DATABASE [dbname] SET  on

And then re-export ... (Yes, re-export .........) )

In fact, this issue is not related to azure, it is a SQL Server problem, before the model version 3.3 also appeared.

The search solution took a while, in fact there are two scenarios that are also feasible:

Scenario One: Import with the latest version of SSMs, which takes into account compatibility issues with older versions. I did download and install and started trying to import the database, but given the bandwidth from on-premises to Azure, I looked at the import speed and turned it off in despair ...

Scenario Two: Use some tools to dump all the data in the database directly into an SQL statement and then execute it. This method is theoretically feasible, but I don't even have the thought of trying ... Still a bandwidth problem

Reference Links:

Http://stackoverflow.com/questions/40516564/sql-azure-v12-bacpac-import-error-could-not-read-schema-model-header-informati

Http://stackoverflow.com/questions/36754023/sql-azure-v12-bacpac-import-error-the-internal-target-platform-type-sqlazurev1

Migrating SQL Azure from Global to Mooncake

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.