Last active
July 12, 2016 01:02
-
-
Save eramella/99465d1125462096625251594751a510 to your computer and use it in GitHub Desktop.
Restore SQLExpress backup to a LocalDb
This file contains hidden or 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
-check file names first | |
restore filelistonly | |
from disk = 'c:\dev\EMS.2016-07-11.bak' | |
-Then restore filename to a local disk location of your choice (make sure the entire path is already created before running this) | |
restore database EMS | |
from disk = 'c:\dev\EMS.2016-07-11.bak' | |
with move 'EMS' to 'c:\dev\SQLData\EMS.mdf', | |
move 'EMS_log' to 'c:\dev\SQLData\EMS_log.ldf', | |
replace; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thank you Rob Prouse, he created this, see his blog at http://www.alteridem.net/2016/03/24/restore-a-sql-server-backup-to-localdb/