While connected to test server through SQL Server management studio (SSMS), i have to restore any particular database several times. It is time consuming to browse and select the backup file each time. If you have same problem then consider the restore of last backup by this way.
SQL Server provides option to restore last backup of any database on same server without knowing the name or location of backup file. This method can be used in test environments when excessive restores are being performed for same backup. Follow these steps
- Click on database on which backup is to be restored, or even you can do this by database which is to be restored. A database can be restored on itself. In my case it is last backup of AdventureWorks that i would restore on itself
- A frame would appear select database on which back is to be restored. As i mentioned before it may be any database on your server. Even you can create new one from here. Also select the database whose backup is required to be restored. Automatically list of last backups would appear in frame. Select the backup that is required to be restored. It may be full, differential or last backup.
- Also have a look at options pane of frame to configure any parameter.
At the end click the Ok button and last backup of selected database would be restored at required database.
This method would prevent you to keep track of last backup. But make sure that backup file is located at place where it was created.