SQL SERVER – Restoring SQL Server 2017 to SQL Server 2005 Using Generate Scripts

Let me answer the first question first – There is no way to backup and restore SQL Server 2017 to SQL Server 2005 with the help of any tools. In this blog post, we will learn about how we can generate scripts to achieve this task.

However, there is a small workaround if you really want to restore SQL Server 2017 to SQL Server 2005. Recently during Comprehensive Database Performance Health Check asked me a question that if there is any way they can restore one of their databases from SQL Server 2017 to SQL Server 2005. Let us see how I was able to do help my customer.

The only way we can restore SQL Server 2017 to SQL Server 2005 is to generate a script for Schema as well as data using SSMS. Let us see with the help of images, how we can do that.

First go to SSMS >> Database >> Right Click on it and go to Tasks >> Go to Generate Scripts…

Continue forward with the Generate and Publish Scripts Wizards.

Select the option to either select independent objects or select the entire database.

This is one of the most critical steps. Here you can specify for which version of SQL Server you are generating your scripts for.

Next, select the option of Schema and Data.

Now once again, you need to select necessary options over here. I usually enable all the options as the default selection does not script every single object in the database.

Once you hit OK. It will bring you to the summary screen. Over here click Next. Please note the location where it is going to generate the scripts.

Now the next screen will start generating schema and data.

That’s it. We are done!

Once you generate the script go to the location where you have saved the script and run that in SSMS. You will be successfully able to restore your database from SQL Server 2017 to SQL Server 2005.

 If you are familiar with any other method do let me know and I will be happy to publish that on this blog with the due credit.

Reference: Pinal Dave (https://blog.sqlauthority.com)

Menu
Exit mobile version