MS SQL Restore a database on your Windows VPS
From Hostek.com Wiki
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.
- Go to Start--->All Programs--->Microsoft SQL Server--->SQL Server Management Studio
- Expand Databases
- Click on New Query
- Run the following code:
ALTER DATABASE [DB_NAME_HERE] SET SINGLE_USER WITH NO_WAIT
Replace [DB_NAME_HERE] with the actual database name
- Click Execute
- Under databases, right click on the database. Select Tasks--->Restore--->Database
- Select the "From Device" button
- Click on the "..."
- Click on Add
- Navigate to your backup file and select it
- Click on Options on the far left.
- Select Overwite the existing database
- Click into the Restore As path
- Add an extra \ to each \ in the path. For example C:\Backup\MSSQL\Backups would become C:\\Backup\\MSQL\\Backups
- Repeat the above step for the Log path as well
- Click Ok
- Once the restore is complete, open New Query again
- Run the following code:
ALTER DATABASE [DB_NAME_HERE] SET MULTI_USER WITH NO_WAIT
Replace [DB_NAME_HERE] with the actual database name
- Click Execute
Your database has now been restored and set back to multi-user mode.