Categories

Move my Microsoft SQL Server database to Plesk

< All Topics

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, or any current version, then launch the Microsoft SQL Server Management Studio program.
  2. Connect to your local SQL Server instance.
  3. In the Object Explorer section, right-click on Databases and choose New Database….
  4. 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.
  5. Right-click on this new database, hover over Tasks, then Restore. On this expanded area, click Database….
  6. On the pop-up window, select Device: and click .
  7. On the second pop-up window, click Add.
  8. Locate the .bak file you are restoring from your local computer files, then click OK.
  9. Click OK on the second pop-up window.
  10. Click Options under the Select a page column on the left.
  11. Check to Overwrite the existing database (WITH REPLACE).
  12. Click OK to restore the database.
  13. Click OK to dismiss the restored successfully pop-up window.
  14. Right-click on your database, hover over Tasks, then click Generate Scripts….
  15. In the Choose Objects step, deselect UsersDatabase Roles and Schemas.
  16. Continue following the prompts to generate a script.sql file onto your local computer.
  17. Connect to the new Plesk Database remotely by Selecting File, then Connect Object Explorer.
  18. Choose SQL Server Authentication, then enter the your new Plesk Database credentials.
  19. Click File, hover over Open and click File….
  20. Select your newly created script.sql file and click Open.
  21. Click Execute in the main panel to import the script.sql file into your new database.

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.

Previous Log in to phpMyAdmin in Plesk hosting
Next PHP upload limits on hosting accounts
Table of Contents