Restoring to a Different Database

You can restore a database backup to a different database. The database you’re restoring to can be on the same server or a different server, and the database can be restored to a different name, if needed. These types of restores are common in development environments where a production backup is recovered on a development server or multiple copies of the same development database are restored to different database names for use by different groups.

Listing 14.7 shows the T-SQL RESTORE command you can use to create a new database named AdventureWorks2008_COPY from the backup of the AdventureWorks2008 database. Take note of the MOVE options that specify where the database files for the new AdventureWorks2008_COPY ...

Get Microsoft® SQL Server 2008 R2 Unleashed now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.