From: Dan on
Hi SQL Gurus,
I am still learning SQL Server.
I know how to detach and attach databases, also know how to backup and
restore databases.

I have a question and curious to know the answer.
If our SQL Server crashes and if we have a copy of MDF and LDF, can we still
restore it or attach it to a new server?

Thanks, Dan


From: Plamen Ratchev on
Yes, you can attach a database from the MDF & LDF files:
http://msdn.microsoft.com/en-us/library/ms187858.aspx
http://msdn.microsoft.com/en-us/library/ms176061.aspx

--
Plamen Ratchev
http://www.SQLStudio.com
From: Dan on
Thanks Plamen for your quick reply.
You mean it is possible even if we did not detached it first?
I am going to try it now.

Dan

"Plamen Ratchev" <Plamen(a)SQLStudio.com> wrote in message
news:Mpudnazr_ewIN_TWnZ2dnUVZ_jBi4p2d(a)speakeasy.net...
> Yes, you can attach a database from the MDF & LDF files:
> http://msdn.microsoft.com/en-us/library/ms187858.aspx
> http://msdn.microsoft.com/en-us/library/ms176061.aspx
>
> --
> Plamen Ratchev
> http://www.SQLStudio.com


From: Jay on
I would suggest that you make copies of the files, as is, before doing
anything.

Then, attach the copies.


"Dan" <Dan(a)nospaml.com> wrote in message
news:uUw$otQpKHA.2076(a)TK2MSFTNGP05.phx.gbl...
> Thanks Plamen for your quick reply.
> You mean it is possible even if we did not detached it first?
> I am going to try it now.
>
> Dan
>
> "Plamen Ratchev" <Plamen(a)SQLStudio.com> wrote in message
> news:Mpudnazr_ewIN_TWnZ2dnUVZ_jBi4p2d(a)speakeasy.net...
>> Yes, you can attach a database from the MDF & LDF files:
>> http://msdn.microsoft.com/en-us/library/ms187858.aspx
>> http://msdn.microsoft.com/en-us/library/ms176061.aspx
>>
>> --
>> Plamen Ratchev
>> http://www.SQLStudio.com
>
>


From: Plamen Ratchev on
Yes, if you have the MDF and LDF files you can directly attach a database (assuming the files are not corrupt).

--
Plamen Ratchev
http://www.SQLStudio.com