Moving MS SQL Databases to Plesk from Web/Classic Hosting
Print this Article
Last Updated:
December 30, 2014 3:35 PM
To move MS SQL databases from Classic or Web shared hosting to Plesk requires quite a few steps. The process is long, but not that daunting. If you follow the steps, you should be able to move your database without much issue.
We've broken out the process into the following subsections:
Getting the Old Database's Information
Moving the Backup into SQL Server Management Studio
- Download and install SQL Server Management Studio (SQLManagementStudio) and SQL Server Express (SQLEXPR) from Microsoft here.
- Launch SQL Server Management Studio.
- From the File menu, select Connect Object Explorer...
- In the Server name field, type Localhost\SQLEXPRESS.
- Click Connect.
- In the Object Explorer window, right-click Databases, and then select Restore Database.
- In the Source section, select Device, and then click ...
- Click Add, locate the
BAK
file, and then click OK. - Click OK.
- Click OK.
Converting Your BAK into a SQL Dump
- Click + next to Databases.
- Right-click the database you restored.
- From the Tasks selection, select Generate Scripts...
- On the Generate and Publish Scripts wizard that displays, click Next to advance past the Introduction.
- Select Select specific database object.
- Select only Tables, Views, and Stored Procedures.
- Click Next to advance past Choose Objects.
- Note the File name where you're saving the new
SQL
file. - Next to Save to file, click Advanced.
- From the Types of data to script menu, select Schema and data.
- Click OK.
- Click Next to advance past Set Scripting Options.
- Click Next to advance past Summary.
- Click Finish.
Moving Your SQL Dump to Plesk
- Create a new MS SQL database in Plesk (more info). We recommend using the same database name as your old database.
- Note the Database server that displays.
- Open your
SQL
file, which should open in SQL Server Management Studio. - Copy all of the contents from the file that display.
- From the File menu, select Connect Object Explorer...
- Complete the following fields, and then click Connect:
Field What do... Server name Enter your Database server. Authentication Select SQL Server Authentication. Login Enter your database's username Password Enter your database's password - Under the remote MS SQL server you connected to, click + next to Databases.
- Right-click the database you created in Plesk.
- Select New Query.
- Paste the contents of your
SQL
file into the window. - Click Execute.
Executing the query can take a few minutes. Once it's done, your database has been moved to your Plesk account.