Created
February 18, 2014 12:40
-
-
Save OliverRC/9070186 to your computer and use it in GitHub Desktop.
restore-db.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
USE master | |
GO | |
--Run to varify backup and view Logical and Physical Names | |
RESTORE FILELISTONLY | |
FROM disk = 'C:\<backfile>' | |
--Run once you are happy with everything | |
RESTORE DATABASE <databasename> | |
FROM disk = 'C:\<backfile>' | |
WITH RECOVERY, | |
MOVE 'LogicalName' TO 'C:\<logicalfielname>.mdf', | |
MOVE 'LogicalName_log' TO 'C:\<logicalfielname>.ldf' | |
GO | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment