SQL Server High-version data backup restored to the lower version

Source: Internet
Author: User

Recently encountered a problem:

You want to restore SQL Server high-backup data to a lower version of SQL Server, but it is not possible to directly restore the database in SQL Server, so after a series of consulting to summarize the available methods.

first of all, you have to have a high version of SQL Server you are going to operate on your computer, or you can connect to a database with a high version of SQL Server (which allows you to copy data later).

The second step is to open the database in the high-version database that you need to back up, and delete the logins or users that are associated with the database you backed up. Right-click Database, Task--build script. In the "Select objects" step of the build script, select "Script options for writing the entire database and all database objects." Set the Write use database script and schema qualified object name option to False in the advanced options in the Set scripting options for the build script and select Server Edition script as the version of your lower version of the database. Generates a script.

In the third step, create a new database in your lower version of the database (name casually) and open the SQL script. Delete all operations on the original database name in the script, dividing the database from the first alter operation into two parts, and performing the first part of the table operation on the new database.

The fourth step, right-click New Database----import data, set the data source to a higher version of the database, and set the target to the current database. Then choose to copy one or more charts. Select all the data tables, and then, in edit mappings, choose Enable identity insertion. Import data

The fifth step, and then the second part of the previous split SQL script, the database is indexed!

Ok. The recovery to this high-version SQL Server database was successful in the low-version SQL Server

Share a second case:

You want to restore data from a Sqlserver2014 backup to a lower version of SQLSERVER2008R2, but this is not a straightforward way to restore a database in SQL Server, and can be restored smoothly by the following methods.

SQL scripts that are generated by a high version are executed in the lower version, and the data can also be retained.

Step: Task-"Generate script-"

Next-Advanced, select the database version and script the data type as schema and data, you can preserve the data.

Proceed to the next step to complete.

Finally, in the lower version of SQL database:

Create a new database in the script, and then implement the SQL generated table structure and data.

Perfect Restore Success!

SQL Server High-version data backup restored to the lower version

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.