Windows Hosting (Plesk) Help

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.

  1. Download SQL Server 2017 Express, then launch the Microsoft SQL Server Management Studio program.
  2. Connect to your local SQL Server instance. Instructions for configuring this can be found here.
  3. SQL Server Connection

  4. In the Object Explorer section, right-click on Databases and choose New Database....
  5. 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.
  6. New Database

  7. Right-click on this new database, hover over Tasks, then Restore. On this expanded area, click Database....
  8. Restore Prompt

  9. On the pop-up window, select Device: and click ....
  10. On the second pop-up window, click Add.
  11. Locate the .bak file you are restoring from your local computer files, then click OK.
  12. Database Add

    Note: If the folder you are pathing to doesn't appear, simply move the file to a folder that the program can access.

  13. Click OK on the second pop-up window.
  14. Click Options under the Select a page column on the left.
  15. Check to Overwrite the existing database (WITH REPLACE).
  16. Click OK to restore the database.
  17. Click OK to dismiss the restored successfully pop-up window.
  18. Right-click on your database, hover over Tasks, then click Generate Scripts....
  19. Database Script

  20. In the Choose Objects step, deselect Users, Database Roles and Schemas.
  21. Continue following the prompts to generate a script.sql file onto your local computer.
  22. Connect to the new Plesk Database remotely by Selecting File, then Connect Object Explorer.
  23. Choose SQL Server Authentication, then enter the your new Plesk Database credentials.
  24. Click File, hover over Open and click File....
  25. Select your newly created script.sql file and click Open.
  26. Click Execute in the main panel to import the script.sql file into your new database.
  27. Database Execute

Next step

More info

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.