Rate this article :
3.3/5 | 3 opinion
This article was useful to you ?
Yes
No
Vous avez noté 0 étoile(s)
Sommaire
Procédure
The version of SQL Server currently used on our servers is version 2012. If you started your website locally with a more recent version, you may need to migrate your database to the 2012 version in order to import it into your hosting package from your Plesk control panel.
This documentation will explain how to do this.
The error message you may encounter when importing a SQL Server database occurs because the SQL Server database files (*.mdf, *.ndf and *.ldf) and backups are not backward compatible. Backward compatibility is the reason why we cannot restore or join a database created from a higher version of SQL Server to a lower version of SQL Server. However, there are a few options that can help us downgrade the database from a higher version of SQL Server to a lower version of SQL Server. These options include:
In this tip, we will use the Script Generation Wizard in SQL Server Management Studio.
1. Script the database schema and data in the higher version of SQL Server using the Script Generation Wizard in SSMS.
2. Connect to the lower version of SQL Server and run the SQL scripts generated in the previous step to create the database schema and data.
For the purposes of this example, we will be migrating the "BDDLWS" database.
Script the "LWS Trial" database schema on the instance above SQL Server 2012 (LWS-HOTLINERSQLEXPRESS) using the Generate Scripts in SSMS wizard.
In Object Explorer, connect to your SQL Server instance (LWS-HOTLINER), right-click on your database (BDDLWS), expand Tasks and choose"Generate Scripts...".
This launches the Generate and publish scripts wizard. Click Next to skip the introduction screen and go to the Choose objects page.
On the Choose objects page, choose the "Script the entire database and all database objects" option, then click Next to go to the "Define scripting options" page.
On the Define scripting options page, specify the location where you want to save the script file, then click the Advanced button .
In the Advanced Scripting Options dialog box ,
and set Data Types to Script for Schema and Data - this last option is essential as it generates data by table.
Once you have done this, click OK to close the Advanced Scripting Options dialog box and return to the Set Scripting Options page. From the Set Script Options page, click Next to continue to the Summary page.
After reviewing your selections on the Summary page , click Next to generate scripts.
Once the scripts have been successfully generated, click Finish to close the Generate and Publish Scripts wizard .
Step 2:
Connect to the SQL Server 2008 R2 instance (IITCUK \ SQLSERVER2008), then run the SQL scripts generated in step 1 to create the OUTLANDER database schema and data.
In Object Explorer, connect to IITCUK \ SQLServer2008 , then in SQL Server Management Studio, open the SQL Server script you saved in step 1.
Edit the script to specify the correct location for the OUTLANDER database data and log files. Once you have done this, run the script to create the OUTLANDER database on the IITCUK \ SQLServer2008 instance.
After successful execution, refresh the database folder in the Object Explorer. As you can see from the following image, the OUTLANDER database has been successfully downgraded.
Remarks
There are a few points to bear in mind when using this approach.
Below is a list of all the script options. If you click on an item, the lower part of the screen gives you a short definition of the option.
Next steps
Conclusion:
You are now ready to migrate your Sql Server database to an earlier version. Don't hesitate to contact our technical department via an incident ticket if you have any questions.
Rate this article :
3.3/5 | 3 opinion
This article was useful to you ?
Yes
No
1mn reading
How do I create a database in Plesk?
0mn reading
How do I create an ODBC link in Plesk?
0mn reading
How do I export a database to Plesk?
0mn reading
How do I install myLittleAdmin on Plesk?