Database restore from mdf?

If you are having a problem using Vault, post a message here.

Moderator: SourceGear

Post Reply
Matt

Database restore from mdf?

Post by Matt » Tue Jun 08, 2004 9:52 pm

Hello,

The hard drive in my SQL server is dead. I don't have any backup files of the sgvault database, but I do have the MDF and LDF. Is there a way to cleanly restore the database from those files?

This is not a super-critical issue, as I do have backups of the actual source code. But it would sure be nice not to have to re-create my repositories and projects. I just did a fresh install of Vault on a new SQL Server. How dangerous would it be to just drop in the old MDF and LDF files for sgvault?

feeling lucky,
matt

jclausius
Posts: 3706
Joined: Tue Dec 16, 2003 1:17 pm
Location: SourceGear
Contact:

Post by jclausius » Wed Jun 09, 2004 7:17 am

Do you not have a Database backup? If so, just restore that backup.

Otherwise, you could try :

1) sp_attach_db

OR

2) if you didn't use the .ldf, sp_attach_single_file_db

OR

3) http://groups.google.com/groups?hl=en&l ... kmsftngp05

Report back how things go.
Jeff Clausius
SourceGear

Matt

Post by Matt » Wed Jun 09, 2004 10:44 am

Jeff,

Thanks for the quick reply. I'll let you know what happens when I try your suggestions. I'll be attempting the restore sometime this weekend.

Matt

Post Reply