December 29, 2014 at 6:37 am
This is causing me a problem: LocalDb cannot restore a backup whose original data and log files are in different folders
This is a documented bug that hasn't been fixed by Microsoft.
Anyone have a workaround?
December 29, 2014 at 8:06 am
There's a workaround posted on the Microsoft Connect site you mentioned:
Gepost door JCBrown79 op 24-2-2014 om 4:44
1. Obtain the original file paths for the database using RESTORE FILELISTONLY
2. Using this information replicate the servers original folder structure.
Use a cmd tool such as SUBST [ http://technet.microsoft.com/en-us/library/bb491006.aspx ] to create virtual drives to replicate any drive letters used in the paths.
3. Use RESTORE but without the move option
4. Optionally: Detach, move files and then attach the restored database using desired paths
With a typical full backup LocalDB will be able to 'restore with move' the main data files but the backed-up data for log files is effectively NULL (so restore process simply creates an empty file), this means you should only have to fake the original log file path as move should work for files with backup data.
Inspired by Don Rohan reply on http://social.msdn.microsoft.com/Forums/windowsazure/en-US/ddea8f32-9b70-4ab8-a8db-1b2b31257593/cannot-restore-backup-to-localdb?forum=sqlexpress%5B/quote%5D
Viewing 2 posts - 1 through 1 (of 1 total)
You must be logged in to reply to this topic. Login to reply