Move my Microsoft SQL Server database to Plesk
Using a script to import Microsoft SQL Server database backup files in our shared Plesk hosting platform requires a few extra steps to convert the .bak file into a .sql file. In the following steps we'll restore a file named DotNetNuke_41.bak after generating the backup file in Plesk.
Note: If you have direct access to the "live" database, you can connect to it with the SQL Server Management Studio and start with Step 14.
If you already have a .sql file ready to import, you can launch the SQL Server Management Studio and start with Step 17.
- Download SQL Server 2017 Express, then launch the Microsoft SQL Server Management Studio program.
- Connect to your local SQL Server instance. Instructions for configuring this can be found here.
- In the Object Explorer section, right-click on Databases and choose New Database....
- In the pop-up window, enter the Database name (it should match the database you plan to import) in the text field and click OK.
- Right-click on this new database, hover over Tasks, then Restore. On this expanded area, click Database....
- On the pop-up window, select Device: and click ....
- On the second pop-up window, click Add.
- Locate the .bak file you are restoring from your local computer files, then click OK.
- Click OK on the second pop-up window.
- Click Options under the Select a page column on the left.
- Check to Overwrite the existing database (WITH REPLACE).
- Click OK to restore the database.
- Click OK to dismiss the restored successfully pop-up window.
- Right-click on your database, hover over Tasks, then click Generate Scripts....
- In the Choose Objects step, deselect Users, Database Roles and Schemas.
- Continue following the prompts to generate a script.sql file onto your local computer.
- Connect to the new Plesk Database remotely by Selecting File, then Connect Object Explorer.
- Choose SQL Server Authentication, then enter the your new Plesk Database credentials.
- Click File, hover over Open and click File....
- Select your newly created script.sql file and click Open.
- Click Execute in the main panel to import the script.sql file into your new database.
Note: If the folder you are pathing to doesn't appear, simply move the file to a folder that the program can access.
Next step
- Use the Plesk File Manager to upload your files.
More info
- Use the Plesk Backup Manager to fully automate backups.
Note: As a courtesy, we provide information about how to use certain third-party products, but we do not endorse or directly support third-party products and we are not responsible for the functions or reliability of such products. Third-party marks and logos are registered trademarks of their respective owners. All rights reserved.