-
Quickly Restore a SQL Server Database
If you frequently need to restore other peoples DB’s for testing here is a quick way to do so in Microsoft Sql Server.
- Open your Sql Server manager
- Create a new database (note the names and locations of the created files)
- Select the newly created DB and select Restore.
- Select from Device and choose the backup file to restore.
- Make sure you are overwriting the new database you created, usually quite apparent, look at the path.
- Check the log file and database name, modify where needed to the new database and log files (usually under logical name)
- Hopefully once set, you can restore the database, proceed hopefully, if not check the error and modify accordingly.
- Now you likely need to take ownership of the DB, run the following on the newly restored database to give it sa ownership:
exec sp_changedbowner 'sa','true'
<
Leave a reply