Published on

December 31, 2015

Downgrading SQL Server: Moving Data from Higher to Lower Version

As a SQL Server user, you may encounter situations where you need to move data from a higher version of SQL Server to a lower version. However, it’s important to note that downgrading from a higher version to a lower version is not directly supported in SQL Server. In this article, we will explore the reasons behind this limitation and discuss alternative approaches to move your data.

The Incompatibility Issue

When you attempt to restore a database backup from a higher version of SQL Server onto a lower version, you may encounter the following error message:

Msg 3169, Level 16, State 1, Line 1
The database was backed up on a server running version 13.00.0801. That version is incompatible with this server, which is running version 12.00.4213. Either restore the database on a server that supports the backup, or use a backup that is compatible with this server.
Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.

This error message clearly indicates that there is no direct way to downgrade a database from a higher version to a lower version. The reason behind this limitation lies in the fact that when an instance of SQL Server is upgraded, not only do the binaries for the database engine change, but the schema level for the databases also changes. Therefore, it is not possible to attach a database with a higher schema level to an instance running a lower version of SQL Server.

Alternative Approaches

Although downgrading a database from a higher version to a lower version is not possible, there are alternative approaches to move your data. One possible approach is to manually export and import the data using the following steps:

  1. Create an empty database on the target server.
  2. In SQL Server Management Studio, expand Databases, right-click on the database, point to Tasks, and then click Generate Scripts.
  3. Follow the steps in the wizard to script the database objects.
  4. On the Choose Objects page, select “Script entire database and database objects”.
  5. On the Set Scripting Options page, select “Save scripts to a specific location”.
  6. Select the Advanced button; under “Types of data to script”, select “Schema Only” and under “Script for server version”, select the appropriate version of SQL Server.
  7. Click on Next and finish to complete the process.
  8. Now you can use the generated script file and execute it against the target SQL Server instance to create the complete database schema without data.

To move the data, you have a few options:

  • Script out the data exactly as described in the previous steps, but this time select “Types of data to script” as “Data Only”.
  • Script out the data for each object individually instead of the complete database if you have a large database.
  • Use the Bulk Copy Program (BCP) to export the data into files and then import the data back into the tables on the target server using BCP.

These alternative approaches allow you to move your data from a higher version of SQL Server to a lower version, albeit with some additional effort and manual steps involved.

While these methods provide a way to move your data, it’s important to note that they may not be suitable for all scenarios. It’s always recommended to plan your database upgrades and downgrades carefully to avoid compatibility issues and ensure a smooth transition.

Do you know any more ways to move data from a higher version of SQL Server to a lower version? Share your thoughts and experiences in the comments below!

Click to rate this post!
[Total: 0 Average: 0]

Let's work together

Send us a message or book free introductory meeting with us using button below.