MSSQL Question:

Retro2001

Senior member
Jun 20, 2000
767
0
0
I'm trying to help a friend recover a MSSQL database from a hard drive that devolped bad sectors. I've got the .mdf for the database, but the .ldf was taken by the bad sectors. In browsing through the documentation, I've sorted out that I've got to execute the command AttachDBWithSingleFile, and I've sorted out the syntax for the command. The issue is, not knowing MSSQL well at all, is that I cannot sort out where / how to give the server that command. Any advice would be fantastic.

Thanks!

will
 

bunker

Lifer
Apr 23, 2001
10,572
0
71
Use query analyzer to issue the command. You need the SQL tools installed.
 

awal

Senior member
Oct 13, 1999
953
0
0
If your just trying to reattach the data file with out the transaction log (*.ldf) then you can do that graphically via Enterprise manager or command line in Query Analyzer. That AttachDBWithSingleFile is a api call for C+.
 

Retro2001

Senior member
Jun 20, 2000
767
0
0
If your just trying to reattach the data file with out the transaction log (*.ldf) then you can do that graphically via Enterprise manager or command line in Query Analyzer.

Can you expand a little bit on how to do this either way? Or, point me towards some documentation that explains the process to do the above.

Thanks!

will