Restoring SQL DB, but to another DB name

mpeters

ADSM.ORG Member
Joined
Jan 8, 2008
Messages
21
Reaction score
0
Points
0
Hi all,

Apologies, this has been posted before, but a long time ago, so just wondered if it has become possible since.

Basically i'd like to restore a database on the SAME server, but with a different name, if possible using the TDP SQL client.

Anyone have any idea how to do this?

thanks
 
In the manual

This processes is described in the TDP manual for SQL but essentially this option is kind of hidden.

You need to select the database you are restoring (click the gray check box). Once that is checked you can then right click on it and it provides the options you are looking for.

You can rename the DB and also redirect the underlying files to which it is restored.

Rich
 
Here is what I do using the GUI

Redirecting A Database Restore To A Database With A Different Name:

Follow the steps in this section if you are redirecting a restore to a database of a different name.

For example, if the requestor wants the original database (Database) to remain intact and a copy of the database restored for comparison purposes (Database_06032008_RESTORE).



1. Click on the ‘Restore Databases’ tab.
2. Select the ‘Show Active and Inactive’ and ‘Wait for Tape Mounts for File Information’ checkboxes.
3. Selecting the ‘Show Active and Inactive’ option returns information on all backups within the retention period (not selecting this option will display only the most recent backup)
4. The ‘Wait for Tape Mounts for File Information’ is required if replacing an existing database
5. Expand the SQL Servers group.
6. Expand the server name to display a list of all databases.
7. Highlight the database being restored. The list of candidate backups is displayed in the right window.
8. Select the backup from which you need to restore by clicking the checkbox

9. Ensure the database being restored is selected and the correct backup selected.
10. Select the ‘Replace’ checkbox in order to replace an existing database.
11. Right-click on the selected backup, select ‘Restore Into’.
12. Enter the name of the database being restored to (i.e. Database_06032008_restore) and Click OK.
13. Right-click on the selected backup, select ‘Relocate’… it may take some time for TSM to retrieve the file information.
14. In the Relocate window, modify the physical file names of the files that will be restored … in this example, ‘_RESTORE’ is appended to the existing file names. Failure to complete this step will cause an error, as the restore will try to replace the original database files which are being used by SQL Server
15. Click OK.
16. Click the Restore button.
17. Monitor the progress window to confirm completion of the restore; respond to error messages accordingly.
 
Last edited:
Oh, brilliant. I'll give that a go. Thanks.
 
One thing though, you may need to create the database first... ie, restoring db Database, you may need to get your SQL guys to create a database called Database_06032008_restore, so that you can restore the db Database into it (or whatever the name you are going to use)
 
Just to say thanks to everyone for their advice. Tried this yesterday and works fine. Worth noting that for a differential restore, you have to perform the above steps for both the master and differential data, but that's fairly obvious anyway.

cheers!

M
 
Back
Top