Restore MS SQL database backup on a server

This tutorial will show you how to restore MS SQL database a backup on a new server.

I presume you have backup file already. (If you do not have one and you can backup on the old server with right-click on the database inside MS SQL Management Studio and then ‘Backup‘)

So, you have moved the backup file on the new server, and now we have to create a database where the backup will be restored.
Login to the MS SQL server expand ‘Databases’ section right-click and choose ‘New Database’.

Restore MS SQL database backup on a server

Type the database name and click OK.

Restore MS SQL database backup on a server

Now we have to create user for the database. For that expand the Security section and right-click on Logins and choose ‘New Login’.
This will open a new pane where you have to put username and to choose authentication as per your needs.
Do not forget to assign the correct database from the bottom.

Restore MS SQL database backup on a server

Now we are ready to restore database information from the backup. Locate the new database, right-click on it and choose ‘Tasks RestoreDatabase ‘¦’

Restore MS SQL database backup on a server

To select the source for restore check ‘From device’ and then the three dots button which will open ‘Specify Backup‘ pane. Click there ‘Add’ and locate the backup file that has to be restored.

Restore MS SQL database backup on a server

This will add the file to ‘Select the backup sets to restore‘ section and before clicking OK you have to check the check box under the restore section.

Restore MS SQL database backup on a server

No here you will need to run a specific query in order to fix the database user login.
The query string is the following:

Change ‘dbname’, ‘user’ and ‘loginname’ with the once you have created your database with.
Now to run it go to the database right-click and choose ‘New Query‘.

Restore MS SQL database backup on a server

Then paste the edited query in the field that will appear and click ‘Execute‘.

Restore MS SQL database backup on a server

Well that is it. Now you can start using the restored database.

Tags

Filed Under: MSSQL

Anthony Gee About the Author: Anthony G. is an IT specialist with more than 9 years of solid working experience in the Web Hosting industry. Currently works as server support administrator, involved in consultative discussions about Web Hosting and server administration. One of the first writers in the Onlinehowto.net website, now writing for Free Tutorials community - he is publishing tutorials and articles for the wide public, as well as specific technical solutions.

Leave a Reply