Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Restore SQL Data from MDB and LDF
Message
From
15/05/2015 08:45:46
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
 
General information
Forum:
Microsoft SQL Server
Category:
Other
Environment versions
SQL Server:
SQL Server 2008 R2
Application:
Desktop
Miscellaneous
Thread ID:
01619851
Message ID:
01619853
Views:
37
>I am about to restore my computer to factory settings. Which, I believe, will wipe out drive C:. Drive C: is where all SQL Server 2008 databases are stored. I cannot start SQL Server. So the only way I can "back up" the databases is copy them to an external drive.
>Will I be able to "restore" these .MDF and .LDF file on the SQL Server that I will install later? How?

Not sure that's actually possible, I've never had much success. The reason for that is probably that I've changed paths, changed server name or something, and it never matched. While a dbf header holds the relative path to a dbc, in case of SQL server all paths are absolute. Which is the reason why you can't just move files around even when you have a fully functioning server. You need to detach (which probably deletes the entries in master db and writes some self-referential stuff into the mdf itself) and then attach (and hope it works).

Since you can't do it now, you can only copy everything together, i.e. the whole set of folders where mdf and ldf files are, install from scratch using the same locations for everything, backup that (in case you end up with an unusable setup in the end), then stop SQL service, restore your backup, cross fingers, start service.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform