SQL database restore back to the same SQL Server without overwriting the original database when using the Data Protection for SQL client
Resolving the problem
The Data Protection for SQL will allow for a restore to an alternate location on the same SQL Server.
When using the Data Protection (DP) for SQL to restore a database to an alternate location (into a new database) on the same machine, both the RELOCATE and the RESTORE INTO parameters must be used.
The RELOCATE is used to determine what file on the hard drive will be used to hold the data. This will need to be changed to have a different name and/or location to be something different (test) than the production database.
The RESTORE INTO is used by the SQL Server to identify the database. This should be a new name so that the SQL Server will be able to differentiate between the production database and this second (test) copy of the database.
To use the Data Protection for SQL GUI client, the following steps can be used for this alternate restore.
1. Launch the DP SQL GUI.
2. Click on the Restore Databases tab.
3. Make sure that both boxes are checked for the Wait for Tape Mounts (for both the Restore and for File Information).
4. Depending on which database backup is being restored, it may be necessary to check the Show Active and Inactive box.
5. On the left-hand side, under SQL Servers, open the list to see the SQL Server and databases.
6. In the main restore window, select the database to be restored ( the box next to the database should be yellow and have a red check mark).
7. Right click on this selected database and 3 options will be displayed: Restore Into, Relocate, Standby Server Undo File.
8. Both the Restore Into and Relocate options will need to be configured.
Select the Restore Into and enter the alternate name for this database on the SQL Server.
Then select the Relocate, wait for the dialog box to appear that contains the information regarding the file location/name for the database backup and update these to be different than the existing database files. If the metadata containing this information must wait for a tape mount on the TSM Server, it may be some amount of time until the dialog box is populated. It is not possible to update the Relocate information until after the box has been filled in with this File Information metadata.
9. Then click the Restore button to complete the restore.