My online database server got crashed. Fortunatly we recovered the *.mdf and *.ldf files from the crashed hard dick.
Now I want to restore the database from *.mdf and *.ldf files on new sql server.
I did below procedure to attache the database from *.mdf and *.ldf files.
I copied the *.mdf and *.ldf files into current sql server data folder and ran the below script.
Are you sure that you have recovered the files correctly? e.g. not accidentally use a Text Copy instead of a Binary Copy or somesuch? If the files have been recovered from "undelete" or a tape dump of the whole disk (rather than file-by-file tape), or somesuch then there is a high possibility that the file is not "intact" - that said, files usually attach even with a large amount of damage (that can then be review with DBCC CHECKDB)
exec sp_Attach_Single_File_DB to attach the MDF file. It will create a new Ldf file.
Also have a look in books online for...
If these options don't help then you could save file use a utility called SQL Server Recovery Toolbox. It is a powerful tool for sql server recovery MDF file which I've heard a lot of good reviews. I hope it will help you. http://www.oemailrecovery.com/sql_recovery.html