MS SQL Restore a database on your Windows VPS

From Hostek.com Wiki
Revision as of 20:19, 27 April 2013 by Brentb (Talk | contribs) (Created page with "==Restore a MS SQL database on your Windows VPS== On a Windows VPS, you can restore a database with MS SQL Management Studio. Please follow these steps to complete a restore...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Restore a MS SQL database on your Windows VPS

On a Windows VPS, you can restore a database with MS SQL Management Studio. Please follow these steps to complete a restore.

  1. Go to Start--->All Programs--->Microsoft SQL Server--->SQL Server Management Studio
  2. Expand Databases
  3. Click on New Query
  4. Run the following code:
ALTER DATABASE [DB_NAME_HERE] SET SINGLE_USER WITH NO_WAIT

Replace [DB_NAME_HERE] with the actual database name

  1. Click Execute
  2. Under databases, right click on the database. Select Tasks--->Restore--->Database
  3. Select the "From Device" button
  4. Click on the "..."
  5. Click on Add
  6. Navigate to your backup file and select it
  7. Click on Options on the far left.
  8. Select Overwite the existing database
  9. Click into the Restore As path
  10. Add an extra \ to each \ in the path. For example C:\Backup\MSSQL\Backups would become C:\\Backup\\MSQL\\Backups
  11. Repeat the above step for the Log path as well
  12. Click Ok
  13. Once the restore is complete, open New Query again
  14. Run the following code:
ALTER DATABASE [DB_NAME_HERE] SET MULTI_USER WITH NO_WAIT

Replace [DB_NAME_HERE] with the actual database name

  1. Click Execute

Your database has now been restored and set back to multi-user mode.