Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Restore SQL Data from MDB and LDF
Message
 
 
À
15/05/2015 08:45:46
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Autre
Versions des environnements
SQL Server:
SQL Server 2008 R2
Application:
Desktop
Divers
Thread ID:
01619851
Message ID:
01619854
Vues:
32
>>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.

Thank you for your input. Hopefully since I will be installing SQL Server (the same version) on the same computer, all paths will be the same. But like you said, it is never guaranteed to work.
"The creative process is nothing but a series of crises." Isaac Bashevis Singer
"My experience is that as soon as people are old enough to know better, they don't know anything at all." Oscar Wilde
"If a nation values anything more than freedom, it will lose its freedom; and the irony of it is that if it is comfort or money that it values more, it will lose that too." W.Somerset Maugham
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform